LuaDistributesChildrenSkill = {} LuaDistributesChildrenSkill.sysID = 0 LuaDistributesChildrenSkill.cmdID = 0 function LuaDistributesChildrenSkill.ExtraPacket(memStream) -- print('ExtraPacket:'..memStream.Length) local binaryReader = CS.BinaryMessageHandle.GetLuaPacketReader(memStream) local sysID = binaryReader:ReadByte() local cmdID = binaryReader:ReadByte() packet = LuaDistributesChildrenSkill.ReadPacket(binaryReader) return packet end function LuaDistributesChildrenSkill.SendPacket(packet) local message = CS.BinaryMessageHandle.CreateMessage(LuaDistributesChildrenSkill.sysID, LuaDistributesChildrenSkill.cmdID) if(packet['curLvlMath'] == nil) then packet['curLvlMath'] = 0 end message:WriteInt(packet['curLvlMath']) if(packet['curExpMath'] == nil) then packet['curExpMath'] = 0 end message:WriteInt(packet['curExpMath']) if(packet['curLvlArt'] == nil) then packet['curLvlArt'] = 0 end message:WriteInt(packet['curLvlArt']) if(packet['curExpArt'] == nil) then packet['curExpArt'] = 0 end message:WriteInt(packet['curExpArt']) if(packet['curLvlWarcraft'] == nil) then packet['curLvlWarcraft'] = 0 end message:WriteInt(packet['curLvlWarcraft']) if(packet['curExpWarcraft'] == nil) then packet['curExpWarcraft'] = 0 end message:WriteInt(packet['curExpWarcraft']) if(packet['curLvlStamina'] == nil) then packet['curLvlStamina'] = 0 end message:WriteInt(packet['curLvlStamina']) if(packet['curExpStamina'] == nil) then packet['curExpStamina'] = 0 end message:WriteInt(packet['curExpStamina']) if(packet['studyingType'] == nil) then packet['studyingType'] = 0 end message:WriteInt(packet['studyingType']) if(packet['studyingEndtime'] == nil) then packet['studyingEndtime'] = 0 end message:WriteInt(packet['studyingEndtime']) message:Send() end function LuaDistributesChildrenSkill.ReadPacket(binaryReader) local packet = {} packet['curLvlMath'] = binaryReader:ReadInt32() packet['curExpMath'] = binaryReader:ReadInt32() packet['curLvlArt'] = binaryReader:ReadInt32() packet['curExpArt'] = binaryReader:ReadInt32() packet['curLvlWarcraft'] = binaryReader:ReadInt32() packet['curExpWarcraft'] = binaryReader:ReadInt32() packet['curLvlStamina'] = binaryReader:ReadInt32() packet['curExpStamina'] = binaryReader:ReadInt32() packet['studyingType'] = binaryReader:ReadInt32() packet['studyingEndtime'] = binaryReader:ReadInt32() return packet end