49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
|
LuaDistributesReqDraw = {}
|
||
|
|
||
|
LuaDistributesReqDraw.sysID = 3
|
||
|
LuaDistributesReqDraw.cmdID = 16
|
||
|
|
||
|
function LuaDistributesReqDraw.ExtraPacket(memStream)
|
||
|
-- print('ExtraPacket:'..memStream.Length)
|
||
|
|
||
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
||
|
local sysID = binaryReader:ReadByte()
|
||
|
local cmdID = binaryReader:ReadByte()
|
||
|
packet = LuaDistributesReqDraw.ReadPacket(binaryReader)
|
||
|
|
||
|
return packet
|
||
|
end
|
||
|
|
||
|
function LuaDistributesReqDraw.SendPacket(packet)
|
||
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesReqDraw.sysID, LuaDistributesReqDraw.cmdID)
|
||
|
if(packet['actID'] == nil) then
|
||
|
packet['actID'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['actID'])
|
||
|
|
||
|
if(packet['count'] == nil) then
|
||
|
packet['count'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['count'])
|
||
|
|
||
|
if(packet['appointGroup'] == nil) then
|
||
|
packet['appointGroup'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['appointGroup'])
|
||
|
|
||
|
|
||
|
message:Send()
|
||
|
end
|
||
|
|
||
|
function LuaDistributesReqDraw.ReadPacket(binaryReader)
|
||
|
|
||
|
local packet = {}
|
||
|
packet['actID'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['count'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['appointGroup'] = binaryReader:ReadInt32()
|
||
|
|
||
|
|
||
|
return packet
|
||
|
end
|