public void LearnSpell(AbstractSpell spell)
 {
     if (!KnownSpells.Contains(spell))
     {
         KnownSpells.Add(spell);
     }
 }
示例#2
0
        public override void ParseFromNetworkMessage(NetworkMessage message)
        {
            HasPremium     = message.ReadBool();
            PremiumUntil   = message.ReadUInt32();
            Profession     = message.ReadByte();
            HasReachedMain = message.ReadBool();

            KnownSpells.Capacity = message.ReadUInt16();
            for (var i = 0; i < KnownSpells.Capacity; ++i)
            {
                KnownSpells.Add(message.ReadByte());
            }
        }
示例#3
0
        public override void ParseFromNetworkMessage(NetworkMessage message)
        {
            HasPremium     = message.ReadBool();
            PremiumUntil   = message.ReadUInt32();
            Profession     = message.ReadByte();
            HasReachedMain = message.ReadBool();

            KnownSpells.Capacity = message.ReadUInt16();
            for (var i = 0; i < KnownSpells.Capacity; ++i)
            {
                KnownSpells.Add(message.ReadByte());
            }

            if (Client.VersionNumber >= 126010468)
            {
                activeManaShieldBar = message.ReadBool();
            }
        }
示例#4
0
 public void DeserializeSelf(Helper _helper)
 {
     foreach (string spellDef in KnownSpellsS)
     {
         SpellDefinition sd = _helper.GetSpell(spellDef);
         if (sd != null)
         {
             KnownSpells.Add(sd);
         }
     }
     foreach (SpellS spell in SpellsS)
     {
         SpellDefinition sd = _helper.GetSpell(spell.Name);
         Spells.Add(new Spell()
         {
             Definition = sd, IsCasted = spell.IsCasted
         });
     }
 }