Lua接口/客户端/SetTimer:修订间差异
来自天龙知识库
跳到导航跳到搜索
新建客户端 Lua 接口页:全局函数、对象方法、窗口操作与客户端事件 |
新建客户端 Lua 接口页:全局函数、对象方法、窗口操作与客户端事件 |
||
| 第17行: | 第17行: | ||
{| class="wikitable" style="width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;" | {| class="wikitable" style="width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;" | ||
! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:9%;" | 序号 | ! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:9%;" | 序号 | ||
! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width: | ! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:25%;" | 类型 | ||
! scope="col" style="text-align:left;background:#edf3f2;padding:8px;" | 说明 | ! scope="col" style="text-align:left;background:#edf3f2;padding:8px;" | 说明 | ||
|- | |- | ||
2026年9月19日 (六) 09:00的版本
SetTimer
实现体未体现明确的外部效果 · 实现于 Game/Script/GMUITimer.cpp
本页信息由客户端 C++ 绑定源码与 230 个界面脚本自动整理:参数取实现体的
args[n] 取值点(对象方法已扣除 self 占用的栈位),调用示例取脚本中的真实调用,未经运行验证;用途摘要按实现体归纳,仅供参考。调用方式
SetTimer(string, string, number)
作为全局函数直接按名称调用。
界面脚本中共 12 处调用,实参个数出现过:3 个(12 处)。
参数
| 序号 | 类型 | 说明 |
|---|---|---|
| 1 | string
|
调用点实参:"PetFriendSearch"(4 处)、"PetZhengYou"(4 处)、"PlayerFrame"(2 处)
|
| 2 | string
|
调用点实参:"MiniMap_TimerProc()"(1 处)、"PetFriendSearch_CoolDown3();"(1 处)、"PetFriendSearch_CoolDown4();"(1 处)
|
| 3 | number
|
调用点实参:cooldownTime(4 处)、pageCoolDownTime(4 处)、5000(1 处)
|
返回值
返回 1 个值。
脚本中的调用
以下是界面脚本里的真实调用点(同一形态只列一次):
-- ChatFrame/ChatFrame.lua
SetTimer("ChatFrame", "StopFlashCityChannel()", 5000)
-- MiniMap/MiniMap.lua
SetTimer("MiniMap", "MiniMap_TimerProc()", 60000)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolPageUp();", pageCoolDownTime)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolPageDown();", pageCoolDownTime)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolDown3();", cooldownTime)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolDown4();", cooldownTime)
-- PetZhengYou/PetZhengYou.lua
SetTimer("PetZhengYou", "PetZhengYou_CoolPageUp();", pageCoolDownTime)
参数与返回值由实现体的取值点推断(对象方法已扣除
self 占用的栈位),调用示例取自 230 个界面脚本;均为静态整理,未在游戏内执行验证。