*Explicitly implement spell target 28 and 29.
--HG-- branch : trunk
This commit is contained in:
1 parent
f72cd39122
commit
d44d827200
5 files changed
+17
-20
No files matched your search
+10
-9
@@ -1977,17 +1977,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 = GetSpellRadius(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;
|
||||
@@ -1999,6 +1995,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 = GetSpellRadius(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