Allow logout if GM is fighting.

This commit is contained in:
MobiusDev
2016-07-11 16:21:57 +00:00
parent 1a92599722
commit 14b5fa63b1

View File

@@ -66,15 +66,13 @@ public final class Logout implements IClientIncomingPacket
// Don't allow leaving if player is fighting // Don't allow leaving if player is fighting
if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player)) if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player))
{ {
if (player.isGM() && Config.GM_RESTART_FIGHTING) if (!player.isGM() || (player.isGM() && !Config.GM_RESTART_FIGHTING))
{ {
return;
}
player.sendPacket(SystemMessageId.YOU_CANNOT_EXIT_THE_GAME_WHILE_IN_COMBAT); player.sendPacket(SystemMessageId.YOU_CANNOT_EXIT_THE_GAME_WHILE_IN_COMBAT);
player.sendPacket(ActionFailed.STATIC_PACKET); player.sendPacket(ActionFailed.STATIC_PACKET);
return; return;
} }
}
if (L2Event.isParticipant(player)) if (L2Event.isParticipant(player))
{ {