New records and commands

This commit is contained in:
wincent
2024-09-12 21:18:48 +02:00
parent 04e9e74d7c
commit f78b28b454
5 changed files with 106 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
#include "eChatMessageType.h"
#include "BitStreamUtils.h"
#include "CheatDetection.h"
#include "dConfig.h"
UserManager* UserManager::m_Address = nullptr;
@@ -516,7 +517,14 @@ void UserManager::LoginCharacter(const SystemAddress& sysAddr, uint32_t playerID
Database::Get()->UpdateLastLoggedInCharacter(playerID);
uint32_t zoneID = character->GetZoneID();
if (zoneID == LWOZONEID_INVALID) zoneID = 1000; //Send char to VE
if (zoneID == LWOZONEID_INVALID) {
const std::string& defaultWorld = Game::config->GetValue("default_world");
if (!defaultWorld.empty()) {
zoneID = std::stoul(defaultWorld);
} else {
zoneID = 1000; //Send char to VE
}
}
ZoneInstanceManager::Instance()->RequestZoneTransfer(Game::server, zoneID, character->GetZoneClone(), false, [=](bool mythranShift, uint32_t zoneID, uint32_t zoneInstance, uint32_t zoneClone, std::string serverIP, uint16_t serverPort) {
LOG("Transferring %s to Zone %i (Instance %i | Clone %i | Mythran Shift: %s) with IP %s and Port %i", character->GetName().c_str(), zoneID, zoneInstance, zoneClone, mythranShift == true ? "true" : "false", serverIP.c_str(), serverPort);