Lua接口/服务端/GetMissionFlagEx:修订间差异

来自天龙知识库
跳到导航跳到搜索
雪舞​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
Waylee​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
 
(未显示同一用户的2个中间版本)
第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;">读取角色任务数据的标志位数值。</div>
<div class="lua-lead lua-rule">读取角色任务数据的标志位数值。</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;">GetMissionFlagEx(sceneId, selfId, bitIndex)</pre>
<pre>GetMissionFlagEx(sceneId, selfId, bitIndex)</pre>


服务端脚本中未检索到该接口的调用点(已检索 4244 个随包脚本)。
服务端脚本中未检索到该接口的调用点(已检索 4245 个随包脚本)。


实现位于 <code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Mission.h</code> 第 97 行,注册表第 104 行。
实现位于 <code>LuaFnTbl_Mission.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。
| 当前调用所在的场景 ID。
|-
|-
| 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。
| 当前场景内的对象 ID,玩家对象;不是角色 GUID。
|-
|-
| 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;">bitIndex</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| <code>bitIndex</code><br /><span class="lua-muted"><code>number</code></span>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 任务数据标志位索引;通过有效性校验后才会读写。
| 任务数据标志位索引;通过有效性校验后才会读写。
|}
|}



2026年9月20日 (日) 00:11的最新版本

首页 · 服务端接口 · 任务与对话 · 调用约定

读取角色任务数据的标志位数值。

Lua 调用

GetMissionFlagEx(sceneId, selfId, bitIndex)

服务端脚本中未检索到该接口的调用点(已检索 4245 个随包脚本)。

实现位于 LuaFnTbl_Mission.h。

参数

序号 参数 / 类型 说明
1 sceneId
number
当前调用所在的场景 ID。
2 selfId
number
当前场景内的对象 ID,玩家对象;不是角色 GUID。
3 bitIndex
number
任务数据标志位索引;通过有效性校验后才会读写。

返回值

返回该标志位的数值。索引越界或对象无效时为 0,不能与“标志位本来就是 0”区分开。

注意事项

  • 要求恰好传入 3 个数值参数,实现体直接委托 LuaMissionRead 处理(见 LuaFnTbl_Mission.h)。
  • 读写范围限定为扩展任务数据表;索引先经 TLBBMission::FlagDataIndex 校验,不通过时整次调用不生效,也不会写入任何数据。