示例#1
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     if (!eventInfo.GetActionTarget())
     {
         return(false);
     }
     if (eventInfo.GetActionTarget().HasAura(SpellIds.BeaconOfLight, eventInfo.GetActor().GetGUID()))
     {
         return(false);
     }
     return(true);
 }
示例#2
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();
            DamageInfo damageInfo = eventInfo.GetDamageInfo();

            if (damageInfo == null || damageInfo.GetDamage() == 0)
            {
                return;
            }

            int amount = aurEff.GetAmount() - (int)damageInfo.GetDamage();

            if (amount > 0)
            {
                aurEff.SetAmount(amount);
                return;
            }

            Remove();

            Unit caster = GetCaster();

            if (!caster)
            {
                return;
            }

            caster.CastSpell(eventInfo.GetActionTarget(), SpellIds.SeedOfCorruptionGeneric, true, null, aurEff);
        }
示例#3
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();
            DamageInfo damageInfo = eventInfo.GetDamageInfo();

            if (damageInfo == null || damageInfo.GetDamage() == 0)
            {
                return;
            }

            int amount = (int)(aurEff.GetAmount() - damageInfo.GetDamage());

            if (amount > 0)
            {
                aurEff.SetAmount(amount);
                if (!GetTarget().HealthBelowPctDamaged(1, damageInfo.GetDamage()))
                {
                    return;
                }
            }

            Remove();

            Unit caster = GetCaster();

            if (!caster)
            {
                return;
            }

            caster.CastSpell(eventInfo.GetActionTarget(), SpellIds.SeedOfCorruptionDamage, true);
        }
示例#4
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     if (eventInfo.GetActionTarget().GetEntry() != InstanceCreatureIds.XS013Scrapbot)
     {
         return(false);
     }
     return(true);
 }
示例#5
0
        void HandleProc(ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            Unit target = eventInfo.GetActionTarget();
            int  bp0    = (int)MathFunctions.CalculatePct(target.GetMaxHealth(), GetSpellInfo().GetEffect(1).CalcValue());

            target.CastCustomSpell(SpellIds.Stoicism, SpellValueMod.BasePoint0, bp0, (Unit)null, true);
        }
示例#6
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            Unit target = eventInfo.GetActionTarget();
            //Get the Remaining Damage from the aura (if exist)
            int remainingDamage = (int)target.GetRemainingPeriodicAmount(target.GetGUID(), SpellIds.TraumaEffect, AuraType.PeriodicDamage);
            //Get 25% of damage from the spell casted (Slam & Whirlwind) plus Remaining Damage from Aura
            int damage = (int)(MathFunctions.CalculatePct(eventInfo.GetDamageInfo().GetDamage(), aurEff.GetAmount()) / Global.SpellMgr.GetSpellInfo(SpellIds.TraumaEffect).GetMaxTicks(Difficulty.None)) + remainingDamage;

            GetCaster().CastCustomSpell(SpellIds.TraumaEffect, SpellValueMod.BasePoint0, damage, target, true);
        }
示例#7
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            Unit target = eventInfo.GetActionTarget();
            //Get 25% of damage from the spell casted (Slam & Whirlwind) plus Remaining Damage from Aura
            int damage = (int)(MathFunctions.CalculatePct(eventInfo.GetDamageInfo().GetDamage(), aurEff.GetAmount()) / Global.SpellMgr.GetSpellInfo(SpellIds.TraumaEffect, GetCastDifficulty()).GetMaxTicks());
            CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);

            args.AddSpellMod(SpellValueMod.BasePoint0, damage);
            GetCaster().CastSpell(target, SpellIds.TraumaEffect, args);
        }
示例#8
0
        void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            Unit attacker           = eventInfo.GetActor();
            CastSpellExtraArgs args = new(aurEff);

            args.AddSpellMod(SpellValueMod.BasePoint0, Math.Max(1, (int)(attacker.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * 0.0264f)));
            attacker.CastSpell(eventInfo.GetActionTarget(), SpellIds.FlametongueAttack, args);
        }
示例#9
0
        void HandleProc(ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            Unit target             = eventInfo.GetActionTarget();
            int  bp0                = (int)MathFunctions.CalculatePct(target.GetMaxHealth(), GetSpellInfo().GetEffect(1).CalcValue());
            CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);

            args.AddSpellMod(SpellValueMod.BasePoint0, bp0);
            target.CastSpell((Unit)null, SpellIds.Stoicism, args);
        }
示例#10
0
        bool CheckProc(ProcEventInfo eventInfo)
        {
            if (eventInfo.GetActionTarget().HealthBelowPct(20))
            {
                return(true);
            }

            DamageInfo damageInfo = eventInfo.GetDamageInfo();

            if (damageInfo != null && damageInfo.GetDamage() != 0)
            {
                if (GetTarget().HealthBelowPctDamaged(20, damageInfo.GetDamage()))
                {
                    return(true);
                }
            }

            return(false);
        }
示例#11
0
        void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            Unit attacker = eventInfo.GetActor();
            int  damage   = (int)(attacker.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * 0.12f / 2600 * attacker.GetBaseAttackTime(WeaponAttackType.BaseAttack));

            attacker.CastCustomSpell(SpellIds.FlametongueAttack, SpellValueMod.BasePoint0, damage, eventInfo.GetActionTarget(), TriggerCastFlags.FullMask, null, aurEff);
        }
示例#12
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActionTarget().CastSpell((Unit)null, SpellIds.RunicReturn, true);
 }
示例#13
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(eventInfo.GetActor() == eventInfo.GetActionTarget());
 }
示例#14
0
 bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     return(eventInfo.GetActionTarget().HealthBelowPct(aurEff.GetAmount()));
 }