42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
|
LuaDistributesGainMillionPowerReq = {}
|
||
|
|
||
|
LuaDistributesGainMillionPowerReq.sysID = 55
|
||
|
LuaDistributesGainMillionPowerReq.cmdID = 1
|
||
|
|
||
|
function LuaDistributesGainMillionPowerReq.ExtraPacket(memStream)
|
||
|
-- print('ExtraPacket:'..memStream.Length)
|
||
|
|
||
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
||
|
local sysID = binaryReader:ReadByte()
|
||
|
local cmdID = binaryReader:ReadByte()
|
||
|
packet = LuaDistributesGainMillionPowerReq.ReadPacket(binaryReader)
|
||
|
|
||
|
return packet
|
||
|
end
|
||
|
|
||
|
function LuaDistributesGainMillionPowerReq.SendPacket(packet)
|
||
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesGainMillionPowerReq.sysID, LuaDistributesGainMillionPowerReq.cmdID)
|
||
|
if(packet['activityId'] == nil) then
|
||
|
packet['activityId'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['activityId'])
|
||
|
|
||
|
if(packet['taskId'] == nil) then
|
||
|
packet['taskId'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['taskId'])
|
||
|
|
||
|
|
||
|
message:Send()
|
||
|
end
|
||
|
|
||
|
function LuaDistributesGainMillionPowerReq.ReadPacket(binaryReader)
|
||
|
|
||
|
local packet = {}
|
||
|
packet['activityId'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['taskId'] = binaryReader:ReadInt32()
|
||
|
|
||
|
|
||
|
return packet
|
||
|
end
|