56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
LuaDistributesRetChooseProp = {}
|
|
|
|
LuaDistributesRetChooseProp.sysID = 47
|
|
LuaDistributesRetChooseProp.cmdID = 9
|
|
|
|
function LuaDistributesRetChooseProp.ExtraPacket(memStream)
|
|
-- print('ExtraPacket:'..memStream.Length)
|
|
|
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
|
local sysID = binaryReader:ReadByte()
|
|
local cmdID = binaryReader:ReadByte()
|
|
packet = LuaDistributesRetChooseProp.ReadPacket(binaryReader)
|
|
|
|
return packet
|
|
end
|
|
|
|
function LuaDistributesRetChooseProp.SendPacket(packet)
|
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesRetChooseProp.sysID, LuaDistributesRetChooseProp.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['selectedNum'] == nil) then
|
|
packet['selectedNum'] = 0
|
|
end
|
|
message:WriteInt(packet['selectedNum'])
|
|
|
|
if(packet['state'] == nil) then
|
|
packet['state'] = 0
|
|
end
|
|
message:WriteInt(packet['state'])
|
|
|
|
|
|
message:Send()
|
|
end
|
|
|
|
function LuaDistributesRetChooseProp.ReadPacket(binaryReader)
|
|
|
|
local packet = {}
|
|
packet['groupId'] = binaryReader:ReadInt32()
|
|
|
|
packet['boxId'] = binaryReader:ReadInt32()
|
|
|
|
packet['selectedNum'] = binaryReader:ReadInt32()
|
|
|
|
packet['state'] = binaryReader:ReadInt32()
|
|
|
|
|
|
return packet
|
|
end |