Core/BattlegroundMap: Load all cells when created & mark all creatures as active (#29410)

This commit is contained in:
Jeremy
2023-11-14 18:40:39 +01:00
committed by GitHub
parent 740136af41
commit e72bde5236
6 changed files with 25 additions and 0 deletions

View File

@@ -548,6 +548,9 @@ bool Map::AddToMap(T* obj)
return false; //Should delete object
}
if (IsAlwaysActive())
obj->setActive(true);
Cell cell(cellCoord);
if (obj->isActiveObject())
EnsureGridLoadedForActiveObject(cell, obj);
@@ -3295,6 +3298,11 @@ bool Map::IsGarrison() const
return i_mapEntry && i_mapEntry->IsGarrison();
}
bool Map::IsAlwaysActive() const
{
return IsBattlegroundOrArena();
}
bool Map::GetEntrancePos(int32 &mapid, float &x, float &y)
{
if (!i_mapEntry)