mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-16 08:45:27 +00:00
fix: tell the player when the zone they go to gets no instance
The master server dropped a transfer request it started no instance for, so the world server never heard back and the player waited. It now answers the request with an empty address and the reason in place of the port: no room for another instance (max_instances), a zone that is not in the ZoneTable, or another reason. A request for a private zone that does not exist is answered the same way. The world server passes this on as a TRANSFER_TO_WORLD without an address, which the client shows as a failed map change, and leaves the character where it is. The auth server fails the login when there is no character select to send the player to. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "dZMCommon.h"
|
||||
#include "Logger.h"
|
||||
#include "master/InstanceMigration.h"
|
||||
#include "InstanceLimits.h"
|
||||
|
||||
struct Player {
|
||||
LWOOBJID id;
|
||||
@@ -220,6 +221,16 @@ public:
|
||||
// Mark the running instances which() picks outdated (old binary or old zone files); returns how many were new
|
||||
uint32_t MarkOutdated(const std::function<bool(const Instance&)>& which);
|
||||
|
||||
/**
|
||||
* Whether a new instance may be started for a zone, and why not when it may not
|
||||
*/
|
||||
InstanceLimits::eNewInstance CheckNewInstance(LWOMAPID mapID) const;
|
||||
|
||||
/**
|
||||
* Answers a transfer request no instance was started for: an empty address, and the reason in place of the port
|
||||
*/
|
||||
static void SendTransferFailure(const PendingInstanceRequest& request, LWOMAPID mapID, LWOCLONEID cloneID, eTransferFailure failure);
|
||||
|
||||
private:
|
||||
std::string mExternalIP;
|
||||
std::vector<std::unique_ptr<Instance>> m_Instances;
|
||||
|
||||
Reference in New Issue
Block a user