public override void Deserialize(IDataReader reader) { base.Deserialize(reader); var flag = reader.ReadByte(); Sex = BooleanByteWrapper.GetFlag(flag, 0); IsRideable = BooleanByteWrapper.GetFlag(flag, 1); IsFeconded = BooleanByteWrapper.GetFlag(flag, 2); IsFecondationReady = BooleanByteWrapper.GetFlag(flag, 3); Id = reader.ReadVarUhLong(); ExpirationDate = reader.ReadVarUhLong(); Model = reader.ReadVarUhInt(); Name = reader.ReadUTF(); Owner = reader.ReadUTF(); Level = reader.ReadSByte(); ReproductionCount = reader.ReadVarInt(); ReproductionCountMax = reader.ReadVarUhInt(); var EffectsCount = reader.ReadShort(); Effects = new List <ObjectEffectInteger>(); for (var i = 0; i < EffectsCount; i++) { var objectToAdd = new ObjectEffectInteger(); objectToAdd.Deserialize(reader); Effects.Add(objectToAdd); } var CapacitiesCount = reader.ReadShort(); Capacities = new List <int>(); for (var i = 0; i < CapacitiesCount; i++) { Capacities.Add(reader.ReadVarInt()); } }
public override void Deserialize(IDataReader reader) { var flag = reader.ReadByte(); Sex = BooleanByteWrapper.GetFlag(flag, 0); IsRideable = BooleanByteWrapper.GetFlag(flag, 1); IsWild = BooleanByteWrapper.GetFlag(flag, 2); IsFecondationReady = BooleanByteWrapper.GetFlag(flag, 3); UseHarnessColors = BooleanByteWrapper.GetFlag(flag, 4); Id = reader.ReadDouble(); Model = reader.ReadVarUhInt(); var AncestorCount = reader.ReadShort(); Ancestor = new List <int>(); for (var i = 0; i < AncestorCount; i++) { Ancestor.Add(reader.ReadInt()); } var BehaviorsCount = reader.ReadShort(); Behaviors = new List <int>(); for (var i = 0; i < BehaviorsCount; i++) { Behaviors.Add(reader.ReadInt()); } Name = reader.ReadUTF(); OwnerId = reader.ReadInt(); Experience = reader.ReadVarUhLong(); ExperienceForLevel = reader.ReadVarUhLong(); ExperienceForNextLevel = reader.ReadDouble(); Level = reader.ReadSByte(); MaxPods = reader.ReadVarUhInt(); Stamina = reader.ReadVarUhInt(); StaminaMax = reader.ReadVarUhInt(); Maturity = reader.ReadVarUhInt(); MaturityForAdult = reader.ReadVarUhInt(); Energy = reader.ReadVarUhInt(); EnergyMax = reader.ReadVarUhInt(); Serenity = reader.ReadInt(); AggressivityMax = reader.ReadInt(); SerenityMax = reader.ReadVarUhInt(); Love = reader.ReadVarUhInt(); LoveMax = reader.ReadVarUhInt(); FecondationTime = reader.ReadInt(); BoostLimiter = reader.ReadInt(); BoostMax = reader.ReadDouble(); ReproductionCount = reader.ReadInt(); ReproductionCountMax = reader.ReadVarUhInt(); HarnessGID = reader.ReadVarUhShort(); var EffectListCount = reader.ReadShort(); EffectList = new List <ObjectEffectInteger>(); for (var i = 0; i < EffectListCount; i++) { var objectToAdd = new ObjectEffectInteger(); objectToAdd.Deserialize(reader); EffectList.Add(objectToAdd); } }