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