mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Objects: Remove restriction on what object types can be set as active
This commit is contained in:
@@ -82,32 +82,14 @@ class ObjectWorldLoader
|
||||
uint32& i_corpses;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
void ObjectGridLoaderBase::SetObjectCell(T* /*obj*/, CellCoord const& /*cellCoord*/) { }
|
||||
|
||||
template<> void ObjectGridLoaderBase::SetObjectCell(Creature* obj, CellCoord const& cellCoord)
|
||||
{
|
||||
Cell cell(cellCoord);
|
||||
obj->SetCurrentCell(cell);
|
||||
}
|
||||
|
||||
template<> void ObjectGridLoaderBase::SetObjectCell(GameObject* obj, CellCoord const& cellCoord)
|
||||
void ObjectGridLoaderBase::SetObjectCell(MapObject* obj, CellCoord const& cellCoord)
|
||||
{
|
||||
Cell cell(cellCoord);
|
||||
obj->SetCurrentCell(cell);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void AddObjectHelper(CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* /*map*/, T *obj)
|
||||
{
|
||||
obj->AddToGrid(m);
|
||||
ObjectGridLoader::SetObjectCell(obj, cell);
|
||||
obj->AddToWorld();
|
||||
++count;
|
||||
}
|
||||
|
||||
template <>
|
||||
void AddObjectHelper(CellCoord &cell, CreatureMapType &m, uint32 &count, Map* map, Creature *obj)
|
||||
void AddObjectHelper(CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* map, T *obj)
|
||||
{
|
||||
obj->AddToGrid(m);
|
||||
ObjectGridLoader::SetObjectCell(obj, cell);
|
||||
|
||||
Reference in New Issue
Block a user