public override void Deserialize(GenericReader reader) { base.Deserialize(reader); var version = reader.GetVersion(); switch (version) { case 3: case 2: { _Level = reader.ReadFlag <AspectLevel>(); _Aspects = new AspectAttributes(reader); } goto case 1; case 1: { if (version < 3) { reader.ReadInt(); } _EnrageStatBuff.Deserialize(reader); } goto case 0; case 0: break; } if (_Aspects == null) { _Aspects = new AspectAttributes(this); Title = InitTitle(); } if (version < 2) { _Level = DefaultLevel; InitLevel(); } }
public BaseAspect(AIType aiType, FightMode mode, int perception, int rangeFight, double activeSpeed, double passiveSpeed) : base(aiType, mode, perception, rangeFight, activeSpeed, passiveSpeed) { _Aspects = new AspectAttributes(this); _Level = DefaultLevel; Female = Utility.RandomBool(); Title = InitTitle(); Body = InitBody(); Fame = 50000; Karma = -50000; SpeechHue = YellHue = 34; SetDamageType(ResistanceType.Physical, 20); SetDamageType(ResistanceType.Fire, 20); SetDamageType(ResistanceType.Cold, 20); SetDamageType(ResistanceType.Poison, 20); SetDamageType(ResistanceType.Energy, 20); SetResistance(ResistanceType.Physical, 25, 50); SetResistance(ResistanceType.Fire, 25, 50); SetResistance(ResistanceType.Cold, 25, 50); SetResistance(ResistanceType.Energy, 25, 50); SetResistance(ResistanceType.Poison, 25, 50); InitLevel(); var pack = Backpack; if (pack != null) { pack.Delete(); } AddItem(new BottomlessBackpack()); PackItems(); EquipItems(); Instances.Add(this); }