aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorMeji <alvaro.megias@outlook.com>2023-07-20 10:10:18 +0200
committerGitHub <noreply@github.com>2023-07-20 10:10:18 +0200
commit889e88ab8033a78db837e0bb8619d8ce9d64967f (patch)
tree4b3e48d62b72fd860cff29cb7b3a3f1bd8dcb0f8 /src/server/scripts
parent8b426af763a9d51524538cebbf615595f94a99a4 (diff)
Core/Spells: Fixed target radius logic in spell effects for TargetB (#29158)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp2
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp2
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
index b9fcfc779c4..a993f30c802 100644
--- a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
+++ b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
@@ -545,7 +545,7 @@ public:
/// TODO: Remove this once we find a general rule for WorldObject::MovePosition (this spell shouldn't take the Z change into consideration)
Unit* caster = GetCaster();
float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
- uint32 dist = caster->GetCombatReach() + GetSpellInfo()->GetEffect(EFFECT_0).CalcRadius(caster) * (float)rand_norm();
+ uint32 dist = caster->GetCombatReach() + GetSpellInfo()->GetEffect(EFFECT_0).CalcRadius(caster, SpellTargetIndex::TargetB) * (float)rand_norm();
float x = caster->GetPositionX() + dist * std::cos(angle);
float y = caster->GetPositionY() + dist * std::sin(angle);
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 0b014725722..8080cfa4c55 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -166,7 +166,7 @@ class spell_krystallus_shatter_effect : public SpellScript
if (!GetHitUnit())
return;
- float radius = GetEffectInfo(EFFECT_0).CalcRadius(GetCaster());
+ float radius = GetEffectInfo(EFFECT_0).CalcRadius(GetCaster(), SpellTargetIndex::TargetB);
if (!radius)
return;
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index a8bc4138e38..c88f98b937a 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -323,7 +323,7 @@ class spell_gruul_shatter_effect : public SpellScriptLoader
if (!GetHitUnit())
return;
- float radius = GetEffectInfo(EFFECT_0).CalcRadius(GetCaster());
+ float radius = GetEffectInfo(EFFECT_0).CalcRadius(GetCaster(), SpellTargetIndex::TargetB);
if (!radius)
return;
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 54b5cc2393f..4aecdc4fef9 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -1406,7 +1406,7 @@ class spell_mage_ring_of_frost_freeze : public SpellScript
void FilterTargets(std::list<WorldObject*>& targets)
{
WorldLocation const* dest = GetExplTargetDest();
- float outRadius = sSpellMgr->AssertSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON, GetCastDifficulty())->GetEffect(EFFECT_0).CalcRadius();
+ float outRadius = sSpellMgr->AssertSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON, GetCastDifficulty())->GetEffect(EFFECT_0).CalcRadius(nullptr, SpellTargetIndex::TargetB);
float inRadius = 6.5f;
targets.remove_if([dest, outRadius, inRadius](WorldObject* target)