105 lines
2.5 KiB
Plaintext
105 lines
2.5 KiB
Plaintext
LuaDistributesRetMoneyTree = {}
|
|
|
|
LuaDistributesRetMoneyTree.sysID = 3
|
|
LuaDistributesRetMoneyTree.cmdID = 31
|
|
|
|
function LuaDistributesRetMoneyTree.ExtraPacket(memStream)
|
|
-- print('ExtraPacket:'..memStream.Length)
|
|
|
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
|
local sysID = binaryReader:ReadByte()
|
|
local cmdID = binaryReader:ReadByte()
|
|
packet = LuaDistributesRetMoneyTree.ReadPacket(binaryReader)
|
|
|
|
return packet
|
|
end
|
|
|
|
function LuaDistributesRetMoneyTree.SendPacket(packet)
|
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesRetMoneyTree.sysID, LuaDistributesRetMoneyTree.cmdID)
|
|
if(packet['actID'] == nil) then
|
|
packet['actID'] = 0
|
|
end
|
|
message:WriteInt(packet['actID'])
|
|
|
|
if(packet['button1State'] == nil) then
|
|
packet['button1State'] = 0
|
|
end
|
|
message:WriteInt(packet['button1State'])
|
|
|
|
if(packet['button1MonyeNum'] == nil) then
|
|
packet['button1MonyeNum'] = 0
|
|
end
|
|
message:WriteInt(packet['button1MonyeNum'])
|
|
|
|
if(packet['button2State'] == nil) then
|
|
packet['button2State'] = 0
|
|
end
|
|
message:WriteInt(packet['button2State'])
|
|
|
|
if(packet['button2MonyeNum'] == nil) then
|
|
packet['button2MonyeNum'] = 0
|
|
end
|
|
message:WriteInt(packet['button2MonyeNum'])
|
|
|
|
if(packet['rewdBaseCoppers'] == nil) then
|
|
packet['rewdBaseCoppers'] = 0
|
|
end
|
|
message:WriteInt(packet['rewdBaseCoppers'])
|
|
|
|
if(packet['multiplePower1'] == nil) then
|
|
packet['multiplePower1'] = 0
|
|
end
|
|
message:WriteInt(packet['multiplePower1'])
|
|
|
|
if(packet['multiplePower2'] == nil) then
|
|
packet['multiplePower2'] = 0
|
|
end
|
|
message:WriteInt(packet['multiplePower2'])
|
|
|
|
if(packet['isRedPoint'] == nil) then
|
|
packet['isRedPoint'] = 0
|
|
end
|
|
message:WriteInt(packet['isRedPoint'])
|
|
|
|
if(packet['viplimYuanBao'] == nil) then
|
|
packet['viplimYuanBao'] = 0
|
|
end
|
|
message:WriteInt(packet['viplimYuanBao'])
|
|
|
|
if(packet['viplimLinYu'] == nil) then
|
|
packet['viplimLinYu'] = 0
|
|
end
|
|
message:WriteInt(packet['viplimLinYu'])
|
|
|
|
|
|
message:Send()
|
|
end
|
|
|
|
function LuaDistributesRetMoneyTree.ReadPacket(binaryReader)
|
|
|
|
local packet = {}
|
|
packet['actID'] = binaryReader:ReadInt32()
|
|
|
|
packet['button1State'] = binaryReader:ReadInt32()
|
|
|
|
packet['button1MonyeNum'] = binaryReader:ReadInt32()
|
|
|
|
packet['button2State'] = binaryReader:ReadInt32()
|
|
|
|
packet['button2MonyeNum'] = binaryReader:ReadInt32()
|
|
|
|
packet['rewdBaseCoppers'] = binaryReader:ReadInt32()
|
|
|
|
packet['multiplePower1'] = binaryReader:ReadInt32()
|
|
|
|
packet['multiplePower2'] = binaryReader:ReadInt32()
|
|
|
|
packet['isRedPoint'] = binaryReader:ReadInt32()
|
|
|
|
packet['viplimYuanBao'] = binaryReader:ReadInt32()
|
|
|
|
packet['viplimLinYu'] = binaryReader:ReadInt32()
|
|
|
|
|
|
return packet
|
|
end |