|
|
| (未显示同一用户的4个中间版本) |
| 第1行: |
第1行: |
| __NOTOC__ | | __NOTOC__ |
| <div class="lua-reference" style="max-width:1200px;margin:0 auto;line-height:1.8;color:#29343a;font-family:Arial,'Microsoft YaHei',sans-serif;letter-spacing:0;overflow-wrap:anywhere;"> | | <div class="lua-reference"> |
| [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/生活技能与装备|生活技能与装备]] · [[Lua接口/服务端调用约定|调用约定]] | | [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/生活技能与装备|生活技能与装备]] · [[Lua接口/服务端调用约定|调用约定]] |
|
| |
|
| <div style="padding:14px 0;border-top:3px solid #287568;border-bottom:1px solid #dbe3e6;">查询Obj_Human生活技能等级 SceneID,HumanID,AbilityID</div> | | <div class="lua-lead lua-rule">查询Obj_Human生活技能等级 SceneID,HumanID,AbilityID</div> |
|
| |
|
| == Lua 调用 == | | == Lua 调用 == |
| <pre style="white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;padding:12px;background:#f5f7f8;border:1px solid #dbe3e6;">QueryHumanAbilityLevel(sceneId, selfId, AbilityID)</pre> | | <pre>QueryHumanAbilityLevel(sceneId, selfId, AbilityID)</pre> |
|
| |
|
| 服务端脚本中共出现 838 处调用,实参个数出现过:3 个(838 处)。 | | 服务端脚本中共出现 842 处调用,实参个数出现过:3 个(842 处)。 |
|
| |
|
| 实现位于 <code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Ability.h</code> 第 1361 行,注册表第 599 行。 | | 实现位于 <code>LuaFnTbl_Ability.h</code>。 |
|
| |
|
| == 参数 == | | == 参数 == |
| {| class="wikitable" style="width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;" | | {| class="wikitable" |
| ! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:11%;" | 序号 | | ! scope="col" class="lua-w11" | 序号 |
| ! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:36%;" | 参数 / 类型 | | ! scope="col" class="lua-w36" | 参数 / 类型 |
| ! scope="col" style="text-align:left;background:#edf3f2;padding:8px;" | 说明 | | ! scope="col" | 说明 |
| |- | | |- |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 1
| | | 1 |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">sceneId</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| | | <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 当前调用所在的场景 ID。<br /><span style="color:#657078;">脚本中的实参:<code style="white-space:normal;overflow-wrap:anywhere;">sceneId</code>(838 处)</span>
| | | 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code>(842 处)</span> |
| |- | | |- |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 2
| | | 2 |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">selfId</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| | | <code>selfId</code><br /><span class="lua-muted"><code>number</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。<br /><span style="color:#657078;">脚本中的实参:<code style="white-space:normal;overflow-wrap:anywhere;">selfId</code>(838 处)</span>
| | | 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。<br /><span class="lua-muted">脚本中的实参:<code>selfId</code>(842 处)</span> |
| |- | | |- |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 3
| | | 3 |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">AbilityID</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| | | <code>AbilityID</code><br /><span class="lua-muted"><code>number</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 生活技能编号。<br /><span style="color:#657078;">脚本中的实参:<code style="white-space:normal;overflow-wrap:anywhere;">ABILITY_ZHONGZHI</code>(148 处)、<code style="white-space:normal;overflow-wrap:anywhere;">ABILITY_ZHUZAO</code>(90 处)、<code style="white-space:normal;overflow-wrap:anywhere;">ABILITY_FENGREN</code>(72 处)</span>
| | | 生活技能编号。<br /><span class="lua-muted">脚本中的实参:<code>ABILITY_ZHONGZHI</code>(148 处)、<code>ABILITY_ZHUZAO</code>(90 处)、<code>ABILITY_FENGREN</code>(72 处)</span> |
| |} | | |} |
|
| |
|
| == 返回值 == | | == 返回值 == |
| 返回 1 个值。返回类型包括 <code style="white-space:normal;overflow-wrap:anywhere;">number</code>。明确的固定返回组合包括 <code style="white-space:normal;overflow-wrap:anywhere;">-1</code>。 | | 返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>-1</code>。 |
|
| |
|
| == 脚本中的调用 == | | == 调用示例 == |
| 以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。
| | 以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序: |
| <pre style="white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;padding:12px;background:#f5f7f8;border:1px solid #dbe3e6;">-- event/city/ecity_lifeskillstudy.lua | | <pre>-- event/city/ecity_lifeskillstudy.lua |
| QueryHumanAbilityLevel(sceneId, selfId, aid) | | QueryHumanAbilityLevel(sceneId, selfId, aid) |
|
| |
| -- event/liveabilityevent/elevelup_caibingshu.lua | | -- event/liveabilityevent/elevelup_caibingshu.lua |
| QueryHumanAbilityLevel(sceneId, selfId, ABILITY_CAIBINGSHU) | | QueryHumanAbilityLevel(sceneId, selfId, ABILITY_CAIBINGSHU) |
|
| |
| -- event/liveabilityevent/elevelup_caihuoshu.lua | | -- event/liveabilityevent/elevelup_caihuoshu.lua |
| QueryHumanAbilityLevel(sceneId, selfId, ABILITY_CAIHUOSHU) | | QueryHumanAbilityLevel(sceneId, selfId, ABILITY_CAIHUOSHU)</pre> |
| | |
| -- event/liveabilityevent/elevelup_caikuang.lua
| |
| QueryHumanAbilityLevel(sceneId, selfId, x713567_g_AbilityID)
| |
| | |
| -- event/liveabilityevent/elevelup_caiyao.lua
| |
| QueryHumanAbilityLevel(sceneId, selfId, x713568_g_AbilityID)
| |
| | |
| -- event/liveabilityevent/elevelup_daofa.lua
| |
| QueryHumanAbilityLevel(sceneId, selfId, ABILITY_DAOFA)
| |
| | |
| -- event/liveabilityevent/elevelup_diaoyu.lua
| |
| QueryHumanAbilityLevel(sceneId, selfId, x713569_g_AbilityID)
| |
| | |
| -- event/liveabilityevent/elevelup_fengren.lua
| |
| QueryHumanAbilityLevel(sceneId, selfId, x713565_g_AbilityID)</pre>
| |
|
| |
|
| == 注意事项 == | | == 注意事项 == |
首页 · 服务端接口 · 生活技能与装备 · 调用约定
查询Obj_Human生活技能等级 SceneID,HumanID,AbilityID
Lua 调用
QueryHumanAbilityLevel(sceneId, selfId, AbilityID)
服务端脚本中共出现 842 处调用,实参个数出现过:3 个(842 处)。
实现位于 LuaFnTbl_Ability.h。
参数
| 序号
|
参数 / 类型
|
说明
|
| 1
|
sceneId
number
|
当前调用所在的场景 ID。 脚本中的实参:sceneId(842 处)
|
| 2
|
selfId
number
|
当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。 脚本中的实参:selfId(842 处)
|
| 3
|
AbilityID
number
|
生活技能编号。 脚本中的实参:ABILITY_ZHONGZHI(148 处)、ABILITY_ZHUZAO(90 处)、ABILITY_FENGREN(72 处)
|
返回值
返回 1 个值。返回类型包括 number。明确的固定返回组合包括 -1。
调用示例
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序:
-- event/city/ecity_lifeskillstudy.lua
QueryHumanAbilityLevel(sceneId, selfId, aid)
-- event/liveabilityevent/elevelup_caibingshu.lua
QueryHumanAbilityLevel(sceneId, selfId, ABILITY_CAIBINGSHU)
-- event/liveabilityevent/elevelup_caihuoshu.lua
QueryHumanAbilityLevel(sceneId, selfId, ABILITY_CAIHUOSHU)
注意事项