aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r--src/game/GameObject.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 540ea1e0dd7..a6292a9964b 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -302,7 +302,12 @@ void GameObject::Update(uint32 /*p_time*/)
bool IsBattleGroundTrap = false;
//FIXME: this is activation radius (in different casting radius that must be selected from spell data)
//TODO: move activated state code (cast itself) to GO_ACTIVATED, in this place only check activating and set state
- float radius = goInfo->trap.radius;
+ float radius = 0.0f;
+ const SpellEntry *spellEntry = sSpellStore.LookupEntry(m_spellId);
+ if(spellEntry)
+ radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(spellEntry->EffectRadiusIndex[0]));
+ else
+ radius = goInfo->trap.radius;
if(!radius)
{
if(goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call)