mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 01:35:27 +00:00
fix: the master server only starts instances of zones in the ZoneTable
A transfer or private zone request started a world server for whatever map ID it named, and for as many instances as were asked for. A new instance now needs a row in the ZoneTable for its zone, and no more than max_instances (masterconfig.ini, 256 by default, 0 for no limit) run at once. The character select has no row and is always started. A request that gets no instance is logged and dropped. Before, the handlers went on to use the missing instance. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -234,7 +234,17 @@ private:
|
||||
std::map<LWOMAPID, IServerOperations::ZoneLimit> m_ZoneLimits;
|
||||
std::map<LWOMAPID, SpareBackoff> m_SpareBackoff;
|
||||
|
||||
/**
|
||||
* The most instances that run at once, 0 for no limit
|
||||
*/
|
||||
uint32_t m_MaxInstances = 0;
|
||||
|
||||
//Private functions:
|
||||
|
||||
/**
|
||||
* Whether a new instance may be started for a zone, logs the reason when it may not
|
||||
*/
|
||||
bool CanCreateInstance(LWOMAPID mapID, LWOCLONEID cloneID) const;
|
||||
int GetSoftCap(LWOMAPID mapID);
|
||||
int GetHardCap(LWOMAPID mapID);
|
||||
const InstancePtr& CreateInstance(LWOMAPID mapID, LWOCLONEID cloneID);
|
||||
|
||||
Reference in New Issue
Block a user