From 8466894d816f484f30cdbe47b980a142870c955e Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 20 Jul 2022 18:55:40 +0200 Subject: Core/Maps: Replace some Instanceable() checks with IsDungeon() --- src/server/scripts/Commands/cs_go.cpp | 11 ++++------- src/server/scripts/Commands/cs_misc.cpp | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 9aeffbad0b1..8977ec55f77 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -340,20 +340,17 @@ public: AreaTableEntry const* zoneEntry = areaEntry->ParentAreaID ? sAreaTableStore.LookupEntry(areaEntry->ParentAreaID) : areaEntry; ASSERT(zoneEntry); - Map* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID); + x /= 100.0f; + y /= 100.0f; - if (map->Instanceable()) + Map* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID); + if (!sDB2Manager.Zone2MapCoordinates(areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId, x, y)) { handler->PSendSysMessage(LANG_INVALID_ZONE_MAP, areaId, areaEntry->AreaName[handler->GetSessionDbcLocale()], map->GetId(), map->GetMapName()); handler->SetSentErrorMessage(true); return false; } - x /= 100.0f; - y /= 100.0f; - - sDB2Manager.Zone2MapCoordinates(areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId, x, y); - if (!MapManager::IsValidMapCoord(zoneEntry->ContinentID, x, y)) { handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, uint32(zoneEntry->ContinentID)); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index ceec104b317..9ef49a442ce 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -540,7 +540,7 @@ public: if (!target->GetMap()->IsBattlegroundOrArena()) target->SetBattlegroundEntryPoint(); } - else if (map->Instanceable()) + else if (map->IsDungeon()) { Map* targetMap = target->GetMap(); Player* targetGroupLeader = nullptr; -- cgit v1.2.3