查看“︁Lua接口/服务端/GetMenPai”︁的源代码
来自天龙知识库
←
Lua接口/服务端/GetMenPai
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
__NOTOC__ <div class="lua-reference"> [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/角色属性与物品|角色属性与物品]] · [[Lua接口/服务端调用约定|调用约定]] <div class="lua-lead lua-rule">获取玩家当前所属门派ID</div> 同一接口的其他调用名称:<code>LuaFnGetMenPai</code>。 == Lua 调用 == <pre>GetMenPai(sceneId, selfId)</pre> 服务端脚本中共出现 320 处调用,实参个数出现过:2 个(320 处)。 实现位于 <code>LuaFnTbl_Attr.h</code> 第 3301 行,注册表第 307、839 行。 == 参数 == {| class="wikitable" ! scope="col" class="lua-w11" | 序号 ! scope="col" class="lua-w36" | 参数 / 类型 ! scope="col" | 说明 |- | 1 | <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span> | 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code>(320 处)</span> |- | 2 | <code>selfId</code><br /><span class="lua-muted"><code>number</code></span> | 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。<br /><span class="lua-muted">脚本中的实参:<code>selfId</code>(288 处)、<code>humanObjId</code>(18 处)、<code>nHumanId</code>(4 处)</span> |} == 返回值 == 返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>-1</code>。 == 脚本中的调用 == 以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。 <pre>-- event/dali/edali_0237.lua GetMenPai(sceneId, selfId) -- event/dali/edali_0287.lua GetMenPai(sceneId, nPlayerId) -- event/huashan/ehuashan_1.lua LuaFnGetMenPai(sceneId, nHumanId) -- event/huashan/ehuashan_1.lua GetMenPai(sceneId, killerId) -- event/huashan/ehuashan_1.lua GetMenPai(sceneId, PlayerId) -- event/huashan/ehuashan_4.lua LuaFnGetMenPai(sceneId, playerId) -- event/huodong/eTouximenpai_NPC_emei.lua GetMenPai(sceneId, humanObjId) -- event/piaomiaofeng/ai_zhuobufan.lua GetMenPai(sceneId, enemyId)</pre> == 注意事项 == * 调用对象必须是当前场景中的有效玩家。 * 调用前要求玩家处于可执行逻辑的状态(实现体断言 <code>pHuman->IsCanLogic()</code>);不满足时会记录断言,应先确认玩家当前状态。 </div>
返回
Lua接口/服务端/GetMenPai
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
创建账号
登录
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
搜索
工具
链入页面
相关更改
页面信息