コード例 #1
0
ファイル: Shaman.cs プロジェクト: uvbs/CypherCore
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            DamageInfo damageInfo = eventInfo.GetDamageInfo();

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

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.Electrified);
            int       amount    = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), aurEff.GetAmount());

            amount /= (int)spellInfo.GetMaxTicks(Difficulty.None);

            // Add remaining ticks to damage done
            Unit caster = eventInfo.GetActor();
            Unit target = eventInfo.GetProcTarget();

            amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.Electrified, AuraType.PeriodicDamage);

            caster.CastCustomSpell(SpellIds.Electrified, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
        }
コード例 #2
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.ChainedHeal, GetCastDifficulty());
            int       amount    = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            amount /= (int)spellInfo.GetMaxTicks();

            Unit caster = eventInfo.GetActor();
            Unit target = eventInfo.GetProcTarget();

            CastSpellExtraArgs args = new(aurEff);

            args.AddSpellMod(SpellValueMod.BasePoint0, amount);
            caster.CastSpell(target, SpellIds.ChainedHeal, args);
        }
コード例 #3
0
        void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            PreventDefaultAction();

            HealInfo healInfo = eventInfo.GetHealInfo();

            if (healInfo == null || healInfo.GetHeal() == 0)
            {
                return;
            }

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.ChainedHeal, GetCastDifficulty());
            int       amount    = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());

            amount /= (int)spellInfo.GetMaxTicks();

            // Add remaining ticks to healing done
            Unit caster = eventInfo.GetActor();
            Unit target = eventInfo.GetProcTarget();

            amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.ChainedHeal, AuraType.PeriodicHeal);

            caster.CastCustomSpell(SpellIds.ChainedHeal, SpellValueMod.BasePoint0, amount, target, true, null, aurEff);
        }
コード例 #4
0
ファイル: DeathKnight.cs プロジェクト: mayor2012/CypherCore
        bool CheckProc(ProcEventInfo eventInfo)
        {
            Unit caster = eventInfo.GetActor();

            if (caster)
            {
                if (!caster.IsTypeId(TypeId.Player) || caster.GetClass() != Class.Deathknight)
                {
                    return(false);
                }

                for (byte i = 0; i < PlayerConst.MaxRunes; ++i)
                {
                    if (caster.ToPlayer().GetRuneCooldown(i) == 0)
                    {
                        return(false);
                    }
                }

                return(true);
            }

            return(false);
        }
コード例 #5
0
ファイル: Druid.cs プロジェクト: snowflake95/CypherCore
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActor().CastSpell((Unit)null, SpellIds.Infusion, true, null, aurEff);
 }
コード例 #6
0
ファイル: Druid.cs プロジェクト: snowflake95/CypherCore
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.BlessingOfTheClaw, true, null, aurEff);
 }
コード例 #7
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActor().CastSpell(eventInfo.GetProcTarget(), SpellIds.ArmorOfFaith, true);
 }
コード例 #8
0
 void Trigger(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     eventInfo.GetActor().CastSpell(GetTarget(), SpellIds.FingersOfFrost, new CastSpellExtraArgs(aurEff));
 }
コード例 #9
0
ファイル: Mage.cs プロジェクト: MaxtorCoder/CypherCore
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     eventInfo.GetActor().CastSpell((Unit)null, SpellIds.ManaSurge, true);
 }
コード例 #10
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     _procTarget = eventInfo.GetActor().SelectNearbyTarget(eventInfo.GetProcTarget());
     return(_procTarget);
 }
コード例 #11
0
ファイル: Paladin.cs プロジェクト: lyosky/CypherCore
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     GetTarget().CastSpell(eventInfo.GetActor(), SpellIds.EyeForAnEyeTriggered, true);
 }
コード例 #12
0
 bool CheckProc(ProcEventInfo eventInfo)
 {
     return(eventInfo.GetActor() == eventInfo.GetActionTarget());
 }
コード例 #13
0
ファイル: Paladin.cs プロジェクト: spadd/CypherCore
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo procInfo)
 {
     procInfo.GetActor().CastSpell(procInfo.GetActor(), SpellIds.RighteousVerdictAura, true);
 }
コード例 #14
0
ファイル: Paladin.cs プロジェクト: spadd/CypherCore
        bool CheckEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
        {
            SpellInfo procSpell = eventInfo.GetSpellInfo();

            if (procSpell != null)
            {
                _baseHolyPowerCost = procSpell.CalcPowerCost(PowerType.HolyPower, false, eventInfo.GetActor(), eventInfo.GetSchoolMask());
            }
            else
            {
                _baseHolyPowerCost = null;
            }

            return(_baseHolyPowerCost != null);
        }
コード例 #15
0
 void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     GetTarget().CastSpell(eventInfo.GetActor(), SpellIds.CracklingJadeLightningKnockback, TriggerCastFlags.FullMask);
     GetTarget().CastSpell(GetTarget(), SpellIds.CracklingJadeLightningKnockbackCd, TriggerCastFlags.FullMask);
 }
コード例 #16
0
ファイル: Shaman.cs プロジェクト: query-wow/CypherCore
 void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     PreventDefaultAction();
     _procTargetGuid = eventInfo.GetProcTarget().GetGUID();
     eventInfo.GetActor().CastSpell(eventInfo.GetActor(), SpellIds.EarthenRagePeriodic, true);
 }
コード例 #17
0
 void Trigger(AuraEffect aurEff, ProcEventInfo eventInfo)
 {
     eventInfo.GetActor().CastSpell(GetTarget(), SpellIds.FingersOfFrost, true, null, aurEff);
 }