Add std::string WorldContentService::GetCurrentExpansionName() [skip ci]

This commit is contained in:
Akkadius
2020-04-11 03:11:09 -05:00
parent e0363a8fe1
commit 77cacf5cd1
5 changed files with 37 additions and 19 deletions
+18 -16
View File
@@ -290,24 +290,26 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
/**
* Expansion check
*/
auto zones = ZoneRepository::GetWhere(
fmt::format(
"expansion <= {} AND short_name = '{}'",
if (content_service.GetCurrentExpansion() >= Expansion::Classic && !GetGM()) {
auto zones = ZoneRepository::GetWhere(
fmt::format(
"expansion <= {} AND short_name = '{}'",
(content_service.GetCurrentExpansion() + 1),
target_zone_name
)
);
LogInfo(
"Checking zone request [{}] for expansion [{}] ({}) success [{}]",
target_zone_name,
(content_service.GetCurrentExpansion() + 1),
target_zone_name
)
);
content_service.GetCurrentExpansionName(),
!zones.empty() ? "true" : "false"
);
LogInfo(
"Checking zone request [{}] for expansion [{}] ({}) success [{}]",
target_zone_name,
(content_service.GetCurrentExpansion() + 1),
Expansion::ExpansionName[content_service.GetCurrentExpansion()],
!zones.empty() ? "true" : "false"
);
if (zones.empty()) {
myerror = ZONE_ERROR_NOEXPANSION;
if (zones.empty()) {
myerror = ZONE_ERROR_NOEXPANSION;
}
}
if(myerror == 1) {