void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
                if (!spellInfo)
                    return;

                uint32 spellId;
                int32 chance;

                // Holy Light & Flash of Light
                if (spellInfo->SpellFamilyFlags[0] & 0xC0000000)
                {
                    spellId = SPELL_PALADIN_ENDURING_LIGHT;
                    chance = 15;
                }
                // Judgements
                else if (spellInfo->SpellFamilyFlags[0] & 0x00800000)
                {
                    spellId = SPELL_PALADIN_ENDURING_JUDGEMENT;
                    chance = 50;
                }
                else
                    return;

                if (roll_chance_i(chance))
                    eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), spellId, true);
            }
Exemple #2
0
            void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
                if (!spellInfo)
                    return;

                uint32 spellId;
                int32 chance;

                // Lesser Healing Wave
                if (spellInfo->SpellFamilyFlags[0] & 0x00000080)
                {
                    spellId = SPELL_SHAMAN_ENERGY_SURGE;
                    chance = 10;
                }
                // Lightning Bolt
                else if (spellInfo->SpellFamilyFlags[0] & 0x00000001)
                {
                    spellId = SPELL_SHAMAN_ENERGY_SURGE;
                    chance = 15;
                }
                // Stormstrike
                else if (spellInfo->SpellFamilyFlags[1] & 0x00000010)
                {
                    spellId = SPELL_SHAMAN_POWER_SURGE;
                    chance = 50;
                }
                else
                    return;

                if (roll_chance_i(chance))
                    eventInfo.GetActor()->CastSpell((Unit*)nullptr, spellId, true);
            }
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
                    if (spellInfo->Id == SPELL_MAGE_IGNITE)
                        return true;

                return false;
            }
 bool CheckProc(ProcEventInfo& eventInfo)
 {
     // Dont proc with Living Bomb explosion
     SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
     if (spellInfo && spellInfo->SpellIconID == SPELL_ICON_MAGE_LIVING_BOMB && spellInfo->SpellFamilyName == SPELLFAMILY_MAGE)
         return false;
     return true;
 }
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
                    if (spellInfo->GetAllEffectsMechanicMask() & ((1 << MECHANIC_INTERRUPT) | (1 << MECHANIC_SILENCE)))
                        return true;

                return false;
            }
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                // due to family mask sharing with brain freeze/missile barrage proc, we need to filter out by icon id
                SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
                if (!spellInfo || (spellInfo->SpellIconID != SPELL_ICON_MAGE_CLEARCASTING && spellInfo->SpellIconID != SPELL_ICON_MAGE_PRESENCE_OF_MIND))
                    return false;

                return true;
            }
Exemple #7
0
        void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
        {
            if (eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->Id == 82036)
                return;

            SpellSchoolMask mask = eventInfo.GetDamageInfo()->GetSchoolMask();
            if (mask & SPELL_SCHOOL_MASK_NORMAL)
            {
                int32 damage = QuadraticLinarBenefit(30.0f, 100.0f, eventInfo.GetDamageInfo()->GetDamage());
                if (damage < 1) damage = 1;
                GetCaster()->CastCustomSpell(eventInfo.GetProcTarget(), 82036, &damage, NULL, NULL, true);
            }
            else if (mask & SPELL_SCHOOL_MASK_NATURE)
            {
                int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
                GetCaster()->CastCustomSpell(GetCaster(), 82037, &damage, NULL, NULL, true);
            }
        }
Exemple #8
0
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                // Growl shares family flags with other spells
                // filter by spellIcon instead
                SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
                if (!spellInfo || spellInfo->SpellIconID != PET_ICON_ID_GROWL)
                    return false;

                return true;
            }
Exemple #9
0
        void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
        {
            PreventDefaultAction();
            SpellInfo const* procSpell = eventInfo.GetSpellInfo();
            if (!procSpell)
                return;

            uint32 mana = procSpell->ManaCost + procSpell->ManaCostPercentage *  GetTarget()->GetCreateMana() / 100;
            int32 basepoint = CalculatePct(int32(mana), aurEff->GetAmount());
            GetTarget()->CastCustomSpell(GetTarget(), SPELL_HUNTER_GLYPH_OF_ARCANE_SHOT, &basepoint, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
        }
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
                if (!spellInfo)
                    return false;

                // Arcane Blast - full chance
                if (spellInfo->SpellFamilyFlags[0] & 0x20000000)
                    return true;

                // Rest of spells have half chance
                return roll_chance_i(50);
            }
Exemple #11
0
            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();

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

                Unit* target = eventInfo.GetProcTarget();
                if (!target->CanHaveThreatList())
                    return;
                float addThreat = CalculatePct(ASSERT_NOTNULL(eventInfo.GetSpellInfo())->Effects[EFFECT_0].CalcValue(caster), aurEff->GetAmount());
                target->GetThreatManager().AddThreat(caster, addThreat, GetSpellInfo(), false, true);
            }
Exemple #12
0
        bool HandleCheckProc(ProcEventInfo& eventInfo)
        {
            Unit const* const caster = GetCaster();
            SpellInfo const* const triggerSpell = eventInfo.GetSpellInfo();

            if (triggerSpell)
            {
                // Prevents proc by damage from the spell itself
                if (triggerSpell->Id != GetId())
                    return true;

                // Sanguinary Vein
                if (AuraEffect const* const aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_SANGUINARY_VEIN, EFFECT_1))
                    if (triggerSpell->GetAuraState() == AURA_STATE_BLEEDING && roll_chance_i(aurEff->GetAmount()))
                        return false;
            }

            return true;
        }
Exemple #13
0
            bool CheckProc(ProcEventInfo& eventInfo)
            {
                // Claw, Bite and Smack share FamilyFlags with other spells
                // filter by spellIcon instead
                SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
                if (!spellInfo)
                    return false;

                switch (spellInfo->SpellIconID)
                {
                    case PET_ICON_ID_CLAW:
                    case PET_ICON_ID_BITE:
                    case PET_ICON_ID_SMACK:
                        break;
                    default:
                        return false;
                }

                return true;
            }
Exemple #14
0
 bool CheckProc(ProcEventInfo& eventInfo)
 {
     return eventInfo.GetSpellInfo() && (eventInfo.GetSpellInfo()->GetAllEffectsMechanicMask() & (1 << MECHANIC_SNARE | 1 << MECHANIC_ROOT | 1 << MECHANIC_FREEZE));
 }