Lua接口/服务端/LuaFnSetCopySceneData Timer:修订间差异
来自雪舞天龙知识库
跳到导航跳到搜索
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| (未显示同一用户的6个中间版本) | |||
| 第1行: | 第1行: | ||
__NOTOC__ | __NOTOC__ | ||
<div class="lua-reference | <div class="lua-reference"> | ||
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/场景与副本|场景与副本]] · [[Lua接口/服务端调用约定|调用约定]] | [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/场景与副本|场景与副本]] · [[Lua接口/服务端调用约定|调用约定]] | ||
<div | <div class="lua-lead lua-rule">设置副本创建数据里的:场景定时器的时间间隔,如果为0表示没有设置。</div> | ||
== Lua 调用 == | == Lua 调用 == | ||
<pre | <pre>LuaFnSetCopySceneData_Timer(sceneId, uTime)</pre> | ||
服务端脚本中共出现 | 服务端脚本中共出现 85 处调用,实参个数出现过:2 个(85 处)。 | ||
实现位于 <code | 实现位于 <code>LuaFnTbl_Scene.h</code>。 | ||
== 参数 == | == 参数 == | ||
{| class="wikitable | {| class="wikitable" | ||
! scope="col" | ! scope="col" class="lua-w11" | 序号 | ||
! scope="col" | ! scope="col" class="lua-w36" | 参数 / 类型 | ||
! scope="col | ! scope="col" | 说明 | ||
|- | |- | ||
| 1 | |||
| <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span> | |||
| 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code>(84 处)、<code>s</code></span> | |||
|- | |- | ||
| 2 | |||
| <code>uTime</code><br /><span class="lua-muted"><code>number</code></span> | |||
| 时间(毫秒),uint<br /><span class="lua-muted">脚本中的实参:<code>1000</code>、<code>x050010_g_TickTime * 1000</code>、<code>x050013_g_TickTime * 1000</code></span> | |||
|} | |} | ||
| 第30行: | 第30行: | ||
无返回值。赋值接收时得到 nil;这与返回数字 0 不同。 | 无返回值。赋值接收时得到 nil;这与返回数字 0 不同。 | ||
== | == 调用示例 == | ||
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序: | |||
<pre | <pre>-- event/challenge/edali_challenge.lua | ||
LuaFnSetCopySceneData_Timer(sceneId, x806014_g_TickTime) | LuaFnSetCopySceneData_Timer(sceneId, x806014_g_TickTime) | ||
-- event/challenge/eluoyang_challenge.lua | -- event/challenge/eluoyang_challenge.lua | ||
LuaFnSetCopySceneData_Timer(sceneId, x806012_g_TickTime) | LuaFnSetCopySceneData_Timer(sceneId, x806012_g_TickTime) | ||
-- event/city/ecity_0102eliminatethieves.lua | -- event/city/ecity_0102eliminatethieves.lua | ||
LuaFnSetCopySceneData_Timer(sceneId, x600004_g_TickTime | LuaFnSetCopySceneData_Timer(sceneId, x600004_g_TickTime * 1000)</pre> | ||
</div> | </div> | ||
2026年10月27日 (二) 12:36的最新版本
设置副本创建数据里的:场景定时器的时间间隔,如果为0表示没有设置。
Lua 调用
LuaFnSetCopySceneData_Timer(sceneId, uTime)
服务端脚本中共出现 85 处调用,实参个数出现过:2 个(85 处)。
实现位于 LuaFnTbl_Scene.h。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 脚本中的实参: sceneId(84 处)、s
|
| 2 | uTimenumber
|
时间(毫秒),uint 脚本中的实参: 1000、x050010_g_TickTime * 1000、x050013_g_TickTime * 1000
|
返回值
无返回值。赋值接收时得到 nil;这与返回数字 0 不同。
调用示例
以下取自随包服务端脚本的真实调用,可对照上方参数表确认参数顺序:
-- event/challenge/edali_challenge.lua LuaFnSetCopySceneData_Timer(sceneId, x806014_g_TickTime) -- event/challenge/eluoyang_challenge.lua LuaFnSetCopySceneData_Timer(sceneId, x806012_g_TickTime) -- event/city/ecity_0102eliminatethieves.lua LuaFnSetCopySceneData_Timer(sceneId, x600004_g_TickTime * 1000)