public void LearnSpell(AbstractSpell spell) { if (!KnownSpells.Contains(spell)) { KnownSpells.Add(spell); } }
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()); } }
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(); } }
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 }); } }