Ejemplo n.º 1
0
 private void TriggerSpell(WorldObject owner)
 {
     timer = null;
     SpellCast.ValidateAndTriggerNew(m_spellEffect.TriggerSpell, m_aura.CasterReference, Owner,
                                     Owner, m_aura.Controller as SpellChannel, m_aura.UsedItem,
                                     null, null);
 }
Ejemplo n.º 2
0
 private void TriggerSpell(WorldObject owner)
 {
     this.timer = (OneShotObjectUpdateTimer)null;
     SpellCast.ValidateAndTriggerNew(this.m_spellEffect.TriggerSpell, this.m_aura.CasterReference, this.Owner,
                                     (WorldObject)this.Owner, this.m_aura.Controller as SpellChannel, this.m_aura.UsedItem,
                                     (IUnitAction)null, (SpellEffect)null);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Called when a matching proc event triggers this proc handler with the given
 /// triggerer and action.
 /// </summary>
 public override void OnProc(Unit triggerer, IUnitAction action)
 {
     if (this.m_spellEffect.TriggerSpell == null)
     {
         return;
     }
     SpellCast.ValidateAndTriggerNew(this.m_spellEffect.TriggerSpell, this.m_aura.CasterReference, this.Owner,
                                     (WorldObject)triggerer, this.m_aura.Controller as SpellChannel, this.m_aura.UsedItem, action,
                                     this.m_spellEffect);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Called when a matching proc event triggers this proc handler with the given
 /// triggerer and action.
 /// </summary>
 public override void OnProc(Unit triggerer, IUnitAction action)
 {
     if (m_spellEffect.TriggerSpell == null)
     {
         //log.Warn("Tried to trigger invalid Spell \"{0}\" from Aura {1}", SpellEffect.TriggerSpellId, m_aura.Spell);
     }
     else
     {
         SpellCast.ValidateAndTriggerNew(m_spellEffect.TriggerSpell, m_aura.CasterReference, Owner, triggerer,
                                         m_aura.Controller as SpellChannel, m_aura.UsedItem, action, m_spellEffect);
     }
 }
Ejemplo n.º 5
0
        private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect)
        {
            var owner = item.OwningCharacter;
            var spell = SpellHandler.Get((SpellId)effect.Misc);

            if (spell == null)
            {
                LogManager.GetCurrentClassLogger().Warn("{0} had invalid SpellId: {1}", effect, (SpellId)effect.Misc);
                return;
            }
            SpellCast.ValidateAndTriggerNew(spell, owner, owner, null, item);
        }
Ejemplo n.º 6
0
        protected void TriggerSpell(Spell spell)
        {
            SpellCast cast = m_aura.SpellCast;

            if (spell == null)
            {
                LogManager.GetCurrentClassLogger().Warn("Found invalid periodic TriggerSpell in Spell {0} ({1}) ",
                                                        m_aura.Spell,
                                                        (uint)m_spellEffect.TriggerSpellId);
                return;
            }

            SpellCast.ValidateAndTriggerNew(spell, m_aura.CasterReference, Owner, Owner, m_aura.Controller as SpellChannel, cast != null ? cast.TargetItem : null,
                                            null, m_spellEffect);
        }
        protected void TriggerSpell(Spell spell)
        {
            SpellCast spellCast = this.m_aura.SpellCast;

            if (spell == null)
            {
                LogManager.GetCurrentClassLogger().Warn("Found invalid periodic TriggerSpell in Spell {0} ({1}) ",
                                                        (object)this.m_aura.Spell, (object)this.m_spellEffect.TriggerSpellId);
            }
            else
            {
                SpellCast.ValidateAndTriggerNew(spell, this.m_aura.CasterReference, this.Owner,
                                                (WorldObject)this.Owner, this.m_aura.Controller as SpellChannel, spellCast?.TargetItem,
                                                (IUnitAction)null, this.m_spellEffect);
            }
        }
Ejemplo n.º 8
0
        private static void ApplyEquipSpell(Item item, ItemEnchantmentEffect effect)
        {
            Character owningCharacter = item.OwningCharacter;
            Spell     spell           = SpellHandler.Get((SpellId)effect.Misc);

            if (spell == null)
            {
                LogManager.GetCurrentClassLogger().Warn("{0} had invalid SpellId: {1}", (object)effect,
                                                        (object)(SpellId)effect.Misc);
            }
            else
            {
                SpellCast.ValidateAndTriggerNew(spell, (Unit)owningCharacter, (WorldObject)owningCharacter,
                                                (SpellChannel)null, item, (IUnitAction)null, (SpellEffect)null);
            }
        }
Ejemplo n.º 9
0
            public override void OnProc(Unit triggerer, IUnitAction action)
            {
                // Crypt Fever is triggered by default but changes to Ebon Plague, if
                // the caster (which by default is also the owner of this Aura) has the Ebon Plaguebringer talent.
                var     ebonPlague = m_aura.Owner.Spells.GetHighestRankOf(SpellLineId.DeathKnightUnholyEbonPlaguebringer);
                SpellId spell;

                // select spell to be triggered, based on talent rank
                if (ebonPlague != null)
                {
                    spell = EbonPlagueRanks[ebonPlague.Rank - 1];                                               // Ebon Plaguebringer
                }
                else
                {
                    spell = CryptFeverRanks[m_spellEffect.Spell.Rank - 1];                              // Crypt Fever
                }

                SpellCast.ValidateAndTriggerNew(SpellHandler.Get(spell), m_aura.CasterReference, Owner, triggerer,
                                                m_aura.Controller as SpellChannel, m_aura.UsedItem, action, m_spellEffect);
            }
Ejemplo n.º 10
0
 public bool ProcSpell(Unit creator, Unit triggerer, IUnitAction action)
 {
     //if (triggerer != null)
     SpellCast.ValidateAndTriggerNew(Spell, creator, triggerer, null, null, action);
     return(false);
 }
 public bool ProcSpell(Unit creator, Unit triggerer, IUnitAction action)
 {
     SpellCast.ValidateAndTriggerNew(this.Spell, creator, (WorldObject)triggerer, (SpellChannel)null,
                                     (Item)null, action, (SpellEffect)null);
     return(false);
 }