42 lines
1000 B
Plaintext
42 lines
1000 B
Plaintext
LuaDistributesGodDisRet = {}
|
|
|
|
LuaDistributesGodDisRet.sysID = 46
|
|
LuaDistributesGodDisRet.cmdID = 23
|
|
|
|
function LuaDistributesGodDisRet.ExtraPacket(memStream)
|
|
-- print('ExtraPacket:'..memStream.Length)
|
|
|
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
|
local sysID = binaryReader:ReadByte()
|
|
local cmdID = binaryReader:ReadByte()
|
|
packet = LuaDistributesGodDisRet.ReadPacket(binaryReader)
|
|
|
|
return packet
|
|
end
|
|
|
|
function LuaDistributesGodDisRet.SendPacket(packet)
|
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesGodDisRet.sysID, LuaDistributesGodDisRet.cmdID)
|
|
if(packet['guid'] == nil) then
|
|
packet['guid'] = 0
|
|
end
|
|
message:WriteLong(packet['guid'])
|
|
|
|
if(packet['points'] == nil) then
|
|
packet['points'] = 0
|
|
end
|
|
message:WriteInt(packet['points'])
|
|
|
|
|
|
message:Send()
|
|
end
|
|
|
|
function LuaDistributesGodDisRet.ReadPacket(binaryReader)
|
|
|
|
local packet = {}
|
|
packet['guid'] = binaryReader:ReadInt64()
|
|
|
|
packet['points'] = binaryReader:ReadInt32()
|
|
|
|
|
|
return packet
|
|
end |