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

来自雪舞天龙知识库
跳到导航跳到搜索
Waylee​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
Waylee​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
 
(未显示同一用户的5个中间版本)
第8行: 第8行:
<pre>LuaFnSetCopySceneData_NoUserCloseTime(sceneId, closeTime)</pre>
<pre>LuaFnSetCopySceneData_NoUserCloseTime(sceneId, closeTime)</pre>


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


实现位于 <code>LuaFnTbl_Scene.h</code> 第 430 行,注册表第 726 行。
实现位于 <code>LuaFnTbl_Scene.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>(81 处)</span>
| 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code>(84 处)、<code>s</code></span>
|-
|-
| 2
| 2
| <code>closeTime</code><br /><span class="lua-muted"><code>number</code></span>
| <code>closeTime</code><br /><span class="lua-muted"><code>number</code></span>
| 时间(毫秒),uint<br /><span class="lua-muted">脚本中的实参:<code>x050010_g_NoUserTime * 1000</code>、<code>x050013_g_NoUserTime * 1000</code>、<code>x050100_g_NoUserTime * 1000</code></span>
| 时间(毫秒),uint<br /><span class="lua-muted">脚本中的实参:<code>10000</code>、<code>x050010_g_NoUserTime * 1000</code>、<code>x050013_g_NoUserTime * 1000</code></span>
|}
|}


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


== 脚本中的调用 ==
== 调用示例 ==
以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序:
<pre>-- event/challenge/edali_challenge.lua
<pre>-- event/challenge/edali_challenge.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x806014_g_CopySceneCloseTime)
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x806014_g_CopySceneCloseTime)
-- event/challenge/eluoyang_challenge.lua
-- event/challenge/eluoyang_challenge.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x806012_g_CopySceneCloseTime)
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x806012_g_CopySceneCloseTime)
-- event/city/ecity_0102eliminatethieves.lua
-- event/city/ecity_0102eliminatethieves.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600004_g_NoUserTime * 1000)
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600004_g_NoUserTime * 1000)</pre>
 
-- event/city/ecity_0202convoypet.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600009_g_NoUserTime * 1000)
 
-- event/city/ecity_0302fightvermins.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600014_g_NoUserTime * 1000)
 
-- event/city/ecity_0402chuckoutvillain.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600019_g_NoUserTime * 1000)
 
-- event/city/ecity_0502directprentice.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600025_g_NoUserTime * 1000)
 
-- event/city/ecity_0503savefamily.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600026_g_NoUserTime * 1000)</pre>


</div>
</div>

2026年10月27日 (二) 12:36的最新版本

首页 · 服务端接口 · 场景与副本 · 调用约定

设置副本创建数据里的:没有人后副本场景自动关闭清除的时间。

Lua 调用

LuaFnSetCopySceneData_NoUserCloseTime(sceneId, closeTime)

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

实现位于 LuaFnTbl_Scene.h。

参数

序号 参数 / 类型 说明
1 sceneId
number
当前调用所在的场景 ID。
脚本中的实参:sceneId(84 处)、s
2 closeTime
number
时间(毫秒),uint
脚本中的实参:10000、x050010_g_NoUserTime * 1000、x050013_g_NoUserTime * 1000

返回值

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

调用示例

以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序:

-- event/challenge/edali_challenge.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x806014_g_CopySceneCloseTime)
-- event/challenge/eluoyang_challenge.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x806012_g_CopySceneCloseTime)
-- event/city/ecity_0102eliminatethieves.lua
LuaFnSetCopySceneData_NoUserCloseTime(sceneId, x600004_g_NoUserTime * 1000)