42 lines
1.0 KiB
Plaintext
42 lines
1.0 KiB
Plaintext
|
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
|