From 53b3c9a6dc6cf96a0ce0769a3ad431f1d6c4768c Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 10 May 2009 19:21:39 +0200 Subject: *Fix trap radius calculation in some cases-by krz --HG-- branch : trunk --- src/game/GameObject.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game/GameObject.cpp') 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) -- cgit v1.2.3