49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
LuaDistributesReqChooseProp = {}
|
|
|
|
LuaDistributesReqChooseProp.sysID = 47
|
|
LuaDistributesReqChooseProp.cmdID = 8
|
|
|
|
function LuaDistributesReqChooseProp.ExtraPacket(memStream)
|
|
-- print('ExtraPacket:'..memStream.Length)
|
|
|
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
|
local sysID = binaryReader:ReadByte()
|
|
local cmdID = binaryReader:ReadByte()
|
|
packet = LuaDistributesReqChooseProp.ReadPacket(binaryReader)
|
|
|
|
return packet
|
|
end
|
|
|
|
function LuaDistributesReqChooseProp.SendPacket(packet)
|
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesReqChooseProp.sysID, LuaDistributesReqChooseProp.cmdID)
|
|
if(packet['groupId'] == nil) then
|
|
packet['groupId'] = 0
|
|
end
|
|
message:WriteInt(packet['groupId'])
|
|
|
|
if(packet['boxId'] == nil) then
|
|
packet['boxId'] = 0
|
|
end
|
|
message:WriteInt(packet['boxId'])
|
|
|
|
if(packet['state'] == nil) then
|
|
packet['state'] = 0
|
|
end
|
|
message:WriteInt(packet['state'])
|
|
|
|
|
|
message:Send()
|
|
end
|
|
|
|
function LuaDistributesReqChooseProp.ReadPacket(binaryReader)
|
|
|
|
local packet = {}
|
|
packet['groupId'] = binaryReader:ReadInt32()
|
|
|
|
packet['boxId'] = binaryReader:ReadInt32()
|
|
|
|
packet['state'] = binaryReader:ReadInt32()
|
|
|
|
|
|
return packet
|
|
end |