Cleanup and reorganization of Unit and SpellEntry headers. (#312)

* Move some unit and spell defines to dedicated header.

* Reorder functions in unit header.

* Clean up until spell category.

* Finish cleaning up spell functions.

* Cleanup combat system methods.

* Done cleaning up unit header.

* Reduce not needed includes.
This commit is contained in:
ratkosrb
2019-11-24 22:20:44 +02:00
committed by GitHub
parent df76eff1d3
commit 66659fe13f
374 changed files with 7116 additions and 7379 deletions
+4 -4
View File
@@ -99,11 +99,11 @@ public:
uint32 i_corpses;
};
template<class T> void addUnitState(T* /*obj*/, CellPair const& /*cell_pair*/)
template<class T> void AddUnitState(T* /*obj*/, CellPair const& /*cell_pair*/)
{
}
template<> void addUnitState(Creature *obj, CellPair const& cell_pair)
template<> void AddUnitState(Creature *obj, CellPair const& cell_pair)
{
Cell cell(cell_pair);
@@ -158,7 +158,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellPair &cell, GridRefManager<T> &
grid.AddGridObject(obj);
addUnitState(obj, cell);
AddUnitState(obj, cell);
obj->SetMap(map);
obj->AddToWorld();
if (obj->isActiveObject() && !map->IsUnloading())
@@ -191,7 +191,7 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType
grid.AddWorldObject(obj);
addUnitState(obj, cell);
AddUnitState(obj, cell);
obj->SetMap(map);
obj->AddToWorld();
if (obj->isActiveObject() && !map->IsUnloading())