Lua接口/客户端/Talk/HandleHistoryAction
来自天龙知识库
跳到导航跳到搜索
Talk:HandleHistoryAction
触发客户端事件 GE_CHAT_HISTORY_ACTION;读取客户端本地数据 · 实现于 Game/Interface/GMInterface_Script_Talk.cpp
调用方式
Talk:HandleHistoryAction(string, string, string)
对象名 Talk 是全局对象,可直接使用。
界面脚本中共 13 处调用,实参个数出现过:3 个(13 处)。
参数
| 序号 | 类型 | 说明 |
|---|---|---|
| 1 | string
|
调用点实参:"listChange"(8 处)、"editbox"(2 处)、"changMsg"(1 处)
|
| 2 | string
|
调用点实参:g_theCurrentChannel(8 处)、""(2 处)、msg(1 处)
|
| 3 | string
|
调用点实参:""(11 处)、g_theCurrentChannelName(2 处)
|
返回值
无返回值(实现体 return 0)。被赋给变量时得到 nil,与返回数字 0 不同。
脚本中的调用
以下是界面脚本里的真实调用点(同一形态只列一次):
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("listChange", g_theCurrentChannel, g_theCurrentChannelName)
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("editbox", prvname, "")
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("editbox", "", "")
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("modifyTxt", "", "")
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("privateChange", newname, "")
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("listChange", g_theCurrentChannel, "")
-- ChatFrame/ChatFrame.lua
Talk:HandleHistoryAction("changMsg", msg, "")
关联
- 触发客户端事件:
GE_CHAT_HISTORY_ACTION,见客户端事件 - 读取或修改客户端本地数据