aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp8
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp2
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp6
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index f396c45d8b9..b5f0a6de54a 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -587,11 +587,11 @@ class spell_dk_corpse_explosion : public SpellScript
if (effIndex == EFFECT_0)
{
args.AddSpellBP0(GetEffectValue());
- GetCaster()->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), args);
+ GetCaster()->CastSpell(target, GetSpellInfo()->GetEffect(EFFECT_1).CalcValue(), args);
}
else if (effIndex == EFFECT_1)
{
- args.AddSpellBP0(GetSpell()->CalculateDamage(EFFECT_0));
+ args.AddSpellBP0(GetSpell()->CalculateDamage(GetSpellInfo()->GetEffect(EFFECT_0)));
GetCaster()->CastSpell(target, GetEffectValue(), args);
}
}
@@ -896,7 +896,7 @@ class spell_dk_death_strike : public SpellScript
int32 bp = int32(count * caster->CountPctFromMaxHealth(int32(GetSpellInfo()->Effects[EFFECT_0].DamageMultiplier)));
// Improved Death Strike
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, DK_ICON_ID_IMPROVED_DEATH_STRIKE, 0))
- AddPct(bp, caster->CalculateSpellDamage(aurEff->GetSpellInfo(), EFFECT_2));
+ AddPct(bp, caster->CalculateSpellDamage(aurEff->GetSpellInfo()->GetEffect(EFFECT_2)));
// @todo castspell refactor note: this is not triggered - is this intended??
CastSpellExtraArgs args;
@@ -1040,7 +1040,7 @@ class spell_dk_hysteria : public AuraScript
void PeriodicTick(AuraEffect const* aurEff)
{
- uint32 const damage = GetTarget()->CountPctFromMaxHealth(GetTarget()->CalculateSpellDamage(GetSpellInfo(), aurEff->GetEffIndex()));
+ uint32 const damage = GetTarget()->CountPctFromMaxHealth(GetTarget()->CalculateSpellDamage(aurEff->GetSpellEffectInfo()));
Unit::DealDamage(GetTarget(), GetTarget(), damage, nullptr, SELF_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
}
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index e112f224272..c3d1eb7a772 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -457,7 +457,7 @@ class spell_dru_frenzied_regeneration : public AuraScript
return;
int32 const mod = std::min(static_cast<int32>(rage), 100);
- int32 const regen = CalculatePct(GetTarget()->GetMaxHealth(), GetTarget()->CalculateSpellDamage(GetSpellInfo(), EFFECT_1) * mod / 100.f);
+ int32 const regen = CalculatePct(GetTarget()->GetMaxHealth(), GetTarget()->CalculateSpellDamage(GetSpellInfo()->GetEffect(EFFECT_1)) * mod / 100.f);
CastSpellExtraArgs args(aurEff);
args.AddSpellBP0(regen);
GetTarget()->CastSpell(nullptr, SPELL_DRUID_FRENZIED_REGENERATION_HEAL, args);
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 9273cf24b82..6cdbca548f3 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -939,7 +939,7 @@ class spell_hun_rapid_recuperation : public AuraScript
Unit* target = GetTarget();
CastSpellExtraArgs args(aurEff);
args.AddSpellBP0(CalculatePct(target->GetMaxPower(POWER_MANA), aurEff->GetAmount()));
- target->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, args);
+ target->CastSpell(target, aurEff->GetSpellEffectInfo().TriggerSpell, args);
}
void Register() override
@@ -1114,7 +1114,7 @@ class spell_hun_sniper_training : public AuraScript
if (Player* playerTarget = GetUnitOwner()->ToPlayer())
{
int32 baseAmount = aurEff->GetBaseAmount();
- int32 amount = playerTarget->CalculateSpellDamage(GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount);
+ int32 amount = playerTarget->CalculateSpellDamage(aurEff->GetSpellEffectInfo(), &baseAmount);
GetEffect(EFFECT_0)->SetAmount(amount);
}
}
@@ -1126,7 +1126,7 @@ class spell_hun_sniper_training : public AuraScript
{
int32 baseAmount = aurEff->GetBaseAmount();
int32 amount = playerTarget->isMoving() ?
- playerTarget->CalculateSpellDamage(GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount) :
+ playerTarget->CalculateSpellDamage(aurEff->GetSpellEffectInfo(), &baseAmount) :
aurEff->GetAmount() - 1;
aurEff->SetAmount(amount);
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 290f75546b3..9cd62c00232 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -398,7 +398,7 @@ class spell_warl_demonic_empowerment : public SpellScript
case CREATURE_FAMILY_VOIDWALKER:
{
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER);
- int32 hp = targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(spellInfo, EFFECT_0));
+ int32 hp = targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(spellInfo->GetEffect(EFFECT_0)));
CastSpellExtraArgs args(TRIGGERED_FULL_MASK);
args.AddSpellBP0(hp);
targetCreature->CastSpell(targetCreature, SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER, args);