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

49 lines
1.2 KiB
Plaintext
Raw Normal View History

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