refactor(Core): Rename ...Manager to ...Mgr (#6910)

* Rename MapManager.h to MapMgr.h

* Rename BanManager.h to BanMgr.h

* Rename MapManager.cpp to MapMgr.cpp

* Rename BanManager.cpp to BanMgr.cpp

* Rename MapRefManager.h to MapRefMgr.h

* Rename ThreatManager.h to ThreatMgr.h

* Rename GridRefManager.h to GridRefMgr.h

* Rename ThreatManager.cpp to ThreatMgr.cpp

* Rename GroupRefManager.h to GroupRefMgr.h

* Rename HostileRefManager.h to HostileRefMgr.h

* Rename HostileRefManager.cpp to HostileRefMgr.cpp

* Rename MMapManager.h to MMapMgr.h

* Rename FollowerRefManager.h to FollowerRefMgr.h

* Rename VMapManager2.h to VMapMgr2.h

* Rename IVMapManager.h to IVMapMgr.h

* Rename MMapManager.cpp to MMapMgr.cpp

* Rename VMapManager2.cpp to VMapMgr2.cpp

* Rename RefManager.h to RefMgr.h

* Rename WaypointManager.h to WaypointMgr.h

* Rename WaypointManager.cpp to WaypointMgr.cpp

* Rename MPQManager.h to MPQMgr.h

* Rename MPQManager.cpp to MPQMgr.cpp

* Rename IMMAPManager.h to IMMAPMgr.h

* fix build

* Update Main.cpp

* chore(Core/Misc): Remove toxic language

* Revert "chore(Core/Misc): Remove toxic language"

* fix build

* build
This commit is contained in:
Kitzunu
2021-09-15 17:50:28 +02:00
committed by GitHub
parent 7e2aa2402f
commit 2f449326e0
187 changed files with 719 additions and 719 deletions
+5 -5
View File
@@ -47,11 +47,11 @@ typedef TYPELIST_5(GameObject, Player, Creature/*pets*/, Corpse/*resurrectable*/
typedef TYPELIST_4(GameObject, Creature/*except pets*/, DynamicObject, Corpse/*Bones*/) AllGridObjectTypes;
typedef TYPELIST_5(Creature, GameObject, DynamicObject, Pet, Corpse) AllMapStoredObjectTypes;
typedef GridRefManager<Corpse> CorpseMapType;
typedef GridRefManager<Creature> CreatureMapType;
typedef GridRefManager<DynamicObject> DynamicObjectMapType;
typedef GridRefManager<GameObject> GameObjectMapType;
typedef GridRefManager<Player> PlayerMapType;
typedef GridRefMgr<Corpse> CorpseMapType;
typedef GridRefMgr<Creature> CreatureMapType;
typedef GridRefMgr<DynamicObject> DynamicObjectMapType;
typedef GridRefMgr<GameObject> GameObjectMapType;
typedef GridRefMgr<Player> PlayerMapType;
enum GridMapTypeMask
{
@@ -7,19 +7,19 @@
#ifndef _GRIDREFMANAGER
#define _GRIDREFMANAGER
#include "RefManager.h"
#include "RefMgr.h"
template<class OBJECT>
class GridReference;
template<class OBJECT>
class GridRefManager : public RefManager<GridRefManager<OBJECT>, OBJECT>
class GridRefMgr : public RefMgr<GridRefMgr<OBJECT>, OBJECT>
{
public:
typedef LinkedListHead::Iterator< GridReference<OBJECT> > iterator;
GridReference<OBJECT>* getFirst() { return (GridReference<OBJECT>*)RefManager<GridRefManager<OBJECT>, OBJECT>::getFirst(); }
GridReference<OBJECT>* getLast() { return (GridReference<OBJECT>*)RefManager<GridRefManager<OBJECT>, OBJECT>::getLast(); }
GridReference<OBJECT>* getFirst() { return (GridReference<OBJECT>*)RefMgr<GridRefMgr<OBJECT>, OBJECT>::getFirst(); }
GridReference<OBJECT>* getLast() { return (GridReference<OBJECT>*)RefMgr<GridRefMgr<OBJECT>, OBJECT>::getLast(); }
iterator begin() { return iterator(getFirst()); }
iterator end() { return iterator(nullptr); }
+4 -4
View File
@@ -10,10 +10,10 @@
#include "LinkedReference/Reference.h"
template<class OBJECT>
class GridRefManager;
class GridRefMgr;
template<class OBJECT>
class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
class GridReference : public Reference<GridRefMgr<OBJECT>, OBJECT>
{
protected:
void targetObjectBuildLink() override
@@ -33,8 +33,8 @@ protected:
this->getTarget()->decSize();
}
public:
GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() {}
GridReference() : Reference<GridRefMgr<OBJECT>, OBJECT>() {}
~GridReference() override { this->unlink(); }
GridReference* next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); }
GridReference* next() { return (GridReference*)Reference<GridRefMgr<OBJECT>, OBJECT>::next(); }
};
#endif
+1 -1
View File
@@ -47,7 +47,7 @@ public:
[[nodiscard]] int32 getX() const { return i_x; }
[[nodiscard]] int32 getY() const { return i_y; }
void link(GridRefManager<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> >* pTo)
void link(GridRefMgr<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> >* pTo)
{
i_Reference.link(pTo, this);
}
@@ -327,10 +327,10 @@ void MessageDistDelivererToHostile::Visit(DynamicObjectMapType& m)
}
template<class T>
void ObjectUpdater::Visit(GridRefManager<T>& m)
void ObjectUpdater::Visit(GridRefMgr<T>& m)
{
T* obj;
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); )
for (typename GridRefMgr<T>::iterator iter = m.begin(); iter != m.end(); )
{
obj = iter->GetSource();
++iter;
+29 -29
View File
@@ -42,7 +42,7 @@ namespace Acore
}
void Visit(GameObjectMapType&);
template<class T> void Visit(GridRefManager<T>& m);
template<class T> void Visit(GridRefMgr<T>& m);
void SendToSelf(void);
};
@@ -51,7 +51,7 @@ namespace Acore
WorldObject& i_object;
explicit VisibleChangesNotifier(WorldObject& object) : i_object(object) {}
template<class T> void Visit(GridRefManager<T>&) {}
template<class T> void Visit(GridRefMgr<T>&) {}
void Visit(PlayerMapType&);
void Visit(CreatureMapType&);
void Visit(DynamicObjectMapType&);
@@ -61,7 +61,7 @@ namespace Acore
{
PlayerRelocationNotifier(Player& player, bool largeOnly): VisibleNotifier(player, false, largeOnly) { }
template<class T> void Visit(GridRefManager<T>& m) { VisibleNotifier::Visit(m); }
template<class T> void Visit(GridRefMgr<T>& m) { VisibleNotifier::Visit(m); }
void Visit(PlayerMapType&);
};
@@ -69,7 +69,7 @@ namespace Acore
{
Creature& i_creature;
CreatureRelocationNotifier(Creature& c) : i_creature(c) {}
template<class T> void Visit(GridRefManager<T>&) {}
template<class T> void Visit(GridRefMgr<T>&) {}
void Visit(PlayerMapType&);
};
@@ -78,7 +78,7 @@ namespace Acore
Unit& i_unit;
bool isCreature;
explicit AIRelocationNotifier(Unit& unit) : i_unit(unit), isCreature(unit.GetTypeId() == TYPEID_UNIT) {}
template<class T> void Visit(GridRefManager<T>&) {}
template<class T> void Visit(GridRefMgr<T>&) {}
void Visit(CreatureMapType&);
};
@@ -99,7 +99,7 @@ namespace Acore
void Visit(PlayerMapType& m);
void Visit(CreatureMapType& m);
void Visit(DynamicObjectMapType& m);
template<class SKIP> void Visit(GridRefManager<SKIP>&) {}
template<class SKIP> void Visit(GridRefMgr<SKIP>&) {}
void SendPacket(Player* player)
{
@@ -127,7 +127,7 @@ namespace Acore
void Visit(PlayerMapType& m);
void Visit(CreatureMapType& m);
void Visit(DynamicObjectMapType& m);
template<class SKIP> void Visit(GridRefManager<SKIP>&) {}
template<class SKIP> void Visit(GridRefMgr<SKIP>&) {}
void SendPacket(Player* player)
{
@@ -144,7 +144,7 @@ namespace Acore
uint32 i_timeDiff;
bool i_largeOnly;
explicit ObjectUpdater(const uint32 diff, bool largeOnly) : i_timeDiff(diff), i_largeOnly(largeOnly) {}
template<class T> void Visit(GridRefManager<T>& m);
template<class T> void Visit(GridRefMgr<T>& m);
void Visit(PlayerMapType&) {}
void Visit(CorpseMapType&) {}
};
@@ -170,7 +170,7 @@ namespace Acore
void Visit(CorpseMapType& m);
void Visit(DynamicObjectMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -190,7 +190,7 @@ namespace Acore
void Visit(CorpseMapType& m);
void Visit(DynamicObjectMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -210,7 +210,7 @@ namespace Acore
void Visit(GameObjectMapType& m);
void Visit(DynamicObjectMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Do>
@@ -267,7 +267,7 @@ namespace Acore
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// Gameobject searchers
@@ -284,7 +284,7 @@ namespace Acore
void Visit(GameObjectMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// Last accepted by Check GO if any (Check can change requirements at each call)
@@ -300,7 +300,7 @@ namespace Acore
void Visit(GameObjectMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -315,7 +315,7 @@ namespace Acore
void Visit(GameObjectMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Functor>
@@ -331,7 +331,7 @@ namespace Acore
_func(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
private:
Functor& _func;
@@ -354,7 +354,7 @@ namespace Acore
void Visit(CreatureMapType& m);
void Visit(PlayerMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// Last accepted by Check Unit if any (Check can change requirements at each call)
@@ -371,7 +371,7 @@ namespace Acore
void Visit(CreatureMapType& m);
void Visit(PlayerMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// All accepted by Check units if any
@@ -388,7 +388,7 @@ namespace Acore
void Visit(PlayerMapType& m);
void Visit(CreatureMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// Creature searchers
@@ -405,7 +405,7 @@ namespace Acore
void Visit(CreatureMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// Last accepted by Check Creature if any (Check can change requirements at each call)
@@ -421,7 +421,7 @@ namespace Acore
void Visit(CreatureMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -436,7 +436,7 @@ namespace Acore
void Visit(CreatureMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Do>
@@ -455,7 +455,7 @@ namespace Acore
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// Player searchers
@@ -472,7 +472,7 @@ namespace Acore
void Visit(PlayerMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -487,7 +487,7 @@ namespace Acore
void Visit(PlayerMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -503,7 +503,7 @@ namespace Acore
void Visit(PlayerMapType& m);
void Visit(CreatureMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Check>
@@ -519,7 +519,7 @@ namespace Acore
void Visit(PlayerMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Do>
@@ -538,7 +538,7 @@ namespace Acore
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
template<class Do>
@@ -558,7 +558,7 @@ namespace Acore
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED>&) {}
template<class NOT_INTERESTED> void Visit(GridRefMgr<NOT_INTERESTED>&) {}
};
// CHECKS && DO classes
@@ -17,13 +17,13 @@
#include "WorldPacket.h"
template<class T>
inline void Acore::VisibleNotifier::Visit(GridRefManager<T>& m)
inline void Acore::VisibleNotifier::Visit(GridRefMgr<T>& m)
{
// Xinef: Update gameobjects only
if (i_gobjOnly)
return;
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
for (typename GridRefMgr<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if (i_largeOnly != iter->GetSource()->IsVisibilityOverridden())
continue;
+7 -7
View File
@@ -27,7 +27,7 @@ public:
void Visit(CorpseMapType& m);
template<class T> void Visit(GridRefManager<T>&) { }
template<class T> void Visit(GridRefMgr<T>&) { }
private:
Cell i_cell;
@@ -54,7 +54,7 @@ template<> void ObjectGridLoader::SetObjectCell(GameObject* obj, CellCoord const
}
template <class T>
void AddObjectHelper(CellCoord& cell, GridRefManager<T>& m, uint32& count, Map* /*map*/, T* obj)
void AddObjectHelper(CellCoord& cell, GridRefMgr<T>& m, uint32& count, Map* /*map*/, T* obj)
{
obj->AddToGrid(m);
ObjectGridLoader::SetObjectCell(obj, cell);
@@ -87,7 +87,7 @@ void AddObjectHelper(CellCoord& cell, GameObjectMapType& m, uint32& count, Map*
}
template <class T>
void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefManager<T>& m, uint32& count, Map* map)
void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefMgr<T>& m, uint32& count, Map* map)
{
for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
{
@@ -105,7 +105,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefManager<T>&
}
template <>
void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefManager<GameObject>& m, uint32& count, Map* map)
void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefMgr<GameObject>& m, uint32& count, Map* map)
{
for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
{
@@ -187,7 +187,7 @@ void ObjectGridLoader::LoadN(void)
}
template<class T>
void ObjectGridUnloader::Visit(GridRefManager<T>& m)
void ObjectGridUnloader::Visit(GridRefMgr<T>& m)
{
while (!m.isEmpty())
{
@@ -206,9 +206,9 @@ void ObjectGridUnloader::Visit(GridRefManager<T>& m)
}
template<class T>
void ObjectGridCleaner::Visit(GridRefManager<T>& m)
void ObjectGridCleaner::Visit(GridRefMgr<T>& m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
for (typename GridRefMgr<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
iter->GetSource()->CleanupsBeforeDelete();
}
+2 -2
View File
@@ -46,7 +46,7 @@ private:
class ObjectGridCleaner
{
public:
template<class T> void Visit(GridRefManager<T>&);
template<class T> void Visit(GridRefMgr<T>&);
};
//Delete objects before deleting NGrid
@@ -54,6 +54,6 @@ class ObjectGridUnloader
{
public:
void Visit(CorpseMapType&) { } // corpses are deleted with Map
template<class T> void Visit(GridRefManager<T>& m);
template<class T> void Visit(GridRefMgr<T>& m);
};
#endif