callmephil / SunWellCore

This is lite distribution of SunWellCore. (Sunwell.pl)
39 stars 62 forks source link

Instant Logout #55

Open Bungi96 opened 8 years ago

Bungi96 commented 8 years ago

InstantLogout

Description: Required security level for instantly logging out everywhere.

Does not work while in combat, dueling or falling.

Default: 1 - (Enabled, Mods/GMs/Admins)

0 - (Enabled, Everyone)

2 - (Enabled, GMs/Admins)

3 - (Enabled, Admins)

4 - (Disabled)

InstantLogout = 0

Instant logout not working for player.

LordPsyan commented 8 years ago

First, please stop using such a large font. We aren't blind. Second. here is the fix: in MiscHandler.cpp find: bool instantLogout = (GetSecurity() > SEC_PLAYER || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat()) || GetPlayer()->IsInFlight();

and replace with:

bool instantLogout = (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat()) ||
 GetPlayer()->IsInFlight() || GetSecurity() >= AccountTypes(sWorld->getIntConfig(CONFIG_INSTANT_LOGOUT)) ||
                         GetPlayer()->GetMapId() == 1 || GetPlayer()->GetZoneId() == 5695 ||
                         GetPlayer()->GetMapId() == 0 || GetPlayer()->GetZoneId() == 2037 ||
                         GetPlayer()->GetMapId() == 0 || GetPlayer()->GetZoneId() == 1537 ||
                         GetPlayer()->GetMapId() == 530 || GetPlayer()->GetZoneId() == 3487 ||
                         GetPlayer()->GetMapId() == 571 || GetPlayer()->GetZoneId() == 394 ||
                         GetPlayer()->GetMapId() == 732 || GetPlayer()->GetZoneId() == 5389 ||
                         GetPlayer()->GetMapId() == 732 || GetPlayer()->GetZoneId() == 5095;
callmephil commented 8 years ago

thanks @LordPsyan will be adding this as soon as possible.