56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
|
LuaDistributesValGEqpRet = {}
|
||
|
|
||
|
LuaDistributesValGEqpRet.sysID = 46
|
||
|
LuaDistributesValGEqpRet.cmdID = 25
|
||
|
|
||
|
function LuaDistributesValGEqpRet.ExtraPacket(memStream)
|
||
|
-- print('ExtraPacket:'..memStream.Length)
|
||
|
|
||
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
||
|
local sysID = binaryReader:ReadByte()
|
||
|
local cmdID = binaryReader:ReadByte()
|
||
|
packet = LuaDistributesValGEqpRet.ReadPacket(binaryReader)
|
||
|
|
||
|
return packet
|
||
|
end
|
||
|
|
||
|
function LuaDistributesValGEqpRet.SendPacket(packet)
|
||
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesValGEqpRet.sysID, LuaDistributesValGEqpRet.cmdID)
|
||
|
if(packet['guid'] == nil) then
|
||
|
packet['guid'] = 0
|
||
|
end
|
||
|
message:WriteLong(packet['guid'])
|
||
|
|
||
|
if(packet['equipGuid'] == nil) then
|
||
|
packet['equipGuid'] = 0
|
||
|
end
|
||
|
message:WriteLong(packet['equipGuid'])
|
||
|
|
||
|
if(packet['isEquip'] == nil) then
|
||
|
packet['isEquip'] = 0
|
||
|
end
|
||
|
message:WriteByte(packet['isEquip'])
|
||
|
|
||
|
if(packet['equipId'] == nil) then
|
||
|
packet['equipId'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['equipId'])
|
||
|
|
||
|
|
||
|
message:Send()
|
||
|
end
|
||
|
|
||
|
function LuaDistributesValGEqpRet.ReadPacket(binaryReader)
|
||
|
|
||
|
local packet = {}
|
||
|
packet['guid'] = binaryReader:ReadInt64()
|
||
|
|
||
|
packet['equipGuid'] = binaryReader:ReadInt64()
|
||
|
|
||
|
packet['isEquip'] = binaryReader:ReadByte()
|
||
|
|
||
|
packet['equipId'] = binaryReader:ReadInt32()
|
||
|
|
||
|
|
||
|
return packet
|
||
|
end
|