mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/BattlegroundMap: Load all cells when created & mark all creatures as active (#29410)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user