aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-07-20 18:55:40 +0200
committerShauren <shauren.trinity@gmail.com>2022-07-20 18:55:40 +0200
commit8466894d816f484f30cdbe47b980a142870c955e (patch)
treebbb66264042eb8db2d490f37bf8b412f514d68eb /src/server/scripts/Commands
parent51d7ff6f0bb4a512ff3dc912f2574e3087014553 (diff)
Core/Maps: Replace some Instanceable() checks with IsDungeon()
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_go.cpp11
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp2
2 files changed, 5 insertions, 8 deletions
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;