Core/Spells: Remove ProcEventInfo::GetProcTarget to avoid confusion. (#30435)
(cherry picked from commit 81ab02d6f89605c4a059a76de2ba90b0e2e5b214)
This commit is contained in:
@@ -267,12 +267,12 @@ uint32 HealInfo::GetHitMask() const
|
||||
return _hitMask;
|
||||
}
|
||||
|
||||
ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget,
|
||||
ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget,
|
||||
ProcFlagsInit const& typeMask, ProcFlagsSpellType spellTypeMask,
|
||||
ProcFlagsSpellPhase spellPhaseMask, ProcFlagsHit hitMask,
|
||||
Spell* spell, DamageInfo* damageInfo,
|
||||
HealInfo* healInfo) :
|
||||
_actor(actor), _actionTarget(actionTarget), _procTarget(procTarget),
|
||||
_actor(actor), _actionTarget(actionTarget),
|
||||
_typeMask(typeMask), _spellTypeMask(spellTypeMask),
|
||||
_spellPhaseMask(spellPhaseMask), _hitMask(hitMask), _spell(spell),
|
||||
_damageInfo(damageInfo), _healInfo(healInfo)
|
||||
@@ -10575,7 +10575,7 @@ void Unit::TriggerAurasProcOnEvent(AuraApplicationList* myProcAuras, AuraApplica
|
||||
ProcFlagsSpellPhase spellPhaseMask, ProcFlagsHit hitMask, Spell* spell, DamageInfo* damageInfo, HealInfo* healInfo)
|
||||
{
|
||||
// prepare data for self trigger
|
||||
ProcEventInfo myProcEventInfo(this, actionTarget, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
|
||||
ProcEventInfo myProcEventInfo(this, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
|
||||
AuraApplicationProcContainer myAurasTriggeringProc;
|
||||
if (typeMaskActor)
|
||||
{
|
||||
@@ -10598,7 +10598,7 @@ void Unit::TriggerAurasProcOnEvent(AuraApplicationList* myProcAuras, AuraApplica
|
||||
}
|
||||
|
||||
// prepare data for target trigger
|
||||
ProcEventInfo targetProcEventInfo(this, actionTarget, this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
|
||||
ProcEventInfo targetProcEventInfo(this, actionTarget, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
|
||||
AuraApplicationProcContainer targetAurasTriggeringProc;
|
||||
if (typeMaskActionTarget && actionTarget)
|
||||
actionTarget->GetProcAurasTriggeredOnEvent(targetAurasTriggeringProc, targetProcAuras, targetProcEventInfo);
|
||||
|
||||
@@ -493,13 +493,12 @@ class TC_GAME_API HealInfo
|
||||
class TC_GAME_API ProcEventInfo
|
||||
{
|
||||
public:
|
||||
ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, ProcFlagsInit const& typeMask,
|
||||
ProcEventInfo(Unit* actor, Unit* actionTarget, ProcFlagsInit const& typeMask,
|
||||
ProcFlagsSpellType spellTypeMask, ProcFlagsSpellPhase spellPhaseMask, ProcFlagsHit hitMask,
|
||||
Spell* spell, DamageInfo* damageInfo, HealInfo* healInfo);
|
||||
|
||||
Unit* GetActor() const { return _actor; }
|
||||
Unit* GetActionTarget() const { return _actionTarget; }
|
||||
Unit* GetProcTarget() const { return _procTarget; }
|
||||
|
||||
ProcFlagsInit GetTypeMask() const { return _typeMask; }
|
||||
ProcFlagsSpellType GetSpellTypeMask() const { return _spellTypeMask; }
|
||||
@@ -517,7 +516,6 @@ class TC_GAME_API ProcEventInfo
|
||||
private:
|
||||
Unit* const _actor;
|
||||
Unit* const _actionTarget;
|
||||
Unit* const _procTarget;
|
||||
ProcFlagsInit _typeMask;
|
||||
ProcFlagsSpellType _spellTypeMask;
|
||||
ProcFlagsSpellPhase _spellPhaseMask;
|
||||
|
||||
@@ -6155,7 +6155,7 @@ void AuraEffect::HandleBreakableCCAuraProc(AuraApplication* aurApp, ProcEventInf
|
||||
void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* triggerCaster = aurApp->GetTarget();
|
||||
Unit* triggerTarget = eventInfo.GetProcTarget();
|
||||
Unit* triggerTarget = triggerCaster == eventInfo.GetActor() ? eventInfo.GetActionTarget() : eventInfo.GetActor();
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR8_TARGET_PROCS_ON_CASTER) && eventInfo.GetTypeMask() & TAKEN_HIT_PROC_FLAG_MASK)
|
||||
triggerTarget = eventInfo.GetActor();
|
||||
|
||||
@@ -6180,7 +6180,7 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
|
||||
void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* triggerCaster = aurApp->GetTarget();
|
||||
Unit* triggerTarget = eventInfo.GetProcTarget();
|
||||
Unit* triggerTarget = triggerCaster == eventInfo.GetActor() ? eventInfo.GetActionTarget() : eventInfo.GetActor();
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR8_TARGET_PROCS_ON_CASTER) && eventInfo.GetTypeMask() & TAKEN_HIT_PROC_FLAG_MASK)
|
||||
triggerTarget = eventInfo.GetActor();
|
||||
|
||||
@@ -6207,7 +6207,7 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
|
||||
void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* target = aurApp->GetTarget();
|
||||
Unit* triggerTarget = eventInfo.GetProcTarget();
|
||||
Unit* triggerTarget = target == eventInfo.GetActor() ? eventInfo.GetActionTarget() : eventInfo.GetActor();
|
||||
if (triggerTarget->IsImmunedToDamage(target, GetSpellInfo(), &GetSpellEffectInfo()))
|
||||
{
|
||||
SendTickImmune(triggerTarget, target);
|
||||
|
||||
@@ -254,7 +254,7 @@ class spell_undermine_arena_reaction_trigger : public AuraScript
|
||||
void HandleProc(ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
|
||||
zonescript->DoAction(CageOfCarnage::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
|
||||
zonescript->DoAction(CageOfCarnage::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -264,7 +264,7 @@ class spell_enigma_arena_reaction_trigger : public AuraScript
|
||||
void HandleProc(ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
|
||||
zonescript->DoAction(EnigmaCrucible::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
|
||||
zonescript->DoAction(EnigmaCrucible::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -339,7 +339,7 @@ class spell_arena_reaction_trigger : public AuraScript
|
||||
void HandleProc(ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
|
||||
zonescript->DoAction(HookPoint::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
|
||||
zonescript->DoAction(HookPoint::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -227,7 +227,7 @@ class spell_zandalar_arena_reaction_trigger : public AuraScript
|
||||
void HandleProc(ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
|
||||
zonescript->DoAction(Mugambala::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
|
||||
zonescript->DoAction(Mugambala::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ class spell_nokhudon_proving_grounds_reaction_trigger : public AuraScript
|
||||
void HandleProc(ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
|
||||
zonescript->DoAction(NokhudonProvingGrounds::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
|
||||
zonescript->DoAction(NokhudonProvingGrounds::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -378,7 +378,7 @@ class spell_multi_headed_proc_guarm : public AuraScript
|
||||
{
|
||||
void HandleProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_MULTI_HEADED_DAMAGE);
|
||||
GetTarget()->CastSpell(eventInfo.GetActionTarget(), SPELL_MULTI_HEADED_DAMAGE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -353,7 +353,7 @@ class spell_hallows_end_powder_blast : public AuraScript
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_HALLOWS_END_DUMMY_NUKE);
|
||||
eventInfo.GetProcTarget()->CastSpell(GetTarget(), SPELL_HALLOWS_END_DREAD_FERTILIZER);
|
||||
eventInfo.GetActor()->CastSpell(GetTarget(), SPELL_HALLOWS_END_DREAD_FERTILIZER);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -679,7 +679,7 @@ class spell_baleroc_torment_AuraScript : public AuraScript
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* healer = eventInfo.GetProcTarget();
|
||||
Unit* healer = eventInfo.GetActor();
|
||||
if (healer->HasAura(SPELL_VITAL_FLAME))
|
||||
return;
|
||||
|
||||
@@ -751,7 +751,7 @@ class spell_baleroc_vital_spark : public AuraScript
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = eventInfo.GetProcTarget())
|
||||
if (Unit* target = eventInfo.GetActionTarget())
|
||||
if (target->HasAura(SPELL_BLAZE_OF_GLORY))
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_VITAL_FLAME, true);
|
||||
}
|
||||
|
||||
@@ -1069,7 +1069,7 @@ class spell_deathbringer_blood_beast_blood_link : public AuraScript
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetProcTarget()->CastSpell(nullptr, SPELL_BLOOD_LINK_DUMMY, CastSpellExtraArgs(aurEff).AddSpellBP0(3));
|
||||
eventInfo.GetActionTarget()->CastSpell(nullptr, SPELL_BLOOD_LINK_DUMMY, CastSpellExtraArgs(aurEff).AddSpellBP0(3));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -108,7 +108,7 @@ class spell_koralon_meteor_fists : public AuraScript
|
||||
void TriggerFists(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_METEOR_FISTS_DAMAGE, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_METEOR_FISTS_DAMAGE, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -160,7 +160,7 @@ class spell_flame_warder_meteor_fists : public AuraScript
|
||||
void TriggerFists(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_FW_METEOR_FISTS_DAMAGE, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_FW_METEOR_FISTS_DAMAGE, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -1932,8 +1932,8 @@ class spell_illidan_parasitic_shadowfiend_proc : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
return target && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND) && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND_2);
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
return !target->HasAura(SPELL_PARASITIC_SHADOWFIEND) && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND_2);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -826,7 +826,7 @@ class spell_ahune_spanky_hands : public AuraScript
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_COLD_SLAP, true);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_COLD_SLAP, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -198,7 +198,7 @@ class spell_pet_gen_lich_pet_aura : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return (eventInfo.GetProcTarget()->GetTypeId() == TYPEID_PLAYER);
|
||||
return eventInfo.GetActionTarget()->IsPlayer();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
|
||||
|
||||
@@ -28,10 +28,10 @@ class spell_torghast_subjugators_manacles : public AuraScript
|
||||
{
|
||||
bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& procInfo)
|
||||
{
|
||||
if (_triggeredTargets.contains(procInfo.GetProcTarget()->GetGUID()))
|
||||
if (_triggeredTargets.contains(procInfo.GetActionTarget()->GetGUID()))
|
||||
return false;
|
||||
|
||||
_triggeredTargets.insert(procInfo.GetProcTarget()->GetGUID());
|
||||
_triggeredTargets.insert(procInfo.GetActionTarget()->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class spell_torghast_blade_of_the_lifetaker : public AuraScript
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetProcTarget(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff)
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetActionTarget(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff)
|
||||
.AddSpellMod(SPELLVALUE_BASE_POINT0, GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount()))
|
||||
.SetTriggeringSpell(procInfo.GetProcSpell()));
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class spell_torghast_touch_of_the_unseen : public AuraScript
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetProcTarget(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff)
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetActor(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff)
|
||||
.AddSpellMod(SPELLVALUE_BASE_POINT0, GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount()))
|
||||
.SetTriggeringSpell(procInfo.GetProcSpell()));
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ class spell_soulbind_sulfuric_emission : public AuraScript
|
||||
|
||||
bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& procInfo)
|
||||
{
|
||||
if (!procInfo.GetProcTarget()->HealthBelowPct(aurEff->GetAmount()))
|
||||
if (!procInfo.GetActionTarget()->HealthBelowPct(aurEff->GetAmount()))
|
||||
return false;
|
||||
|
||||
if (procInfo.GetProcTarget()->HasAura(SPELL_SULFURIC_EMISSION_COOLDOWN_AURA))
|
||||
if (procInfo.GetActionTarget()->HasAura(SPELL_SULFURIC_EMISSION_COOLDOWN_AURA))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -187,7 +187,7 @@ class spell_item_bracing_chill_proc : public AuraScript
|
||||
return;
|
||||
|
||||
if (AuraEffect const* trait = caster->GetAuraEffect(SPELL_BRACING_CHILL_TRAIT, EFFECT_0, caster->GetGUID()))
|
||||
caster->CastSpell(procInfo.GetProcTarget(), SPELL_BRACING_CHILL_HEAL,
|
||||
caster->CastSpell(procInfo.GetActionTarget(), SPELL_BRACING_CHILL_HEAL,
|
||||
CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellMod(SPELLVALUE_BASE_POINT0, trait->GetAmount()));
|
||||
|
||||
if (GetStackAmount() > 1)
|
||||
@@ -344,7 +344,7 @@ class spell_item_divine_right : public AuraScript
|
||||
{
|
||||
bool CheckHealthPct(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget()->HasAuraState(AURA_STATE_WOUNDED_20_PERCENT, eventInfo.GetSpellInfo(), eventInfo.GetActor());
|
||||
return eventInfo.GetActionTarget()->HasAuraState(AURA_STATE_WOUNDED_20_PERCENT, eventInfo.GetSpellInfo(), eventInfo.GetActor());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -2088,7 +2088,7 @@ public:
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
if (!caster || !target)
|
||||
return;
|
||||
|
||||
@@ -432,7 +432,7 @@ class spell_dk_crimson_scourge : public AuraScript
|
||||
|
||||
static bool CheckProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& procInfo)
|
||||
{
|
||||
return procInfo.GetProcTarget()->HasAura(SPELL_DK_BLOOD_PLAGUE, procInfo.GetActor()->GetGUID());
|
||||
return procInfo.GetActionTarget()->HasAura(SPELL_DK_BLOOD_PLAGUE, procInfo.GetActor()->GetGUID());
|
||||
}
|
||||
|
||||
static void HandleProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
|
||||
@@ -1035,7 +1035,7 @@ class spell_dk_mark_of_blood : public AuraScript
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(eventInfo.GetProcTarget(), SPELL_DK_MARK_OF_BLOOD_HEAL, true);
|
||||
caster->CastSpell(eventInfo.GetActionTarget(), SPELL_DK_MARK_OF_BLOOD_HEAL, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1055,7 +1055,7 @@ class spell_dk_necrosis : public AuraScript
|
||||
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DK_NECROSIS_EFFECT, true);
|
||||
GetTarget()->CastSpell(eventInfo.GetActor(), SPELL_DK_NECROSIS_EFFECT, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -248,11 +248,6 @@ class spell_dru_astral_smolder : public AuraScript
|
||||
&& sSpellMgr->AssertSpellInfo(SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, DIFFICULTY_NONE)->GetEffect(EFFECT_0).GetPeriodicTickCount() > 0;
|
||||
}
|
||||
|
||||
bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
return eventInfo.GetProcTarget() != nullptr;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
@@ -264,12 +259,11 @@ class spell_dru_astral_smolder : public AuraScript
|
||||
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellMod(SPELLVALUE_BASE_POINT0, amount);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, args);
|
||||
GetTarget()->CastSpell(eventInfo.GetActionTarget(), SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, args);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_dru_astral_smolder::CheckProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectProc += AuraEffectProcFn(spell_dru_astral_smolder::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -2419,7 +2413,7 @@ class spell_dru_t3_6p_bonus : public AuraScript
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_BLESSING_OF_THE_CLAW, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_DRUID_BLESSING_OF_THE_CLAW, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -2499,7 +2493,7 @@ class spell_dru_t10_balance_4p_bonus : public AuraScript
|
||||
return;
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
SpellEffectInfo const& spellEffect = sSpellMgr->AssertSpellInfo(SPELL_DRUID_LANGUISH, GetCastDifficulty())->GetEffect(EFFECT_0);
|
||||
SpellEffectValue amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
|
||||
@@ -2581,7 +2575,7 @@ class spell_dru_t10_restoration_4p_bonus_dummy : public AuraScript
|
||||
if (!caster)
|
||||
return false;
|
||||
|
||||
return caster->GetGroup() || caster != eventInfo.GetProcTarget();
|
||||
return caster->GetGroup() || caster != eventInfo.GetActionTarget();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
|
||||
@@ -1404,7 +1404,7 @@ class spell_ethereal_pet_aura : public AuraScript
|
||||
{
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
uint32 levelDiff = std::abs(GetTarget()->GetLevel() - eventInfo.GetProcTarget()->GetLevel());
|
||||
uint32 levelDiff = std::abs(eventInfo.GetActor()->GetLevel() - eventInfo.GetActionTarget()->GetLevel());
|
||||
return levelDiff <= 9;
|
||||
}
|
||||
|
||||
@@ -1419,7 +1419,7 @@ class spell_ethereal_pet_aura : public AuraScript
|
||||
if (minion->IsAIEnabled())
|
||||
{
|
||||
minion->AI()->Talk(SAY_STEAL_ESSENCE);
|
||||
minion->CastSpell(eventInfo.GetProcTarget(), SPELL_STEAL_ESSENCE_VISUAL);
|
||||
minion->CastSpell(eventInfo.GetActionTarget(), SPELL_STEAL_ESSENCE_VISUAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2050,7 +2050,7 @@ class spell_gen_interrupt : public AuraScript
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_GEN_THROW_INTERRUPT, aurEff);
|
||||
GetTarget()->CastSpell(eventInfo.GetActionTarget(), SPELL_GEN_THROW_INTERRUPT, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -667,7 +667,7 @@ class spell_hun_manhunter : public AuraScript
|
||||
|
||||
static bool CheckProc(AuraScript const&, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget()->IsPlayer();
|
||||
return eventInfo.GetActionTarget()->IsPlayer();
|
||||
}
|
||||
|
||||
static void HandleEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
|
||||
@@ -297,7 +297,7 @@ class spell_item_anger_capacitor : public SpellScriptLoader
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
caster->CastSpell(nullptr, SPELL_MOTE_OF_ANGER, true);
|
||||
Aura const* motes = caster->GetAura(SPELL_MOTE_OF_ANGER);
|
||||
@@ -493,19 +493,16 @@ class spell_item_blessing_of_ancient_kings : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() != nullptr;
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
return healInfo && healInfo->GetHeal();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
if (!healInfo || !healInfo->GetHeal())
|
||||
return;
|
||||
|
||||
SpellEffectValue absorb = CalculatePct(healInfo->GetHeal(), 15.0f);
|
||||
if (AuraEffect* protEff = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, EFFECT_0, eventInfo.GetActor()->GetGUID()))
|
||||
SpellEffectValue absorb = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15.0f);
|
||||
if (AuraEffect* protEff = eventInfo.GetActionTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, EFFECT_0, eventInfo.GetActor()->GetGUID()))
|
||||
{
|
||||
// The shield can grow to a maximum size of 20,000 damage absorbtion
|
||||
protEff->SetAmount(std::min(protEff->GetAmount() + absorb, 20000.0));
|
||||
@@ -517,7 +514,7 @@ class spell_item_blessing_of_ancient_kings : public AuraScript
|
||||
{
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellBP0(absorb);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PROTECTION_OF_ANCIENT_KINGS, args);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_PROTECTION_OF_ANCIENT_KINGS, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1543,19 +1540,20 @@ class spell_item_necrotic_touch : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive();
|
||||
if (!eventInfo.GetActionTarget()->IsAlive())
|
||||
return false;
|
||||
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
return damageInfo && damageInfo->GetDamage();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
if (!damageInfo || !damageInfo->GetDamage())
|
||||
return;
|
||||
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
|
||||
GetTarget()->CastSpell(nullptr, SPELL_ITEM_NECROTIC_TOUCH_PROC, args);
|
||||
args.AddSpellBP0(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_ITEM_NECROTIC_TOUCH_PROC, args);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1691,7 +1689,7 @@ class spell_item_persistent_shield : public AuraScript
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
SpellEffectValue bp0 = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15);
|
||||
|
||||
// Scarab Brooch does not replace stronger shields
|
||||
@@ -2153,22 +2151,21 @@ class spell_item_shadowmourne : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (GetTarget()->HasAura(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF)) // cant collect shards while under effect of Chaos Bane buff
|
||||
return false;
|
||||
return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive();
|
||||
// cant collect shards while under effect of Chaos Bane buff
|
||||
return !eventInfo.GetActor()->HasAura(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF) && eventInfo.GetActionTarget()->IsAlive();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_SHADOWMOURNE_SOUL_FRAGMENT, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHADOWMOURNE_SOUL_FRAGMENT, aurEff);
|
||||
|
||||
// this can't be handled in AuraScript of SoulFragments because we need to know victim
|
||||
if (Aura* soulFragments = GetTarget()->GetAura(SPELL_SHADOWMOURNE_SOUL_FRAGMENT))
|
||||
{
|
||||
if (soulFragments->GetStackAmount() >= 10)
|
||||
{
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE, aurEff);
|
||||
soulFragments->Remove();
|
||||
}
|
||||
}
|
||||
@@ -3277,7 +3274,7 @@ class spell_item_shard_of_the_scale : public SpellScriptLoader
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
if (eventInfo.GetTypeMask() & PROC_FLAG_DEAL_HELPFUL_SPELL)
|
||||
caster->CastSpell(target, HealProc, aurEff);
|
||||
@@ -3397,16 +3394,14 @@ class spell_item_sunwell_neck : public SpellScriptLoader
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (eventInfo.GetActor()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
return true;
|
||||
return eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Player* player = eventInfo.GetActor()->ToPlayer();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
// Aggression checks are in the spell system... just cast and forget
|
||||
if (player->GetReputationRank(FACTION_ALDOR) == REP_EXALTED)
|
||||
@@ -4340,7 +4335,7 @@ class spell_item_sephuzs_secret : public AuraScript
|
||||
PreventDefaultAction();
|
||||
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SEPHUZS_SECRET_COOLDOWN, TRIGGERED_FULL_MASK);
|
||||
GetUnitOwner()->CastSpell(procInfo.GetProcTarget(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff).SetTriggeringSpell(procInfo.GetProcSpell()));
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff).SetTriggeringSpell(procInfo.GetProcSpell()));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -4468,7 +4463,7 @@ class spell_item_set_march_of_the_legion : public AuraScript
|
||||
{
|
||||
bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
|
||||
return eventInfo.GetActionTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -4488,7 +4483,7 @@ class spell_item_seal_of_darkshire_nobility : public AuraScript
|
||||
|
||||
bool CheckCooldownAura(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() && !eventInfo.GetProcTarget()->HasAura(GetEffectInfo(EFFECT_1).TriggerSpell, GetTarget()->GetGUID());
|
||||
return !eventInfo.GetActionTarget()->HasAura(GetEffectInfo(EFFECT_1).TriggerSpell, GetTarget()->GetGUID());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -4502,7 +4497,7 @@ class spell_item_lightblood_elixir : public AuraScript
|
||||
{
|
||||
bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
|
||||
return eventInfo.GetActionTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -4559,7 +4554,7 @@ class spell_item_seeping_scourgewing : public AuraScript
|
||||
|
||||
void TriggerIsolatedStrikeCheck(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_SHADOW_STRIKE_AOE_CHECK,
|
||||
GetTarget()->CastSpell(eventInfo.GetActionTarget(), SPELL_SHADOW_STRIKE_AOE_CHECK,
|
||||
CastSpellExtraArgs(aurEff).SetTriggeringSpell(eventInfo.GetProcSpell()));
|
||||
}
|
||||
|
||||
@@ -4646,8 +4641,8 @@ public:
|
||||
|
||||
void HandleAdditionalProc(AuraEffect* aurEff, ProcEventInfo& procInfo)
|
||||
{
|
||||
if (procInfo.GetProcTarget()->HasAura(SPELL_SHIVER_VENOM))
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetProcTarget(), _additionalProcSpellId, CastSpellExtraArgs(aurEff)
|
||||
if (procInfo.GetActionTarget()->HasAura(SPELL_SHIVER_VENOM))
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetActionTarget(), _additionalProcSpellId, CastSpellExtraArgs(aurEff)
|
||||
.AddSpellMod(SPELLVALUE_BASE_POINT0, aurEff->GetAmount())
|
||||
.SetTriggeringSpell(procInfo.GetProcSpell()));
|
||||
}
|
||||
|
||||
@@ -1300,7 +1300,8 @@ class spell_mage_ignite : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() != nullptr;
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
return damageInfo && damageInfo->GetDamage();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -1317,7 +1318,7 @@ class spell_mage_ignite : public AuraScript
|
||||
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellMod(SPELLVALUE_BASE_POINT0, amount);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_MAGE_IGNITE, args);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_MAGE_IGNITE, args);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1412,7 +1413,7 @@ class spell_mage_improved_scorch : public AuraScript
|
||||
|
||||
static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget()->HealthBelowPct(aurEff->GetAmount()) || eventInfo.GetActor()->HasAura(SPELL_MAGE_HEAT_SHIMMER);
|
||||
return eventInfo.GetActionTarget()->HealthBelowPct(aurEff->GetAmount()) || eventInfo.GetActor()->HasAura(SPELL_MAGE_HEAT_SHIMMER);
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo) const
|
||||
@@ -1712,22 +1713,23 @@ class spell_mage_radiant_spark : public AuraScript
|
||||
|
||||
bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& procInfo)
|
||||
{
|
||||
return !procInfo.GetProcTarget()->HasAura(SPELL_MAGE_RADIANT_SPARK_PROC_BLOCKER, GetCasterGUID());
|
||||
return !procInfo.GetActor()->HasAura(SPELL_MAGE_RADIANT_SPARK_PROC_BLOCKER, GetCasterGUID());
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& procInfo)
|
||||
{
|
||||
Aura* vulnerability = procInfo.GetProcTarget()->GetAura(aurEff->GetSpellEffectInfo().TriggerSpell, GetCasterGUID());
|
||||
Aura* vulnerability = procInfo.GetActionTarget()->GetAura(aurEff->GetSpellEffectInfo().TriggerSpell, GetCasterGUID());
|
||||
if (vulnerability && vulnerability->GetStackAmount() == vulnerability->CalcMaxStackAmount())
|
||||
{
|
||||
PreventDefaultAction();
|
||||
vulnerability->Remove();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_RADIANT_SPARK_PROC_BLOCKER, true);
|
||||
procInfo.GetActor()->CastSpell(procInfo.GetActor(), SPELL_MAGE_RADIANT_SPARK_PROC_BLOCKER, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_mage_radiant_spark::CheckProc, EFFECT_2, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_radiant_spark::HandleProc, EFFECT_2, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1298,39 +1298,47 @@ class spell_pal_item_t6_trinket : public AuraScript
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
uint32 spellId;
|
||||
int32 chance;
|
||||
return false;
|
||||
|
||||
// Holy Light & Flash of Light
|
||||
if (spellInfo->SpellFamilyFlags[0] & 0xC0000000)
|
||||
{
|
||||
spellId = SPELL_PALADIN_ENDURING_LIGHT;
|
||||
chance = 15;
|
||||
if (!roll_chance(15))
|
||||
return false;
|
||||
|
||||
_triggeredSpellId = SPELL_PALADIN_ENDURING_LIGHT;
|
||||
return true;
|
||||
}
|
||||
// Judgements
|
||||
else if (spellInfo->SpellFamilyFlags[0] & 0x00800000)
|
||||
{
|
||||
spellId = SPELL_PALADIN_ENDURING_JUDGEMENT;
|
||||
chance = 50;
|
||||
}
|
||||
else
|
||||
return;
|
||||
if (!roll_chance(50))
|
||||
return false;
|
||||
|
||||
if (roll_chance(chance))
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), spellId, aurEff);
|
||||
_triggeredSpellId = SPELL_PALADIN_ENDURING_JUDGEMENT;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), _triggeredSpellId, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pal_item_t6_trinket::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pal_item_t6_trinket::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
|
||||
uint32 _triggeredSpellId = 0;
|
||||
};
|
||||
|
||||
// 633 - Lay on Hands
|
||||
@@ -1371,18 +1379,15 @@ class spell_pal_light_s_beacon : public AuraScript
|
||||
return false;
|
||||
if (eventInfo.GetActionTarget()->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, eventInfo.GetActor()->GetGUID()))
|
||||
return false;
|
||||
return true;
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
return healInfo && healInfo->GetHeal();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
if (!healInfo || !healInfo->GetHeal())
|
||||
return;
|
||||
|
||||
SpellEffectValue heal = CalculatePct(healInfo->GetHeal(), aurEff->GetAmount());
|
||||
SpellEffectValue heal = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount());
|
||||
|
||||
Unit::AuraList const& auras = GetCaster()->GetSingleCastAuras();
|
||||
for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
@@ -1654,7 +1659,7 @@ class spell_pal_t3_6p_bonus : public AuraScript
|
||||
|
||||
uint32 spellId;
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
switch (target->GetClass())
|
||||
{
|
||||
@@ -1697,19 +1702,21 @@ class spell_pal_t8_2p_bonus : public AuraScript
|
||||
&& sSpellMgr->AssertSpellInfo(SPELL_PALADIN_HOLY_MENDING, DIFFICULTY_NONE)->GetEffect(EFFECT_0).GetPeriodicTickCount() > 0;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
return healInfo && healInfo->GetHeal();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
if (!healInfo || !healInfo->GetHeal())
|
||||
return;
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
SpellEffectInfo const& hotEffect = sSpellMgr->AssertSpellInfo(SPELL_PALADIN_HOLY_MENDING, GetCastDifficulty())->GetEffect(EFFECT_0);
|
||||
SpellEffectValue amount = CalculatePct(static_cast<SpellEffectValue>(healInfo->GetHeal()), aurEff->GetAmount());
|
||||
SpellEffectValue amount = CalculatePct(static_cast<SpellEffectValue>(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount());
|
||||
|
||||
amount /= hotEffect.GetPeriodicTickCount();
|
||||
|
||||
@@ -1720,6 +1727,7 @@ class spell_pal_t8_2p_bonus : public AuraScript
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pal_t8_2p_bonus::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pal_t8_2p_bonus::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -496,24 +496,27 @@ class spell_pri_aq_3p_bonus : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_ORACULAR_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
if (caster == eventInfo.GetProcTarget())
|
||||
return;
|
||||
if (eventInfo.GetActor() == eventInfo.GetActionTarget())
|
||||
return false;
|
||||
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
if (!healInfo || !healInfo->GetHeal())
|
||||
return;
|
||||
return healInfo && healInfo->GetHeal();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellBP0(CalculatePct(static_cast<int32>(healInfo->GetHeal()), 10));
|
||||
caster->CastSpell(caster, SPELL_PRIEST_ORACULAR_HEAL, args);
|
||||
args.AddSpellBP0(CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 10));
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_PRIEST_ORACULAR_HEAL, args);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_aq_3p_bonus::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_aq_3p_bonus::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -861,7 +864,7 @@ class spell_pri_binding_heals : public AuraScript
|
||||
|
||||
static bool CheckProc(AuraScript const&, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
return eventInfo.GetActor() != eventInfo.GetProcTarget();
|
||||
return eventInfo.GetActor() != eventInfo.GetActionTarget();
|
||||
}
|
||||
|
||||
static void HandleEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
@@ -897,14 +900,12 @@ class spell_pri_blaze_of_light : public AuraScript
|
||||
|
||||
void HandleProc(ProcEventInfo const& eventInfo) const
|
||||
{
|
||||
Unit* procTarget = eventInfo.GetProcTarget();
|
||||
if (!procTarget)
|
||||
return;
|
||||
Unit* procTarget = eventInfo.GetActionTarget();
|
||||
|
||||
if (GetTarget()->IsValidAttackTarget(procTarget))
|
||||
GetTarget()->CastSpell(procTarget, SPELL_PRIEST_BLAZE_OF_LIGHT_DECREASE, TriggerCastFlags(TRIGGERED_CAST_DIRECTLY | TRIGGERED_IGNORE_CAST_IN_PROGRESS));
|
||||
else
|
||||
GetTarget()->CastSpell(procTarget, SPELL_PRIEST_BLAZE_OF_LIGHT_INCREASE, TriggerCastFlags(TRIGGERED_CAST_DIRECTLY | TRIGGERED_IGNORE_CAST_IN_PROGRESS));
|
||||
GetTarget()->CastSpell(procTarget, GetTarget()->IsValidAttackTarget(procTarget)
|
||||
? SPELL_PRIEST_BLAZE_OF_LIGHT_DECREASE
|
||||
: SPELL_PRIEST_BLAZE_OF_LIGHT_INCREASE,
|
||||
TRIGGERED_CAST_DIRECTLY | TRIGGERED_IGNORE_CAST_IN_PROGRESS);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -2398,12 +2399,12 @@ class spell_pri_holy_mending : public AuraScript
|
||||
|
||||
static bool CheckProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& procInfo)
|
||||
{
|
||||
return procInfo.GetProcTarget()->HasAura(SPELL_PRIEST_RENEW, procInfo.GetActor()->GetGUID());
|
||||
return procInfo.GetActionTarget()->HasAura(SPELL_PRIEST_RENEW, procInfo.GetActor()->GetGUID());
|
||||
}
|
||||
|
||||
static void HandleProc(AuraScript const&, AuraEffect* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_HOLY_MENDING_HEAL, CastSpellExtraArgs(aurEff));
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_PRIEST_HOLY_MENDING_HEAL, CastSpellExtraArgs(aurEff));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -3515,11 +3516,12 @@ class spell_pri_divine_aegis : public AuraScript
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.SetTriggerFlags(TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
args.AddSpellMod(SPELLVALUE_BASE_POINT0, aegisAmount);
|
||||
caster->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_DIVINE_AEGIS_ABSORB, args);
|
||||
caster->CastSpell(eventInfo.GetActionTarget(), SPELL_PRIEST_DIVINE_AEGIS_ABSORB, args);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_divine_aegis::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_divine_aegis::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -3806,14 +3808,14 @@ class spell_pri_prayerful_litany : public SpellScript
|
||||
// 193063 - Protective Light (Aura)
|
||||
class spell_pri_protective_light : public AuraScript
|
||||
{
|
||||
bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const
|
||||
static bool CheckEffectProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget() == GetCaster();
|
||||
return eventInfo.GetActionTarget() == eventInfo.GetActor();
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) const
|
||||
static void HandleEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_PRIEST_PROTECTIVE_LIGHT_AURA, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_PRIEST_PROTECTIVE_LIGHT_AURA, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -4669,7 +4671,7 @@ class spell_pri_t3_4p_bonus : public AuraScript
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_ARMOR_OF_FAITH, aurEff);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_PRIEST_ARMOR_OF_FAITH, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -4719,21 +4721,23 @@ class spell_pri_t10_heal_2p_bonus : public AuraScript
|
||||
&& sSpellMgr->AssertSpellInfo(SPELL_PRIEST_BLESSED_HEALING, DIFFICULTY_NONE)->GetEffect(EFFECT_0).GetPeriodicTickCount() > 0;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
return healInfo && healInfo->GetHeal();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
if (!healInfo || !healInfo->GetHeal())
|
||||
return;
|
||||
|
||||
SpellEffectInfo const& hotEffect = sSpellMgr->AssertSpellInfo(SPELL_PRIEST_BLESSED_HEALING, GetCastDifficulty())->GetEffect(EFFECT_0);
|
||||
SpellEffectValue amount = CalculatePct(static_cast<int32>(healInfo->GetHeal()), aurEff->GetAmount());
|
||||
SpellEffectValue amount = CalculatePct(static_cast<int32>(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount());
|
||||
|
||||
amount /= hotEffect.GetPeriodicTickCount();
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellBP0(amount);
|
||||
@@ -4742,6 +4746,7 @@ class spell_pri_t10_heal_2p_bonus : public AuraScript
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_t10_heal_2p_bonus::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_t10_heal_2p_bonus::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -4937,7 +4942,7 @@ class spell_pri_twist_of_fate : public AuraScript
|
||||
{
|
||||
static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
return eventInfo.GetProcTarget()->GetHealthPct() < aurEff->GetAmount();
|
||||
return eventInfo.GetActionTarget()->GetHealthPct() < aurEff->GetAmount();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -282,7 +282,7 @@ class spell_rog_blade_flurry : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
_procTarget = GetTarget()->SelectNearbyTarget(eventInfo.GetProcTarget());
|
||||
_procTarget = GetTarget()->SelectNearbyTarget(eventInfo.GetActionTarget());
|
||||
return _procTarget && eventInfo.GetDamageInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -874,7 +874,7 @@ class spell_sha_earthen_rage_passive : public AuraScript
|
||||
void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
_procTargetGuid = eventInfo.GetProcTarget()->GetGUID();
|
||||
_procTargetGuid = eventInfo.GetActionTarget()->GetGUID();
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHAMAN_EARTHEN_RAGE_PERIODIC, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_FULL_MASK
|
||||
});
|
||||
@@ -1529,7 +1529,7 @@ class spell_sha_item_lightning_shield : public AuraScript
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD, CastSpellExtraArgsInit{
|
||||
GetTarget()->CastSpell(eventInfo.GetActionTarget(), SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_FULL_MASK,
|
||||
.TriggeringAura = aurEff
|
||||
});
|
||||
@@ -2169,7 +2169,7 @@ class spell_sha_mastery_elemental_overload : public AuraScript
|
||||
Unit* caster = procInfo.GetActor();
|
||||
|
||||
caster->m_Events.AddEventAtOffset([caster,
|
||||
targets = CastSpellTargetArg(procInfo.GetProcTarget()),
|
||||
targets = CastSpellTargetArg(procInfo.GetActionTarget()),
|
||||
overloadSpellId = GetTriggeredSpellId(procInfo.GetSpellInfo()->Id),
|
||||
originalCastId = procInfo.GetProcSpell()->m_castId]() mutable
|
||||
{
|
||||
@@ -2928,7 +2928,7 @@ class spell_sha_t3_6p_bonus : public AuraScript
|
||||
|
||||
uint32 spellId;
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
switch (target->GetClass())
|
||||
{
|
||||
@@ -3006,7 +3006,7 @@ class spell_sha_t8_elemental_4p_bonus : public AuraScript
|
||||
amount /= dotEffect.GetPeriodicTickCount();
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
caster->CastSpell(target, SPELL_SHAMAN_ELECTRIFIED, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_FULL_MASK,
|
||||
@@ -3044,7 +3044,7 @@ class spell_sha_t9_elemental_4p_bonus : public AuraScript
|
||||
amount /= dotEffect.GetPeriodicTickCount();
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
caster->CastSpell(target, SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_FULL_MASK,
|
||||
@@ -3067,7 +3067,7 @@ class spell_sha_t10_elemental_4p_bonus : public AuraScript
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
// try to find spell Flame Shock on the target
|
||||
AuraEffect* flameShock = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, flag128(0x10000000), caster->GetGUID());
|
||||
@@ -3114,7 +3114,7 @@ class spell_sha_t10_restoration_4p_bonus : public AuraScript
|
||||
amount /= dotEffect.GetPeriodicTickCount();
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
|
||||
caster->CastSpell(target, SPELL_SHAMAN_CHAINED_HEAL, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_FULL_MASK,
|
||||
|
||||
@@ -1941,7 +1941,7 @@ class spell_warr_sweeping_strikes : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
_procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetProcTarget());
|
||||
_procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetActionTarget());
|
||||
return _procTarget != nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user