无限 1.60 插件 API 手册

从本地国服 Beta 客户端(内部代号 Camelot)的 CASC 数据中提取,供插件开发参考。数据来源:Blizzard_APIDocumentationGenerated 插件、WowT.exe 字符串、Blizzard 插件 Lua 源码。

客户端版本
1.60.1.70094
编译日期
2026-09-28
Lua
5.1.4
C_ 命名空间
286
文档化函数
6596
事件
1805
枚举 / 结构
1743
标记受保护
74

运行时

脚本引擎是标准 Lua 5.1.4(exe 内版权字符串 $Lua: Lua 5.1.4),与正式服相同。客户端是 Mainline 代码库,Housing、Mythic+ 等 12.0 时代的 API 都在,再通过 GameType 为 camelot 的规则关闭。

可用的标准库

stringtablemathcoroutinebit (band, bor, bxor, bnot, lshift, rshift, arshift)

没有 io,没有 os(只保留 date、time、difftime 作为全局),没有 package.loadlib、dofile、require。debug 库只剩 debugstack、debuglocals、debugprofilestart、debugprofilestop。

WoW 扩展的全局函数

strsplitstrjoinstrconcatstrtrimstrlenutf8strcmputf8itostringallwipetinserttremovegetnformatgsubstrfindstrmatchstrsubstrlenstrupperstrlowerstrbytestrcharstrrepfloorceilabssqrtmaxminrandomfastrandomdatetimedifftimedebugstackdebuglocalsdebugprofilestartdebugprofilestopgeterrorhandlerseterrorhandlerloadstringsetfenvgetfenvnewproxygcinfocollectgarbageCopyTabletContainstInverttDeleteItemtIndexOf

安全与污染(taint)

securecallsecurecallfunctionsecureexecuterangeissecureissecurevariableforceinsecurehooksecurefuncscrubcanaccessobjectissecretvalueissecrettablecanaccessvaluecanaccesstablesecretwrapsecretunwrapInCombatLockdownRunScript

插件代码默认是"受污染"的。调用受保护函数或向安全框架写入会触发 ADDON_ACTION_BLOCKED 或 ADDON_ACTION_FORBIDDEN。查看 taint 用 CVar taintLog,脚本错误用 scriptErrors。

机密值(secret values)

这是 12.0 引入、无限客户端完整继承的机制。在战斗、首领战、PvP 对局、聊天锁定等受限状态下,部分 API 不再返回明文,而是返回 <secret>。机密值可以原样传回 Blizzard API,但不能比较、运算、拼接或存表,相关调用会被阻断并写入 taint 日志。

资源配额

启动日志显示 LimitedLuaResources 机制存在但当前关闭(Enabled = false)。预设配额:每插件 Frame 10000、Texture 40000、FontString 5000、Font 300、Timer 500、AnimGroup 2000、Animation 5000;全局 Frame 100000、Texture 400000。另有 CVar luaScriptBucketThrottleEnabled 系列控制脚本每秒执行时间上限,受限状态下阈值更低。

相关 CVar

scriptErrorsscriptWarningsscriptProfiletaintLogcheckAddonVersionluaErrorExceptionsluaScriptBucketThrottleEnabledluaScriptBucketThrottleMaxMsPerSecondNormalluaScriptBucketThrottleMaxMsPerSecondRestrictedluaScriptBucketThrottleMaxMsBurstNormalluaScriptBucketThrottleMaxMsBurstRestrictedallowUntaintedCreationenableDeprecationAddons