Core/Battlegrounds: Added OnMapSet hook

Port From (https://github.com/TrinityCore/TrinityCore/commit/141b881fa00dca87f7f262a1fb0d2d3e8b7735b5)
This commit is contained in:
hondacrx
2024-02-06 15:58:28 -05:00
parent b9b62cdf65
commit d42204efb3
@@ -1359,7 +1359,10 @@ namespace Game.BattleGrounds
{ {
m_Map = map; m_Map = map;
if (map != null) if (map != null)
{
_pvpStatIds = Global.DB2Mgr.GetPVPStatIDsForMap(map.GetId()); _pvpStatIds = Global.DB2Mgr.GetPVPStatIDsForMap(map.GetId());
OnMapSet(map);
}
else else
_pvpStatIds = null; _pvpStatIds = null;
} }
@@ -1793,6 +1796,9 @@ namespace Game.BattleGrounds
return m_Players.LookupByKey(playerGuid); return m_Players.LookupByKey(playerGuid);
} }
// Called when valid BattlegroundMap is assigned to the battleground
public virtual void OnMapSet(BattlegroundMap map) { }
public virtual void StartingEventCloseDoors() { } public virtual void StartingEventCloseDoors() { }
public virtual void StartingEventOpenDoors() { } public virtual void StartingEventOpenDoors() { }