Lua接口/服务端/GetMissionParamEx:修订间差异
来自雪舞天龙知识库
跳到导航跳到搜索
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| (未显示同一用户的1个中间版本) | |||
| 第8行: | 第8行: | ||
<pre>GetMissionParamEx(sceneId, selfId, missionIndex, paramIndex, byteIndex)</pre> | <pre>GetMissionParamEx(sceneId, selfId, missionIndex, paramIndex, byteIndex)</pre> | ||
服务端脚本中共出现 | 服务端脚本中共出现 22 处调用,实参个数出现过:5 个(22 处)。 | ||
实现位于 <code>LuaFnTbl_Mission.h</code>。 | 实现位于 <code>LuaFnTbl_Mission.h</code>。 | ||
| 第20行: | 第20行: | ||
| 1 | | 1 | ||
| <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span> | | <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span> | ||
| 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code> | | 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code>(22 处)</span> | ||
|- | |- | ||
| 2 | | 2 | ||
| <code>selfId</code><br /><span class="lua-muted"><code>number</code></span> | | <code>selfId</code><br /><span class="lua-muted"><code>number</code></span> | ||
| 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。<br /><span class="lua-muted">脚本中的实参:<code>humanObjId</code> | | 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。<br /><span class="lua-muted">脚本中的实参:<code>humanObjId</code>(22 处)</span> | ||
|- | |- | ||
| 3 | | 3 | ||
| <code>missionIndex</code><br /><span class="lua-muted"><code>number</code></span> | | <code>missionIndex</code><br /><span class="lua-muted"><code>number</code></span> | ||
| 任务条目索引。<br /><span class="lua-muted">脚本中的实参:<code>misIndex</code> | | 任务条目索引。<br /><span class="lua-muted">脚本中的实参:<code>misIndex</code>(22 处)</span> | ||
|- | |- | ||
| 4 | | 4 | ||
| <code>paramIndex</code><br /><span class="lua-muted"><code>number</code></span> | | <code>paramIndex</code><br /><span class="lua-muted"><code>number</code></span> | ||
| 参数索引。<br /><span class="lua-muted">脚本中的实参:<code>3</code> | | 参数索引。<br /><span class="lua-muted">脚本中的实参:<code>3</code>(22 处)</span> | ||
|- | |- | ||
| 5 | | 5 | ||
| <code>byteIndex</code><br /><span class="lua-muted"><code>number</code></span> | | <code>byteIndex</code><br /><span class="lua-muted"><code>number</code></span> | ||
| 字节索引。<br /><span class="lua-muted">脚本中的实参:<code>0</code> | | 字节索引。<br /><span class="lua-muted">脚本中的实参:<code>0</code>(11 处)、<code>1</code>(11 处)</span> | ||
|} | |} | ||
| 第42行: | 第42行: | ||
返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>0</code>;<code>-1</code>。 | 返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>0</code>;<code>-1</code>。 | ||
== | == 调用示例 == | ||
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序: | |||
<pre>-- event/shimen/event_shimen_dali.lua | <pre>-- event/shimen/event_shimen_dali.lua | ||
GetMissionParamEx(sceneId, humanObjId, misIndex, 3, 0) | GetMissionParamEx(sceneId, humanObjId, misIndex, 3, 0) | ||
-- event/shimen/event_shimen_dali.lua | -- event/shimen/event_shimen_dali.lua | ||
GetMissionParamEx(sceneId, humanObjId, misIndex, 3, 1)</pre> | GetMissionParamEx(sceneId, humanObjId, misIndex, 3, 1)</pre> | ||
2026年10月27日 (二) 12:41的最新版本
返回任务参数中指定的字节。
Lua 调用
GetMissionParamEx(sceneId, selfId, missionIndex, paramIndex, byteIndex)
服务端脚本中共出现 22 处调用,实参个数出现过:5 个(22 处)。
实现位于 LuaFnTbl_Mission.h。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 脚本中的实参: sceneId(22 处)
|
| 2 | selfIdnumber
|
当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。 脚本中的实参: humanObjId(22 处)
|
| 3 | missionIndexnumber
|
任务条目索引。 脚本中的实参: misIndex(22 处)
|
| 4 | paramIndexnumber
|
参数索引。 脚本中的实参: 3(22 处)
|
| 5 | byteIndexnumber
|
字节索引。 脚本中的实参: 0(11 处)、1(11 处)
|
返回值
返回 1 个值。返回类型包括 number。明确的固定返回组合包括 0;-1。
调用示例
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序:
-- event/shimen/event_shimen_dali.lua GetMissionParamEx(sceneId, humanObjId, misIndex, 3, 0) -- event/shimen/event_shimen_dali.lua GetMissionParamEx(sceneId, humanObjId, misIndex, 3, 1)
注意事项
- 调用对象必须是当前场景中的有效玩家。