Core/Grid:

- Simplified CellArea calculation (Original author: SilverIce)

- Removed unused code in Cell class (Original author: SilverIce)

- Improve some Visit functions.
This commit is contained in:
kaelima
2011-10-19 17:40:44 +01:00
parent d7e0190726
commit be0b2fcf97
25 changed files with 127 additions and 353 deletions

View File

@@ -365,14 +365,13 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float minimumRange)
CellCoord pair(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::PlayerAtMinimumRangeAway check(me, minimumRange);
Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway> searcher(me, player, check);
TypeContainerVisitor<Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway>, GridTypeMapContainer> visitor(searcher);
cell.Visit(pair, visitor, *(me->GetMap()));
cell.Visit(pair, visitor, *me->GetMap(), *me, minimumRange);
return player;
}