1.13.3版本中SendChatMessage是受保护的函数吗?

我在维护一个插件,其中有一个功能使用了 SendChatMessage。但是如果我调用它,会出现以下错误:

日期:2020-01-01 12:23:01
ID:1
错误发生在:AddOn:LunarSphere
计数:1
消息:警告:AddOn LunarSphere 试图调用一个受保护的函数(UNKNOWN()),这可能需要交互。
Debug:
 [C]:?
 [C]:SendChatMessage()
 LunarSphere \ lib \ moduleSpeech.lua:1087:RunScript()
 LunarSphere \ lib \ moduleSpeech.lua:403:CheckCurrentAction()
 LunarSphere \ lib \ moduleSpeech.lua:202:
 LunarSphere \ lib \ moduleSpeech.lua:179
_local_:

相关代码为:

SendChatMessage("msg","SAY");

真的只有这么点内容。

但是我可以在客户端中使用/script SendChatMessage("msg","SAY");

有可能有解决方法吗?至少对于SAY频道?

谢谢!

点赞
用户1297035
用户1297035

现在,这是一个受保护的硬件事件功能,请参见 https://wow.gamepedia.com/API_SendChatMessage

如果您从聊天窗口运行脚本,则可以工作,但在插件中则不再工作。

2020-01-01 17:51:05