Ejemplo n.º 1
0
            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                AuraEffect* counter = GetEffect(EFFECT_1);
                if (!counter)
                    return;

                // Count spell criticals in a row in second aura
                if (eventInfo.GetHitMask() & PROC_HIT_CRITICAL)
                {
                    counter->SetAmount(counter->GetAmount() * 2);
                    if (counter->GetAmount() < 100) // not enough
                        return;

                    // roll chance
                    if (!roll_chance_i(aurEff->GetAmount()))
                        return;

                    Unit* caster = eventInfo.GetActor();
                    caster->CastSpell(caster, SPELL_MAGE_HOT_STREAK_PROC, true, nullptr, aurEff);
                }

                // reset counter
                counter->SetAmount(25);
            }
Ejemplo n.º 2
0
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                // Do not take charges, add a stack of crit buff
                if (!(eventInfo.GetHitMask() & PROC_HIT_CRITICAL))
                {
                    eventInfo.GetActor()->CastSpell(nullptr, SPELL_MAGE_COMBUSTION_PROC, true);
                    return false;
                }

                return true;
            }