Ejemplo n.º 1
0
            void HandleDummy(SpellEffIndex /*effIndex*/)
            {
                if (Unit* ally = GetHitUnit())
                    if (Player* caster = GetCaster()->ToPlayer())
                        if (Pet* target = caster->GetPet())
                        {
                            TriggerCastFlags castMask = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_CASTER_AURASTATE);
                            target->CastSpell(ally, GetEffectValue(), castMask);
                            target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask);
                            target->CastSpell(target, SPELL_HUNTER_MASTERS_CALL_TRIGGERED, castMask);

                            target->GetMotionMaster()->Clear();

                            Movement::MoveSplineInit init(target);
                            init.MoveTo(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), false);
                            init.SetVelocity(42.0f);
                            init.Launch();

                            int delay = 3;
                            if (caster->HasSpell(34454))
                                delay += 6;
                            else if (caster->HasSpell(34453))
                                delay += 3;
                            target->SetMasterCallDelay(delay);
                        }
            }
Ejemplo n.º 2
0
 void HandleScriptEffect(SpellEffIndex /*effIndex*/)
 {
     if (Unit* target = GetHitUnit())
     {
         // Cannot be processed while pet is dead
         TriggerCastFlags castMask = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_CASTER_AURASTATE);
         target->CastSpell(target, SPELL_HUNTER_MASTERS_CALL_TRIGGERED, castMask);
     }
 }
Ejemplo n.º 3
0
 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if (Unit* ally = GetHitUnit())
         if (Player* caster = GetCaster()->ToPlayer())
             if (Pet* target = caster->GetPet())
             {
                 TriggerCastFlags castMask = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_CASTER_AURASTATE);
                 target->CastSpell(ally, GetEffectValue(), castMask);
             }
 }
Ejemplo n.º 4
0
 void HandleDummy(SpellEffIndex /*effIndex*/)
 {
     if (Unit* ally = GetHitUnit())
         if (Player* caster = GetCaster()->ToPlayer())
             if (Pet* target = caster->GetPet())
             {
                 TriggerCastFlags castMask = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_CASTER_AURASTATE);
                 target->CastSpell(ally, GetEffectValue(), castMask);
                 target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask);
                 target->RemoveMovementImpairingAuras(); // remove already applied root and snare from pet
                 caster->RemoveMovementImpairingAuras(); // remove already applied root and snare from pet's target
                 caster->CastSpell(ally, GetEffectValue(), castMask); // this should remove already applied root and snare from pet's target, but not working
                 caster->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask); // apply 4s root and snare immunity to pet's target
             }
 }
Ejemplo n.º 5
0
 void HandleScriptEffect(SpellEffIndex /*effIndex*/)
 {
     if (Unit* target = GetHitUnit())
     {
         // Cannot be processed while pet is dead
         TriggerCastFlags castMask = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_CASTER_AURASTATE);
         target->CastSpell(target, GetEffectValue(), castMask);
         target->CastSpell(target, HUNTER_SPELL_MASTERS_CALL_TRIGGERED, castMask);
         if (Unit* ally = GetExplTargetUnit())
         {
             target->CastSpell(ally, GetEffectValue(), castMask);
             target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask);
         }
     }
 }
Ejemplo n.º 6
0
 void HandleScriptEffect(SpellEffIndex /*effIndex*/)
 {
     if (Unit* target = GetHitUnit())
     {
         // Cannot be processed while pet is dead
         TriggerCastFlags castMask = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_CASTER_AURASTATE);
         target->CastSpell(target, GetEffectValue(), castMask);
         target->CastSpell(target, HUNTER_SPELL_MASTERS_CALL_TRIGGERED, castMask);
         // there is a possibility that this effect should access effect 0 (dummy) target, but i dubt that
         // it's more likely that on on retail it's possible to call target selector based on dbc values
         // anyways, we're using GetTargetUnit() here and it's ok
         if (Unit* ally = GetTargetUnit())
         {
             target->CastSpell(ally, GetEffectValue(), castMask);
             target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask);
         }
     }
 }
Ejemplo n.º 7
0
 void HandleForceCast(SpellEffIndex effIndex)
 {
     PreventHitDefaultEffect(effIndex);
     // All this spells trigger a spell that requires reagents; if the
     // triggered spell is cast as "triggered", reagents are not consumed
     GetHitUnit()->CastSpell((Unit*)NULL, GetSpellInfo()->Effects[effIndex].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST));
 }
        void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
        {
            PreventDefaultAction();

            Unit* caster = GetCaster();
            if (!caster)
                return;

            Unit* target = GetTarget();
            target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), nullptr, aurEff, caster->GetGUID());
        }