Lua接口/服务端/AddGlobalCountNews
来自天龙知识库
向全组服务器发送新闻公告,公告发送指定次数
同一接口的其他调用名称:LuaFnAddGlobalCountNews。
Lua 调用
AddGlobalCountNews(sceneId, newstr)
服务端脚本中共出现 77 处调用,实参个数出现过:2 个(77 处)。
实现位于 LuaFnTbl_Misc.h。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 脚本中的实参: sceneId(77 处)
|
| 2 | newstrstring
|
公告内容,字符串指针类型 脚本中的实参: str(27 处)、message(19 处)、szMsg(7 处)
|
返回值
无返回值。赋值接收时得到 nil;这与返回数字 0 不同。
用法补充
向全组服务器发送新闻公告,公告发送指定次数
没有测试
脚本中的调用
以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。
-- city0_building12.lua
AddGlobalCountNews(sceneId, strText)
-- event/city/protect_guild_generate.lua
AddGlobalCountNews(sceneId, "@*;SrvMsg;SCA:#P"..cityDefaultName.."告急!帮会城市"..)
-- event/equip/equip_bind.lua
AddGlobalCountNews(sceneId, szMsg)
-- event/EventScript/client_GiveRose.lua
AddGlobalCountNews(sceneId, message)
-- event/festival/christmas07/nightwatchgift.lua
AddGlobalCountNews(sceneId, "#{SDSY_081212_01}")
-- event/huashan/ehuashan_1.lua
AddGlobalCountNews(sceneId, str)
-- event/huashan/ehuashan_1.lua
AddGlobalCountNews(sceneId, szStr)
-- event/huodong/edataosha_callback.lua
AddGlobalCountNews(sceneId, Msg)