aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorJeremy <Golrag@users.noreply.github.com>2024-03-28 19:29:22 +0100
committerfunjoker <funjoker109@gmail.com>2024-03-28 20:38:55 +0100
commitd0d5d309bb5877dc2fcb27f6cb123707a31ec1e8 (patch)
treef487ecb6ff8fd052357ea582ffa630027dc8bd07 /src/server/scripts/Commands
parentaefa15ece72bccdeb47cbdbdc75df87837c9da00 (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 (cherry picked from commit be11f42a16d1fa0482e9572bf54e99e4dedd3c78)
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp12
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
{