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_bf.cpp11
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/server/scripts/Commands/cs_bf.cpp b/src/server/scripts/Commands/cs_bf.cpp
index 55d9ecc68d7..d883b5609bd 100644
--- a/src/server/scripts/Commands/cs_bf.cpp
+++ b/src/server/scripts/Commands/cs_bf.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "BattlefieldMgr.h"
#include "Chat.h"
#include "ChatCommand.h"
+#include "Player.h"
#include "RBAC.h"
using namespace Trinity::ChatCommands;
@@ -54,7 +55,7 @@ public:
static bool HandleBattlefieldStart(ChatHandler* handler, uint32 battleId)
{
- Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId);
+ Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(handler->GetPlayer()->GetMap(), battleId);
if (!bf)
return false;
@@ -69,7 +70,7 @@ public:
static bool HandleBattlefieldEnd(ChatHandler* handler, uint32 battleId)
{
- Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId);
+ Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(handler->GetPlayer()->GetMap(), battleId);
if (!bf)
return false;
@@ -84,7 +85,7 @@ public:
static bool HandleBattlefieldEnable(ChatHandler* handler, uint32 battleId)
{
- Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId);
+ Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(handler->GetPlayer()->GetMap(), battleId);
if (!bf)
return false;
@@ -107,7 +108,7 @@ public:
static bool HandleBattlefieldSwitch(ChatHandler* handler, uint32 battleId)
{
- Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId);
+ Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(handler->GetPlayer()->GetMap(), battleId);
if (!bf)
return false;
@@ -121,7 +122,7 @@ public:
static bool HandleBattlefieldTimer(ChatHandler* handler, uint32 battleId, uint32 time)
{
- Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleId);
+ Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(handler->GetPlayer()->GetMap(), battleId);
if (!bf)
return false;
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 97b772f18c9..b3879bafd56 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1408,7 +1408,7 @@ public:
nearestLoc = bg->GetClosestGraveyard(player);
else
{
- if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetZoneId()))
+ if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetMap(), player->GetZoneId()))
nearestLoc = bf->GetClosestGraveyard(player);
else
nearestLoc = sObjectMgr->GetClosestGraveyard(*player, player->GetTeam(), player);