--1号通讯报文回调(用于接收服务器下发数据) 客户端接收
function MsgFunc_sj(smsg)
local datetab = deserialize(smsg)--反序列化
local t = type(datetab)
if t == "table" then
for k, v in pairs(datetab) do
if k == "buff_info" then
const.buff_info = datetab[k]
elseif k == "buff_config" then
const.buff_config = datetab[k]
end
end
end
end
--给客户端LUA下发BUFF数据
function KH_SJXF(actor)
if not actor then return end
local buff = {}
if BuffRun then
local buff = {}
buff["buff_info"] = BuffRun.buff_info
actor:sendNetMsg(1, serialize(buff))
local buff = {}
buff["buff_config"] = BuffRun.buff_config
actor:sendNetMsg(1, serialize(buff))
end