fix(Core/Grids): Grid improvements (#20955)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "MoveSplineInit.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "QueryResult.h"
|
||||
#include "Timer.h"
|
||||
#include "WaypointMgr.h"
|
||||
|
||||
FormationMgr::~FormationMgr()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "QueryResult.h"
|
||||
#include "Timer.h"
|
||||
#include "Util.h"
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
|
||||
@@ -3098,18 +3098,9 @@ void WorldObject::BuildUpdate(UpdateDataMapType& data_map, UpdatePlayerSet& play
|
||||
|
||||
void WorldObject::GetCreaturesWithEntryInRange(std::list<Creature*>& creatureList, float radius, uint32 entry)
|
||||
{
|
||||
CellCoord pair(Acore::ComputeCellCoord(this->GetPositionX(), this->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Acore::AllCreaturesOfEntryInRange check(this, entry, radius);
|
||||
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(this, creatureList, check);
|
||||
|
||||
TypeContainerVisitor<Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange>, WorldTypeMapContainer> world_visitor(searcher);
|
||||
cell.Visit(pair, world_visitor, *(this->GetMap()), *this, radius);
|
||||
|
||||
TypeContainerVisitor<Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange>, GridTypeMapContainer> grid_visitor(searcher);
|
||||
cell.Visit(pair, grid_visitor, *(this->GetMap()), *this, radius);
|
||||
Cell::VisitAllObjects(this, searcher, radius);
|
||||
}
|
||||
|
||||
void WorldObject::AddToObjectUpdate()
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define TRANSPORTS_H
|
||||
|
||||
#include "GameObject.h"
|
||||
#include "Timer.h"
|
||||
#include "TransportMgr.h"
|
||||
#include "VehicleDefines.h"
|
||||
#include "ZoneScript.h"
|
||||
|
||||
@@ -20535,6 +20535,8 @@ void Unit::ExecuteDelayedUnitRelocationEvent()
|
||||
}
|
||||
}
|
||||
|
||||
GetMap()->LoadGridsInRange(*player, MAX_VISIBILITY_DISTANCE);
|
||||
|
||||
Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance
|
||||
Cell::VisitAllObjects(viewPoint, relocateNoLarge, player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS);
|
||||
relocateNoLarge.SendToSelf();
|
||||
|
||||
Reference in New Issue
Block a user