Core/Battlegrounds: Move to scripts (#29799)

* Introduce new BattlegroundScript class for map/bg specific scripts
* Remove all sub, zone specific, battleground classes except Arena
* Move all bg zone scripts to new BattlegroundScripts class in script folder
* Remove ZoneScript from Battleground class
* Remove some unused hooks from Battleground
This commit is contained in:
Jeremy
2024-03-28 19:29:22 +01:00
committed by GitHub
parent 78635f640e
commit be11f42a16
78 changed files with 6821 additions and 7805 deletions
+4 -8
View File
@@ -1418,15 +1418,11 @@ public:
if (linked)
{
if (Battleground* bg = player->GetBattleground())
nearestLoc = bg->GetClosestGraveyard(player);
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetMap(), player->GetZoneId()))
nearestLoc = bf->GetClosestGraveyard(player);
else
{
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetMap(), player->GetZoneId()))
nearestLoc = bf->GetClosestGraveyard(player);
else
nearestLoc = sObjectMgr->GetClosestGraveyard(*player, player->GetTeam(), player);
}
nearestLoc = sObjectMgr->GetClosestGraveyard(*player, player->GetTeam(), player);
}
else
{