aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
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
{