aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Commands/cs_list.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 4c77bb92e14..a225b9c217a 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -648,13 +648,10 @@ public:
static bool HandleListSpawnPointsCommand(ChatHandler* handler, char const* /*args*/)
{
Player const* player = handler->GetSession()->GetPlayer();
- if (!player)
- return false;
- Map const* map = player->GetMap();
+ Map const* map = player->FindMap();
if (!map)
return false;
- LocaleConstant const locale = handler->GetSession()->GetSessionDbcLocale();
uint32 const mapId = map->GetId();
bool const showAll = map->IsBattlegroundOrArena() || map->IsDungeon();
handler->PSendSysMessage("Listing all spawn points in map %u (%s)%s:", mapId, map->GetMapName(), showAll ? "" : " within 5000yd");
@@ -692,10 +689,8 @@ public:
{
// We need a player
Player const* player = handler->GetSession()->GetPlayer();
- if (!player)
- return false;
// And we need a map
- Map const* map = player->GetMap();
+ Map const* map = player->FindMap();
if (!map)
return false;