152 lines
3.4 KiB
Plaintext
152 lines
3.4 KiB
Plaintext
LuaDistributesEquipSuitInfoRet = {}
|
|
|
|
LuaDistributesEquipSuitInfoRet.sysID = 44
|
|
LuaDistributesEquipSuitInfoRet.cmdID = 2
|
|
|
|
function LuaDistributesEquipSuitInfoRet.ExtraPacket(memStream)
|
|
-- print('ExtraPacket:'..memStream.Length)
|
|
|
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
|
local sysID = binaryReader:ReadByte()
|
|
local cmdID = binaryReader:ReadByte()
|
|
packet = LuaDistributesEquipSuitInfoRet.ReadPacket(binaryReader)
|
|
|
|
return packet
|
|
end
|
|
|
|
function LuaDistributesEquipSuitInfoRet.SendPacket(packet)
|
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesEquipSuitInfoRet.sysID, LuaDistributesEquipSuitInfoRet.cmdID)
|
|
if(packet['suitValue1'] == nil) then
|
|
packet['suitValue1'] = 0
|
|
end
|
|
message:WriteInt(packet['suitValue1'])
|
|
|
|
if(packet['suitValue2'] == nil) then
|
|
packet['suitValue2'] = 0
|
|
end
|
|
message:WriteInt(packet['suitValue2'])
|
|
|
|
if(packet['suitClass1'] == nil) then
|
|
packet['suitClass1'] = 0
|
|
end
|
|
message:WriteInt(packet['suitClass1'])
|
|
|
|
if(packet['suitClass2'] == nil) then
|
|
packet['suitClass2'] = 0
|
|
end
|
|
message:WriteInt(packet['suitClass2'])
|
|
|
|
if(fairyAttrId == nil) then
|
|
fairyAttrId = {}
|
|
end
|
|
message:WriteInt(#packet['fairyAttrId'])
|
|
for k,v in ipairs(packet['fairyAttrId']) do
|
|
if(v == nil) then
|
|
v = 0
|
|
end
|
|
message:WriteInt(v)
|
|
end
|
|
|
|
if(fairyClassID == nil) then
|
|
fairyClassID = {}
|
|
end
|
|
message:WriteInt(#packet['fairyClassID'])
|
|
for k,v in ipairs(packet['fairyClassID']) do
|
|
if(v == nil) then
|
|
v = 0
|
|
end
|
|
message:WriteInt(v)
|
|
end
|
|
|
|
if(fairyEquipCnt == nil) then
|
|
fairyEquipCnt = {}
|
|
end
|
|
message:WriteInt(#packet['fairyEquipCnt'])
|
|
for k,v in ipairs(packet['fairyEquipCnt']) do
|
|
if(v == nil) then
|
|
v = 0
|
|
end
|
|
message:WriteInt(v)
|
|
end
|
|
|
|
if(godAttrId == nil) then
|
|
godAttrId = {}
|
|
end
|
|
message:WriteInt(#packet['godAttrId'])
|
|
for k,v in ipairs(packet['godAttrId']) do
|
|
if(v == nil) then
|
|
v = 0
|
|
end
|
|
message:WriteInt(v)
|
|
end
|
|
|
|
if(godClassID == nil) then
|
|
godClassID = {}
|
|
end
|
|
message:WriteInt(#packet['godClassID'])
|
|
for k,v in ipairs(packet['godClassID']) do
|
|
if(v == nil) then
|
|
v = 0
|
|
end
|
|
message:WriteInt(v)
|
|
end
|
|
|
|
if(godEquipCnt == nil) then
|
|
godEquipCnt = {}
|
|
end
|
|
message:WriteInt(#packet['godEquipCnt'])
|
|
for k,v in ipairs(packet['godEquipCnt']) do
|
|
if(v == nil) then
|
|
v = 0
|
|
end
|
|
message:WriteInt(v)
|
|
end
|
|
|
|
|
|
message:Send()
|
|
end
|
|
|
|
function LuaDistributesEquipSuitInfoRet.ReadPacket(binaryReader)
|
|
|
|
local packet = {}
|
|
packet['suitValue1'] = binaryReader:ReadInt32()
|
|
|
|
packet['suitValue2'] = binaryReader:ReadInt32()
|
|
|
|
packet['suitClass1'] = binaryReader:ReadInt32()
|
|
|
|
packet['suitClass2'] = binaryReader:ReadInt32()
|
|
|
|
packet['fairyAttrId'] = {}
|
|
local fairyAttrIdCnt = binaryReader:ReadInt32()
|
|
for i=1,fairyAttrIdCnt,1 do
|
|
packet['fairyAttrId'][i] = binaryReader:ReadInt32()
|
|
end
|
|
packet['fairyClassID'] = {}
|
|
local fairyClassIDCnt = binaryReader:ReadInt32()
|
|
for i=1,fairyClassIDCnt,1 do
|
|
packet['fairyClassID'][i] = binaryReader:ReadInt32()
|
|
end
|
|
packet['fairyEquipCnt'] = {}
|
|
local fairyEquipCntCnt = binaryReader:ReadInt32()
|
|
for i=1,fairyEquipCntCnt,1 do
|
|
packet['fairyEquipCnt'][i] = binaryReader:ReadInt32()
|
|
end
|
|
packet['godAttrId'] = {}
|
|
local godAttrIdCnt = binaryReader:ReadInt32()
|
|
for i=1,godAttrIdCnt,1 do
|
|
packet['godAttrId'][i] = binaryReader:ReadInt32()
|
|
end
|
|
packet['godClassID'] = {}
|
|
local godClassIDCnt = binaryReader:ReadInt32()
|
|
for i=1,godClassIDCnt,1 do
|
|
packet['godClassID'][i] = binaryReader:ReadInt32()
|
|
end
|
|
packet['godEquipCnt'] = {}
|
|
local godEquipCntCnt = binaryReader:ReadInt32()
|
|
for i=1,godEquipCntCnt,1 do
|
|
packet['godEquipCnt'][i] = binaryReader:ReadInt32()
|
|
end
|
|
|
|
return packet
|
|
end |