Lua接口/客户端/City/GetBuildingInfo:修订间差异
来自天龙知识库
跳到导航跳到搜索
新建客户端 Lua 接口页:全局函数、对象方法、窗口操作与客户端事件 |
新建客户端 Lua 接口页:全局函数、对象方法、窗口操作与客户端事件 |
||
| 第7行: | 第7行: | ||
<div style="margin-top:6px;color:#657078;">操作客户端界面 · 实现于 Game/Interface/GMInterface_Script_City.cpp</div> | <div style="margin-top:6px;color:#657078;">操作客户端界面 · 实现于 Game/Interface/GMInterface_Script_City.cpp</div> | ||
</div> | </div> | ||
== 调用方式 == | == 调用方式 == | ||
<code style="white-space:normal;overflow-wrap:anywhere;">City:GetBuildingInfo(number, string)</code> | <code style="white-space:normal;overflow-wrap:anywhere;">City:GetBuildingInfo(number, string)</code> | ||
| 第53行: | 第52行: | ||
* 操作客户端界面 | * 操作客户端界面 | ||
</div> | </div> | ||
2026年9月19日 (六) 13:48的版本
City:GetBuildingInfo
操作客户端界面 · 实现于 Game/Interface/GMInterface_Script_City.cpp
调用方式
City:GetBuildingInfo(number, string)
对象名 City 是全局对象,可直接使用。
界面脚本中共 10 处调用,实参个数出现过:2 个(10 处)。
参数
| 序号 | 类型 | 说明 |
|---|---|---|
| 1 | number
|
调用点实参:g_CityData[2](5 处)、g_selIdx(3 处)、bId(2 处)
|
| 2 | string
|
调用点实参:"condattrname"(3 处)、"name"(3 处)、"condition"(2 处)
|
返回值
返回 6 个值。
脚本中的调用
以下是界面脚本里的真实调用点(同一形态只列一次):
-- Interior/Interior.lua City:GetBuildingInfo(g_selIdx, "name") -- Interior/Interior.lua City:GetBuildingInfo(g_selIdx, "exist") -- Interior/Interior.lua City:GetBuildingInfo(g_selIdx, "condition") -- MessageBox_Self/MessageBox_Self.lua City:GetBuildingInfo(bId, "exist") -- MessageBox_Self/MessageBox_Self.lua City:GetBuildingInfo(bId, "condattrname") -- MessageBox_Self/MessageBox_Self.lua City:GetBuildingInfo(g_CityData[2], "name") -- MessageBox_Self/MessageBox_Self.lua City:GetBuildingInfo(g_CityData[2], "condition")
关联
- 操作客户端界面