void DoSpell(string spellname) { if (GameController.Player.ManaCost(GameController.CurrentSpell.Cost)) { RFX4_EffectEvent effect = SpellStore.GetSpell(gameObject, spellname); SpellInfo info = SpellStore.GetInfo(spellname); _effect.CharacterEffect = effect.CharacterEffect; _effect.CharacterAttachPoint = effect.CharacterAttachPoint; _effect.CharacterAttachPoint2 = effect.CharacterAttachPoint2; _effect.CharacterEffect_DestroyTime = effect.CharacterEffect_DestroyTime; _effect.CharacterEffect2_DestroyTime = effect.CharacterEffect2_DestroyTime; _effect.MainEffect = effect.MainEffect; _effect.AttachPoint = effect.AttachPoint; _effect.AdditionalEffect = effect.AdditionalEffect; _effect.AdditionalEffectAttachPoint = effect.AdditionalEffectAttachPoint; _effect.AdditionalEffect_DestroyTime = effect.AdditionalEffect_DestroyTime; animator.SetTrigger(info.Animation); } else { } }
public bool HasSpell(uint entry) { // @TODO: get rid of this ugly cast when redesign loading dbc return(SpellStore.ContainsKey((int)entry)); }