aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-12 23:54:02 -0600
committermegamage <none@none>2008-12-12 23:54:02 -0600
commit0ea36ed76eff53d1e8eea8f57b2f5f9feedb8932 (patch)
tree546c94a3aadaa41ad407fc09a4bb215adcd5d3a8 /src/game/Spell.cpp
parent032f5bc87de643b9946bebab1afeef27c23840cf (diff)
*Move cell visit into functions.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 6a3b33a8bdc..9f37bbb7333 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1473,7 +1473,14 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const u
y = m_caster->GetPositionY();
}
- float x_off, y_off;
+ Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry);
+ if((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY)
+ || TargetType == SPELL_TARGETS_ENTRY && !entry)
+ m_caster->GetMap()->VisitWorld(x, y, radius, notifier);
+ else
+ m_caster->GetMap()->VisitAll(x, y, radius, notifier);
+
+ /*float x_off, y_off;
CellPair p(Trinity::ComputeCellPair(x, y, x_off, y_off));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
@@ -1491,7 +1498,7 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const u
{
TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap(), radius, x_off, y_off);
- }
+ }*/
}
Unit* Spell::SearchNearbyTarget(float radius, SpellTargets TargetType, uint32 entry)