mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457 (#6113)
* refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457
(cherry picked from commit d6201e5dbb)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: SilverIce <slifeleaf@gmail.com>
* Update CellImpl.h
* w
* more more brackets
* ew
* fix build
This commit is contained in:
@@ -610,9 +610,7 @@ void GameObject::Update(uint32 diff)
|
||||
{
|
||||
Acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck checker(this, owner, radius);
|
||||
Acore::UnitSearcher<Acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, target, checker);
|
||||
VisitNearbyGridObject(radius, searcher);
|
||||
if (!target)
|
||||
VisitNearbyWorldObject(radius, searcher);
|
||||
Cell::VisitAllObjects(this, searcher, radius);
|
||||
}
|
||||
else // environmental trap
|
||||
{
|
||||
@@ -621,7 +619,7 @@ void GameObject::Update(uint32 diff)
|
||||
Player* player = nullptr;
|
||||
Acore::AnyPlayerInObjectRangeCheck checker(this, radius, true, true);
|
||||
Acore::PlayerSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(this, player, checker);
|
||||
VisitNearbyWorldObject(radius, searcher);
|
||||
Cell::VisitWorldObjects(this, searcher, radius);
|
||||
target = player;
|
||||
}
|
||||
|
||||
@@ -1209,14 +1207,10 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
|
||||
{
|
||||
GameObject* ok = nullptr;
|
||||
|
||||
CellCoord p(Acore::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
Acore::NearestGameObjectFishingHole u_check(*this, range);
|
||||
Acore::GameObjectSearcher<Acore::NearestGameObjectFishingHole> checker(this, ok, u_check);
|
||||
|
||||
TypeContainerVisitor<Acore::GameObjectSearcher<Acore::NearestGameObjectFishingHole>, GridTypeMapContainer > grid_object_checker(checker);
|
||||
cell.Visit(p, grid_object_checker, *GetMap(), *this, range);
|
||||
|
||||
Cell::VisitGridObjects(this, checker, range);
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -1978,7 +1972,7 @@ void GameObject::SendMessageToSetInRange(WorldPacket* data, float dist, bool /*s
|
||||
if (includeMargin)
|
||||
dist += VISIBILITY_COMPENSATION * 2.0f; // pussywizard: to ensure everyone receives all important packets
|
||||
Acore::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr);
|
||||
VisitNearbyWorldObject(dist, notifier);
|
||||
Cell::VisitWorldObjects(this, notifier, dist);
|
||||
}
|
||||
|
||||
void GameObject::EventInform(uint32 eventId)
|
||||
|
||||
Reference in New Issue
Block a user