aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-03 16:18:06 +0200
committerShauren <shauren.trinity@gmail.com>2024-07-03 16:18:06 +0200
commitf19e1a271618a35515512ce2a64330f21133616c (patch)
tree0490d682a4d48eb443d68c27692011cd08ee2e09 /src/server/game/Spells/SpellInfo.cpp
parent321f3cc4a7a59874c73ab82d57c2f1c76a820396 (diff)
Core/Spells: Remove spell range increase when caster or target move backwards
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 8e29ade5a67..b725cd76df5 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -699,7 +699,7 @@ float SpellEffectInfo::CalcRadius(WorldObject* caster /*= nullptr*/, SpellTarget
if (caster)
{
- if (Unit* casterUnit = caster->ToUnit())
+ if (Unit const* casterUnit = caster->ToUnit())
radius += entry->RadiusPerLevel * casterUnit->GetLevel();
radius = std::min(radius, entry->RadiusMax);
@@ -708,7 +708,7 @@ float SpellEffectInfo::CalcRadius(WorldObject* caster /*= nullptr*/, SpellTarget
modOwner->ApplySpellMod(_spellInfo, SpellModOp::Radius, radius, spell);
if (!_spellInfo->HasAttribute(SPELL_ATTR9_NO_MOVEMENT_RADIUS_BONUS))
- if (Unit* casterUnit = caster->ToUnit(); casterUnit && casterUnit->isMoving() && !casterUnit->IsWalking())
+ if (Unit const* casterUnit = caster->ToUnit(); casterUnit && Spell::CanIncreaseRangeByMovement(casterUnit))
radius += 2.0f;
}