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

49 lines
1.2 KiB
Plaintext

LuaDistributesValhallaGeneralUpLevelRet = {}
LuaDistributesValhallaGeneralUpLevelRet.sysID = 46
LuaDistributesValhallaGeneralUpLevelRet.cmdID = 16
function LuaDistributesValhallaGeneralUpLevelRet.ExtraPacket(memStream)
-- print('ExtraPacket:'..memStream.Length)
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
local sysID = binaryReader:ReadByte()
local cmdID = binaryReader:ReadByte()
packet = LuaDistributesValhallaGeneralUpLevelRet.ReadPacket(binaryReader)
return packet
end
function LuaDistributesValhallaGeneralUpLevelRet.SendPacket(packet)
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesValhallaGeneralUpLevelRet.sysID, LuaDistributesValhallaGeneralUpLevelRet.cmdID)
if(packet['guid'] == nil) then
packet['guid'] = 0
end
message:WriteLong(packet['guid'])
if(packet['level'] == nil) then
packet['level'] = 0
end
message:WriteInt(packet['level'])
if(packet['exp'] == nil) then
packet['exp'] = 0
end
message:WriteInt(packet['exp'])
message:Send()
end
function LuaDistributesValhallaGeneralUpLevelRet.ReadPacket(binaryReader)
local packet = {}
packet['guid'] = binaryReader:ReadInt64()
packet['level'] = binaryReader:ReadInt32()
packet['exp'] = binaryReader:ReadInt32()
return packet
end