mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 10:26:37 +00:00
[Commands] Cleanup #zonelock Command. (#1711)
* [Commands] Cleanup #zonelock Command. - Add support for Zone IDs. - Cleanup messages and display. - Fix dangling pointer in ZoneLongName() helper method so name is displayed properly. * Add account status enum. * Typo. * Typo. * Convert list to constants. * Cleanup. * Update command.cpp * Fix compile.
This commit is contained in:
@@ -85,6 +85,26 @@ std::string WorldStore::GetZoneName(uint32 zone_id)
|
||||
return std::string();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param zone_id
|
||||
* @param error_unknown
|
||||
* @return
|
||||
*/
|
||||
const char *WorldStore::GetZoneLongName(uint32 zone_id, bool error_unknown)
|
||||
{
|
||||
for (auto &z: zones) {
|
||||
if (z.zoneidnumber == zone_id) {
|
||||
return z.long_name.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
if (error_unknown) {
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param zone_id
|
||||
* @return
|
||||
|
||||
Reference in New Issue
Block a user