/// <summary> /// Adds a spell. /// </summary> /// <param name="info">The spellinfo.</param> public bool AddSpell(SpellInfo info) { if (Spells.ContainsKey(info.ID)) return false; if (Spells.TryAdd(info.ID, info)) { info.SendSpellToClient(Owner); Database.CharacterDatabase.SaveSpell(Owner, info); return true; } return false; }
/// <summary> /// Adds a spell. /// </summary> /// <param name="info">The spellinfo.</param> public bool AddSpell(SpellInfo info) { if (Spells.ContainsKey(info.ID)) { return(false); } if (Spells.TryAdd(info.ID, info)) { info.SendSpellToClient(Owner); Database.CharacterDatabase.SaveSpell(Owner, info); return(true); } return(false); }
public bool AddSpell(ushort ID) { if (Spells.ContainsKey(ID)) { return(false); } SpellInfo info = new SpellInfo(); info.ID = ID; if (Spells.TryAdd(info.ID, info)) { info.SendSpellToClient(Owner); Database.CharacterDatabase.SaveSpell(Owner, info); return(true); } return(false); }