aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/EventAI
diff options
context:
space:
mode:
authorkaelima <kaelima@live.se>2011-10-19 17:40:44 +0100
committerkaelima <kaelima@live.se>2011-10-19 17:40:44 +0100
commitbe0b2fcf97404af624e538be96ea05892d3f41be (patch)
tree8849332a9a8930226fea13b4e5188f4b521a70c3 /src/server/game/AI/EventAI
parentd7e019072677dd098c491986ebe8c48259d20155 (diff)
Core/Grid:
- Simplified CellArea calculation (Original author: SilverIce) - Removed unused code in Cell class (Original author: SilverIce) - Improve some Visit functions.
Diffstat (limited to 'src/server/game/AI/EventAI')
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAI.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 8f3bf52c37e..be0dd8c3679 100755
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -1179,7 +1179,6 @@ Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff)
{
CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* unit = NULL;
@@ -1201,7 +1200,6 @@ void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
{
CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::FriendlyCCedInRange u_check(me, range);
@@ -1209,14 +1207,13 @@ void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
- cell.Visit(p, grid_creature_searcher, *me->GetMap());
+ cell.Visit(p, grid_creature_searcher, *me->GetMap(), *me, range);
}
void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid)
{
CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::FriendlyMissingBuffInRange u_check(me, range, spellid);
@@ -1224,7 +1221,7 @@ void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, flo
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
- cell.Visit(p, grid_creature_searcher, *me->GetMap());
+ cell.Visit(p, grid_creature_searcher, *me->GetMap(), *me, range);
}
// *********************************