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