diff options
author | Jeremy <Golrag@users.noreply.github.com> | 2024-03-28 19:29:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 19:29:22 +0100 |
commit | be11f42a16d1fa0482e9572bf54e99e4dedd3c78 (patch) | |
tree | 3d33413d7ed5cada34d7ced7f430380731160d5b /src/server/scripts/Commands | |
parent | 78635f640ee3b632a487a50dcf492ae62c2a0933 (diff) |
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
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index d03dd7b96cb..7f4468dbdb9 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -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 { |