Core/BattlegroundMap: Load all cells when created & mark all creatures as active
Port From (https://github.com/TrinityCore/TrinityCore/commit/e72bde5236d41a7f66abb25ce9e118eeb1c5aa92)
This commit is contained in:
@@ -423,6 +423,9 @@ namespace Game.Maps
|
||||
return false; //Should delete object
|
||||
}
|
||||
|
||||
if (IsAlwaysActive())
|
||||
obj.SetActive(true);
|
||||
|
||||
var cell = new Cell(cellCoord);
|
||||
if (obj.IsActiveObject())
|
||||
EnsureGridLoadedForActiveObject(cell, obj);
|
||||
@@ -3345,6 +3348,15 @@ namespace Game.Maps
|
||||
return i_mapRecord != null && i_mapRecord.IsGarrison();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Currently, this means that every entity added to this map will be marked as active
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool IsAlwaysActive()
|
||||
{
|
||||
return IsBattlegroundOrArena();
|
||||
}
|
||||
|
||||
private bool GetEntrancePos(out uint mapid, out float x, out float y)
|
||||
{
|
||||
mapid = 0;
|
||||
|
||||
Reference in New Issue
Block a user