/// <summary> /// Cast a <see cref="Spell"/> with the supplied <see cref="SpellParameters"/>. /// </summary> public void CastSpell(SpellParameters parameters) { if (parameters == null) { throw new ArgumentNullException(); } if (DisableManager.Instance.IsDisabled(DisableType.BaseSpell, parameters.SpellInfo.BaseInfo.Entry.Id)) { if (this is Player player) { player.SendSystemMessage($"Unable to cast base spell {parameters.SpellInfo.BaseInfo.Entry.Id} because it is disabled."); } return; } if (DisableManager.Instance.IsDisabled(DisableType.Spell, parameters.SpellInfo.Entry.Id)) { if (this is Player player) { player.SendSystemMessage($"Unable to cast spell {parameters.SpellInfo.Entry.Id} because it is disabled."); } return; } var spell = new Spell.Spell(this, parameters); spell.Cast(); pendingSpells.Add(spell); }
/// <summary> /// Cast a <see cref="Spell"/> with the supplied <see cref="SpellParameters"/>. /// </summary> public void CastSpell(SpellParameters parameters) { if (parameters == null) { throw new ArgumentNullException(); } var spell = new Spell.Spell(this, parameters); spell.Cast(); pendingSpells.Add(spell); }