public override void Deserialize(GenericReader reader) { MetaTalismanskills = new Dictionary <MetaTalismanSkillType, BaseMetaTalismanSkill>(); base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 0: { _Stage = reader.ReadInt(); _EvoXp = reader.ReadInt(); NextEvolution = reader.ReadInt(); MaxStage = reader.ReadInt(); MaxAbilities = reader.ReadInt(); CurrentAbilities = reader.ReadInt(); MetaTalismanskills = reader.ReadDictionary( () => { var c = (MetaTalismanSkillType)reader.ReadInt(); var s = new BaseMetaTalismanSkill(reader); return(new KeyValuePair <MetaTalismanSkillType, BaseMetaTalismanSkill>(c, s)); }); } break; } }
public virtual void DoAbility(MetaTalismanSkillType skill, BaseCreature target, Mobile attacker) { if (MetaTalismanskills != null && MetaTalismanskills.ContainsKey(skill)) { //Console.WriteLine("doability test @ BaseMetaTalisman.cs : (" + target + ")"); BaseMetaTalismanSkill metatalismanskill = MetaTalismanskills[skill]; metatalismanskill.FindAbility(target, this, attacker); } }