aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp4
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp4
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp4
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp20
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp4
-rw-r--r--src/server/scripts/Spells/spell_item.cpp55
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp19
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp10
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp14
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp6
12 files changed, 77 insertions, 69 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index 0c3344fdf8e..a138aec1de4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -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
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 41cbebf48f2..1a9225f0a3d 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -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
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index da338c976df..0074fed9706 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -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
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp
index bb793113cdd..37a24fd8d3b 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp
@@ -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
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 999a0d23f61..f2c5b3206d8 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index a018da538c3..c7822d8acc5 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index c0b4d56bf40..9aae5a665fb 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index fc9eeacc6bc..90f1eb65f54 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 41e14e5ebc8..056ab79de33 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 821937ae60c..c074198b99c 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 1ea8ca2d4a3..58977ed5dc0 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -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
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index cead7bf93a0..a8502c9e6d9 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -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