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:
1 parent
d7e0190726
commit
be0b2fcf97
25 files changed
+127
-353
No files matched your search
@@ -1224,7 +1224,7 @@ GameObject* ChatHandler::GetNearbyGameObject()
|
||||
GameObject* obj = NULL;
|
||||
Trinity::NearestGameObjectCheck check(*pl);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectCheck> searcher(pl, obj, check);
|
||||
pl->VisitNearbyGridObject(999, searcher);
|
||||
pl->VisitNearbyGridObject(SIZE_OF_GRIDS, searcher);
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -1242,13 +1242,12 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
|
||||
// search near player then
|
||||
CellCoord p(Trinity::ComputeCellCoord(pl->GetPositionX(), pl->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
Trinity::GameObjectWithDbGUIDCheck go_check(*pl, lowguid);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(pl, obj, go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
cell.Visit(p, object_checker, *pl->GetMap());
|
||||
cell.Visit(p, object_checker, *pl->GetMap(), *pl, pl->GetGridActivationRange());
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
||||
Reference in new issue
Block a user