Custom CommunityBoard Karma prohibition.
This commit is contained in:
parent
cfb38570be
commit
1157c89461
4
trunk/dist/game/config/Custom.properties
vendored
4
trunk/dist/game/config/Custom.properties
vendored
@ -611,6 +611,10 @@ CommunityBuffPrice = 0
|
||||
# Default: True
|
||||
CommunityCombatDisabled = True
|
||||
|
||||
# Disable Community Board while player has Karma.
|
||||
# Default: True
|
||||
CommunityKarmaDisabled = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Faction System (Good vs Evil)
|
||||
|
@ -40,7 +40,7 @@ import com.l2jserver.gameserver.network.serverpackets.ShowBoard;
|
||||
|
||||
/**
|
||||
* Home board.
|
||||
* @author Zoey76
|
||||
* @author Zoey76, Mobius
|
||||
*/
|
||||
public final class HomeBoard implements IParseBoardHandler
|
||||
{
|
||||
@ -66,10 +66,18 @@ 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() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)))
|
||||
if (Config.CUSTOM_CB_ENABLED)
|
||||
{
|
||||
activeChar.sendMessage("You can't use the Community Board right now.");
|
||||
return false;
|
||||
if (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;
|
||||
}
|
||||
if (Config.COMMUNITYBOARD_KARMA_DISABLED && (activeChar.getKarma() > 0))
|
||||
{
|
||||
activeChar.sendMessage("Players with Karma cannot use the Community Board.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (command.equals("_bbshome") || command.equals("_bbstop"))
|
||||
|
@ -40,7 +40,7 @@ import com.l2jserver.gameserver.network.serverpackets.ShowBoard;
|
||||
|
||||
/**
|
||||
* Home board.
|
||||
* @author Zoey76
|
||||
* @author Zoey76, Mobius
|
||||
*/
|
||||
public final class HomeBoard implements IParseBoardHandler
|
||||
{
|
||||
@ -66,10 +66,18 @@ 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() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)))
|
||||
if (Config.CUSTOM_CB_ENABLED)
|
||||
{
|
||||
activeChar.sendMessage("You can't use the Community Board right now.");
|
||||
return false;
|
||||
if (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;
|
||||
}
|
||||
if (Config.COMMUNITYBOARD_KARMA_DISABLED && (activeChar.getKarma() > 0))
|
||||
{
|
||||
activeChar.sendMessage("Players with Karma cannot use the Community Board.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (command.equals("_bbshome") || command.equals("_bbstop"))
|
||||
|
@ -824,6 +824,7 @@ public final class Config
|
||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||
public static boolean COMMUNITYBOARD_COMBAT_DISABLED;
|
||||
public static boolean COMMUNITYBOARD_KARMA_DISABLED;
|
||||
public static boolean FACTION_SYSTEM_ENABLED;
|
||||
public static Location FACTION_STARTING_LOCATION;
|
||||
public static int FACTION_MANAGER_NPCID;
|
||||
@ -2602,6 +2603,7 @@ public final class Config
|
||||
COMMUNITYBOARD_TELEPORT_PRICE = CustomSettings.getInt("CommunityTeleportPrice", 0);
|
||||
COMMUNITYBOARD_BUFF_PRICE = CustomSettings.getInt("CommunityBuffPrice", 0);
|
||||
COMMUNITYBOARD_COMBAT_DISABLED = CustomSettings.getBoolean("CommunityCombatDisabled", true);
|
||||
COMMUNITYBOARD_KARMA_DISABLED = CustomSettings.getBoolean("CommunityKarmaDisabled", true);
|
||||
|
||||
String[] tempString;
|
||||
FACTION_SYSTEM_ENABLED = Boolean.valueOf(CustomSettings.getBoolean("EnableFactionSystem", false));
|
||||
|
Loading…
Reference in New Issue
Block a user