diff options
author | Treeston <treeston.mmoc@gmail.com> | 2017-08-01 18:14:55 +0200 |
---|---|---|
committer | Treeston <treeston.mmoc@gmail.com> | 2017-08-01 18:14:55 +0200 |
commit | c70b328eda8331a32b3fc7cc08af5e8b004d0705 (patch) | |
tree | 464cd5c6b8045c3e6515298c7bc470b824eac02b | |
parent | 3b02029cb6977edd30d2b744caf2f5c4ae2e5721 (diff) |
more unneeded checks (follow-up 3b02029)
-rw-r--r-- | src/server/scripts/Commands/cs_list.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index a225b9c217a..0cf0cc35702 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -648,10 +648,7 @@ public: static bool HandleListSpawnPointsCommand(ChatHandler* handler, char const* /*args*/) { Player const* player = handler->GetSession()->GetPlayer(); - Map const* map = player->FindMap(); - if (!map) - return false; - + Map const* map = player->GetMap(); 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"); @@ -687,13 +684,8 @@ public: } static bool HandleListRespawnsCommand(ChatHandler* handler, char const* args) { - // We need a player Player const* player = handler->GetSession()->GetPlayer(); - // And we need a map - Map const* map = player->FindMap(); - if (!map) - return false; - + Map const* map = player->GetMap(); uint32 range = 0; if (*args) range = atoi((char*)args); |