fix: Using 'leave-zone' in Return to the Venture Explorer allows players to return to the original Venture Explorer map (#1341)

* fixed VE zone bug and added config option to renable it

* add zero back to LWOMAPID initialization

* typo

* removed config option to enable bug
This commit is contained in:
jadebenn 2023-12-20 15:12:01 -06:00 committed by GitHub
parent e2391665b9
commit 799269c79e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,11 +288,13 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
return; return;
} }
if (chatCommand == "leave-zone") { if (chatCommand == "leave-zone" || chatCommand == "leavezone") {
const auto currentZone = Game::zoneManager->GetZone()->GetZoneID().GetMapID(); const auto currentZone = Game::zoneManager->GetZone()->GetZoneID().GetMapID();
LWOMAPID newZone = 0; LWOMAPID newZone = 0;
if (currentZone % 100 == 0) {
if (currentZone == 1001) {
newZone = 1100; // Send to AG if we're in a Return to Venture Explorer instance
} else if (currentZone % 100 == 0) {
ChatPackets::SendSystemMessage(sysAddr, u"You are not in an instanced zone."); ChatPackets::SendSystemMessage(sysAddr, u"You are not in an instanced zone.");
return; return;
} else { } else {