From 101cbfca9b9adfe075c85631a3b9f695687be8fa Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 11 May 2015 15:02:15 +0000 Subject: [PATCH] Additional checks for disabling CB while in combat mode. Contributed by OdairDevalier. --- .../game/data/scripts/handlers/communityboard/HomeBoard.java | 3 ++- .../scripts/handlers/communityboard/HomeBoard.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/trunk/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 121cd1b069..ffaac3f094 100644 --- a/trunk/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/trunk/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -33,6 +33,7 @@ import com.l2jserver.gameserver.handler.CommunityBoardHandler; import com.l2jserver.gameserver.handler.IParseBoardHandler; import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.zone.ZoneId; import com.l2jserver.gameserver.network.serverpackets.BuyList; import com.l2jserver.gameserver.network.serverpackets.ExBuySellList; import com.l2jserver.gameserver.network.serverpackets.ShowBoard; @@ -65,7 +66,7 @@ public final class HomeBoard implements IParseBoardHandler @Override public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar) { - if (Config.CUSTOM_CB_ENABLED && Config.COMMUNITYBOARD_COMBAT_DISABLED && activeChar.isInCombat()) + if (Config.CUSTOM_CB_ENABLED && Config.COMMUNITYBOARD_COMBAT_DISABLED && (activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP))) { activeChar.sendMessage("You can't use the Community Board right now."); return false; diff --git a/trunk/dist/game/data_classic/scripts/handlers/communityboard/HomeBoard.java b/trunk/dist/game/data_classic/scripts/handlers/communityboard/HomeBoard.java index 121cd1b069..ffaac3f094 100644 --- a/trunk/dist/game/data_classic/scripts/handlers/communityboard/HomeBoard.java +++ b/trunk/dist/game/data_classic/scripts/handlers/communityboard/HomeBoard.java @@ -33,6 +33,7 @@ import com.l2jserver.gameserver.handler.CommunityBoardHandler; import com.l2jserver.gameserver.handler.IParseBoardHandler; import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.zone.ZoneId; import com.l2jserver.gameserver.network.serverpackets.BuyList; import com.l2jserver.gameserver.network.serverpackets.ExBuySellList; import com.l2jserver.gameserver.network.serverpackets.ShowBoard; @@ -65,7 +66,7 @@ public final class HomeBoard implements IParseBoardHandler @Override public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar) { - if (Config.CUSTOM_CB_ENABLED && Config.COMMUNITYBOARD_COMBAT_DISABLED && activeChar.isInCombat()) + if (Config.CUSTOM_CB_ENABLED && Config.COMMUNITYBOARD_COMBAT_DISABLED && (activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP))) { activeChar.sendMessage("You can't use the Community Board right now."); return false;