--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-30 23:38:21 -05:00
101 changed files with 801 additions and 608 deletions

View File

@@ -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;