mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Fix the crash when removing object from an unloaded grid. Object should always be unlinked from grid no matter if the grid is loaded.
This commit is contained in:
@@ -77,7 +77,7 @@ template<> void ObjectGridLoader::SetObjectCell(Creature* obj, CellCoord const&
|
||||
template <class T>
|
||||
void AddObjectHelper(CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* map, T *obj)
|
||||
{
|
||||
obj->GetGridRef().link(&m, obj);
|
||||
obj->AddToGrid(m);
|
||||
ObjectGridLoader::SetObjectCell(obj, cell);
|
||||
obj->AddToWorld();
|
||||
if (obj->isActiveObject())
|
||||
|
||||
Reference in New Issue
Block a user