Move from isGM to Account Levels (#106)

Co-authored-by: dongresource <dongresource@protonmail.com>
This commit is contained in:
CakeLancelot
2020-09-21 21:26:12 -05:00
committed by GitHub
parent 5d8bb7f8a5
commit adf017b07c
10 changed files with 25 additions and 20 deletions

View File

@@ -40,7 +40,7 @@ void TransportManager::transportRegisterLocationHandler(CNSocket* sock, CNPacket
}
// update registration bitfield using bitmask
uint32_t newScamperFlag = plr->iWarpLocationFlag | (plr->IsGM ? UINT32_MAX : (1UL << (transport->iLocationID - 1)));
uint32_t newScamperFlag = plr->iWarpLocationFlag | (plr->accountLevel <= 40 ? UINT32_MAX : (1UL << (transport->iLocationID - 1)));
if (newScamperFlag != plr->iWarpLocationFlag) {
plr->iWarpLocationFlag = newScamperFlag;
newReg = true;
@@ -61,7 +61,7 @@ void TransportManager::transportRegisterLocationHandler(CNSocket* sock, CNPacket
/*
* assuming the two bitfields are just stuck together to make a longer one, do a similar operation
*/
if (plr->IsGM) {
if (plr->accountLevel <= 40) {
plr->aSkywayLocationFlag[0] = UINT64_MAX;
plr->aSkywayLocationFlag[1] = UINT64_MAX;
newReg = true;