Esempio n. 1
0
        void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            Spell procSpell = eventInfo.GetProcSpell();
            int?  energize  = procSpell.GetPowerTypeCostAmount(PowerType.Maelstrom);

            eventInfo.GetActor().CastSpell(eventInfo.GetActor(), SpellIds.AftershockEnergize, new CastSpellExtraArgs(energize != 0)
                                           .AddSpellMod(SpellValueMod.BasePoint0, energize.Value));
        }
Esempio n. 2
0
        bool CheckEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            Spell procSpell = eventInfo.GetProcSpell();

            if (procSpell != null)
            {
                return(procSpell.HasPowerTypeCost(PowerType.HolyPower));
            }

            return(false);
        }
Esempio n. 3
0
        bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            Spell procSpell = eventInfo.GetProcSpell();

            if (procSpell != null)
            {
                int?cost = procSpell.GetPowerTypeCostAmount(PowerType.Maelstrom);
                if (cost.HasValue)
                {
                    return(cost > 0 && RandomHelper.randChance(aurEff.GetAmount()));
                }
            }

            return(false);
        }
Esempio n. 4
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            var costs = eventInfo.GetProcSpell().GetPowerCost();
            var m     = costs.Find(cost => cost.Power == PowerType.Mana);

            if (m != null)
            {
                int mana = MathFunctions.CalculatePct(m.Amount, 35);
                if (mana > 0)
                {
                    GetTarget().CastCustomSpell(SpellIds.ItemManaSurge, SpellValueMod.BasePoint0, mana, GetTarget(), true, null, aurEff);
                }
            }
        }
Esempio n. 5
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            var costs = eventInfo.GetProcSpell().GetPowerCost();
            var m     = costs.Find(cost => cost.Power == PowerType.Mana);

            if (m != null)
            {
                int mana = MathFunctions.CalculatePct(m.Amount, 35);
                if (mana > 0)
                {
                    CastSpellExtraArgs args = new(aurEff);
                    args.AddSpellMod(SpellValueMod.BasePoint0, mana);
                    GetTarget().CastSpell(GetTarget(), SpellIds.ItemManaSurge, args);
                }
            }
        }
Esempio n. 6
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo procInfo)
        {
            Spell procSpell = procInfo.GetProcSpell();
            int   amount    = aurEff.GetAmount() * procSpell.GetPowerTypeCostAmount(PowerType.ComboPoints).Value * 1000;

            Unit target = GetTarget();

            if (target != null)
            {
                Aura aura = target.GetAura(SpellIds.SliceAndDice);
                if (aura != null)
                {
                    aura.SetDuration(aura.GetDuration() + amount);
                }
                else
                {
                    CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);
                    args.AddSpellMod(SpellValueMod.Duration, amount);
                    target.CastSpell(target, SpellIds.SliceAndDice, args);
                }
            }
        }
Esempio n. 7
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();
            Spell spell = eventInfo.GetProcSpell();

            if (spell == null)
            {
                return;
            }

            Unit caster = eventInfo.GetActor();
            var  costs  = spell.GetPowerCost();
            var  m      = costs.First(cost => cost.Power == PowerType.Mana);

            if (m == null)
            {
                return;
            }

            int amount = MathFunctions.CalculatePct(m.Amount, aurEff.GetAmount());

            caster.CastCustomSpell(SpellIds.Exhilarate, SpellValueMod.BasePoint0, amount, null, true, null, aurEff);
        }
Esempio n. 8
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(eventInfo.GetProcSpell() != null);
 }
Esempio n. 9
0
        bool HandleCheckProc(ProcEventInfo eventInfo)
        {
            Spell procSpell = eventInfo.GetProcSpell();

            return(procSpell && procSpell.HasPowerTypeCost(PowerType.ComboPoints));
        }