Files
JJBB/Assets/Project/Script/LuaScripts/NetWork/Lua/Distributes/LuaDistributesValhallaInstanceDataRet.txt
2024-08-23 15:49:34 +08:00

49 lines
1.2 KiB
Plaintext

LuaDistributesValhallaInstanceDataRet = {}
LuaDistributesValhallaInstanceDataRet.sysID = 46
LuaDistributesValhallaInstanceDataRet.cmdID = 50
function LuaDistributesValhallaInstanceDataRet.ExtraPacket(memStream)
-- print('ExtraPacket:'..memStream.Length)
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
local sysID = binaryReader:ReadByte()
local cmdID = binaryReader:ReadByte()
packet = LuaDistributesValhallaInstanceDataRet.ReadPacket(binaryReader)
return packet
end
function LuaDistributesValhallaInstanceDataRet.SendPacket(packet)
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesValhallaInstanceDataRet.sysID, LuaDistributesValhallaInstanceDataRet.cmdID)
if(packet['id'] == nil) then
packet['id'] = 0
end
message:WriteInt(packet['id'])
if(packet['fubenId'] == nil) then
packet['fubenId'] = 0
end
message:WriteInt(packet['fubenId'])
if(packet['state'] == nil) then
packet['state'] = 0
end
message:WriteByte(packet['state'])
message:Send()
end
function LuaDistributesValhallaInstanceDataRet.ReadPacket(binaryReader)
local packet = {}
packet['id'] = binaryReader:ReadInt32()
packet['fubenId'] = binaryReader:ReadInt32()
packet['state'] = binaryReader:ReadByte()
return packet
end