Files
JJBB/Assets/Project/Script/LuaScripts/NetWork/Lua/Distributes/LuaDistributesValhallaLevelUpReq.txt

42 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-08-23 15:49:34 +08:00
LuaDistributesValhallaLevelUpReq = {}
LuaDistributesValhallaLevelUpReq.sysID = 46
LuaDistributesValhallaLevelUpReq.cmdID = 23
function LuaDistributesValhallaLevelUpReq.ExtraPacket(memStream)
-- print('ExtraPacket:'..memStream.Length)
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
local sysID = binaryReader:ReadByte()
local cmdID = binaryReader:ReadByte()
packet = LuaDistributesValhallaLevelUpReq.ReadPacket(binaryReader)
return packet
end
function LuaDistributesValhallaLevelUpReq.SendPacket(packet)
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesValhallaLevelUpReq.sysID, LuaDistributesValhallaLevelUpReq.cmdID)
if(packet['guid'] == nil) then
packet['guid'] = 0
end
message:WriteLong(packet['guid'])
if(packet['id'] == nil) then
packet['id'] = 0
end
message:WriteInt(packet['id'])
message:Send()
end
function LuaDistributesValhallaLevelUpReq.ReadPacket(binaryReader)
local packet = {}
packet['guid'] = binaryReader:ReadInt64()
packet['id'] = binaryReader:ReadInt32()
return packet
end