[Rules] Add rule 'GM:MinStatusToBypassLockedServer' (#1330)

* Add rule 'GM:MinStatusToBypassLockedServer'
Default Status: 100
Description: Players >= this status can log in to the server even when it is locked

* Add rule 'GM:MinStatusToBypassLockedServer'
Default Status: 100
Description: Players >= this status can log in to the server even when it is locked
This commit is contained in:
splose 2021-04-22 23:42:14 -04:00 committed by GitHub
parent 0f23bd24cc
commit 5893730704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -209,6 +209,7 @@ RULE_CATEGORY(GM)
RULE_INT(GM, MinStatusToSummonItem, 250, "Minimum required status to summon items")
RULE_INT(GM, MinStatusToZoneAnywhere, 250, "Minimum required status to zone anywhere")
RULE_INT(GM, MinStatusToLevelTarget, 100, "Minimum required status to set the level of a player")
RULE_INT(GM, MinStatusToBypassLockedServer, 100, "Players >= this status can log in to the server even when it is locked")
RULE_CATEGORY_END()
RULE_CATEGORY(World)

View File

@ -92,7 +92,7 @@ void LoginServer::ProcessUsertoWorldReqLeg(uint16_t opcode, EQ::Net::Packet &p)
utwrs->response = UserToWorldStatusSuccess;
if (Config->Locked) {
if (status < 100) {
if (status < (RuleI(GM, MinStatusToBypassLockedServer))) {
LogDebug("[ProcessUsertoWorldReqLeg] Server locked and status is not high enough for account_id [{0}]", utwr->lsaccountid);
utwrs->response = UserToWorldStatusWorldUnavail;
SendPacket(&outpack);
@ -101,7 +101,7 @@ void LoginServer::ProcessUsertoWorldReqLeg(uint16_t opcode, EQ::Net::Packet &p)
}
int32 x = Config->MaxClients;
if ((int32) numplayers >= x && x != -1 && x != 255 && status < 80) {
if ((int32) numplayers >= x && x != -1 && x != 255 && status < (RuleI(GM, MinStatusToBypassLockedServer))) {
LogDebug("[ProcessUsertoWorldReqLeg] World at capacity account_id [{0}]", utwr->lsaccountid);
utwrs->response = UserToWorldStatusWorldAtCapacity;
SendPacket(&outpack);
@ -170,7 +170,7 @@ void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p)
utwrs->response = UserToWorldStatusSuccess;
if (Config->Locked == true) {
if (status < 100) {
if (status < (RuleI(GM, MinStatusToBypassLockedServer))) {
LogDebug("[ProcessUsertoWorldReq] Server locked and status is not high enough for account_id [{0}]", utwr->lsaccountid);
utwrs->response = UserToWorldStatusWorldUnavail;
SendPacket(&outpack);
@ -179,7 +179,7 @@ void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p)
}
int32 x = Config->MaxClients;
if ((int32) numplayers >= x && x != -1 && x != 255 && status < 80) {
if ((int32) numplayers >= x && x != -1 && x != 255 && status < (RuleI(GM, MinStatusToBypassLockedServer))) {
LogDebug("[ProcessUsertoWorldReq] World at capacity account_id [{0}]", utwr->lsaccountid);
utwrs->response = UserToWorldStatusWorldAtCapacity;
SendPacket(&outpack);