70 lines
1.6 KiB
Plaintext
70 lines
1.6 KiB
Plaintext
|
LuaDistributesRetUpStarAssist = {}
|
||
|
|
||
|
LuaDistributesRetUpStarAssist.sysID = 3
|
||
|
LuaDistributesRetUpStarAssist.cmdID = 51
|
||
|
|
||
|
function LuaDistributesRetUpStarAssist.ExtraPacket(memStream)
|
||
|
-- print('ExtraPacket:'..memStream.Length)
|
||
|
|
||
|
local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream)
|
||
|
local sysID = binaryReader:ReadByte()
|
||
|
local cmdID = binaryReader:ReadByte()
|
||
|
packet = LuaDistributesRetUpStarAssist.ReadPacket(binaryReader)
|
||
|
|
||
|
return packet
|
||
|
end
|
||
|
|
||
|
function LuaDistributesRetUpStarAssist.SendPacket(packet)
|
||
|
local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesRetUpStarAssist.sysID, LuaDistributesRetUpStarAssist.cmdID)
|
||
|
if(packet['actId'] == nil) then
|
||
|
packet['actId'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['actId'])
|
||
|
|
||
|
if(packet['type'] == nil) then
|
||
|
packet['type'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['type'])
|
||
|
|
||
|
if(packet['level'] == nil) then
|
||
|
packet['level'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['level'])
|
||
|
|
||
|
if(packet['starCount'] == nil) then
|
||
|
packet['starCount'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['starCount'])
|
||
|
|
||
|
if(packet['nextYbCount'] == nil) then
|
||
|
packet['nextYbCount'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['nextYbCount'])
|
||
|
|
||
|
if(packet['minLevel'] == nil) then
|
||
|
packet['minLevel'] = 0
|
||
|
end
|
||
|
message:WriteInt(packet['minLevel'])
|
||
|
|
||
|
|
||
|
message:Send()
|
||
|
end
|
||
|
|
||
|
function LuaDistributesRetUpStarAssist.ReadPacket(binaryReader)
|
||
|
|
||
|
local packet = {}
|
||
|
packet['actId'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['type'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['level'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['starCount'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['nextYbCount'] = binaryReader:ReadInt32()
|
||
|
|
||
|
packet['minLevel'] = binaryReader:ReadInt32()
|
||
|
|
||
|
|
||
|
return packet
|
||
|
end
|