*Implement spell effect wmo damage.
--HG-- branch : trunk
This commit is contained in:
1 parent
b372a5ba25
commit
4ed847a6e3
10 files changed
+162
-5
No files matched your search
@@ -2197,7 +2197,36 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
|
||||
break;
|
||||
case TARGET_OBJECT_AREA_SRC: // fix me
|
||||
case TARGET_OBJECT_AREA_DST:
|
||||
{
|
||||
float x, y, z;
|
||||
if(cur == TARGET_OBJECT_AREA_SRC)
|
||||
{
|
||||
if(m_targets.HasSrc())
|
||||
{
|
||||
x = m_targets.m_srcX;
|
||||
y = m_targets.m_srcY;
|
||||
z = m_targets.m_srcZ;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
else if(m_targets.HasDst())
|
||||
{
|
||||
x = m_targets.m_destX;
|
||||
y = m_targets.m_destY;
|
||||
z = m_targets.m_destZ;
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
Trinity::GameObjectInRangeCheck check(x, y, z, radius + 50);
|
||||
std::list<GameObject*> goList;
|
||||
Trinity::GameObjectListSearcher<Trinity::GameObjectInRangeCheck> searcher(m_caster, goList, check);
|
||||
m_caster->GetMap()->VisitGrid(x, y, radius, searcher);
|
||||
for(std::list<GameObject*>::iterator itr = goList.begin(); itr != goList.end(); ++itr)
|
||||
AddGOTarget(*itr, i);
|
||||
break;
|
||||
}
|
||||
case TARGET_UNIT_PARTY_TARGET:
|
||||
m_targets.getUnitTarget()->GetPartyMember(unitList, radius);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user