diff options
author | megamage <none@none> | 2009-04-30 23:38:21 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-30 23:38:21 -0500 |
commit | 8a57a94eca3367dd11afdce7b11d3aba415ae0bf (patch) | |
tree | 1fd8c050c612d0a2e492cf54e9b4e5ec4a585608 /src/game/Spell.cpp | |
parent | b3cb9fb007a51c98cefba626ba1ea59cab417f4e (diff) | |
parent | 570b148264b041a30e0b3ca453df0eacbe5bf4a4 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5ffb17d05ac..9590322617f 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1991,17 +1991,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) break; } - if(cur == TARGET_DEST_DEST) - break; - - float x, y, z, angle, dist; - - dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); - if (cur == TARGET_DEST_DEST_RANDOM) - dist *= rand_norm(); - + float angle; switch(cur) { + case TARGET_DEST_DYNOBJ_ENEMY: + case TARGET_DEST_DYNOBJ_ALLY: + case TARGET_DEST_DEST: + return; case TARGET_DEST_DEST_FRONT: angle = 0.0f; break; case TARGET_DEST_DEST_BACK: angle = M_PI; break; case TARGET_DEST_DEST_RIGHT: angle = M_PI/2; break; @@ -2013,6 +2009,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) default: angle = rand_norm()*2*M_PI; break; } + float dist, x, y, z; + dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); + if (cur == TARGET_DEST_DEST_RANDOM) + dist *= rand_norm(); + x = m_targets.m_destX; y = m_targets.m_destY; z = m_targets.m_destZ; |