mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-11 18:08:05 +00:00
Remove magic numbers
Replace magic numbers with constexpr calculated times. Tested that trying to create a new instance while shutting down doesn't allow a new instance to be created.
This commit is contained in:
@@ -128,6 +128,7 @@ public:
|
||||
|
||||
Instance* CreatePrivateInstance(LWOMAPID mapID, LWOCLONEID cloneID, const std::string& password);
|
||||
Instance* FindPrivateInstance(const std::string& password);
|
||||
void SetIsShuttingDown(bool value) { this->m_IsShuttingDown = value; };
|
||||
|
||||
private:
|
||||
dLogger* mLogger;
|
||||
@@ -136,6 +137,11 @@ private:
|
||||
unsigned short m_LastPort;
|
||||
LWOINSTANCEID m_LastInstanceID;
|
||||
|
||||
/**
|
||||
* Whether or not the master server is currently shutting down.
|
||||
*/
|
||||
bool m_IsShuttingDown = false;
|
||||
|
||||
//Private functions:
|
||||
bool IsInstanceFull(Instance* instance, bool isFriendTransfer);
|
||||
int GetSoftCap(LWOMAPID mapID);
|
||||
|
Reference in New Issue
Block a user