Config refactorings to match newer branches.

This commit is contained in:
MobiusDev
2018-04-06 18:08:42 +00:00
parent 6ca1e72d5d
commit 5ad5c31753
37 changed files with 599 additions and 511 deletions

View File

@@ -117,14 +117,14 @@ public final class Wedding extends AbstractNpcAI
{
htmltext = sendHtml(partner, "NoFormal.html", null, null);
}
else if ((player.getAdena() < Config.L2JMOD_WEDDING_PRICE) || (partner.getAdena() < Config.L2JMOD_WEDDING_PRICE))
else if ((player.getAdena() < Config.WEDDING_PRICE) || (partner.getAdena() < Config.WEDDING_PRICE))
{
htmltext = sendHtml(partner, "Adena.html", "%fee%", String.valueOf(Config.L2JMOD_WEDDING_PRICE));
htmltext = sendHtml(partner, "Adena.html", "%fee%", String.valueOf(Config.WEDDING_PRICE));
}
else
{
player.reduceAdena("Wedding", Config.L2JMOD_WEDDING_PRICE, player.getLastFolkNPC(), true);
partner.reduceAdena("Wedding", Config.L2JMOD_WEDDING_PRICE, player.getLastFolkNPC(), true);
player.reduceAdena("Wedding", Config.WEDDING_PRICE, player.getLastFolkNPC(), true);
partner.reduceAdena("Wedding", Config.WEDDING_PRICE, player.getLastFolkNPC(), true);
// Accept the wedding request
player.setMarryAccepted(true);
@@ -178,7 +178,7 @@ public final class Wedding extends AbstractNpcAI
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final String htmltext = getHtm(player.getHtmlPrefix(), "Start.html");
return htmltext.replaceAll("%fee%", String.valueOf(Config.L2JMOD_WEDDING_PRICE));
return htmltext.replaceAll("%fee%", String.valueOf(Config.WEDDING_PRICE));
}
private String sendHtml(L2PcInstance player, String fileName, String regex, String replacement)
@@ -194,7 +194,7 @@ public final class Wedding extends AbstractNpcAI
private static boolean isWearingFormalWear(L2PcInstance player)
{
if (Config.L2JMOD_WEDDING_FORMALWEAR)
if (Config.WEDDING_FORMALWEAR)
{
final L2ItemInstance formalWear = player.getChestArmorInstance();
return (formalWear != null) && (formalWear.getId() == FORMAL_WEAR);

View File

@@ -551,11 +551,11 @@ public class MasterHandler
// TODO: Add configuration options for this voiced commands:
// CastleVCmd.class,
// SetVCmd.class,
Config.L2JMOD_ALLOW_WEDDING ? Wedding.class : null,
Config.ALLOW_WEDDING ? Wedding.class : null,
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.L2JMOD_CHAT_ADMIN ? ChatAdmin.class : null,
Config.L2JMOD_MULTILANG_ENABLE && Config.L2JMOD_MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.L2JMOD_ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.CHAT_ADMIN ? ChatAdmin.class : null,
Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
Config.AUTO_POTIONS_ENABLED ? AutoPotion.class : null,
},

View File

@@ -131,9 +131,9 @@ public class AdminKill implements IAdminCommandHandler
}
target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar, null);
}
else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())
else if (Config.CHAMPION_ENABLE && target.isChampion())
{
target.reduceCurrentHp((target.getMaxHp() * Config.L2JMOD_CHAMPION_HP) + 1, activeChar, null);
target.reduceCurrentHp((target.getMaxHp() * Config.CHAMPION_HP) + 1, activeChar, null);
}
else
{

View File

@@ -252,9 +252,9 @@ public class AdminMenu implements IAdminCommandHandler
target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar, null);
filename = "charmanage.htm";
}
else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())
else if (Config.CHAMPION_ENABLE && target.isChampion())
{
target.reduceCurrentHp((target.getMaxHp() * Config.L2JMOD_CHAMPION_HP) + 1, activeChar, null);
target.reduceCurrentHp((target.getMaxHp() * Config.CHAMPION_HP) + 1, activeChar, null);
}
else
{

View File

@@ -73,7 +73,7 @@ public class ClanWarehouse implements IBypassHandler
{
if (command.toLowerCase().startsWith(COMMANDS[0])) // WithdrawC
{
if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_CLAN)
if (Config.ENABLE_WAREHOUSESORTING_CLAN)
{
final NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc) target).getObjectId());
msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/WhSortedC.htm");

View File

@@ -57,7 +57,7 @@ public class PrivateWarehouse implements IBypassHandler
{
if (command.toLowerCase().startsWith(COMMANDS[0])) // WithdrawP
{
if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE)
if (Config.ENABLE_WAREHOUSESORTING_PRIVATE)
{
final NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc) target).getObjectId());
msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/WhSortedP.htm");

View File

@@ -72,7 +72,7 @@ public class Time implements IUserCommandHandler
sm.addString(m);
}
activeChar.sendPacket(sm);
if (Config.L2JMOD_DISPLAY_SERVER_TIME)
if (Config.DISPLAY_SERVER_TIME)
{
activeChar.sendMessage("Server time is " + fmt.format(new Date(System.currentTimeMillis())));
}

View File

@@ -33,7 +33,7 @@ public class Lang implements IVoicedCommandHandler
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
{
if (!Config.L2JMOD_MULTILANG_ENABLE || !Config.L2JMOD_MULTILANG_VOICED_ALLOW)
if (!Config.MULTILANG_ENABLE || !Config.MULTILANG_VOICED_ALLOW)
{
return false;
}
@@ -42,7 +42,7 @@ public class Lang implements IVoicedCommandHandler
if (params == null)
{
final StringBuilder html = new StringBuilder(100);
for (String lang : Config.L2JMOD_MULTILANG_ALLOWED)
for (String lang : Config.MULTILANG_ALLOWED)
{
html.append("<button value=\"" + lang.toUpperCase() + "\" action=\"bypass -h voice .lang " + lang + "\" width=60 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><br>");
}

View File

@@ -99,7 +99,7 @@ public class Wedding implements IVoicedCommandHandler
{
activeChar.sendMessage("You are now divorced.");
AdenaAmount = (activeChar.getAdena() / 100) * Config.L2JMOD_WEDDING_DIVORCE_COSTS;
AdenaAmount = (activeChar.getAdena() / 100) * Config.WEDDING_DIVORCE_COSTS;
activeChar.getInventory().reduceAdena("Wedding", AdenaAmount, activeChar, null);
}
@@ -146,7 +146,7 @@ public class Wedding implements IVoicedCommandHandler
else if (activeChar.getPartnerId() != 0)
{
activeChar.sendMessage("You are already engaged.");
if (Config.L2JMOD_WEDDING_PUNISH_INFIDELITY)
if (Config.WEDDING_PUNISH_INFIDELITY)
{
activeChar.startAbnormalVisualEffect(true, AbnormalVisualEffect.BIG_HEAD); // give player a Big Head
// lets recycle the sevensigns debuffs
@@ -202,7 +202,7 @@ public class Wedding implements IVoicedCommandHandler
return false;
}
if ((ptarget.getAppearance().getSex() == activeChar.getAppearance().getSex()) && !Config.L2JMOD_WEDDING_SAMESEX)
if ((ptarget.getAppearance().getSex() == activeChar.getAppearance().getSex()) && !Config.WEDDING_SAMESEX)
{
activeChar.sendMessage("Gay marriage is not allowed on this server!");
return false;
@@ -455,9 +455,9 @@ public class Wedding implements IVoicedCommandHandler
return false;
}
final int teleportTimer = Config.L2JMOD_WEDDING_TELEPORT_DURATION * 1000;
final int teleportTimer = Config.WEDDING_TELEPORT_DURATION * 1000;
activeChar.sendMessage("After " + (teleportTimer / 60000) + " min. you will be teleported to your partner.");
activeChar.getInventory().reduceAdena("Wedding", Config.L2JMOD_WEDDING_TELEPORT_PRICE, activeChar, null);
activeChar.getInventory().reduceAdena("Wedding", Config.WEDDING_TELEPORT_PRICE, activeChar, null);
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
// SoE Animation section

View File

@@ -132,7 +132,7 @@ public final class HellboundLoader
{
AdminCommandHandler.getInstance().registerHandler((IAdminCommandHandler) instance);
}
else if (Config.L2JMOD_HELLBOUND_STATUS && (instance instanceof IVoicedCommandHandler))
else if (Config.HELLBOUND_STATUS && (instance instanceof IVoicedCommandHandler))
{
VoicedCommandHandler.getInstance().registerHandler((IVoicedCommandHandler) instance);
}