mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 04:08:20 +00:00
check if map exists for testmap
This commit is contained in:
parent
e92cdc4f14
commit
6b44936c68
@ -1931,54 +1931,21 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SlashCommandHandler::CheckIfAccessibleZone(const unsigned int zoneID) {
|
bool SlashCommandHandler::CheckIfAccessibleZone(const unsigned int zoneID) {
|
||||||
switch (zoneID) {
|
//We're gonna go ahead and presume we've got the db loaded already:
|
||||||
case 98:
|
CDZoneTableTable * zoneTable = CDClientManager::Instance()->GetTable<CDZoneTableTable>("ZoneTable");
|
||||||
case 1000:
|
const CDZoneTable* zone = zoneTable->Query(zoneID);
|
||||||
case 1001:
|
if (zone != nullptr) {
|
||||||
|
std::string zonePath = "./res/maps/" + zone->zoneName;
|
||||||
case 1100:
|
std::transform(zonePath.begin(), zonePath.end(), zonePath.begin(), ::tolower);
|
||||||
case 1101:
|
std::ifstream f(zonePath.c_str());
|
||||||
case 1150:
|
if (f.good()){
|
||||||
case 1151:
|
|
||||||
case 1152:
|
|
||||||
|
|
||||||
case 1200:
|
|
||||||
case 1201:
|
|
||||||
|
|
||||||
case 1250:
|
|
||||||
case 1251:
|
|
||||||
case 1260:
|
|
||||||
|
|
||||||
case 1300:
|
|
||||||
case 1350:
|
|
||||||
case 1351:
|
|
||||||
|
|
||||||
case 1400:
|
|
||||||
case 1401:
|
|
||||||
case 1450:
|
|
||||||
case 1451:
|
|
||||||
|
|
||||||
case 1600:
|
|
||||||
case 1601:
|
|
||||||
case 1602:
|
|
||||||
case 1603:
|
|
||||||
case 1604:
|
|
||||||
|
|
||||||
case 1700:
|
|
||||||
case 1800:
|
|
||||||
case 1900:
|
|
||||||
case 2000:
|
|
||||||
|
|
||||||
case 58004:
|
|
||||||
case 58005:
|
|
||||||
case 58006:
|
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
default:
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlashCommandHandler::SendAnnouncement(const std::string& title, const std::string& message) {
|
void SlashCommandHandler::SendAnnouncement(const std::string& title, const std::string& message) {
|
||||||
|
Loading…
Reference in New Issue
Block a user