mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Spell: restore old proc system behaviour on auras self proc.
- Use Spell::m_triggeredByAuraSpell and compare against trigger aura, it requires scripts to set triggeredByAura parameter.
- Fixed existing scripts lacking it
DB/Spell: Anger Capacitor (Tiny Abomination in a Jar) proc
Closes #18269
(cherry picked from commit 5b56c94e6d)
# Conflicts:
# src/server/game/Entities/Unit/Unit.cpp
# src/server/game/Spells/Auras/SpellAuras.cpp
# src/server/game/Spells/Spell.cpp
# src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
# src/server/scripts/Pet/pet_hunter.cpp
# src/server/scripts/Spells/spell_dk.cpp
# src/server/scripts/Spells/spell_druid.cpp
# src/server/scripts/Spells/spell_hunter.cpp
# src/server/scripts/Spells/spell_item.cpp
# src/server/scripts/Spells/spell_mage.cpp
# src/server/scripts/Spells/spell_paladin.cpp
# src/server/scripts/Spells/spell_priest.cpp
# src/server/scripts/Spells/spell_rogue.cpp
# src/server/scripts/Spells/spell_shaman.cpp
# src/server/scripts/Spells/spell_warlock.cpp
# src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
@@ -278,7 +278,7 @@ class spell_anetheron_vampiric_aura : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_VAMPIRIC_AURA_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
@@ -286,7 +286,7 @@ class spell_anetheron_vampiric_aura : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
int32 bp = damageInfo->GetDamage() * 3;
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_VAMPIRIC_AURA_HEAL, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetActor(), true);
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_VAMPIRIC_AURA_HEAL, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetActor(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -1118,7 +1118,7 @@ class spell_putricide_ooze_tank_protection : public SpellScriptLoader
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* actionTarget = eventInfo.GetActionTarget();
|
||||
actionTarget->CastSpell((Unit*)nullptr, aurEff->GetSpellEffectInfo()->TriggerSpell, true);
|
||||
actionTarget->CastSpell((Unit*)nullptr, aurEff->GetSpellEffectInfo()->TriggerSpell, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -219,11 +219,11 @@ class spell_uk_second_wind : public SpellScriptLoader
|
||||
return (spellInfo->GetAllEffectsMechanicMask() & ((1 << MECHANIC_ROOT) | (1 << MECHANIC_STUN))) != 0;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActionTarget();
|
||||
caster->CastSpell(caster, SPELL_SECOND_WIND_TRIGGER, true);
|
||||
caster->CastSpell(caster, SPELL_SECOND_WIND_TRIGGER, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -38,14 +38,14 @@ class spell_mark_of_malice : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_MARK_OF_MALICE_TRIGGERED });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
// just drop charges
|
||||
if (GetCharges() > 1)
|
||||
return;
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_MARK_OF_MALICE_TRIGGERED, true);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_MARK_OF_MALICE_TRIGGERED, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -234,14 +234,14 @@ class spell_twisted_reflection : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_TWISTED_REFLECTION_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
if (!damageInfo || !damageInfo->GetDamage())
|
||||
return;
|
||||
|
||||
eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), SPELL_TWISTED_REFLECTION_HEAL, true);
|
||||
eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), SPELL_TWISTED_REFLECTION_HEAL, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -873,10 +873,10 @@ class spell_dru_t3_6p_bonus : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_DRUID_BLESSING_OF_THE_CLAW });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_BLESSING_OF_THE_CLAW, true);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_BLESSING_OF_THE_CLAW, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -920,7 +920,7 @@ class spell_dru_t3_8p_bonus : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
int32 amount = CalculatePct(m->Amount, aurEff->GetAmount());
|
||||
caster->CastCustomSpell(SPELL_DRUID_EXHILARATE, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true);
|
||||
caster->CastCustomSpell(SPELL_DRUID_EXHILARATE, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -951,10 +951,10 @@ class spell_dru_t4_2p_bonus : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_DRUID_INFUSION });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_DRUID_INFUSION, true);
|
||||
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_DRUID_INFUSION, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -988,7 +988,7 @@ class spell_dru_item_t6_trinket : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
@@ -1020,7 +1020,7 @@ class spell_dru_item_t6_trinket : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
if (roll_chance_i(chance))
|
||||
eventInfo.GetActor()->CastSpell((Unit*)nullptr, spellId, true);
|
||||
eventInfo.GetActor()->CastSpell((Unit*)nullptr, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1067,7 +1067,7 @@ class spell_dru_t10_balance_4p_bonus : public SpellScriptLoader
|
||||
// Add remaining ticks to damage done
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_DRUID_LANGUISH, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
|
||||
caster->CastCustomSpell(SPELL_DRUID_LANGUISH, SPELLVALUE_BASE_POINT0, amount, target, true);
|
||||
caster->CastCustomSpell(SPELL_DRUID_LANGUISH, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1169,12 +1169,12 @@ class spell_dru_t10_restoration_4p_bonus_dummy : public SpellScriptLoader
|
||||
return caster->GetGroup() || caster != eventInfo.GetProcTarget();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
int32 amount = static_cast<int32>(eventInfo.GetHealInfo()->GetHeal());
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_DRUID_REJUVENATION_T10_PROC, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true);
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_DRUID_REJUVENATION_T10_PROC, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -3612,7 +3612,7 @@ class spell_gen_vampiric_touch : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_VAMPIRIC_TOUCH_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
@@ -3621,7 +3621,7 @@ class spell_gen_vampiric_touch : public SpellScriptLoader
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
int32 bp = damageInfo->GetDamage() / 2;
|
||||
caster->CastCustomSpell(SPELL_VAMPIRIC_TOUCH_HEAL, SPELLVALUE_BASE_POINT0, bp, caster, true);
|
||||
caster->CastCustomSpell(SPELL_VAMPIRIC_TOUCH_HEAL, SPELLVALUE_BASE_POINT0, bp, caster, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -217,7 +217,7 @@ class spell_item_anger_capacitor : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
@@ -234,7 +234,7 @@ class spell_item_anger_capacitor : public SpellScriptLoader
|
||||
if (player->GetWeaponForAttack(OFF_ATTACK, true) && urand(0, 1))
|
||||
spellId = SPELL_MANIFEST_ANGER_OFF_HAND;
|
||||
|
||||
caster->CastSpell(target, spellId, true);
|
||||
caster->CastSpell(target, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -323,7 +323,7 @@ class spell_item_aura_of_madness : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
|
||||
{
|
||||
@@ -356,7 +356,7 @@ class spell_item_aura_of_madness : public SpellScriptLoader
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
uint32 spellId = Trinity::Containers::SelectRandomContainerElement(triggeredSpells[caster->getClass()]);
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
caster->CastSpell(caster, spellId, true, nullptr, aurEff);
|
||||
|
||||
if (roll_chance_i(10))
|
||||
caster->Unit::Say(SAY_MADNESS);
|
||||
@@ -389,10 +389,10 @@ class spell_item_dementia : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_DEMENTIA_POS, SPELL_DEMENTIA_NEG });
|
||||
}
|
||||
|
||||
void HandlePeriodicDummy(AuraEffect const* /*aurEff*/)
|
||||
void HandlePeriodicDummy(AuraEffect const* aurEff)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), RAND(SPELL_DEMENTIA_POS, SPELL_DEMENTIA_NEG), true);
|
||||
GetTarget()->CastSpell(GetTarget(), RAND(SPELL_DEMENTIA_POS, SPELL_DEMENTIA_NEG), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -450,7 +450,7 @@ class spell_item_blessing_of_ancient_kings : public SpellScriptLoader
|
||||
protEff->GetBase()->RefreshDuration();
|
||||
}
|
||||
else
|
||||
GetTarget()->CastCustomSpell(SPELL_PROTECTION_OF_ANCIENT_KINGS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_PROTECTION_OF_ANCIENT_KINGS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -575,7 +575,7 @@ class spell_item_deathbringers_will : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
|
||||
{
|
||||
@@ -607,12 +607,12 @@ class spell_item_deathbringers_will : public SpellScriptLoader
|
||||
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
auto const& randomSpells = triggeredSpells[caster->getClass()];
|
||||
std::vector<uint32> const& randomSpells = triggeredSpells[caster->getClass()];
|
||||
if (randomSpells.empty())
|
||||
return;
|
||||
|
||||
uint32 spellId = Trinity::Containers::SelectRandomContainerElement(randomSpells);
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
caster->CastSpell(caster, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1038,7 +1038,7 @@ class spell_item_frozen_shadoweave : public SpellScriptLoader
|
||||
|
||||
int32 amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
caster->CastCustomSpell(SPELL_SHADOWMEND, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true);
|
||||
caster->CastCustomSpell(SPELL_SHADOWMEND, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1081,9 +1081,9 @@ class spell_item_gnomish_death_ray : public SpellScriptLoader
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
if (urand(0, 99) < 15)
|
||||
caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true, NULL); // failure
|
||||
caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true); // failure
|
||||
else
|
||||
caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true, NULL);
|
||||
caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1139,7 +1139,7 @@ class spell_item_heartpierce : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
@@ -1156,6 +1156,7 @@ class spell_item_heartpierce : public SpellScriptLoader
|
||||
case POWER_RAGE:
|
||||
spellId = Rage;
|
||||
break;
|
||||
// Death Knights can't use daggers, but oh well
|
||||
case POWER_RUNIC_POWER:
|
||||
spellId = RunicPower;
|
||||
break;
|
||||
@@ -1163,7 +1164,7 @@ class spell_item_heartpierce : public SpellScriptLoader
|
||||
return;
|
||||
}
|
||||
|
||||
caster->CastSpell((Unit*)nullptr, spellId, true);
|
||||
caster->CastSpell((Unit*)nullptr, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1301,14 +1302,14 @@ class spell_item_mark_of_conquest : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_MARK_OF_CONQUEST_ENERGIZE });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (eventInfo.GetTypeMask() & (PROC_FLAG_DONE_RANGED_AUTO_ATTACK | PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS))
|
||||
{
|
||||
// in that case, do not cast heal spell
|
||||
PreventDefaultAction();
|
||||
// but mana instead
|
||||
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_MARK_OF_CONQUEST_ENERGIZE, true);
|
||||
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_MARK_OF_CONQUEST_ENERGIZE, true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1468,7 +1469,7 @@ class spell_item_net_o_matic : public SpellScriptLoader
|
||||
else if (roll < 4) // 2% for 20 sec root, charge to target (off-like chance unknown)
|
||||
spellId = SPELL_NET_O_MATIC_TRIGGERED2;
|
||||
|
||||
GetCaster()->CastSpell(target, spellId, true, NULL);
|
||||
GetCaster()->CastSpell(target, spellId, true, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1527,7 +1528,7 @@ class spell_item_noggenfogger_elixir : public SpellScriptLoader
|
||||
case 2: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2; break;
|
||||
}
|
||||
|
||||
caster->CastSpell(caster, spellId, true, NULL);
|
||||
caster->CastSpell(caster, spellId, true, nullptr);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1660,7 +1661,7 @@ class spell_item_pet_healing : public SpellScriptLoader
|
||||
|
||||
int32 bp = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
caster->CastCustomSpell(SPELL_HEALTH_LINK, SPELLVALUE_BASE_POINT0, bp, (Unit*)nullptr, true);
|
||||
caster->CastCustomSpell(SPELL_HEALTH_LINK, SPELLVALUE_BASE_POINT0, bp, (Unit*)nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -2135,7 +2136,7 @@ class spell_item_swift_hand_justice_dummy : public SpellScriptLoader
|
||||
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
int32 amount = caster->CountPctFromMaxHealth(aurEff->GetAmount());
|
||||
caster->CastCustomSpell(SPELL_SWIFT_HAND_OF_JUSTICE_HEAL, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true);
|
||||
caster->CastCustomSpell(SPELL_SWIFT_HAND_OF_JUSTICE_HEAL, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -3617,17 +3618,17 @@ class spell_item_shard_of_the_scale : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ HealProc, DamageProc });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
|
||||
if (eventInfo.GetTypeMask() & PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS)
|
||||
caster->CastSpell(target, HealProc, true);
|
||||
caster->CastSpell(target, HealProc, true, nullptr, aurEff);
|
||||
|
||||
if (eventInfo.GetTypeMask() & PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG)
|
||||
caster->CastSpell(target, DamageProc, true);
|
||||
caster->CastSpell(target, DamageProc, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -3766,7 +3767,7 @@ class spell_item_sunwell_neck : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Player* player = eventInfo.GetActor()->ToPlayer();
|
||||
@@ -3774,10 +3775,10 @@ class spell_item_sunwell_neck : public SpellScriptLoader
|
||||
|
||||
// Aggression checks are in the spell system... just cast and forget
|
||||
if (player->GetReputationRank(FACTION_ALDOR) == REP_EXALTED)
|
||||
player->CastSpell(target, Aldors, true);
|
||||
player->CastSpell(target, Aldors, true, nullptr, aurEff);
|
||||
|
||||
if (player->GetReputationRank(FACTION_SCRYERS) == REP_EXALTED)
|
||||
player->CastSpell(target, Scryers, true);
|
||||
player->CastSpell(target, Scryers, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -101,9 +101,16 @@ class spell_pal_ardent_defender : public SpellScriptLoader
|
||||
|
||||
enum Spell
|
||||
{
|
||||
PAL_SPELL_ARDENT_DEFENDER_HEAL = 66235,
|
||||
PAL_SPELL_ARDENT_DEFENDER_HEAL = 66235
|
||||
};
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PAL_SPELL_ARDENT_DEFENDER_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
|
||||
@@ -866,7 +873,7 @@ class spell_pal_item_t6_trinket : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_PALADIN_ENDURING_LIGHT, SPELL_PALADIN_ENDURING_JUDGEMENT });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
@@ -892,7 +899,7 @@ class spell_pal_item_t6_trinket : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
if (roll_chance_i(chance))
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), spellId, true);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1333,7 +1340,7 @@ class spell_pal_t3_6p_bonus : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
@@ -1364,7 +1371,7 @@ class spell_pal_t3_6p_bonus : public SpellScriptLoader
|
||||
return;
|
||||
}
|
||||
|
||||
caster->CastSpell(target, spellId, true);
|
||||
caster->CastSpell(target, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1411,7 +1418,7 @@ class spell_pal_t8_2p_bonus : public SpellScriptLoader
|
||||
// Add remaining ticks to damage done
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PALADIN_HOLY_MENDING, SPELL_AURA_PERIODIC_HEAL);
|
||||
|
||||
caster->CastCustomSpell(SPELL_PALADIN_HOLY_MENDING, SPELLVALUE_BASE_POINT0, amount, target, true);
|
||||
caster->CastCustomSpell(SPELL_PALADIN_HOLY_MENDING, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -142,7 +142,7 @@ class spell_pri_aq_3p_bonus : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_ORACULAR_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
@@ -154,7 +154,7 @@ class spell_pri_aq_3p_bonus : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
int32 amount = CalculatePct(static_cast<int32>(healInfo->GetHeal()), 10);
|
||||
caster->CastCustomSpell(SPELL_PRIEST_ORACULAR_HEAL, SPELLVALUE_BASE_POINT0, amount, caster, true);
|
||||
caster->CastCustomSpell(SPELL_PRIEST_ORACULAR_HEAL, SPELLVALUE_BASE_POINT0, amount, caster, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1254,10 +1254,10 @@ class spell_pri_t3_4p_bonus : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_ARMOR_OF_FAITH });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_ARMOR_OF_FAITH, true);
|
||||
eventInfo.GetActor()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_ARMOR_OF_FAITH, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1349,7 +1349,7 @@ class spell_pri_t10_heal_2p_bonus : public SpellScriptLoader
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PRIEST_BLESSED_HEALING, SPELL_AURA_PERIODIC_HEAL);
|
||||
|
||||
caster->CastCustomSpell(SPELL_PRIEST_BLESSED_HEALING, SPELLVALUE_BASE_POINT0, amount, target, true);
|
||||
caster->CastCustomSpell(SPELL_PRIEST_BLESSED_HEALING, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -1018,7 +1018,7 @@ class spell_sha_t3_6p_bonus : public SpellScriptLoader
|
||||
});
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
@@ -1049,7 +1049,7 @@ class spell_sha_t3_6p_bonus : public SpellScriptLoader
|
||||
return;
|
||||
}
|
||||
|
||||
caster->CastSpell(target, spellId, true);
|
||||
caster->CastSpell(target, spellId, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1091,12 +1091,12 @@ class spell_sha_t8_elemental_4p_bonus : public SpellScriptLoader
|
||||
int32 amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
|
||||
amount /= spellInfo->GetMaxTicks(DIFFICULTY_NONE);
|
||||
|
||||
// Add remaining ticks to healing done
|
||||
// Add remaining ticks to damage done
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_SHAMAN_ELECTRIFIED, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
|
||||
caster->CastCustomSpell(SPELL_SHAMAN_ELECTRIFIED, SPELLVALUE_BASE_POINT0, amount, target, true);
|
||||
caster->CastCustomSpell(SPELL_SHAMAN_ELECTRIFIED, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1138,12 +1138,12 @@ class spell_sha_t9_elemental_4p_bonus : public SpellScriptLoader
|
||||
int32 amount = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), aurEff->GetAmount());
|
||||
amount /= spellInfo->GetMaxTicks(DIFFICULTY_NONE);
|
||||
|
||||
// Add remaining ticks to healing done
|
||||
// Add remaining ticks to damage done
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
|
||||
caster->CastCustomSpell(SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, SPELLVALUE_BASE_POINT0, amount, target, true);
|
||||
caster->CastCustomSpell(SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1235,7 +1235,7 @@ class spell_sha_t10_restoration_4p_bonus : public SpellScriptLoader
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_SHAMAN_CHAINED_HEAL, SPELL_AURA_PERIODIC_HEAL);
|
||||
|
||||
caster->CastCustomSpell(SPELL_SHAMAN_CHAINED_HEAL, SPELLVALUE_BASE_POINT0, amount, target, true);
|
||||
caster->CastCustomSpell(SPELL_SHAMAN_CHAINED_HEAL, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -1046,7 +1046,7 @@ class spell_warl_seed_of_corruption_generic : public SpellScriptLoader
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
caster->CastSpell(eventInfo.GetActionTarget(), SPELL_WARLOCK_SEED_OF_CORRUPTION_GENERIC, true);
|
||||
caster->CastSpell(eventInfo.GetActionTarget(), SPELL_WARLOCK_SEED_OF_CORRUPTION_GENERIC, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1383,11 +1383,11 @@ class spell_warl_t4_2p_bonus : public SpellScriptLoader
|
||||
return ValidateSpellInfo({ Trigger });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
caster->CastSpell(caster, Trigger, true);
|
||||
caster->CastSpell(caster, Trigger, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user