mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user