public override void Execute(int globalcooldown) { if (!this.DoesKeyExist) { return; } if (!KeyHelper.HasKey(this._name)) { this._spell = (BarSpell)null; } if (this._spell == null) { this._spell = BarMapper.GetSpellByName(this._name); this._spell.SetCooldown(globalcooldown); KeyHelper.AddKey(this._name, "", this._spell.Bar.ToString(), this._spell.Key.ToString()); } this._spell.CastSpell(); }
public override void Execute(int globalcooldown) { if (DoesKeyExist) { if (!KeyHelper.HasKey(_name)) { _spell = null; } //Load the spell and set the global cooldown if (_spell == null) { _spell = BarMapper.GetSpellByName(_name); _spell.SetCooldown(globalcooldown); KeyHelper.AddKey(_name, "", _spell.Bar.ToString(), _spell.Key.ToString()); } _spell.CastSpell(); } }
/// <summary> /// Returns a BarSpell /// </summary> /// <returns></returns> public BarSpell GetKey() { return(BarMapper.GetSpellByName(SpellName)); }