Lua接口/服务端/GetHumanGuildInt

来自雪舞天龙知识库
Waylee​(留言 | 贡献)2026年10月27日 (二) 12:38的版本 (维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

首页 · 服务端接口 · 帮会 · 调用约定

返回人物帮战临时整数数组中的指定值。

Lua 调用

GetHumanGuildInt(sceneId, selfId, arrayIndex)

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

实现位于 LuaFnTbl_Guild.h。

参数

序号 参数 / 类型 说明
1 sceneId
number
当前调用所在的场景 ID。
脚本中的实参:sceneId(4 处)
2 selfId
number
当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。
脚本中的实参:mems[i](3 处)、selfId
3 arrayIndex
number
数组条目索引。
脚本中的实参:ArrayIntIndex、x402047_g_Human_FlagIndex、x402047_g_Human_KillManIndex

返回值

返回 1 个值。返回类型包括 number。明确的固定返回组合包括 -1。

调用示例

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

-- event/fuben/efuben_bangzhan.lua
GetHumanGuildInt(sceneId, mems[i], x402047_g_Human_KillManIndex)
-- event/fuben/efuben_bangzhan.lua
GetHumanGuildInt(sceneId, mems[i], x402047_g_Human_FlagIndex)
-- event/fuben/efuben_bangzhan.lua
GetHumanGuildInt(sceneId, mems[i], x402047_g_Human_ResourceNumIndex)

注意事项

  • 调用对象必须是当前场景中的有效玩家。