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

来自天龙知识库
跳到导航跳到搜索
雪舞​(留言 | 贡献)
整理当前服务端 Lua 接口:注册名称、参数、返回值与调用说明
 
雪舞​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
第4行: 第4行:


<div style="padding:14px 0;border-top:3px solid #287568;border-bottom:1px solid #dbe3e6;">结束构造UICommand数据体</div>
<div style="padding:14px 0;border-top:3px solid #287568;border-bottom:1px solid #dbe3e6;">结束构造UICommand数据体</div>
<div style="margin:10px 0;padding:10px 12px;border-left:3px solid #9a7940;background:#faf7f0;font-size:13px;color:#5f5136;">本页由服务端绑定源码与随包脚本自动整理:用途、参数位置与返回数量取实现体,<b>未在游戏内执行验证</b>。调用点取自 4244 个服务端脚本中的 580 处真实调用。</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;">UICommand_AddInt(sceneId, nValue)</pre>
<pre style="white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;padding:12px;background:#f5f7f8;border:1px solid #dbe3e6;">UICommand_AddInt(sceneId, nValue)</pre>
服务端脚本中共出现 580 处调用,实参个数出现过:2 个(580 处)。


== 参数 ==
== 参数 ==
第16行: 第20行:
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 1
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 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>
| 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>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 当前调用所在的场景 ID。
| 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>(580 处)</span>
|-
|-
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 2
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 2
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">nValue</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">nValue</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 向数据体添加的数据,整数
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 向数据体添加的数据,整数<br /><span style="color:#657078;">脚本中的实参:<code style="white-space:normal;overflow-wrap:anywhere;">targetId</code>(258 处)、<code style="white-space:normal;overflow-wrap:anywhere;">5</code>(20 处)、<code style="white-space:normal;overflow-wrap:anywhere;">-1</code>(14 处)</span>
|}
|}


第26行: 第30行:
无返回值。赋值接收时得到 nil;这与返回数字 0 不同。
无返回值。赋值接收时得到 nil;这与返回数字 0 不同。


<div style="margin-top:20px;padding-top:10px;border-top:1px solid #dbe3e6;color:#657078;font-size:12px;">核对依据:<code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Mission.h</code> 第 2820 行,服务端注册表第 171 行。调用格式与返回数量依据当前实现整理;游戏内效果、边界行为及未注明的业务枚举仍需实测。</div>
== 脚本中的调用 ==
以下是服务端脚本里的真实调用点,按实参形态去重后列出 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;">-- city0_building0.lua
UICommand_AddInt(sceneId, targetId)
 
-- city0_building0.lua
UICommand_AddInt(sceneId, x805007_g_BuildingID15)
 
-- city0_building11.lua
UICommand_AddInt(sceneId, x805018_g_BuildingID13)
 
-- city0_building12.lua
UICommand_AddInt(sceneId, nAllExp)
 
-- city0_building3.lua
UICommand_AddInt(sceneId, x805010_g_BuildingID4)
 
-- city0_building5.lua
UICommand_AddInt(sceneId, x805012_g_BuildingID6)
 
-- city0_building5.lua
UICommand_AddInt(sceneId, x805012_g_scriptId)
 
-- city0_building9.lua
UICommand_AddInt(sceneId, x805016_g_BuildingID11)</pre>
 
<div style="margin-top:20px;padding-top:10px;border-top:1px solid #dbe3e6;color:#657078;font-size:12px;">核对依据:<code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Mission.h</code> 第 2846 行,服务端注册表第 175 行。调用格式与返回数量依据当前实现整理;脚本调用点取自 4244 个随包脚本(共 535888 行、命中 85384 处调用),未经运行验证。游戏内效果、边界行为及未注明的业务枚举仍需实测。</div>


</div>
</div>

2026年9月19日 (六) 12:49的版本

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

结束构造UICommand数据体
本页由服务端绑定源码与随包脚本自动整理:用途、参数位置与返回数量取实现体,未在游戏内执行验证。调用点取自 4244 个服务端脚本中的 580 处真实调用。

Lua 调用

UICommand_AddInt(sceneId, nValue)

服务端脚本中共出现 580 处调用,实参个数出现过:2 个(580 处)。

参数

序号 参数 / 类型 说明
1 sceneId
number
当前调用所在的场景 ID。
脚本中的实参:sceneId(580 处)
2 nValue
number
向数据体添加的数据,整数
脚本中的实参:targetId(258 处)、5(20 处)、-1(14 处)

返回值

无返回值。赋值接收时得到 nil;这与返回数字 0 不同。

脚本中的调用

以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。

-- city0_building0.lua
UICommand_AddInt(sceneId, targetId)

-- city0_building0.lua
UICommand_AddInt(sceneId, x805007_g_BuildingID15)

-- city0_building11.lua
UICommand_AddInt(sceneId, x805018_g_BuildingID13)

-- city0_building12.lua
UICommand_AddInt(sceneId, nAllExp)

-- city0_building3.lua
UICommand_AddInt(sceneId, x805010_g_BuildingID4)

-- city0_building5.lua
UICommand_AddInt(sceneId, x805012_g_BuildingID6)

-- city0_building5.lua
UICommand_AddInt(sceneId, x805012_g_scriptId)

-- city0_building9.lua
UICommand_AddInt(sceneId, x805016_g_BuildingID11)
核对依据:LuaFnTbl_Mission.h 第 2846 行,服务端注册表第 175 行。调用格式与返回数量依据当前实现整理;脚本调用点取自 4244 个随包脚本(共 535888 行、命中 85384 处调用),未经运行验证。游戏内效果、边界行为及未注明的业务枚举仍需实测。