mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
feat(Core/Maps): Remove active objects nearby cell marking handling (#22585)
This commit is contained in:
@@ -327,14 +327,6 @@ public:
|
||||
void ScriptsStart(std::map<uint32, std::multimap<uint32, ScriptInfo> > const& scripts, uint32 id, Object* source, Object* target);
|
||||
void ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target);
|
||||
|
||||
// must called with AddToWorld
|
||||
template<class T>
|
||||
void AddToActive(T* obj);
|
||||
|
||||
// must called with RemoveFromWorld
|
||||
template<class T>
|
||||
void RemoveFromActive(T* obj);
|
||||
|
||||
CreatureGroupHolderType CreatureGroupHolder;
|
||||
|
||||
void UpdateIteratorBack(Player* player);
|
||||
@@ -490,10 +482,7 @@ public:
|
||||
_updateObjects.erase(obj);
|
||||
}
|
||||
|
||||
std::size_t GetActiveNonPlayersCount() const
|
||||
{
|
||||
return m_activeNonPlayers.size();
|
||||
}
|
||||
size_t GetUpdateObjectsCount() const { return _updateObjects.size(); }
|
||||
|
||||
virtual std::string GetDebugInfo() const;
|
||||
|
||||
@@ -549,10 +538,6 @@ protected:
|
||||
MapRefMgr m_mapRefMgr;
|
||||
MapRefMgr::iterator m_mapRefIter;
|
||||
|
||||
typedef std::set<WorldObject*> ActiveNonPlayers;
|
||||
ActiveNonPlayers m_activeNonPlayers;
|
||||
ActiveNonPlayers::iterator m_activeNonPlayersIter;
|
||||
|
||||
// Objects that must update even in inactive grids without activating them
|
||||
TransportsContainer _transports;
|
||||
TransportsContainer::iterator _transportsUpdateIter;
|
||||
@@ -583,27 +568,6 @@ private:
|
||||
template<class T>
|
||||
void DeleteFromWorld(T*);
|
||||
|
||||
void AddToActiveHelper(WorldObject* obj)
|
||||
{
|
||||
m_activeNonPlayers.insert(obj);
|
||||
}
|
||||
|
||||
void RemoveFromActiveHelper(WorldObject* obj)
|
||||
{
|
||||
// Map::Update for active object in proccess
|
||||
if (m_activeNonPlayersIter != m_activeNonPlayers.end())
|
||||
{
|
||||
ActiveNonPlayers::iterator itr = m_activeNonPlayers.find(obj);
|
||||
if (itr == m_activeNonPlayers.end())
|
||||
return;
|
||||
if (itr == m_activeNonPlayersIter)
|
||||
++m_activeNonPlayersIter;
|
||||
m_activeNonPlayers.erase(itr);
|
||||
}
|
||||
else
|
||||
m_activeNonPlayers.erase(obj);
|
||||
}
|
||||
|
||||
void UpdateNonPlayerObjects(uint32 const diff);
|
||||
|
||||
void _AddObjectToUpdateList(WorldObject* obj);
|
||||
|
||||
Reference in New Issue
Block a user