aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-10 19:21:39 +0200
committerQAston <none@none>2009-05-10 19:21:39 +0200
commit53b3c9a6dc6cf96a0ce0769a3ad431f1d6c4768c (patch)
treee6df1b9c57a7546b8ff57270759c1791c48e399d /src/game/GameObject.cpp
parent9171455b73e5aaf685a5541e1b79e3a6c84c024b (diff)
*Fix trap radius calculation in some cases-by krz
--HG-- branch : trunk
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 f71c08b3403..744b6679862 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -293,7 +293,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 = GetSpellRadius(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)