Config refactorings to match newer branches.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Allowed Player Races
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Allowing specific races to be created.
|
||||
# Default: True
|
||||
AllowHuman = True
|
||||
AllowElf = True
|
||||
AllowDarkElf = True
|
||||
AllowOrc = True
|
||||
AllowDwarf = True
|
||||
AllowKamael = True
|
||||
AllowErtheia = True
|
||||
+6
-6
@@ -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);
|
||||
|
||||
+4
-4
@@ -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,
|
||||
},
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
{
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
{
|
||||
|
||||
Vendored
+1
-1
@@ -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");
|
||||
|
||||
Vendored
+1
-1
@@ -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");
|
||||
|
||||
+1
-1
@@ -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())));
|
||||
}
|
||||
|
||||
+2
-2
@@ -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>");
|
||||
}
|
||||
|
||||
Vendored
+5
-5
@@ -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
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -339,7 +339,7 @@ public final class GameServer
|
||||
|
||||
LOGGER.info("AutoSpawnHandler: Loaded " + AutoSpawnHandler.getInstance().size() + " handlers in total.");
|
||||
|
||||
if (Config.L2JMOD_ALLOW_WEDDING)
|
||||
if (Config.ALLOW_WEDDING)
|
||||
{
|
||||
CoupleManager.getInstance();
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
return false;
|
||||
}
|
||||
|
||||
if (me.isChampion() && Config.L2JMOD_CHAMPION_PASSIVE)
|
||||
if (me.isChampion() && Config.CHAMPION_PASSIVE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public abstract class IdFactory
|
||||
setAllCharacterOffline();
|
||||
if (Config.DATABASE_CLEAN_UP)
|
||||
{
|
||||
if (Config.L2JMOD_ALLOW_WEDDING)
|
||||
if (Config.ALLOW_WEDDING)
|
||||
{
|
||||
cleanInvalidWeddings();
|
||||
}
|
||||
|
||||
+8
-8
@@ -56,7 +56,7 @@ public final class AntiFeedManager
|
||||
*/
|
||||
public final boolean check(L2Character attacker, L2Character target)
|
||||
{
|
||||
if (!Config.L2JMOD_ANTIFEED_ENABLE)
|
||||
if (!Config.ANTIFEED_ENABLE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -78,15 +78,15 @@ public final class AntiFeedManager
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((Config.L2JMOD_ANTIFEED_INTERVAL > 0) && _lastDeathTimes.containsKey(targetPlayer.getObjectId()))
|
||||
if ((Config.ANTIFEED_INTERVAL > 0) && _lastDeathTimes.containsKey(targetPlayer.getObjectId()))
|
||||
{
|
||||
if ((System.currentTimeMillis() - _lastDeathTimes.get(targetPlayer.getObjectId())) < Config.L2JMOD_ANTIFEED_INTERVAL)
|
||||
if ((System.currentTimeMillis() - _lastDeathTimes.get(targetPlayer.getObjectId())) < Config.ANTIFEED_INTERVAL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.L2JMOD_ANTIFEED_DUALBOX && (attacker != null))
|
||||
if (Config.ANTIFEED_DUALBOX && (attacker != null))
|
||||
{
|
||||
final L2PcInstance attackerPlayer = attacker.getActingPlayer();
|
||||
if (attackerPlayer == null)
|
||||
@@ -99,7 +99,7 @@ public final class AntiFeedManager
|
||||
if ((targetClient == null) || (attackerClient == null) || targetClient.isDetached() || attackerClient.isDetached())
|
||||
{
|
||||
// unable to check ip address
|
||||
return !Config.L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX;
|
||||
return !Config.ANTIFEED_DISCONNECTED_AS_DUALBOX;
|
||||
}
|
||||
|
||||
return !targetClient.getConnectionAddress().equals(attackerClient.getConnectionAddress());
|
||||
@@ -161,7 +161,7 @@ public final class AntiFeedManager
|
||||
|
||||
final AtomicInteger connectionCount = event.computeIfAbsent(addrHash, k -> new AtomicInteger());
|
||||
|
||||
if ((connectionCount.get() + 1) <= (max + Config.L2JMOD_DUALBOX_CHECK_WHITELIST.getOrDefault(addrHash, 0)))
|
||||
if ((connectionCount.get() + 1) <= (max + Config.DUALBOX_CHECK_WHITELIST.getOrDefault(addrHash, 0)))
|
||||
{
|
||||
connectionCount.incrementAndGet();
|
||||
return true;
|
||||
@@ -265,9 +265,9 @@ public final class AntiFeedManager
|
||||
|
||||
final Integer addrHash = Integer.valueOf(client.getConnectionAddress().hashCode());
|
||||
int limit = max;
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_WHITELIST.containsKey(addrHash))
|
||||
if (Config.DUALBOX_CHECK_WHITELIST.containsKey(addrHash))
|
||||
{
|
||||
limit += Config.L2JMOD_DUALBOX_CHECK_WHITELIST.get(addrHash);
|
||||
limit += Config.DUALBOX_CHECK_WHITELIST.get(addrHash);
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
||||
@@ -634,12 +634,12 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
((L2Attackable) npc).setChampion(false);
|
||||
}
|
||||
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE)
|
||||
if (Config.CHAMPION_ENABLE)
|
||||
{
|
||||
// Set champion on next spawn
|
||||
if (npc.isMonster() && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && (Config.L2JMOD_CHAMPION_FREQUENCY > 0) && (npc.getLevel() >= Config.L2JMOD_CHAMP_MIN_LVL) && (npc.getLevel() <= Config.L2JMOD_CHAMP_MAX_LVL) && (Config.L2JMOD_CHAMPION_ENABLE_IN_INSTANCES || (getInstanceId() == 0)))
|
||||
if (npc.isMonster() && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && (Config.CHAMPION_FREQUENCY > 0) && (npc.getLevel() >= Config.CHAMP_MIN_LVL) && (npc.getLevel() <= Config.CHAMP_MAX_LVL) && (Config.CHAMPION_ENABLE_IN_INSTANCES || (getInstanceId() == 0)))
|
||||
{
|
||||
if (Rnd.get(100) < Config.L2JMOD_CHAMPION_FREQUENCY)
|
||||
if (Rnd.get(100) < Config.CHAMPION_FREQUENCY)
|
||||
{
|
||||
((L2Attackable) npc).setChampion(true);
|
||||
}
|
||||
|
||||
+13
-13
@@ -466,10 +466,10 @@ public class L2Attackable extends L2Npc
|
||||
long exp = expSp[0];
|
||||
int sp = expSp[1];
|
||||
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
|
||||
if (Config.CHAMPION_ENABLE && isChampion())
|
||||
{
|
||||
exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
|
||||
sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
|
||||
exp *= Config.CHAMPION_REWARDS_EXP_SP;
|
||||
sp *= Config.CHAMPION_REWARDS_EXP_SP;
|
||||
}
|
||||
|
||||
exp *= penalty;
|
||||
@@ -575,10 +575,10 @@ public class L2Attackable extends L2Npc
|
||||
long exp = expSp[0];
|
||||
int sp = expSp[1];
|
||||
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
|
||||
if (Config.CHAMPION_ENABLE && isChampion())
|
||||
{
|
||||
exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
|
||||
sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
|
||||
exp *= Config.CHAMPION_REWARDS_EXP_SP;
|
||||
sp *= Config.CHAMPION_REWARDS_EXP_SP;
|
||||
}
|
||||
|
||||
exp *= partyMul;
|
||||
@@ -993,15 +993,15 @@ public class L2Attackable extends L2Npc
|
||||
}
|
||||
|
||||
// Apply Special Item drop with random(rnd) quantity(qty) for champions.
|
||||
if (!Config.L2JMOD_CHAMPION_ENABLE || !isChampion() || ((Config.L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE <= 0) && (Config.L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE <= 0)))
|
||||
if (!Config.CHAMPION_ENABLE || !isChampion() || ((Config.CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE <= 0) && (Config.CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE <= 0)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int champqty = Rnd.get(Config.L2JMOD_CHAMPION_REWARD_QTY);
|
||||
final ItemHolder item = new ItemHolder(Config.L2JMOD_CHAMPION_REWARD_ID, ++champqty);
|
||||
int champqty = Rnd.get(Config.CHAMPION_REWARD_QTY);
|
||||
final ItemHolder item = new ItemHolder(Config.CHAMPION_REWARD_ID, ++champqty);
|
||||
|
||||
if ((player.getLevel() <= getLevel()) && (Rnd.get(100) < Config.L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE))
|
||||
if ((player.getLevel() <= getLevel()) && (Rnd.get(100) < Config.CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE))
|
||||
{
|
||||
if (Config.AUTO_LOOT_ITEM_IDS.contains(item.getId()) || Config.AUTO_LOOT || isFlying())
|
||||
{
|
||||
@@ -1012,7 +1012,7 @@ public class L2Attackable extends L2Npc
|
||||
dropItem(player, item);
|
||||
}
|
||||
}
|
||||
else if ((player.getLevel() > getLevel()) && (Rnd.get(100) < Config.L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE))
|
||||
else if ((player.getLevel() > getLevel()) && (Rnd.get(100) < Config.CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE))
|
||||
{
|
||||
if (Config.AUTO_LOOT_ITEM_IDS.contains(item.getId()) || Config.AUTO_LOOT || isFlying())
|
||||
{
|
||||
@@ -1635,7 +1635,7 @@ public class L2Attackable extends L2Npc
|
||||
*/
|
||||
public boolean useVitalityRate()
|
||||
{
|
||||
return !isChampion() || Config.L2JMOD_CHAMPION_ENABLE_VITALITY;
|
||||
return !isChampion() || Config.CHAMPION_ENABLE_VITALITY;
|
||||
}
|
||||
|
||||
/** Return True if the L2Character is RaidBoss or his minion. */
|
||||
@@ -1687,7 +1687,7 @@ public class L2Attackable extends L2Npc
|
||||
public void setChampion(boolean champ)
|
||||
{
|
||||
_champion = champ;
|
||||
if (champ && Config.L2JMOD_SHOW_CHAMPION_AURA)
|
||||
if (champ && Config.SHOW_CHAMPION_AURA)
|
||||
{
|
||||
setTeam(Team.RED);
|
||||
}
|
||||
|
||||
+2
-2
@@ -6255,9 +6255,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
public void reduceCurrentHp(double i, L2Character attacker, boolean awake, boolean isDOT, Skill skill)
|
||||
{
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion() && (Config.L2JMOD_CHAMPION_HP != 0))
|
||||
if (Config.CHAMPION_ENABLE && isChampion() && (Config.CHAMPION_HP != 0))
|
||||
{
|
||||
getStatus().reduceHp(i / Config.L2JMOD_CHAMPION_HP, attacker, awake, isDOT, false);
|
||||
getStatus().reduceHp(i / Config.CHAMPION_HP, attacker, awake, isDOT, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
else if (val.equalsIgnoreCase("withdraw"))
|
||||
{
|
||||
if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_CLAN)
|
||||
if (Config.ENABLE_WAREHOUSESORTING_CLAN)
|
||||
{
|
||||
final String htmFile = "data/html/mods/WhSortedC.htm";
|
||||
final String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmFile);
|
||||
|
||||
+4
-4
@@ -13520,7 +13520,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public String getHtmlPrefix()
|
||||
{
|
||||
return Config.L2JMOD_MULTILANG_ENABLE ? _htmlPrefix : null;
|
||||
return Config.MULTILANG_ENABLE ? _htmlPrefix : null;
|
||||
}
|
||||
|
||||
public String getLang()
|
||||
@@ -13531,16 +13531,16 @@ public final class L2PcInstance extends L2Playable
|
||||
public boolean setLang(String lang)
|
||||
{
|
||||
boolean result = false;
|
||||
if (Config.L2JMOD_MULTILANG_ENABLE)
|
||||
if (Config.MULTILANG_ENABLE)
|
||||
{
|
||||
if (Config.L2JMOD_MULTILANG_ALLOWED.contains(lang))
|
||||
if (Config.MULTILANG_ALLOWED.contains(lang))
|
||||
{
|
||||
_lang = lang;
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_lang = Config.L2JMOD_MULTILANG_DEFAULT;
|
||||
_lang = Config.MULTILANG_DEFAULT;
|
||||
}
|
||||
|
||||
_htmlPrefix = "data/lang/" + _lang + "/";
|
||||
|
||||
+8
-8
@@ -277,9 +277,9 @@ public class CharStat
|
||||
public double getMAtk(L2Character target, Skill skill)
|
||||
{
|
||||
float bonusAtk = 1;
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
if (Config.CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
{
|
||||
bonusAtk = Config.L2JMOD_CHAMPION_ATK;
|
||||
bonusAtk = Config.CHAMPION_ATK;
|
||||
}
|
||||
if (_activeChar.isRaid())
|
||||
{
|
||||
@@ -296,9 +296,9 @@ public class CharStat
|
||||
public int getMAtkSpd()
|
||||
{
|
||||
float bonusSpdAtk = 1;
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
if (Config.CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
{
|
||||
bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
|
||||
bonusSpdAtk = Config.CHAMPION_SPD_ATK;
|
||||
}
|
||||
|
||||
double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().getBaseMAtkSpd() * bonusSpdAtk);
|
||||
@@ -504,9 +504,9 @@ public class CharStat
|
||||
public double getPAtk(L2Character target)
|
||||
{
|
||||
float bonusAtk = 1;
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
if (Config.CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
{
|
||||
bonusAtk = Config.L2JMOD_CHAMPION_ATK;
|
||||
bonusAtk = Config.CHAMPION_ATK;
|
||||
}
|
||||
if (_activeChar.isRaid())
|
||||
{
|
||||
@@ -521,9 +521,9 @@ public class CharStat
|
||||
public double getPAtkSpd()
|
||||
{
|
||||
float bonusAtk = 1;
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
if (Config.CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
{
|
||||
bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
|
||||
bonusAtk = Config.CHAMPION_SPD_ATK;
|
||||
}
|
||||
return Math.round(calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().getBasePAtkSpd() * bonusAtk, null, null));
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ public class L2Event
|
||||
return;
|
||||
}
|
||||
|
||||
if ((Config.L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||
{
|
||||
_registeredPlayers.add(player);
|
||||
}
|
||||
|
||||
+7
-7
@@ -2394,19 +2394,19 @@ public abstract class AbstractScript extends ManagedScript
|
||||
minAmount *= Config.RATE_QUEST_DROP;
|
||||
maxAmount *= Config.RATE_QUEST_DROP;
|
||||
dropChance *= Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
|
||||
if ((npc != null) && Config.L2JMOD_CHAMPION_ENABLE && npc.isChampion())
|
||||
if ((npc != null) && Config.CHAMPION_ENABLE && npc.isChampion())
|
||||
{
|
||||
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
|
||||
{
|
||||
dropChance *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE;
|
||||
minAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
|
||||
maxAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
|
||||
dropChance *= Config.CHAMPION_ADENAS_REWARDS_CHANCE;
|
||||
minAmount *= Config.CHAMPION_ADENAS_REWARDS_AMOUNT;
|
||||
maxAmount *= Config.CHAMPION_ADENAS_REWARDS_AMOUNT;
|
||||
}
|
||||
else
|
||||
{
|
||||
dropChance *= Config.L2JMOD_CHAMPION_REWARDS_CHANCE;
|
||||
minAmount *= Config.L2JMOD_CHAMPION_REWARDS_AMOUNT;
|
||||
maxAmount *= Config.L2JMOD_CHAMPION_REWARDS_AMOUNT;
|
||||
dropChance *= Config.CHAMPION_REWARDS_CHANCE;
|
||||
minAmount *= Config.CHAMPION_REWARDS_AMOUNT;
|
||||
maxAmount *= Config.CHAMPION_REWARDS_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -380,7 +380,7 @@ public abstract class AbstractOlympiadGame
|
||||
player.setCurrentMp(player.getMaxMp());
|
||||
player.getStatus().startHpMpRegeneration();
|
||||
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
if (Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.OLYMPIAD_ID, player);
|
||||
}
|
||||
|
||||
+7
-7
@@ -301,7 +301,7 @@ public class OlympiadManager
|
||||
if (!checkNoble(noble, player))
|
||||
{
|
||||
// remove previously registered party members
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
if (Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
for (L2PcInstance unreg : party.getMembers())
|
||||
{
|
||||
@@ -329,7 +329,7 @@ public class OlympiadManager
|
||||
// TODO: replace with retail message
|
||||
player.sendMessage("Your team must have at least 10 points in total.");
|
||||
// remove previously registered party members
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
if (Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
for (L2PcInstance unreg : party.getMembers())
|
||||
{
|
||||
@@ -377,7 +377,7 @@ public class OlympiadManager
|
||||
final Integer objId = Integer.valueOf(noble.getObjectId());
|
||||
if (_nonClassBasedRegisters.remove(objId))
|
||||
{
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
if (Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.OLYMPIAD_ID, noble);
|
||||
}
|
||||
@@ -391,7 +391,7 @@ public class OlympiadManager
|
||||
{
|
||||
_classBasedRegisters.put(noble.getBaseClass(), classed);
|
||||
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
if (Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.OLYMPIAD_ID, noble);
|
||||
}
|
||||
@@ -526,11 +526,11 @@ public class OlympiadManager
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.OLYMPIAD_ID, noble, Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP))
|
||||
if ((Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.OLYMPIAD_ID, noble, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP))
|
||||
{
|
||||
final NpcHtmlMessage message = new NpcHtmlMessage(player.getLastHtmlActionOriginId());
|
||||
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
|
||||
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
|
||||
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
|
||||
player.sendPacket(message);
|
||||
return false;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ public class OlympiadManager
|
||||
if (teamMember != null)
|
||||
{
|
||||
teamMember.sendPacket(sm);
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
if (Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.OLYMPIAD_ID, teamMember);
|
||||
}
|
||||
|
||||
@@ -248,9 +248,9 @@ public final class Formulas
|
||||
double hpRegenMultiplier = cha.isRaid() ? Config.RAID_HP_REGEN_MULTIPLIER : Config.HP_REGEN_MULTIPLIER;
|
||||
double hpRegenBonus = 0;
|
||||
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())
|
||||
if (Config.CHAMPION_ENABLE && cha.isChampion())
|
||||
{
|
||||
hpRegenMultiplier *= Config.L2JMOD_CHAMPION_HP_REGEN;
|
||||
hpRegenMultiplier *= Config.CHAMPION_HP_REGEN;
|
||||
}
|
||||
|
||||
if (cha.isPlayer())
|
||||
|
||||
@@ -518,7 +518,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
||||
ps.execute();
|
||||
}
|
||||
|
||||
if (Config.L2JMOD_ALLOW_WEDDING)
|
||||
if (Config.ALLOW_WEDDING)
|
||||
{
|
||||
try (PreparedStatement ps = con.prepareStatement("DELETE FROM mods_wedding WHERE player1Id = ? OR player2Id = ?"))
|
||||
{
|
||||
|
||||
@@ -17876,13 +17876,13 @@ public final class NpcStringId
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.L2JMOD_MULTILANG_NS_ENABLE)
|
||||
if (!Config.MULTILANG_NS_ENABLE)
|
||||
{
|
||||
_log.log(Level.INFO, "NpcStringId: MultiLanguage disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
final List<String> languages = Config.L2JMOD_MULTILANG_NS_ALLOWED;
|
||||
final List<String> languages = Config.MULTILANG_NS_ALLOWED;
|
||||
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setValidating(false);
|
||||
factory.setIgnoringComments(true);
|
||||
|
||||
+2
-2
@@ -9834,13 +9834,13 @@ public final class SystemMessageId
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.L2JMOD_MULTILANG_SM_ENABLE)
|
||||
if (!Config.MULTILANG_SM_ENABLE)
|
||||
{
|
||||
_log.log(Level.INFO, "SystemMessageId: MultiLanguage disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
final List<String> languages = Config.L2JMOD_MULTILANG_SM_ALLOWED;
|
||||
final List<String> languages = Config.MULTILANG_SM_ALLOWED;
|
||||
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setValidating(false);
|
||||
factory.setIgnoringComments(true);
|
||||
|
||||
+61
-2
@@ -166,6 +166,65 @@ public final class CharacterCreate implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// Custom Feature: Disallow a race to be created.
|
||||
// Example: Humans can not be created if AllowHuman = False in Custom.properties
|
||||
switch (template.getRace())
|
||||
{
|
||||
case HUMAN:
|
||||
{
|
||||
if (!Config.ALLOW_HUMAN)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ELF:
|
||||
{
|
||||
if (!Config.ALLOW_ELF)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DARK_ELF:
|
||||
{
|
||||
if (!Config.ALLOW_DARKELF)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ORC:
|
||||
{
|
||||
if (!Config.ALLOW_ORC)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DWARF:
|
||||
{
|
||||
if (!Config.ALLOW_DWARF)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KAMAEL:
|
||||
{
|
||||
if (!Config.ALLOW_KAMAEL)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
newChar = L2PcInstance.create(template, client.getAccountName(), _name, new PcAppearance(_face, _hairColor, _hairStyle, _sex != 0));
|
||||
}
|
||||
|
||||
@@ -174,10 +233,10 @@ public final class CharacterCreate implements IClientIncomingPacket
|
||||
newChar.setCurrentMp(newChar.getMaxMp());
|
||||
// newChar.setMaxLoad(template.getBaseLoad());
|
||||
|
||||
initNewChar(client, newChar);
|
||||
|
||||
client.sendPacket(CharCreateOk.STATIC_PACKET);
|
||||
|
||||
initNewChar(client, newChar);
|
||||
|
||||
final LogRecord record = new LogRecord(Level.INFO, "Created new character.");
|
||||
record.setParameters(new Object[]
|
||||
{
|
||||
|
||||
+2
-2
@@ -117,11 +117,11 @@ public class CharacterSelect implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if ((Config.L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddClient(AntiFeedManager.GAME_ID, client, Config.L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP))
|
||||
if ((Config.DUALBOX_CHECK_MAX_PLAYERS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddClient(AntiFeedManager.GAME_ID, client, Config.DUALBOX_CHECK_MAX_PLAYERS_PER_IP))
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(info.getHtmlPrefix(), "data/html/mods/IPRestriction.htm");
|
||||
msg.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(client, Config.L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP)));
|
||||
msg.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(client, Config.DUALBOX_CHECK_MAX_PLAYERS_PER_IP)));
|
||||
client.sendPacket(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public final class DlgAnswer implements IClientIncomingPacket
|
||||
{
|
||||
if (activeChar.removeAction(PlayerAction.USER_ENGAGE))
|
||||
{
|
||||
if (Config.L2JMOD_ALLOW_WEDDING)
|
||||
if (Config.ALLOW_WEDDING)
|
||||
{
|
||||
activeChar.engageAnswer(_answer);
|
||||
}
|
||||
|
||||
+1
-1
@@ -399,7 +399,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Wedding Checks
|
||||
if (Config.L2JMOD_ALLOW_WEDDING)
|
||||
if (Config.ALLOW_WEDDING)
|
||||
{
|
||||
engage(activeChar);
|
||||
notifyPartner(activeChar, activeChar.getPartnerId());
|
||||
|
||||
+1
-1
@@ -474,7 +474,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
|
||||
public final T getLocalizedMessage(String lang)
|
||||
{
|
||||
if (!Config.L2JMOD_MULTILANG_SM_ENABLE || (getSystemMessageId() == SystemMessageId.S1))
|
||||
if (!Config.MULTILANG_SM_ENABLE || (getSystemMessageId() == SystemMessageId.S1))
|
||||
{
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
+2
-2
@@ -100,9 +100,9 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
{
|
||||
_title = "Invisible";
|
||||
}
|
||||
else if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())
|
||||
else if (Config.CHAMPION_ENABLE && cha.isChampion())
|
||||
{
|
||||
_title = (Config.L2JMOD_CHAMP_TITLE); // On every subclass
|
||||
_title = (Config.CHAMP_TITLE); // On every subclass
|
||||
}
|
||||
else if (cha.getTemplate().isUsingServerSideTitle())
|
||||
{
|
||||
|
||||
+3
-3
@@ -272,12 +272,12 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
charInfopackage.setY(chardata.getInt("y"));
|
||||
charInfopackage.setZ(chardata.getInt("z"));
|
||||
|
||||
if (Config.L2JMOD_MULTILANG_ENABLE)
|
||||
if (Config.MULTILANG_ENABLE)
|
||||
{
|
||||
String lang = chardata.getString("language");
|
||||
if (!Config.L2JMOD_MULTILANG_ALLOWED.contains(lang))
|
||||
if (!Config.MULTILANG_ALLOWED.contains(lang))
|
||||
{
|
||||
lang = Config.L2JMOD_MULTILANG_DEFAULT;
|
||||
lang = Config.MULTILANG_DEFAULT;
|
||||
}
|
||||
charInfopackage.setHtmlPrefix("data/lang/" + lang + "/");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user