diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini index f6f5db5246..9c84363207 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini @@ -144,10 +144,6 @@ EnableAlterSkills = True # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -404,46 +400,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini index ce8f34ae39..52b2ea02c3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini index 1dc5e3accb..b87d6cfbac 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -382,10 +378,6 @@ AllowRace = False # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -522,55 +514,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -603,10 +547,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -697,17 +637,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/GrandBoss.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/GrandBoss.ini index 924f8dcad4..985fe9e143 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/GrandBoss.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/GrandBoss.ini @@ -106,12 +106,6 @@ KelbimMaxPlayers = 35 # Anakim # --------------------------------------------------------------------------- -# Interval time of Anakim. Value is hour. Range 1-480. Retail: 96 -IntervalOfAnakimSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfAnakimSpawn = 12 - # Minimal count of players for enter to Anakim. Retail: 98 AnakimMinPlayers = 98 @@ -128,12 +122,6 @@ AnakimMaxPlayerLvl = 94 # Lilith # --------------------------------------------------------------------------- -# Interval time of Lilith. Value is hour. Range 1-480. Retail: 96 -IntervalOfLilithSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfLilithSpawn = 12 - # Minimal count of players for enter to Lilith. Retail: 98 LilithMinPlayers = 98 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/PVP.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/PVP.ini index 962b639e25..42e1b86335 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/PVP.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/PVP.ini @@ -54,10 +54,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java index 5647db4178..7e6940700f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -20,14 +20,11 @@ import java.util.logging.Logger; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Util; /** @@ -76,27 +73,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java index 89517a5563..514a32a8f6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java @@ -167,8 +167,12 @@ public final class Parade extends AbstractNpcAI return (dd * 1000) / 6; } - class Start implements Runnable + private class Start implements Runnable { + public Start() + { + } + @Override public void run() { @@ -179,8 +183,12 @@ public final class Parade extends AbstractNpcAI } } - class Spawn implements Runnable + private class Spawn implements Runnable { + public Spawn() + { + } + @Override public void run() { @@ -209,8 +217,12 @@ public final class Parade extends AbstractNpcAI } } - class Delete implements Runnable + private class Delete implements Runnable { + public Delete() + { + } + @Override public void run() { @@ -240,8 +252,12 @@ public final class Parade extends AbstractNpcAI } } - class Clean implements Runnable + private class Clean implements Runnable { + public Clean() + { + } + @Override public void run() { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java index 569eff3cfe..8265e5ee42 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java @@ -73,12 +73,16 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI return super.onAdvEvent(event, npc, player); } - public static final class zoneInfo + private static final class zoneInfo { private int currentPoints = 0; private int currentMonitorizedDamage = 0; private int zoneStage = 0; + public zoneInfo() + { + } + void setZoneStage(int a) { zoneStage = a; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java index f754247346..0f2bff21ca 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java @@ -122,7 +122,7 @@ public final class Alexandria extends AbstractNpcAI return htmltext; } - public static class AdditionalQuestItemHolder extends QuestItemHolder + private static class AdditionalQuestItemHolder extends QuestItemHolder { private final int _additionalId; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java index 3394c02a83..12ebfd6d42 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java @@ -16,6 +16,7 @@ */ package ai.bosses.Baylor; +import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Attackable; @@ -28,6 +29,7 @@ import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import instances.AbstractInstance; @@ -326,6 +328,20 @@ public final class BaylorWarzone extends AbstractInstance return super.onSpawn(npc); } + /** + * Broadcasts SocialAction packet to self and known players. + * @param character + * @param actionId + */ + private void broadcastSocialAction(L2Character character, int actionId) + { + final SocialAction action = new SocialAction(character.getObjectId(), actionId); + L2World.getInstance().forEachVisibleObject(character, L2PcInstance.class, player -> + { + player.sendPacket(action); + }); + } + public static void main(String[] args) { new BaylorWarzone(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java index 202e22b1f3..5698d410bf 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java @@ -70,17 +70,21 @@ public final class Stage1 extends AbstractInstance implements IGameXmlReader { Logger LOGGER = Logger.getLogger(Stage1.class.getName()); - protected static class SODSpawn + private static class SODSpawn { - public boolean isZone = false; - public boolean isNeededNextFlag = false; - public int npcId; - public int x = 0; - public int y = 0; - public int z = 0; - public int h = 0; - public int zone = 0; - public int count = 0; + public SODSpawn() + { + } + + boolean isZone = false; + boolean isNeededNextFlag = false; + int npcId; + int x = 0; + int y = 0; + int z = 0; + int h = 0; + int zone = 0; + int count = 0; } // Spawn data diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java index 819ba28b77..07ad6456c8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferAI implements Runnable +class NpcBufferAI implements Runnable { private static final Logger LOGGER = Logger.getLogger(NpcBufferAI.class.getName()); private final L2Npc _npc; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java index 8c6526ebdf..690989cdb2 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java @@ -22,12 +22,12 @@ import java.util.List; /** * @author UnAfraid */ -public class NpcBufferData +class NpcBufferData { private final int _id; private final List _skills = new ArrayList<>(); - public NpcBufferData(int id) + NpcBufferData(int id) { _id = id; } @@ -37,7 +37,7 @@ public class NpcBufferData return _id; } - public void addSkill(NpcBufferSkillData skill) + void addSkill(NpcBufferSkillData skill) { _skills.add(skill); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java index 89d2849d16..beeab264fa 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java @@ -23,13 +23,13 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferSkillData +class NpcBufferSkillData { private final SkillHolder _skill; private final int _scaleToLevel; private final int _initialDelay; - public NpcBufferSkillData(StatsSet set) + NpcBufferSkillData(StatsSet set) { _skill = new SkillHolder(set.getInt("id"), set.getInt("level")); _scaleToLevel = set.getInt("scaleToLevel", -1); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java index a4efa3ad36..b0287e1df6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.StatsSet; /** * @author UnAfraid */ -public class NpcBuffersData implements IGameXmlReader +class NpcBuffersData implements IGameXmlReader { private static final Logger LOGGER = Logger.getLogger(NpcBuffersData.class.getName()); @@ -93,7 +93,7 @@ public class NpcBuffersData implements IGameXmlReader } } - public NpcBufferData getNpcBuffer(int npcId) + NpcBufferData getNpcBuffer(int npcId) { return _npcBuffers.get(npcId); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java index 51fee14634..062f23e081 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java @@ -37,7 +37,7 @@ public class AdminMonsterRace implements IAdminCommandHandler "admin_mons" }; - protected static int state = -1; + static int state = -1; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) @@ -112,7 +112,7 @@ public class AdminMonsterRace implements IAdminCommandHandler } - class RunRace implements Runnable + private class RunRace implements Runnable { private final int[][] codes; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index b937970ce0..407536b247 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 59491ae669..deec365bc4 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index b526b6c4fc..06c96aa2ae 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -95,20 +95,6 @@ public final class AirBind extends AbstractEffect @Override public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) - { - airBind(effector, effected); - } - - @Override - public void onExit(L2Character effector, L2Character effected, Skill skill) - { - if (!effected.isPlayer()) - { - effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); - } - } - - public void airBind(L2Character effector, L2Character effected) { for (L2PcInstance nearbyPlayer : L2World.getInstance().getVisibleObjects(effected, L2PcInstance.class, 1200)) { @@ -123,4 +109,13 @@ public final class AirBind extends AbstractEffect } } } + + @Override + public void onExit(L2Character effector, L2Character effected, Skill skill) + { + if (!effected.isPlayer()) + { + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); + } + } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index d94354ed72..09813f2027 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -148,7 +148,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java index 48f101724b..679858aa00 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java @@ -112,7 +112,7 @@ public final class TalkingIslandPast extends AbstractInstance return super.onExitZone(character, zone); } - public void onCreatureSee(OnCreatureSee event) + private void onCreatureSee(OnCreatureSee event) { final L2Character creature = event.getSeen(); final L2Npc npc = (L2Npc) event.getSeer(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java index d1626b7a35..db9aefdc96 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java @@ -30,12 +30,12 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00180_InfernalFlamesBurningInCrystalPrison extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int BAYLOR = 29213; + private static final int BAYLOR = 29213; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Quest Item private static final int BELETH_MARK = 17591; // Item diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java index bf65153e22..873f31f318 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java @@ -26,12 +26,12 @@ import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.util.Util; /** - * @hlwrave + * @author hlwrave * @URL https://l2wiki.com/Devils_Strike_Back,_Advent_of_Balok */ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest { - // Npc + // NPC private static final int FIOREN = 33044; // Monster private static final int BALOK = 29218; @@ -41,7 +41,7 @@ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest private static final int EWR = 17526; private static final int POUCH = 34861; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; public Q00181_DevilsStrikeBackAdventOfBalok() { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java index 76ba5a82dc..6be0c2486f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java @@ -33,7 +33,7 @@ public class Q00254_LegendaryTales extends Quest private static final int GILMORE = 30754; // Monsters - public enum Bosses + private enum Bosses { EMERALD_HORN(25718), DUST_RIDER(25719), diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java index 132b885349..5e36ea3918 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java @@ -31,10 +31,10 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00465_WeAreFriends extends Quest { - // Npc - public static final int FAIRY_CITIZEN = 32921; - public static final int FAIRY_CITIZEN_SPAWN = 32923; - // item + // NPCs + private static final int FAIRY_CITIZEN = 32921; + private static final int FAIRY_CITIZEN_SPAWN = 32923; + // Item private static final int MARK_OF_FRIENDSHIP = 17377; private static final int FAIRY_LEAF_FLUTE = 17378; private static final int CERTIFICATE_OF_PROMISE = 30384; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java index 57e97aff33..802a78cbf4 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java @@ -35,8 +35,8 @@ public class Q00466_PlacingMySmallPower extends Quest { // NPCs private static final int ASTERIOS = 30154; - public static final int NOETI_MIMILEAD = 32895; - public static final int[] COCON = + private static final int NOETI_MIMILEAD = 32895; + private static final int[] COCON = { 19394 // Large Cocoon }; @@ -60,13 +60,13 @@ public class Q00466_PlacingMySmallPower extends Quest 22878 // Fairy Rogue }; // Items - public static final int FAIRY_WING = 17597; - public static final int COCOON_FRAGMENT = 17598; - public static final int KIMERIANS_BREATH = 17599; - public static final int TEMINIELS_TONIC = 17596; - public static final int TONIC_RECIPE = 17603; + private static final int FAIRY_WING = 17597; + private static final int COCOON_FRAGMENT = 17598; + private static final int KIMERIANS_BREATH = 17599; + private static final int TEMINIELS_TONIC = 17596; + private static final int TONIC_RECIPE = 17603; // Reward - public static final int CERTIFICATE_OF_PROMISE = 30384; + private static final int CERTIFICATE_OF_PROMISE = 30384; // Misc private static final int MIN_LEVEL = 90; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java index b3f89230f0..287476a017 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java @@ -34,8 +34,8 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00469_SuspiciousGardener extends Quest { - // Npc - public static final int GOFINA = 33031; + // NPC + private static final int GOFINA = 33031; // Monsters private static final int APHERIUS_LOOKOUT_BEWILDERED = 22964; // Items diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java index bed461aa18..a2e7b2168d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00471_BreakingThroughTheEmeraldSquare extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int EMABIFI = 25881; + private static final int EMABIFI = 25881; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Items - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00471_BreakingThroughTheEmeraldSquare() { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java index f391c3e2b1..a0f701944a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00472_ChallengeSteamCorridor extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int KECHI = 25532; + private static final int KECHI = 25532; // Mis - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00472_ChallengeSteamCorridor() { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java index 608f73b337..444fa47400 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java @@ -26,18 +26,18 @@ import com.l2jmobius.gameserver.util.Util; /** * @author hlwrave - * @URL: https://l2wiki.com/In_the_Coral_Garden + * @URL https://l2wiki.com/In_the_Coral_Garden */ public class Q00473_InTheCoralGarden extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int MICHAEL = 25799; + private static final int MICHAEL = 25799; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00473_InTheCoralGarden() { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java index 11a1593e41..45fc3aa169 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java @@ -31,9 +31,9 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00483_IntendedTactic extends Quest { - // Npc - public static final int ENDE = 33357; - // Mobs + // NPC + private static final int ENDE = 33357; + // Monsters private static final int[] MOBS = { 23069, // Vladimir's Warrior @@ -50,7 +50,7 @@ public class Q00483_IntendedTactic extends Quest 25811, // Lazearth 25815 // Ken }; - // items + // Items private static final int LOYAL_SERVANS_BLOOD = 17736; private static final int TRUTTHFUL_ONES_BLOOD = 17737; private static final int TOKEN_OF_INSOLENCE_TOWER = 17624; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java index 135edbc233..7cdab9fd02 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java @@ -287,7 +287,7 @@ public class Q00663_SeductiveWhispers extends Quest return event; } - public String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) + private String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) { boolean isPlayerWin = false; boolean isNpcWin = false; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java index b186e52726..e17b0a8da0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java @@ -43,7 +43,7 @@ public final class Q10292_SevenSignsGirlOfDoubt extends Quest private static final ItemHolder ELCADIAS_MARK = new ItemHolder(17226, 10); // Misc private static final int MIN_LEVEL = 81; - boolean isBusy = false; + private boolean isBusy = false; // Monster private static final int CREATURE_OF_THE_DUSK1 = 27422; private static final int CREATURE_OF_THE_DUSK2 = 27424; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java index 89c68608d2..84350c9ab8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java @@ -444,7 +444,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest return htmltext; } - public boolean hasCheckedAllRightBooks(QuestState qs) + private boolean hasCheckedAllRightBooks(QuestState qs) { return ((qs.getInt("good1") == 1) && (qs.getInt("good2") == 1) && (qs.getInt("good3") == 1) && (qs.getInt("good4") == 1)); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java index b0d144d1c7..deb26e3b82 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java @@ -35,8 +35,8 @@ import com.l2jmobius.gameserver.model.quest.State; public final class Q10353_CertificationOfValue extends Quest { // NPCs - public static final int RIEYI = 33155; - public static final int KYUORI = 33358; + private static final int RIEYI = 33155; + private static final int KYUORI = 33358; private static final int DUMMY_MONSTER = 33349; private static final int[] MONSTERS = { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java index 6bdcb9797f..75a92769e3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java @@ -658,7 +658,7 @@ public final class Q10369_NoblesseSoulTesting extends Quest return super.onFirstTalk(npc, player); } - public boolean canProgress(L2PcInstance player) + private boolean canProgress(L2PcInstance player) { return ((player.getLevel() > MIN_LEVEL) && player.isSubClassActive()); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/vehicles/AirShipController.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/vehicles/AirShipController.java index 623b41de9f..ca2a930497 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/vehicles/AirShipController.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/vehicles/AirShipController.java @@ -43,8 +43,12 @@ import ai.AbstractNpcAI; public abstract class AirShipController extends AbstractNpcAI { - protected final class DecayTask implements Runnable + private final class DecayTask implements Runnable { + public DecayTask() + { + } + @Override public void run() { @@ -55,8 +59,12 @@ public abstract class AirShipController extends AbstractNpcAI } } - protected final class DepartTask implements Runnable + private final class DepartTask implements Runnable { + public DepartTask() + { + } + @Override public void run() { @@ -74,14 +82,14 @@ public abstract class AirShipController extends AbstractNpcAI } } - public static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); protected int _dockZone = 0; protected int _shipSpawnX = 0; protected int _shipSpawnY = 0; protected int _shipSpawnZ = 0; - protected int _shipHeading = 0; + private final int _shipHeading = 0; protected Location _oustLoc = null; protected int _locationId = 0; @@ -94,8 +102,8 @@ public abstract class AirShipController extends AbstractNpcAI protected Movie _movie = null; - protected boolean _isBusy = false; - protected L2ControllableAirShipInstance _dockedShip = null; + private boolean _isBusy = false; + L2ControllableAirShipInstance _dockedShip = null; private final Runnable _decayTask = new DecayTask(); private final Runnable _departTask = new DepartTask(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/log/java0.log b/L2J_Mobius_1.0_Ertheia/dist/game/log/java0.log new file mode 100644 index 0000000000..487f17f17b --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/log/java0.log @@ -0,0 +1,90 @@ +2018.06.26 17:19:49,281 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: ipconfig.xml doesn't exists using automatic configuration... +2018.06.26 17:19:49,663 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: Adding new subnet: 127.0.0.0/8 address: 127.0.0.1 +2018.06.26 17:19:49,673 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: Adding new subnet: 192.168.1.0/24 address: 192.168.1.2 +2018.06.26 17:19:49,678 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: Adding new subnet: 0.0.0.0/0 address: 176.92.112.165 +2018.06.26 17:19:49,763 INFO 1 com.l2jmobius.Config Loaded 6 Filter Words. +2018.06.26 17:19:49,901 INFO 1 com.l2jmobius.gameserver.GameServer ------------------------------------------------=[ Database ] +2018.06.26 17:19:50,441 INFO 1 com.l2jmobius.commons.database.DatabaseFactory Database: Initialized. +2018.06.26 17:19:50,442 INFO 1 com.l2jmobius.gameserver.GameServer ----------------------------------------------=[ ThreadPool ] +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.commons.concurrent.ThreadPool ThreadPool: Initialized +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.commons.concurrent.ThreadPool ...8 scheduled pool executors with 320 total threads. +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.commons.concurrent.ThreadPool ...8 instant pool executors with 160 total threads. +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.gameserver.GameServer -----------------------------------------------=[ IdFactory ] +2018.06.26 17:19:50,515 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory Updated characters online status. +2018.06.26 17:19:50,628 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory Cleaned 0 elements from database in 0 s +2018.06.26 17:19:50,632 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory Cleaned 0 expired timestamps from database. +2018.06.26 17:19:50,636 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory BitSetIDFactory: 102912 id's available. +2018.06.26 17:19:50,637 INFO 1 com.l2jmobius.gameserver.GameServer ---------------------------------------=[ Scripting Engines ] +2018.06.26 17:19:50,651 INFO 1 com.l2jmobius.gameserver.scripting.ScriptEngineManager ScriptEngine: L2J Java Engine 1.0 (Java [0, 1, 2, 3, 4, 5, 6]) +2018.06.26 17:19:50,849 INFO 1 com.l2jmobius.gameserver.scripting.ScriptEngineManager Loaded 9 files to exclude. +2018.06.26 17:19:50,849 INFO 1 com.l2jmobius.gameserver.GameServer --------------------------------------------------=[ Telnet ] +2018.06.26 17:19:50,960 INFO 1 com.l2jmobius.gameserver.network.telnet.TelnetServer Telnet server is currently disabled. +2018.06.26 17:19:50,961 INFO 1 com.l2jmobius.gameserver.GameServer ---------------------------------------------------=[ World ] +2018.06.26 17:19:50,966 INFO 512 com.l2jmobius.gameserver.GameTimeController GameTimeController: Started. +2018.06.26 17:19:51,465 INFO 1 com.l2jmobius.gameserver.model.L2World L2World: (288 by 272 by 32) World Region Grid set up. +2018.06.26 17:19:51,669 INFO 1 com.l2jmobius.gameserver.instancemanager.MapRegionManager MapRegionManager: Loaded 59 map regions. +2018.06.26 17:19:51,672 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager 19 by 18 Zone Region Grid set up. +2018.06.26 17:19:52,364 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager: Loaded 27 zone classes and 2819 zones. +2018.06.26 17:19:52,364 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager: Loaded 16 NPC spawn territoriers. +2018.06.26 17:19:52,369 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager: Last static id: 210109 +2018.06.26 17:19:52,805 INFO 1 com.l2jmobius.gameserver.data.xml.impl.DoorData DoorData: Loaded 1512 Door Templates for 24 regions. +2018.06.26 17:19:52,813 INFO 1 FenceData Loaded 1 Fences. +2018.06.26 17:19:52,830 INFO 1 com.l2jmobius.gameserver.instancemanager.GlobalVariablesManager GlobalVariablesManager: Loaded 7 variables. +2018.06.26 17:19:52,831 INFO 1 com.l2jmobius.gameserver.GameServer ----------------------------------------------------=[ Data ] +2018.06.26 17:19:52,840 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ActionData ActionData: Loaded 215 player actions. +2018.06.26 17:19:52,907 INFO 1 com.l2jmobius.gameserver.data.xml.impl.CategoryData CategoryData: Loaded 215 Categories. +2018.06.26 17:19:52,913 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SecondaryAuthData SecondaryAuthData: Loaded 328 forbidden passwords. +2018.06.26 17:19:52,919 INFO 1 com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData AbilityPointsData: Loaded 4 range fees. +2018.06.26 17:19:55,131 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Highest item id used: 49798 +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 20834 Etc Items +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 11140 Armor Items +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 8628 Weapon Items +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 40602 Items in total. +2018.06.26 17:19:55,148 INFO 1 com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData CombinationItemsData: Loaded 830 combinations. +2018.06.26 17:19:55,161 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SayuneData SayuneData: Loaded: 40 maps. +2018.06.26 17:19:55,176 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ClanRewardData ClanRewardData: Loaded: 4 rewards for MEMBERS_ONLINE +2018.06.26 17:19:55,176 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ClanRewardData ClanRewardData: Loaded: 4 rewards for HUNTING_MONSTERS +2018.06.26 17:19:55,805 INFO 1 handlers.DailyMissionMasterHandler DailyMissionMasterHandler: Loaded 7 handlers. +2018.06.26 17:19:55,847 INFO 1 com.l2jmobius.gameserver.data.xml.impl.DailyMissionData DailyMissionData: Loaded 59 one day rewards. +2018.06.26 17:19:55,847 INFO 1 com.l2jmobius.gameserver.GameServer --------------------------------------------------=[ Skills ] +2018.06.26 17:19:58,208 INFO 1 handlers.EffectMasterHandler EffectMasterHandler: Loaded 331 effect handlers. +2018.06.26 17:19:58,222 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantSkillGroupsData EnchantSkillGroupsData: Loaded 30 enchant routes, max enchant set to 30. +2018.06.26 17:20:02,778 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillData SkillData: Loaded 150332 Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 26839 Class Skills for 145 Class Skill Trees. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 24 Sub-Class Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 38 Dual-Class Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 104 Transfer Skills for 3 Transfer Skill Trees. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 17 Race skills for 7 Race Skill Trees. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 35 Fishing Skills, 8 Dwarven only Fishing Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 3 Collect Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 171 Pledge Skills, 141 for Pledge and 30 Residential. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 18 Sub-Pledge Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 32 Transform Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 17 Noble Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 5 Hero Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 61 Game Master Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 61 Game Master Aura Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 101 Ability Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 112 Alchemy Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 34 Class Awaken Save Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 20 Revelation Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 32 Common Skills to all classes. +2018.06.26 17:20:03,528 INFO 1 com.l2jmobius.gameserver.data.xml.impl.PetSkillData PetSkillData: Loaded 1046 skills. +2018.06.26 17:20:03,528 INFO 1 com.l2jmobius.gameserver.GameServer ---------------------------------------------------=[ Items ] +2018.06.26 17:20:03,771 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData EnchantItemGroupsData: Loaded: 4 item group templates. +2018.06.26 17:20:03,771 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData EnchantItemGroupsData: Loaded: 1 scroll group templates. +2018.06.26 17:20:03,785 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemData EnchantItemData: Loaded 244 Enchant Scrolls. +2018.06.26 17:20:03,786 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemData EnchantItemData: Loaded 100 Support Items. +2018.06.26 17:20:03,801 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemOptionsData EnchantItemOptionsData: Loaded: 51 Items and 1437 Options. +2018.06.26 17:20:03,819 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData ItemCrystallizationData: Loaded 12 crystallization templates. +2018.06.26 17:20:03,819 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData ItemCrystallizationData: Loaded 278 pre-defined crystallizable items. +2018.06.26 17:20:03,832 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData ItemCrystallizationData: Generated 5767 crystallizable items from templates. +2018.06.26 17:20:04,764 WARNING 20 com.l2jmobius.gameserver.Shutdown Server scheduled restart issued shutdown command. Restart in 1 seconds! +2018.06.26 17:20:05,092 INFO 1 com.l2jmobius.gameserver.data.xml.impl.OptionData OptionData: Loaded: 32989 Options. +2018.06.26 17:20:05,188 INFO 1 VariationData VariationData: Loaded 117 Variations. +2018.06.26 17:20:05,188 INFO 1 VariationData VariationData: Loaded 4694 Fees. +2018.06.26 17:20:05,206 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnsoulData EnsoulData: Loaded: 10 fees +2018.06.26 17:20:05,206 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnsoulData EnsoulData: Loaded: 742 options +2018.06.26 17:20:05,206 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnsoulData EnsoulData: Loaded: 104 stones +2018.06.26 17:20:05,208 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData EnchantItemHPBonusData: Loaded 11 Enchant HP Bonuses. +2018.06.26 17:20:05,766 WARNING 520 com.l2jmobius.gameserver.Shutdown GM shutdown countdown is over. shutting down NOW! diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java index ca859949b4..b670fc1a05 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,60 +81,59 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -172,7 +171,6 @@ public final class Config public static long EFFECT_TICK_RATIO; public static boolean ENABLE_ALTER_SKILLS; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; @@ -404,7 +402,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -420,9 +417,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -484,7 +479,6 @@ public final class Config public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_RACE; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -549,18 +543,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -582,8 +564,6 @@ public final class Config public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int ABILITY_MAX_POINTS; public static long ABILITY_POINTS_RESET_ADENA; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -626,12 +606,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -657,7 +635,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -714,10 +691,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -773,15 +746,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Hardin (Agent of Chaos) // -------------------------------------------------- @@ -800,7 +764,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -833,22 +796,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -937,16 +884,12 @@ public final class Config // Anakim public static int ANAKIM_MIN_PLAYERS; public static int ANAKIM_MAX_PLAYERS; - public static int ANAKIM_SPAWN_INTERVAL; - public static int ANAKIM_SPAWN_RANDOM; public static int ANAKIM_MIN_PLAYER_LVL; public static int ANAKIM_MAX_PLAYER_LVL; // Lilith public static int LILITH_MIN_PLAYERS; public static int LILITH_MAX_PLAYERS; - public static int LILITH_SPAWN_INTERVAL; - public static int LILITH_SPAWN_RANDOM; public static int LILITH_MIN_PLAYER_LVL; public static int LILITH_MAX_PLAYER_LVL; @@ -957,14 +900,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1142,7 +1077,6 @@ public final class Config public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; - public static boolean COMMUNITYBOARD_COMBAT_DISABLED; public static boolean COMMUNITYBOARD_KARMA_DISABLED; public static boolean COMMUNITYBOARD_CAST_ANIMATIONS; public static boolean COMMUNITY_PREMIUM_SYSTEM_ENABLED; @@ -1542,7 +1476,6 @@ public final class Config EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); ENABLE_ALTER_SKILLS = Character.getBoolean("EnableAlterSkills", true); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); @@ -1608,45 +1541,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1767,7 +1662,7 @@ public final class Config SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true); PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000; ABILITY_MAX_POINTS = Character.getInt("AbilityMaxPoints", 16); - ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10_000_000); + ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10000000); // Load Telnet config file (if exists) final PropertiesParser telnetSettings = new PropertiesParser(TELNET_CONFIG_FILE); @@ -1811,7 +1706,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1827,9 +1721,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1887,7 +1779,6 @@ public final class Config EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_RACE = General.getBoolean("AllowRace", true); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1924,18 +1815,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1963,9 +1842,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -1994,12 +1870,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2191,7 +2065,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2341,22 +2214,20 @@ public final class Config ANAKIM_MIN_PLAYERS = GrandBossSettings.getInt("AnakimMinPlayers", 98); ANAKIM_MAX_PLAYERS = GrandBossSettings.getInt("AnakimMaxPlayers", 120); - ANAKIM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAnakimSpawn", 192); - ANAKIM_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAnakimSpawn", 148); ANAKIM_MIN_PLAYER_LVL = GrandBossSettings.getInt("AnakimMinPlayerLvl", 90); ANAKIM_MAX_PLAYER_LVL = GrandBossSettings.getInt("AnakimMaxPlayerLvl", 94); LILITH_MIN_PLAYERS = GrandBossSettings.getInt("LilithMinPlayers", 98); LILITH_MAX_PLAYERS = GrandBossSettings.getInt("LilithMaxPlayers", 120); - LILITH_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLilithSpawn", 192); - LILITH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLilithSpawn", 148); LILITH_MIN_PLAYER_LVL = GrandBossSettings.getInt("LilithMinPlayerLvl", 85); LILITH_MAX_PLAYER_LVL = GrandBossSettings.getInt("LilithMaxPlayerLvl", 89); + TRASKEN_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfTraskenSpawn", 264); TRASKEN_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfTraskenSpawn", 72); TRASKEN_MIN_PLAYERS = GrandBossSettings.getInt("TraskenMinPlayers", 49); TRASKEN_MAX_PLAYERS = GrandBossSettings.getInt("TraskenMaxPlayers", 112); TRASKEN_MIN_PLAYER_LVL = GrandBossSettings.getInt("TraskenMinPlayerLvl", 85); + LINDVIOR_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLindviorSpawn", 264); LINDVIOR_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLindviorSpawn", 72); LINDVIOR_MIN_PLAYERS = GrandBossSettings.getInt("LindviorMinPlayers", 49); @@ -2385,15 +2256,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2536,7 +2398,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); @@ -2993,7 +2854,7 @@ public final class Config * @param hexId the hexadecimal ID to store * @param fileName name of the config file */ - public static void saveHexid(int serverId, String hexId, String fileName) + private static void saveHexid(int serverId, String hexId, String fileName) { try { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/concurrent/ThreadPool.java index d157412b2e..932dcc2e4e 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameServer.java index e14844c993..f72b68c65e 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameServer.java @@ -480,7 +480,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/Shutdown.java index dbaf36b403..72caae1c02 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/Shutdown.java @@ -60,10 +60,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 555223ce4f..8d2d8e65ee 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 4aa5d6e735..c960d1ec87 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -250,7 +250,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/TradeList.java index 7d0fa18073..e31f0fb735 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/TradeList.java @@ -155,26 +155,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -310,7 +290,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -460,7 +440,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -546,7 +526,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -577,7 +557,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index b5355f61fa..0be7c93deb 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/SystemMessageId.java index 64c17b5365..a8e17e6489 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -14023,18 +14023,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Token.java index fdd2a6c469..0ce6e889b2 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index eb1e82aca0..49cce40137 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini index 9149e606dc..3641826a38 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini @@ -144,10 +144,6 @@ EnableAlterSkills = True # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -404,46 +400,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_2.5_Underground/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_2.5_Underground/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini index ce8f34ae39..52b2ea02c3 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/General.ini b/L2J_Mobius_2.5_Underground/dist/game/config/General.ini index 66a7b6ba24..08b6846b63 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/General.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -386,10 +382,6 @@ AllowRace = False # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -526,55 +518,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -607,10 +551,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -701,17 +641,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/GrandBoss.ini b/L2J_Mobius_2.5_Underground/dist/game/config/GrandBoss.ini index 924f8dcad4..985fe9e143 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/GrandBoss.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/GrandBoss.ini @@ -106,12 +106,6 @@ KelbimMaxPlayers = 35 # Anakim # --------------------------------------------------------------------------- -# Interval time of Anakim. Value is hour. Range 1-480. Retail: 96 -IntervalOfAnakimSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfAnakimSpawn = 12 - # Minimal count of players for enter to Anakim. Retail: 98 AnakimMinPlayers = 98 @@ -128,12 +122,6 @@ AnakimMaxPlayerLvl = 94 # Lilith # --------------------------------------------------------------------------- -# Interval time of Lilith. Value is hour. Range 1-480. Retail: 96 -IntervalOfLilithSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfLilithSpawn = 12 - # Minimal count of players for enter to Lilith. Retail: 98 LilithMinPlayers = 98 diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini b/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/PVP.ini b/L2J_Mobius_2.5_Underground/dist/game/config/PVP.ini index 962b639e25..42e1b86335 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/PVP.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/PVP.ini @@ -54,10 +54,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/AbstractNpcAI.java index 5647db4178..7e6940700f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -20,14 +20,11 @@ import java.util.logging.Logger; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Util; /** @@ -76,27 +73,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java index 89517a5563..514a32a8f6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java @@ -167,8 +167,12 @@ public final class Parade extends AbstractNpcAI return (dd * 1000) / 6; } - class Start implements Runnable + private class Start implements Runnable { + public Start() + { + } + @Override public void run() { @@ -179,8 +183,12 @@ public final class Parade extends AbstractNpcAI } } - class Spawn implements Runnable + private class Spawn implements Runnable { + public Spawn() + { + } + @Override public void run() { @@ -209,8 +217,12 @@ public final class Parade extends AbstractNpcAI } } - class Delete implements Runnable + private class Delete implements Runnable { + public Delete() + { + } + @Override public void run() { @@ -240,8 +252,12 @@ public final class Parade extends AbstractNpcAI } } - class Clean implements Runnable + private class Clean implements Runnable { + public Clean() + { + } + @Override public void run() { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java index 569eff3cfe..8265e5ee42 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java @@ -73,12 +73,16 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI return super.onAdvEvent(event, npc, player); } - public static final class zoneInfo + private static final class zoneInfo { private int currentPoints = 0; private int currentMonitorizedDamage = 0; private int zoneStage = 0; + public zoneInfo() + { + } + void setZoneStage(int a) { zoneStage = a; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java index f754247346..0f2bff21ca 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java @@ -122,7 +122,7 @@ public final class Alexandria extends AbstractNpcAI return htmltext; } - public static class AdditionalQuestItemHolder extends QuestItemHolder + private static class AdditionalQuestItemHolder extends QuestItemHolder { private final int _additionalId; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java index 3394c02a83..12ebfd6d42 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java @@ -16,6 +16,7 @@ */ package ai.bosses.Baylor; +import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Attackable; @@ -28,6 +29,7 @@ import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import instances.AbstractInstance; @@ -326,6 +328,20 @@ public final class BaylorWarzone extends AbstractInstance return super.onSpawn(npc); } + /** + * Broadcasts SocialAction packet to self and known players. + * @param character + * @param actionId + */ + private void broadcastSocialAction(L2Character character, int actionId) + { + final SocialAction action = new SocialAction(character.getObjectId(), actionId); + L2World.getInstance().forEachVisibleObject(character, L2PcInstance.class, player -> + { + player.sendPacket(action); + }); + } + public static void main(String[] args) { new BaylorWarzone(); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java index 202e22b1f3..5698d410bf 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java @@ -70,17 +70,21 @@ public final class Stage1 extends AbstractInstance implements IGameXmlReader { Logger LOGGER = Logger.getLogger(Stage1.class.getName()); - protected static class SODSpawn + private static class SODSpawn { - public boolean isZone = false; - public boolean isNeededNextFlag = false; - public int npcId; - public int x = 0; - public int y = 0; - public int z = 0; - public int h = 0; - public int zone = 0; - public int count = 0; + public SODSpawn() + { + } + + boolean isZone = false; + boolean isNeededNextFlag = false; + int npcId; + int x = 0; + int y = 0; + int z = 0; + int h = 0; + int zone = 0; + int count = 0; } // Spawn data diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java index 819ba28b77..07ad6456c8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferAI implements Runnable +class NpcBufferAI implements Runnable { private static final Logger LOGGER = Logger.getLogger(NpcBufferAI.class.getName()); private final L2Npc _npc; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java index 8c6526ebdf..690989cdb2 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java @@ -22,12 +22,12 @@ import java.util.List; /** * @author UnAfraid */ -public class NpcBufferData +class NpcBufferData { private final int _id; private final List _skills = new ArrayList<>(); - public NpcBufferData(int id) + NpcBufferData(int id) { _id = id; } @@ -37,7 +37,7 @@ public class NpcBufferData return _id; } - public void addSkill(NpcBufferSkillData skill) + void addSkill(NpcBufferSkillData skill) { _skills.add(skill); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java index 89d2849d16..beeab264fa 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java @@ -23,13 +23,13 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferSkillData +class NpcBufferSkillData { private final SkillHolder _skill; private final int _scaleToLevel; private final int _initialDelay; - public NpcBufferSkillData(StatsSet set) + NpcBufferSkillData(StatsSet set) { _skill = new SkillHolder(set.getInt("id"), set.getInt("level")); _scaleToLevel = set.getInt("scaleToLevel", -1); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java index a4efa3ad36..b0287e1df6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.StatsSet; /** * @author UnAfraid */ -public class NpcBuffersData implements IGameXmlReader +class NpcBuffersData implements IGameXmlReader { private static final Logger LOGGER = Logger.getLogger(NpcBuffersData.class.getName()); @@ -93,7 +93,7 @@ public class NpcBuffersData implements IGameXmlReader } } - public NpcBufferData getNpcBuffer(int npcId) + NpcBufferData getNpcBuffer(int npcId) { return _npcBuffers.get(npcId); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java index 51fee14634..062f23e081 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java @@ -37,7 +37,7 @@ public class AdminMonsterRace implements IAdminCommandHandler "admin_mons" }; - protected static int state = -1; + static int state = -1; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) @@ -112,7 +112,7 @@ public class AdminMonsterRace implements IAdminCommandHandler } - class RunRace implements Runnable + private class RunRace implements Runnable { private final int[][] codes; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index b937970ce0..407536b247 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 59491ae669..deec365bc4 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index b526b6c4fc..06c96aa2ae 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -95,20 +95,6 @@ public final class AirBind extends AbstractEffect @Override public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) - { - airBind(effector, effected); - } - - @Override - public void onExit(L2Character effector, L2Character effected, Skill skill) - { - if (!effected.isPlayer()) - { - effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); - } - } - - public void airBind(L2Character effector, L2Character effected) { for (L2PcInstance nearbyPlayer : L2World.getInstance().getVisibleObjects(effected, L2PcInstance.class, 1200)) { @@ -123,4 +109,13 @@ public final class AirBind extends AbstractEffect } } } + + @Override + public void onExit(L2Character effector, L2Character effected, Skill skill) + { + if (!effected.isPlayer()) + { + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); + } + } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index d94354ed72..09813f2027 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -148,7 +148,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java index 48f101724b..679858aa00 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java @@ -112,7 +112,7 @@ public final class TalkingIslandPast extends AbstractInstance return super.onExitZone(character, zone); } - public void onCreatureSee(OnCreatureSee event) + private void onCreatureSee(OnCreatureSee event) { final L2Character creature = event.getSeen(); final L2Npc npc = (L2Npc) event.getSeer(); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java index d1626b7a35..db9aefdc96 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java @@ -30,12 +30,12 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00180_InfernalFlamesBurningInCrystalPrison extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int BAYLOR = 29213; + private static final int BAYLOR = 29213; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Quest Item private static final int BELETH_MARK = 17591; // Item diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java index bf65153e22..873f31f318 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java @@ -26,12 +26,12 @@ import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.util.Util; /** - * @hlwrave + * @author hlwrave * @URL https://l2wiki.com/Devils_Strike_Back,_Advent_of_Balok */ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest { - // Npc + // NPC private static final int FIOREN = 33044; // Monster private static final int BALOK = 29218; @@ -41,7 +41,7 @@ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest private static final int EWR = 17526; private static final int POUCH = 34861; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; public Q00181_DevilsStrikeBackAdventOfBalok() { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java index 76ba5a82dc..6be0c2486f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java @@ -33,7 +33,7 @@ public class Q00254_LegendaryTales extends Quest private static final int GILMORE = 30754; // Monsters - public enum Bosses + private enum Bosses { EMERALD_HORN(25718), DUST_RIDER(25719), diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java index 132b885349..5e36ea3918 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java @@ -31,10 +31,10 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00465_WeAreFriends extends Quest { - // Npc - public static final int FAIRY_CITIZEN = 32921; - public static final int FAIRY_CITIZEN_SPAWN = 32923; - // item + // NPCs + private static final int FAIRY_CITIZEN = 32921; + private static final int FAIRY_CITIZEN_SPAWN = 32923; + // Item private static final int MARK_OF_FRIENDSHIP = 17377; private static final int FAIRY_LEAF_FLUTE = 17378; private static final int CERTIFICATE_OF_PROMISE = 30384; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java index 57e97aff33..802a78cbf4 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java @@ -35,8 +35,8 @@ public class Q00466_PlacingMySmallPower extends Quest { // NPCs private static final int ASTERIOS = 30154; - public static final int NOETI_MIMILEAD = 32895; - public static final int[] COCON = + private static final int NOETI_MIMILEAD = 32895; + private static final int[] COCON = { 19394 // Large Cocoon }; @@ -60,13 +60,13 @@ public class Q00466_PlacingMySmallPower extends Quest 22878 // Fairy Rogue }; // Items - public static final int FAIRY_WING = 17597; - public static final int COCOON_FRAGMENT = 17598; - public static final int KIMERIANS_BREATH = 17599; - public static final int TEMINIELS_TONIC = 17596; - public static final int TONIC_RECIPE = 17603; + private static final int FAIRY_WING = 17597; + private static final int COCOON_FRAGMENT = 17598; + private static final int KIMERIANS_BREATH = 17599; + private static final int TEMINIELS_TONIC = 17596; + private static final int TONIC_RECIPE = 17603; // Reward - public static final int CERTIFICATE_OF_PROMISE = 30384; + private static final int CERTIFICATE_OF_PROMISE = 30384; // Misc private static final int MIN_LEVEL = 90; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java index b3f89230f0..287476a017 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java @@ -34,8 +34,8 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00469_SuspiciousGardener extends Quest { - // Npc - public static final int GOFINA = 33031; + // NPC + private static final int GOFINA = 33031; // Monsters private static final int APHERIUS_LOOKOUT_BEWILDERED = 22964; // Items diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java index bed461aa18..a2e7b2168d 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00471_BreakingThroughTheEmeraldSquare extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int EMABIFI = 25881; + private static final int EMABIFI = 25881; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Items - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00471_BreakingThroughTheEmeraldSquare() { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java index f391c3e2b1..a0f701944a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00472_ChallengeSteamCorridor extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int KECHI = 25532; + private static final int KECHI = 25532; // Mis - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00472_ChallengeSteamCorridor() { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java index 608f73b337..444fa47400 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java @@ -26,18 +26,18 @@ import com.l2jmobius.gameserver.util.Util; /** * @author hlwrave - * @URL: https://l2wiki.com/In_the_Coral_Garden + * @URL https://l2wiki.com/In_the_Coral_Garden */ public class Q00473_InTheCoralGarden extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int MICHAEL = 25799; + private static final int MICHAEL = 25799; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00473_InTheCoralGarden() { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java index 11a1593e41..45fc3aa169 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java @@ -31,9 +31,9 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00483_IntendedTactic extends Quest { - // Npc - public static final int ENDE = 33357; - // Mobs + // NPC + private static final int ENDE = 33357; + // Monsters private static final int[] MOBS = { 23069, // Vladimir's Warrior @@ -50,7 +50,7 @@ public class Q00483_IntendedTactic extends Quest 25811, // Lazearth 25815 // Ken }; - // items + // Items private static final int LOYAL_SERVANS_BLOOD = 17736; private static final int TRUTTHFUL_ONES_BLOOD = 17737; private static final int TOKEN_OF_INSOLENCE_TOWER = 17624; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java index 135edbc233..7cdab9fd02 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java @@ -287,7 +287,7 @@ public class Q00663_SeductiveWhispers extends Quest return event; } - public String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) + private String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) { boolean isPlayerWin = false; boolean isNpcWin = false; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java index b186e52726..e17b0a8da0 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java @@ -43,7 +43,7 @@ public final class Q10292_SevenSignsGirlOfDoubt extends Quest private static final ItemHolder ELCADIAS_MARK = new ItemHolder(17226, 10); // Misc private static final int MIN_LEVEL = 81; - boolean isBusy = false; + private boolean isBusy = false; // Monster private static final int CREATURE_OF_THE_DUSK1 = 27422; private static final int CREATURE_OF_THE_DUSK2 = 27424; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java index 89c68608d2..84350c9ab8 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java @@ -444,7 +444,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest return htmltext; } - public boolean hasCheckedAllRightBooks(QuestState qs) + private boolean hasCheckedAllRightBooks(QuestState qs) { return ((qs.getInt("good1") == 1) && (qs.getInt("good2") == 1) && (qs.getInt("good3") == 1) && (qs.getInt("good4") == 1)); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java index b0d144d1c7..deb26e3b82 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java @@ -35,8 +35,8 @@ import com.l2jmobius.gameserver.model.quest.State; public final class Q10353_CertificationOfValue extends Quest { // NPCs - public static final int RIEYI = 33155; - public static final int KYUORI = 33358; + private static final int RIEYI = 33155; + private static final int KYUORI = 33358; private static final int DUMMY_MONSTER = 33349; private static final int[] MONSTERS = { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java index 75cf7b998b..736d36cd68 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java @@ -658,7 +658,7 @@ public final class Q10369_NoblesseSoulTesting extends Quest return super.onFirstTalk(npc, player); } - public boolean canProgress(L2PcInstance player) + private boolean canProgress(L2PcInstance player) { return ((player.getLevel() > MIN_LEVEL) && player.isSubClassActive()); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/vehicles/AirShipController.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/vehicles/AirShipController.java index 623b41de9f..ca2a930497 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/vehicles/AirShipController.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/vehicles/AirShipController.java @@ -43,8 +43,12 @@ import ai.AbstractNpcAI; public abstract class AirShipController extends AbstractNpcAI { - protected final class DecayTask implements Runnable + private final class DecayTask implements Runnable { + public DecayTask() + { + } + @Override public void run() { @@ -55,8 +59,12 @@ public abstract class AirShipController extends AbstractNpcAI } } - protected final class DepartTask implements Runnable + private final class DepartTask implements Runnable { + public DepartTask() + { + } + @Override public void run() { @@ -74,14 +82,14 @@ public abstract class AirShipController extends AbstractNpcAI } } - public static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); protected int _dockZone = 0; protected int _shipSpawnX = 0; protected int _shipSpawnY = 0; protected int _shipSpawnZ = 0; - protected int _shipHeading = 0; + private final int _shipHeading = 0; protected Location _oustLoc = null; protected int _locationId = 0; @@ -94,8 +102,8 @@ public abstract class AirShipController extends AbstractNpcAI protected Movie _movie = null; - protected boolean _isBusy = false; - protected L2ControllableAirShipInstance _dockedShip = null; + private boolean _isBusy = false; + L2ControllableAirShipInstance _dockedShip = null; private final Runnable _decayTask = new DecayTask(); private final Runnable _departTask = new DepartTask(); diff --git a/L2J_Mobius_2.5_Underground/dist/game/log/java0.log b/L2J_Mobius_2.5_Underground/dist/game/log/java0.log new file mode 100644 index 0000000000..487f17f17b --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/log/java0.log @@ -0,0 +1,90 @@ +2018.06.26 17:19:49,281 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: ipconfig.xml doesn't exists using automatic configuration... +2018.06.26 17:19:49,663 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: Adding new subnet: 127.0.0.0/8 address: 127.0.0.1 +2018.06.26 17:19:49,673 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: Adding new subnet: 192.168.1.0/24 address: 192.168.1.2 +2018.06.26 17:19:49,678 INFO 1 com.l2jmobius.commons.util.IXmlReader Network Config: Adding new subnet: 0.0.0.0/0 address: 176.92.112.165 +2018.06.26 17:19:49,763 INFO 1 com.l2jmobius.Config Loaded 6 Filter Words. +2018.06.26 17:19:49,901 INFO 1 com.l2jmobius.gameserver.GameServer ------------------------------------------------=[ Database ] +2018.06.26 17:19:50,441 INFO 1 com.l2jmobius.commons.database.DatabaseFactory Database: Initialized. +2018.06.26 17:19:50,442 INFO 1 com.l2jmobius.gameserver.GameServer ----------------------------------------------=[ ThreadPool ] +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.commons.concurrent.ThreadPool ThreadPool: Initialized +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.commons.concurrent.ThreadPool ...8 scheduled pool executors with 320 total threads. +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.commons.concurrent.ThreadPool ...8 instant pool executors with 160 total threads. +2018.06.26 17:19:50,498 INFO 1 com.l2jmobius.gameserver.GameServer -----------------------------------------------=[ IdFactory ] +2018.06.26 17:19:50,515 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory Updated characters online status. +2018.06.26 17:19:50,628 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory Cleaned 0 elements from database in 0 s +2018.06.26 17:19:50,632 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory Cleaned 0 expired timestamps from database. +2018.06.26 17:19:50,636 INFO 1 com.l2jmobius.gameserver.idfactory.BitSetIDFactory BitSetIDFactory: 102912 id's available. +2018.06.26 17:19:50,637 INFO 1 com.l2jmobius.gameserver.GameServer ---------------------------------------=[ Scripting Engines ] +2018.06.26 17:19:50,651 INFO 1 com.l2jmobius.gameserver.scripting.ScriptEngineManager ScriptEngine: L2J Java Engine 1.0 (Java [0, 1, 2, 3, 4, 5, 6]) +2018.06.26 17:19:50,849 INFO 1 com.l2jmobius.gameserver.scripting.ScriptEngineManager Loaded 9 files to exclude. +2018.06.26 17:19:50,849 INFO 1 com.l2jmobius.gameserver.GameServer --------------------------------------------------=[ Telnet ] +2018.06.26 17:19:50,960 INFO 1 com.l2jmobius.gameserver.network.telnet.TelnetServer Telnet server is currently disabled. +2018.06.26 17:19:50,961 INFO 1 com.l2jmobius.gameserver.GameServer ---------------------------------------------------=[ World ] +2018.06.26 17:19:50,966 INFO 512 com.l2jmobius.gameserver.GameTimeController GameTimeController: Started. +2018.06.26 17:19:51,465 INFO 1 com.l2jmobius.gameserver.model.L2World L2World: (288 by 272 by 32) World Region Grid set up. +2018.06.26 17:19:51,669 INFO 1 com.l2jmobius.gameserver.instancemanager.MapRegionManager MapRegionManager: Loaded 59 map regions. +2018.06.26 17:19:51,672 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager 19 by 18 Zone Region Grid set up. +2018.06.26 17:19:52,364 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager: Loaded 27 zone classes and 2819 zones. +2018.06.26 17:19:52,364 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager: Loaded 16 NPC spawn territoriers. +2018.06.26 17:19:52,369 INFO 1 com.l2jmobius.gameserver.instancemanager.ZoneManager ZoneManager: Last static id: 210109 +2018.06.26 17:19:52,805 INFO 1 com.l2jmobius.gameserver.data.xml.impl.DoorData DoorData: Loaded 1512 Door Templates for 24 regions. +2018.06.26 17:19:52,813 INFO 1 FenceData Loaded 1 Fences. +2018.06.26 17:19:52,830 INFO 1 com.l2jmobius.gameserver.instancemanager.GlobalVariablesManager GlobalVariablesManager: Loaded 7 variables. +2018.06.26 17:19:52,831 INFO 1 com.l2jmobius.gameserver.GameServer ----------------------------------------------------=[ Data ] +2018.06.26 17:19:52,840 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ActionData ActionData: Loaded 215 player actions. +2018.06.26 17:19:52,907 INFO 1 com.l2jmobius.gameserver.data.xml.impl.CategoryData CategoryData: Loaded 215 Categories. +2018.06.26 17:19:52,913 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SecondaryAuthData SecondaryAuthData: Loaded 328 forbidden passwords. +2018.06.26 17:19:52,919 INFO 1 com.l2jmobius.gameserver.data.xml.impl.AbilityPointsData AbilityPointsData: Loaded 4 range fees. +2018.06.26 17:19:55,131 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Highest item id used: 49798 +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 20834 Etc Items +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 11140 Armor Items +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 8628 Weapon Items +2018.06.26 17:19:55,138 INFO 1 com.l2jmobius.gameserver.datatables.ItemTable ItemTable: Loaded: 40602 Items in total. +2018.06.26 17:19:55,148 INFO 1 com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData CombinationItemsData: Loaded 830 combinations. +2018.06.26 17:19:55,161 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SayuneData SayuneData: Loaded: 40 maps. +2018.06.26 17:19:55,176 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ClanRewardData ClanRewardData: Loaded: 4 rewards for MEMBERS_ONLINE +2018.06.26 17:19:55,176 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ClanRewardData ClanRewardData: Loaded: 4 rewards for HUNTING_MONSTERS +2018.06.26 17:19:55,805 INFO 1 handlers.DailyMissionMasterHandler DailyMissionMasterHandler: Loaded 7 handlers. +2018.06.26 17:19:55,847 INFO 1 com.l2jmobius.gameserver.data.xml.impl.DailyMissionData DailyMissionData: Loaded 59 one day rewards. +2018.06.26 17:19:55,847 INFO 1 com.l2jmobius.gameserver.GameServer --------------------------------------------------=[ Skills ] +2018.06.26 17:19:58,208 INFO 1 handlers.EffectMasterHandler EffectMasterHandler: Loaded 331 effect handlers. +2018.06.26 17:19:58,222 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantSkillGroupsData EnchantSkillGroupsData: Loaded 30 enchant routes, max enchant set to 30. +2018.06.26 17:20:02,778 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillData SkillData: Loaded 150332 Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 26839 Class Skills for 145 Class Skill Trees. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 24 Sub-Class Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 38 Dual-Class Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 104 Transfer Skills for 3 Transfer Skill Trees. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 17 Race skills for 7 Race Skill Trees. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 35 Fishing Skills, 8 Dwarven only Fishing Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 3 Collect Skills. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 171 Pledge Skills, 141 for Pledge and 30 Residential. +2018.06.26 17:20:03,512 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 18 Sub-Pledge Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 32 Transform Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 17 Noble Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 5 Hero Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 61 Game Master Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 61 Game Master Aura Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 101 Ability Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 112 Alchemy Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 34 Class Awaken Save Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 20 Revelation Skills. +2018.06.26 17:20:03,513 INFO 1 com.l2jmobius.gameserver.data.xml.impl.SkillTreesData SkillTreesData: Loaded 32 Common Skills to all classes. +2018.06.26 17:20:03,528 INFO 1 com.l2jmobius.gameserver.data.xml.impl.PetSkillData PetSkillData: Loaded 1046 skills. +2018.06.26 17:20:03,528 INFO 1 com.l2jmobius.gameserver.GameServer ---------------------------------------------------=[ Items ] +2018.06.26 17:20:03,771 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData EnchantItemGroupsData: Loaded: 4 item group templates. +2018.06.26 17:20:03,771 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData EnchantItemGroupsData: Loaded: 1 scroll group templates. +2018.06.26 17:20:03,785 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemData EnchantItemData: Loaded 244 Enchant Scrolls. +2018.06.26 17:20:03,786 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemData EnchantItemData: Loaded 100 Support Items. +2018.06.26 17:20:03,801 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemOptionsData EnchantItemOptionsData: Loaded: 51 Items and 1437 Options. +2018.06.26 17:20:03,819 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData ItemCrystallizationData: Loaded 12 crystallization templates. +2018.06.26 17:20:03,819 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData ItemCrystallizationData: Loaded 278 pre-defined crystallizable items. +2018.06.26 17:20:03,832 INFO 1 com.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData ItemCrystallizationData: Generated 5767 crystallizable items from templates. +2018.06.26 17:20:04,764 WARNING 20 com.l2jmobius.gameserver.Shutdown Server scheduled restart issued shutdown command. Restart in 1 seconds! +2018.06.26 17:20:05,092 INFO 1 com.l2jmobius.gameserver.data.xml.impl.OptionData OptionData: Loaded: 32989 Options. +2018.06.26 17:20:05,188 INFO 1 VariationData VariationData: Loaded 117 Variations. +2018.06.26 17:20:05,188 INFO 1 VariationData VariationData: Loaded 4694 Fees. +2018.06.26 17:20:05,206 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnsoulData EnsoulData: Loaded: 10 fees +2018.06.26 17:20:05,206 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnsoulData EnsoulData: Loaded: 742 options +2018.06.26 17:20:05,206 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnsoulData EnsoulData: Loaded: 104 stones +2018.06.26 17:20:05,208 INFO 1 com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData EnchantItemHPBonusData: Loaded 11 Enchant HP Bonuses. +2018.06.26 17:20:05,766 WARNING 520 com.l2jmobius.gameserver.Shutdown GM shutdown countdown is over. shutting down NOW! diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java index e6dda9919e..cf18572d41 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,61 +81,60 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -178,7 +177,6 @@ public final class Config public static long EFFECT_TICK_RATIO; public static boolean ENABLE_ALTER_SKILLS; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; @@ -410,7 +408,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -426,9 +423,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -491,7 +486,6 @@ public final class Config public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_RACE; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -556,18 +550,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -589,8 +571,6 @@ public final class Config public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int ABILITY_MAX_POINTS; public static long ABILITY_POINTS_RESET_ADENA; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -633,12 +613,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -664,7 +642,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -721,10 +698,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -780,15 +753,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Hardin (Agent of Chaos) // -------------------------------------------------- @@ -807,7 +771,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -840,22 +803,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -944,16 +891,12 @@ public final class Config // Anakim public static int ANAKIM_MIN_PLAYERS; public static int ANAKIM_MAX_PLAYERS; - public static int ANAKIM_SPAWN_INTERVAL; - public static int ANAKIM_SPAWN_RANDOM; public static int ANAKIM_MIN_PLAYER_LVL; public static int ANAKIM_MAX_PLAYER_LVL; // Lilith public static int LILITH_MIN_PLAYERS; public static int LILITH_MAX_PLAYERS; - public static int LILITH_SPAWN_INTERVAL; - public static int LILITH_SPAWN_RANDOM; public static int LILITH_MIN_PLAYER_LVL; public static int LILITH_MAX_PLAYER_LVL; @@ -964,14 +907,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1149,7 +1084,6 @@ public final class Config public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; - public static boolean COMMUNITYBOARD_COMBAT_DISABLED; public static boolean COMMUNITYBOARD_KARMA_DISABLED; public static boolean COMMUNITYBOARD_CAST_ANIMATIONS; public static boolean COMMUNITY_PREMIUM_SYSTEM_ENABLED; @@ -1557,7 +1491,6 @@ public final class Config EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); ENABLE_ALTER_SKILLS = Character.getBoolean("EnableAlterSkills", true); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); @@ -1623,45 +1556,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1782,7 +1677,7 @@ public final class Config SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true); PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000; ABILITY_MAX_POINTS = Character.getInt("AbilityMaxPoints", 16); - ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10_000_000); + ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10000000); // Load Telnet config file (if exists) final PropertiesParser telnetSettings = new PropertiesParser(TELNET_CONFIG_FILE); @@ -1826,7 +1721,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1842,9 +1736,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1903,7 +1795,6 @@ public final class Config EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_RACE = General.getBoolean("AllowRace", true); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1940,18 +1831,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1979,9 +1858,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -2010,12 +1886,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2207,7 +2081,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2357,22 +2230,20 @@ public final class Config ANAKIM_MIN_PLAYERS = GrandBossSettings.getInt("AnakimMinPlayers", 98); ANAKIM_MAX_PLAYERS = GrandBossSettings.getInt("AnakimMaxPlayers", 120); - ANAKIM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAnakimSpawn", 192); - ANAKIM_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAnakimSpawn", 148); ANAKIM_MIN_PLAYER_LVL = GrandBossSettings.getInt("AnakimMinPlayerLvl", 90); ANAKIM_MAX_PLAYER_LVL = GrandBossSettings.getInt("AnakimMaxPlayerLvl", 94); LILITH_MIN_PLAYERS = GrandBossSettings.getInt("LilithMinPlayers", 98); LILITH_MAX_PLAYERS = GrandBossSettings.getInt("LilithMaxPlayers", 120); - LILITH_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLilithSpawn", 192); - LILITH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLilithSpawn", 148); LILITH_MIN_PLAYER_LVL = GrandBossSettings.getInt("LilithMinPlayerLvl", 85); LILITH_MAX_PLAYER_LVL = GrandBossSettings.getInt("LilithMaxPlayerLvl", 89); + TRASKEN_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfTraskenSpawn", 264); TRASKEN_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfTraskenSpawn", 72); TRASKEN_MIN_PLAYERS = GrandBossSettings.getInt("TraskenMinPlayers", 49); TRASKEN_MAX_PLAYERS = GrandBossSettings.getInt("TraskenMaxPlayers", 112); TRASKEN_MIN_PLAYER_LVL = GrandBossSettings.getInt("TraskenMinPlayerLvl", 85); + LINDVIOR_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLindviorSpawn", 264); LINDVIOR_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLindviorSpawn", 72); LINDVIOR_MIN_PLAYERS = GrandBossSettings.getInt("LindviorMinPlayers", 49); @@ -2401,15 +2272,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2552,7 +2414,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); @@ -3009,7 +2870,7 @@ public final class Config * @param hexId the hexadecimal ID to store * @param fileName name of the config file */ - public static void saveHexid(int serverId, String hexId, String fileName) + private static void saveHexid(int serverId, String hexId, String fileName) { try { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/concurrent/ThreadPool.java index d157412b2e..932dcc2e4e 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameServer.java index b5b61f2ff8..c862d02f72 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameServer.java @@ -488,7 +488,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/Shutdown.java index dbaf36b403..72caae1c02 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/Shutdown.java @@ -60,10 +60,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 555223ce4f..8d2d8e65ee 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 2fc1234300..3dd467d653 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -253,7 +253,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/TradeList.java index 7d0fa18073..e31f0fb735 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/TradeList.java @@ -155,26 +155,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -310,7 +290,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -460,7 +440,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -546,7 +526,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -577,7 +557,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index b5355f61fa..0be7c93deb 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/SystemMessageId.java index f70c6b040d..daaf4fc9a4 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -15664,18 +15664,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Token.java index fdd2a6c469..0ce6e889b2 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index eb1e82aca0..49cce40137 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini index 9149e606dc..3641826a38 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini @@ -144,10 +144,6 @@ EnableAlterSkills = True # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -404,46 +400,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_3.0_Helios/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_3.0_Helios/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini index ce8f34ae39..52b2ea02c3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/General.ini b/L2J_Mobius_3.0_Helios/dist/game/config/General.ini index 66a7b6ba24..08b6846b63 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/General.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -386,10 +382,6 @@ AllowRace = False # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -526,55 +518,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -607,10 +551,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -701,17 +641,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/GrandBoss.ini b/L2J_Mobius_3.0_Helios/dist/game/config/GrandBoss.ini index 67ee84089e..662ca03ecd 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/GrandBoss.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/GrandBoss.ini @@ -106,12 +106,6 @@ KelbimMaxPlayers = 35 # Anakim # --------------------------------------------------------------------------- -# Interval time of Anakim. Value is hour. Range 1-480. Retail: 96 -IntervalOfAnakimSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfAnakimSpawn = 12 - # Minimal count of players for enter to Anakim. Retail: 98 AnakimMinPlayers = 98 @@ -128,12 +122,6 @@ AnakimMaxPlayerLvl = 94 # Lilith # --------------------------------------------------------------------------- -# Interval time of Lilith. Value is hour. Range 1-480. Retail: 96 -IntervalOfLilithSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfLilithSpawn = 12 - # Minimal count of players for enter to Lilith. Retail: 98 LilithMinPlayers = 98 diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini b/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/PVP.ini b/L2J_Mobius_3.0_Helios/dist/game/config/PVP.ini index 962b639e25..42e1b86335 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/PVP.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/PVP.ini @@ -54,10 +54,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/AbstractNpcAI.java index 5647db4178..7e6940700f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -20,14 +20,11 @@ import java.util.logging.Logger; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Util; /** @@ -76,27 +73,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java index 89517a5563..514a32a8f6 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java @@ -167,8 +167,12 @@ public final class Parade extends AbstractNpcAI return (dd * 1000) / 6; } - class Start implements Runnable + private class Start implements Runnable { + public Start() + { + } + @Override public void run() { @@ -179,8 +183,12 @@ public final class Parade extends AbstractNpcAI } } - class Spawn implements Runnable + private class Spawn implements Runnable { + public Spawn() + { + } + @Override public void run() { @@ -209,8 +217,12 @@ public final class Parade extends AbstractNpcAI } } - class Delete implements Runnable + private class Delete implements Runnable { + public Delete() + { + } + @Override public void run() { @@ -240,8 +252,12 @@ public final class Parade extends AbstractNpcAI } } - class Clean implements Runnable + private class Clean implements Runnable { + public Clean() + { + } + @Override public void run() { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java index 569eff3cfe..8265e5ee42 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java @@ -73,12 +73,16 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI return super.onAdvEvent(event, npc, player); } - public static final class zoneInfo + private static final class zoneInfo { private int currentPoints = 0; private int currentMonitorizedDamage = 0; private int zoneStage = 0; + public zoneInfo() + { + } + void setZoneStage(int a) { zoneStage = a; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java index f754247346..0f2bff21ca 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java @@ -122,7 +122,7 @@ public final class Alexandria extends AbstractNpcAI return htmltext; } - public static class AdditionalQuestItemHolder extends QuestItemHolder + private static class AdditionalQuestItemHolder extends QuestItemHolder { private final int _additionalId; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java index 3394c02a83..12ebfd6d42 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java @@ -16,6 +16,7 @@ */ package ai.bosses.Baylor; +import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Attackable; @@ -28,6 +29,7 @@ import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import instances.AbstractInstance; @@ -326,6 +328,20 @@ public final class BaylorWarzone extends AbstractInstance return super.onSpawn(npc); } + /** + * Broadcasts SocialAction packet to self and known players. + * @param character + * @param actionId + */ + private void broadcastSocialAction(L2Character character, int actionId) + { + final SocialAction action = new SocialAction(character.getObjectId(), actionId); + L2World.getInstance().forEachVisibleObject(character, L2PcInstance.class, player -> + { + player.sendPacket(action); + }); + } + public static void main(String[] args) { new BaylorWarzone(); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Helios/Helios.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Helios/Helios.java index 26bed21dfa..3b63c98c25 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Helios/Helios.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Helios/Helios.java @@ -50,7 +50,7 @@ public class Helios extends AbstractNpcAI // Misc private static final int HELIOS_RAID_DURATION = 5; // hours private static L2Npc bossInstance; - protected L2NoSummonFriendZone bossZone; + private final L2NoSummonFriendZone bossZone; private Helios() { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java index 202e22b1f3..5698d410bf 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java @@ -70,17 +70,21 @@ public final class Stage1 extends AbstractInstance implements IGameXmlReader { Logger LOGGER = Logger.getLogger(Stage1.class.getName()); - protected static class SODSpawn + private static class SODSpawn { - public boolean isZone = false; - public boolean isNeededNextFlag = false; - public int npcId; - public int x = 0; - public int y = 0; - public int z = 0; - public int h = 0; - public int zone = 0; - public int count = 0; + public SODSpawn() + { + } + + boolean isZone = false; + boolean isNeededNextFlag = false; + int npcId; + int x = 0; + int y = 0; + int z = 0; + int h = 0; + int zone = 0; + int count = 0; } // Spawn data diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java index 819ba28b77..07ad6456c8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferAI implements Runnable +class NpcBufferAI implements Runnable { private static final Logger LOGGER = Logger.getLogger(NpcBufferAI.class.getName()); private final L2Npc _npc; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java index 8c6526ebdf..690989cdb2 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java @@ -22,12 +22,12 @@ import java.util.List; /** * @author UnAfraid */ -public class NpcBufferData +class NpcBufferData { private final int _id; private final List _skills = new ArrayList<>(); - public NpcBufferData(int id) + NpcBufferData(int id) { _id = id; } @@ -37,7 +37,7 @@ public class NpcBufferData return _id; } - public void addSkill(NpcBufferSkillData skill) + void addSkill(NpcBufferSkillData skill) { _skills.add(skill); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java index 89d2849d16..beeab264fa 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java @@ -23,13 +23,13 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferSkillData +class NpcBufferSkillData { private final SkillHolder _skill; private final int _scaleToLevel; private final int _initialDelay; - public NpcBufferSkillData(StatsSet set) + NpcBufferSkillData(StatsSet set) { _skill = new SkillHolder(set.getInt("id"), set.getInt("level")); _scaleToLevel = set.getInt("scaleToLevel", -1); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java index a4efa3ad36..b0287e1df6 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.StatsSet; /** * @author UnAfraid */ -public class NpcBuffersData implements IGameXmlReader +class NpcBuffersData implements IGameXmlReader { private static final Logger LOGGER = Logger.getLogger(NpcBuffersData.class.getName()); @@ -93,7 +93,7 @@ public class NpcBuffersData implements IGameXmlReader } } - public NpcBufferData getNpcBuffer(int npcId) + NpcBufferData getNpcBuffer(int npcId) { return _npcBuffers.get(npcId); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java index 51fee14634..062f23e081 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java @@ -37,7 +37,7 @@ public class AdminMonsterRace implements IAdminCommandHandler "admin_mons" }; - protected static int state = -1; + static int state = -1; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) @@ -112,7 +112,7 @@ public class AdminMonsterRace implements IAdminCommandHandler } - class RunRace implements Runnable + private class RunRace implements Runnable { private final int[][] codes; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index b937970ce0..407536b247 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 59491ae669..deec365bc4 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index b526b6c4fc..06c96aa2ae 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -95,20 +95,6 @@ public final class AirBind extends AbstractEffect @Override public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) - { - airBind(effector, effected); - } - - @Override - public void onExit(L2Character effector, L2Character effected, Skill skill) - { - if (!effected.isPlayer()) - { - effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); - } - } - - public void airBind(L2Character effector, L2Character effected) { for (L2PcInstance nearbyPlayer : L2World.getInstance().getVisibleObjects(effected, L2PcInstance.class, 1200)) { @@ -123,4 +109,13 @@ public final class AirBind extends AbstractEffect } } } + + @Override + public void onExit(L2Character effector, L2Character effected, Skill skill) + { + if (!effected.isPlayer()) + { + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); + } + } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index d94354ed72..09813f2027 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -148,7 +148,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java index 48f101724b..679858aa00 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java @@ -112,7 +112,7 @@ public final class TalkingIslandPast extends AbstractInstance return super.onExitZone(character, zone); } - public void onCreatureSee(OnCreatureSee event) + private void onCreatureSee(OnCreatureSee event) { final L2Character creature = event.getSeen(); final L2Npc npc = (L2Npc) event.getSeer(); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java index d1626b7a35..db9aefdc96 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java @@ -30,12 +30,12 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00180_InfernalFlamesBurningInCrystalPrison extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int BAYLOR = 29213; + private static final int BAYLOR = 29213; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Quest Item private static final int BELETH_MARK = 17591; // Item diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java index bf65153e22..873f31f318 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java @@ -26,12 +26,12 @@ import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.util.Util; /** - * @hlwrave + * @author hlwrave * @URL https://l2wiki.com/Devils_Strike_Back,_Advent_of_Balok */ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest { - // Npc + // NPC private static final int FIOREN = 33044; // Monster private static final int BALOK = 29218; @@ -41,7 +41,7 @@ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest private static final int EWR = 17526; private static final int POUCH = 34861; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; public Q00181_DevilsStrikeBackAdventOfBalok() { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java index 76ba5a82dc..6be0c2486f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java @@ -33,7 +33,7 @@ public class Q00254_LegendaryTales extends Quest private static final int GILMORE = 30754; // Monsters - public enum Bosses + private enum Bosses { EMERALD_HORN(25718), DUST_RIDER(25719), diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java index 132b885349..5e36ea3918 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java @@ -31,10 +31,10 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00465_WeAreFriends extends Quest { - // Npc - public static final int FAIRY_CITIZEN = 32921; - public static final int FAIRY_CITIZEN_SPAWN = 32923; - // item + // NPCs + private static final int FAIRY_CITIZEN = 32921; + private static final int FAIRY_CITIZEN_SPAWN = 32923; + // Item private static final int MARK_OF_FRIENDSHIP = 17377; private static final int FAIRY_LEAF_FLUTE = 17378; private static final int CERTIFICATE_OF_PROMISE = 30384; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java index 57e97aff33..802a78cbf4 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java @@ -35,8 +35,8 @@ public class Q00466_PlacingMySmallPower extends Quest { // NPCs private static final int ASTERIOS = 30154; - public static final int NOETI_MIMILEAD = 32895; - public static final int[] COCON = + private static final int NOETI_MIMILEAD = 32895; + private static final int[] COCON = { 19394 // Large Cocoon }; @@ -60,13 +60,13 @@ public class Q00466_PlacingMySmallPower extends Quest 22878 // Fairy Rogue }; // Items - public static final int FAIRY_WING = 17597; - public static final int COCOON_FRAGMENT = 17598; - public static final int KIMERIANS_BREATH = 17599; - public static final int TEMINIELS_TONIC = 17596; - public static final int TONIC_RECIPE = 17603; + private static final int FAIRY_WING = 17597; + private static final int COCOON_FRAGMENT = 17598; + private static final int KIMERIANS_BREATH = 17599; + private static final int TEMINIELS_TONIC = 17596; + private static final int TONIC_RECIPE = 17603; // Reward - public static final int CERTIFICATE_OF_PROMISE = 30384; + private static final int CERTIFICATE_OF_PROMISE = 30384; // Misc private static final int MIN_LEVEL = 90; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java index b3f89230f0..287476a017 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java @@ -34,8 +34,8 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00469_SuspiciousGardener extends Quest { - // Npc - public static final int GOFINA = 33031; + // NPC + private static final int GOFINA = 33031; // Monsters private static final int APHERIUS_LOOKOUT_BEWILDERED = 22964; // Items diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java index bed461aa18..a2e7b2168d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00471_BreakingThroughTheEmeraldSquare extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int EMABIFI = 25881; + private static final int EMABIFI = 25881; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Items - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00471_BreakingThroughTheEmeraldSquare() { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java index f391c3e2b1..a0f701944a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00472_ChallengeSteamCorridor extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int KECHI = 25532; + private static final int KECHI = 25532; // Mis - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00472_ChallengeSteamCorridor() { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java index 608f73b337..444fa47400 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java @@ -26,18 +26,18 @@ import com.l2jmobius.gameserver.util.Util; /** * @author hlwrave - * @URL: https://l2wiki.com/In_the_Coral_Garden + * @URL https://l2wiki.com/In_the_Coral_Garden */ public class Q00473_InTheCoralGarden extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int MICHAEL = 25799; + private static final int MICHAEL = 25799; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00473_InTheCoralGarden() { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java index 11a1593e41..45fc3aa169 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java @@ -31,9 +31,9 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00483_IntendedTactic extends Quest { - // Npc - public static final int ENDE = 33357; - // Mobs + // NPC + private static final int ENDE = 33357; + // Monsters private static final int[] MOBS = { 23069, // Vladimir's Warrior @@ -50,7 +50,7 @@ public class Q00483_IntendedTactic extends Quest 25811, // Lazearth 25815 // Ken }; - // items + // Items private static final int LOYAL_SERVANS_BLOOD = 17736; private static final int TRUTTHFUL_ONES_BLOOD = 17737; private static final int TOKEN_OF_INSOLENCE_TOWER = 17624; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java index 135edbc233..7cdab9fd02 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java @@ -287,7 +287,7 @@ public class Q00663_SeductiveWhispers extends Quest return event; } - public String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) + private String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) { boolean isPlayerWin = false; boolean isNpcWin = false; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java index 547652d4b0..e10c113de7 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java @@ -43,7 +43,7 @@ public final class Q10292_SevenSignsGirlOfDoubt extends Quest private static final ItemHolder ELCADIAS_MARK = new ItemHolder(17226, 10); // Misc private static final int MIN_LEVEL = 81; - boolean isBusy = false; + private boolean isBusy = false; // Monster private static final int CREATURE_OF_THE_DUSK1 = 27422; private static final int CREATURE_OF_THE_DUSK2 = 27424; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java index 89c68608d2..84350c9ab8 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java @@ -444,7 +444,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest return htmltext; } - public boolean hasCheckedAllRightBooks(QuestState qs) + private boolean hasCheckedAllRightBooks(QuestState qs) { return ((qs.getInt("good1") == 1) && (qs.getInt("good2") == 1) && (qs.getInt("good3") == 1) && (qs.getInt("good4") == 1)); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java index b0d144d1c7..deb26e3b82 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java @@ -35,8 +35,8 @@ import com.l2jmobius.gameserver.model.quest.State; public final class Q10353_CertificationOfValue extends Quest { // NPCs - public static final int RIEYI = 33155; - public static final int KYUORI = 33358; + private static final int RIEYI = 33155; + private static final int KYUORI = 33358; private static final int DUMMY_MONSTER = 33349; private static final int[] MONSTERS = { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java index 75cf7b998b..736d36cd68 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java @@ -658,7 +658,7 @@ public final class Q10369_NoblesseSoulTesting extends Quest return super.onFirstTalk(npc, player); } - public boolean canProgress(L2PcInstance player) + private boolean canProgress(L2PcInstance player) { return ((player.getLevel() > MIN_LEVEL) && player.isSubClassActive()); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/vehicles/AirShipController.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/vehicles/AirShipController.java index 623b41de9f..ca2a930497 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/vehicles/AirShipController.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/vehicles/AirShipController.java @@ -43,8 +43,12 @@ import ai.AbstractNpcAI; public abstract class AirShipController extends AbstractNpcAI { - protected final class DecayTask implements Runnable + private final class DecayTask implements Runnable { + public DecayTask() + { + } + @Override public void run() { @@ -55,8 +59,12 @@ public abstract class AirShipController extends AbstractNpcAI } } - protected final class DepartTask implements Runnable + private final class DepartTask implements Runnable { + public DepartTask() + { + } + @Override public void run() { @@ -74,14 +82,14 @@ public abstract class AirShipController extends AbstractNpcAI } } - public static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); protected int _dockZone = 0; protected int _shipSpawnX = 0; protected int _shipSpawnY = 0; protected int _shipSpawnZ = 0; - protected int _shipHeading = 0; + private final int _shipHeading = 0; protected Location _oustLoc = null; protected int _locationId = 0; @@ -94,8 +102,8 @@ public abstract class AirShipController extends AbstractNpcAI protected Movie _movie = null; - protected boolean _isBusy = false; - protected L2ControllableAirShipInstance _dockedShip = null; + private boolean _isBusy = false; + L2ControllableAirShipInstance _dockedShip = null; private final Runnable _decayTask = new DecayTask(); private final Runnable _departTask = new DepartTask(); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java index 921357932c..20d45999b1 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,61 +81,60 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -178,7 +177,6 @@ public final class Config public static long EFFECT_TICK_RATIO; public static boolean ENABLE_ALTER_SKILLS; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; @@ -410,7 +408,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -426,9 +423,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -491,7 +486,6 @@ public final class Config public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_RACE; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -556,18 +550,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -589,8 +571,6 @@ public final class Config public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int ABILITY_MAX_POINTS; public static long ABILITY_POINTS_RESET_ADENA; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -633,12 +613,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -664,7 +642,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -722,10 +699,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -781,15 +754,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Hardin (Agent of Chaos) // -------------------------------------------------- @@ -808,7 +772,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -841,22 +804,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -945,16 +892,12 @@ public final class Config // Anakim public static int ANAKIM_MIN_PLAYERS; public static int ANAKIM_MAX_PLAYERS; - public static int ANAKIM_SPAWN_INTERVAL; - public static int ANAKIM_SPAWN_RANDOM; public static int ANAKIM_MIN_PLAYER_LVL; public static int ANAKIM_MAX_PLAYER_LVL; // Lilith public static int LILITH_MIN_PLAYERS; public static int LILITH_MAX_PLAYERS; - public static int LILITH_SPAWN_INTERVAL; - public static int LILITH_SPAWN_RANDOM; public static int LILITH_MIN_PLAYER_LVL; public static int LILITH_MAX_PLAYER_LVL; @@ -972,14 +915,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1157,7 +1092,6 @@ public final class Config public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; - public static boolean COMMUNITYBOARD_COMBAT_DISABLED; public static boolean COMMUNITYBOARD_KARMA_DISABLED; public static boolean COMMUNITYBOARD_CAST_ANIMATIONS; public static boolean COMMUNITY_PREMIUM_SYSTEM_ENABLED; @@ -1565,7 +1499,6 @@ public final class Config EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); ENABLE_ALTER_SKILLS = Character.getBoolean("EnableAlterSkills", true); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); @@ -1631,45 +1564,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1790,7 +1685,7 @@ public final class Config SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true); PLAYER_MOVEMENT_BLOCK_TIME = Character.getInt("NpcTalkBlockingTime", 0) * 1000; ABILITY_MAX_POINTS = Character.getInt("AbilityMaxPoints", 16); - ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10_000_000); + ABILITY_POINTS_RESET_ADENA = Character.getLong("AbilityPointsResetAdena", 10000000); // Load Telnet config file (if exists) final PropertiesParser telnetSettings = new PropertiesParser(TELNET_CONFIG_FILE); @@ -1834,7 +1729,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1850,9 +1744,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1911,7 +1803,6 @@ public final class Config EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_RACE = General.getBoolean("AllowRace", true); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1948,18 +1839,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1987,9 +1866,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -2018,12 +1894,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2216,7 +2090,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2366,15 +2239,11 @@ public final class Config ANAKIM_MIN_PLAYERS = GrandBossSettings.getInt("AnakimMinPlayers", 98); ANAKIM_MAX_PLAYERS = GrandBossSettings.getInt("AnakimMaxPlayers", 120); - ANAKIM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAnakimSpawn", 192); - ANAKIM_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAnakimSpawn", 148); ANAKIM_MIN_PLAYER_LVL = GrandBossSettings.getInt("AnakimMinPlayerLvl", 90); ANAKIM_MAX_PLAYER_LVL = GrandBossSettings.getInt("AnakimMaxPlayerLvl", 94); LILITH_MIN_PLAYERS = GrandBossSettings.getInt("LilithMinPlayers", 98); LILITH_MAX_PLAYERS = GrandBossSettings.getInt("LilithMaxPlayers", 120); - LILITH_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLilithSpawn", 192); - LILITH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLilithSpawn", 148); LILITH_MIN_PLAYER_LVL = GrandBossSettings.getInt("LilithMinPlayerLvl", 85); LILITH_MAX_PLAYER_LVL = GrandBossSettings.getInt("LilithMaxPlayerLvl", 89); @@ -2418,15 +2287,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2569,7 +2429,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); @@ -3026,7 +2885,7 @@ public final class Config * @param hexId the hexadecimal ID to store * @param fileName name of the config file */ - public static void saveHexid(int serverId, String hexId, String fileName) + private static void saveHexid(int serverId, String hexId, String fileName) { try { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/concurrent/ThreadPool.java index d157412b2e..932dcc2e4e 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameServer.java index b5b61f2ff8..c862d02f72 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameServer.java @@ -488,7 +488,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/Shutdown.java index dbaf36b403..72caae1c02 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/Shutdown.java @@ -60,10 +60,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 555223ce4f..8d2d8e65ee 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 2fc1234300..3dd467d653 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -253,7 +253,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/TradeList.java index 7d0fa18073..e31f0fb735 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/TradeList.java @@ -155,26 +155,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -310,7 +290,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -460,7 +440,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -546,7 +526,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -577,7 +557,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index b5355f61fa..0be7c93deb 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/SystemMessageId.java index e2818b3253..32ccfaa556 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -15892,18 +15892,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Token.java index fdd2a6c469..0ce6e889b2 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index eb1e82aca0..49cce40137 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini index 236de31490..7f96953409 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini @@ -144,10 +144,6 @@ EnableAlterSkills = True # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -404,46 +400,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. @@ -521,35 +477,11 @@ FameForDeadPlayers = True # Default: True CraftingEnabled = True -# Enable/Disable crafting of Masterwork items (If set to true, masterwork items can be created when crafting). -# Default: True -CraftMasterwork = True - # Limits for recipes # Default: 100, 100 DwarfRecipeLimit = 100 CommonRecipeLimit = 100 -# Alternative crafting rules. If enabled, the following will be true: -# Crafting takes time. -# Players get EXP/SP for crafting. -# Default: False -AltGameCreation = False - -# Crafting Time multiplier. -# The higher the number, the more time the crafting process takes. XP/SP reward increases with time. -# Default: 1 -AltGameCreationSpeed = 1 - -# Additional crafting XP/SP rate multiplier. -# Default: 1, 1 -AltGameCreationXpRate = 1 -AltGameCreationSpRate = 1 - -# Additional XP/SP rate multiplier when creating rare item. -# Default: 2 -AltGameCreationRareXpSpRate = 2 - # Store/Restore Dwarven Manufacture list # Keep manufacture shoplist after relog # Default: False diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini index ce8f34ae39..52b2ea02c3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini index 66a7b6ba24..08b6846b63 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -386,10 +382,6 @@ AllowRace = False # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -526,55 +518,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -607,10 +551,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -701,17 +641,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/GrandBoss.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/GrandBoss.ini index 67ee84089e..662ca03ecd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/GrandBoss.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/GrandBoss.ini @@ -106,12 +106,6 @@ KelbimMaxPlayers = 35 # Anakim # --------------------------------------------------------------------------- -# Interval time of Anakim. Value is hour. Range 1-480. Retail: 96 -IntervalOfAnakimSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfAnakimSpawn = 12 - # Minimal count of players for enter to Anakim. Retail: 98 AnakimMinPlayers = 98 @@ -128,12 +122,6 @@ AnakimMaxPlayerLvl = 94 # Lilith # --------------------------------------------------------------------------- -# Interval time of Lilith. Value is hour. Range 1-480. Retail: 96 -IntervalOfLilithSpawn = 96 - -# Random interval. Range 1-192. Retail: 12 -RandomOfLilithSpawn = 12 - # Minimal count of players for enter to Lilith. Retail: 98 LilithMinPlayers = 98 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/PVP.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/PVP.ini index 962b639e25..42e1b86335 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/PVP.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/PVP.ini @@ -54,10 +54,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/AbstractNpcAI.java index 5647db4178..7e6940700f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -20,14 +20,11 @@ import java.util.logging.Logger; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Util; /** @@ -76,27 +73,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java index 89517a5563..514a32a8f6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java @@ -167,8 +167,12 @@ public final class Parade extends AbstractNpcAI return (dd * 1000) / 6; } - class Start implements Runnable + private class Start implements Runnable { + public Start() + { + } + @Override public void run() { @@ -179,8 +183,12 @@ public final class Parade extends AbstractNpcAI } } - class Spawn implements Runnable + private class Spawn implements Runnable { + public Spawn() + { + } + @Override public void run() { @@ -209,8 +217,12 @@ public final class Parade extends AbstractNpcAI } } - class Delete implements Runnable + private class Delete implements Runnable { + public Delete() + { + } + @Override public void run() { @@ -240,8 +252,12 @@ public final class Parade extends AbstractNpcAI } } - class Clean implements Runnable + private class Clean implements Runnable { + public Clean() + { + } + @Override public void run() { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java index 569eff3cfe..8265e5ee42 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/HarnakUndergroundRuinsZone/HarnakUndergroundRuinsZone.java @@ -73,12 +73,16 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI return super.onAdvEvent(event, npc, player); } - public static final class zoneInfo + private static final class zoneInfo { private int currentPoints = 0; private int currentMonitorizedDamage = 0; private int zoneStage = 0; + public zoneInfo() + { + } + void setZoneStage(int a) { zoneStage = a; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java index f754247346..0f2bff21ca 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java @@ -122,7 +122,7 @@ public final class Alexandria extends AbstractNpcAI return htmltext; } - public static class AdditionalQuestItemHolder extends QuestItemHolder + private static class AdditionalQuestItemHolder extends QuestItemHolder { private final int _additionalId; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java index 3394c02a83..12ebfd6d42 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java @@ -16,6 +16,7 @@ */ package ai.bosses.Baylor; +import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Attackable; @@ -28,6 +29,7 @@ import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import instances.AbstractInstance; @@ -326,6 +328,20 @@ public final class BaylorWarzone extends AbstractInstance return super.onSpawn(npc); } + /** + * Broadcasts SocialAction packet to self and known players. + * @param character + * @param actionId + */ + private void broadcastSocialAction(L2Character character, int actionId) + { + final SocialAction action = new SocialAction(character.getObjectId(), actionId); + L2World.getInstance().forEachVisibleObject(character, L2PcInstance.class, player -> + { + player.sendPacket(action); + }); + } + public static void main(String[] args) { new BaylorWarzone(); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Helios/Helios.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Helios/Helios.java index 26bed21dfa..3b63c98c25 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Helios/Helios.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Helios/Helios.java @@ -50,7 +50,7 @@ public class Helios extends AbstractNpcAI // Misc private static final int HELIOS_RAID_DURATION = 5; // hours private static L2Npc bossInstance; - protected L2NoSummonFriendZone bossZone; + private final L2NoSummonFriendZone bossZone; private Helios() { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java index 202e22b1f3..5698d410bf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java @@ -70,17 +70,21 @@ public final class Stage1 extends AbstractInstance implements IGameXmlReader { Logger LOGGER = Logger.getLogger(Stage1.class.getName()); - protected static class SODSpawn + private static class SODSpawn { - public boolean isZone = false; - public boolean isNeededNextFlag = false; - public int npcId; - public int x = 0; - public int y = 0; - public int z = 0; - public int h = 0; - public int zone = 0; - public int count = 0; + public SODSpawn() + { + } + + boolean isZone = false; + boolean isNeededNextFlag = false; + int npcId; + int x = 0; + int y = 0; + int z = 0; + int h = 0; + int zone = 0; + int count = 0; } // Spawn data diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java index 819ba28b77..07ad6456c8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferAI implements Runnable +class NpcBufferAI implements Runnable { private static final Logger LOGGER = Logger.getLogger(NpcBufferAI.class.getName()); private final L2Npc _npc; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java index 8c6526ebdf..690989cdb2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferData.java @@ -22,12 +22,12 @@ import java.util.List; /** * @author UnAfraid */ -public class NpcBufferData +class NpcBufferData { private final int _id; private final List _skills = new ArrayList<>(); - public NpcBufferData(int id) + NpcBufferData(int id) { _id = id; } @@ -37,7 +37,7 @@ public class NpcBufferData return _id; } - public void addSkill(NpcBufferSkillData skill) + void addSkill(NpcBufferSkillData skill) { _skills.add(skill); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java index 89d2849d16..beeab264fa 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferSkillData.java @@ -23,13 +23,13 @@ import com.l2jmobius.gameserver.model.skills.Skill; /** * @author UnAfraid */ -public class NpcBufferSkillData +class NpcBufferSkillData { private final SkillHolder _skill; private final int _scaleToLevel; private final int _initialDelay; - public NpcBufferSkillData(StatsSet set) + NpcBufferSkillData(StatsSet set) { _skill = new SkillHolder(set.getInt("id"), set.getInt("level")); _scaleToLevel = set.getInt("scaleToLevel", -1); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java index a4efa3ad36..b0287e1df6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/NpcBuffers/NpcBuffersData.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.StatsSet; /** * @author UnAfraid */ -public class NpcBuffersData implements IGameXmlReader +class NpcBuffersData implements IGameXmlReader { private static final Logger LOGGER = Logger.getLogger(NpcBuffersData.class.getName()); @@ -93,7 +93,7 @@ public class NpcBuffersData implements IGameXmlReader } } - public NpcBufferData getNpcBuffer(int npcId) + NpcBufferData getNpcBuffer(int npcId) { return _npcBuffers.get(npcId); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java index 51fee14634..062f23e081 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMonsterRace.java @@ -37,7 +37,7 @@ public class AdminMonsterRace implements IAdminCommandHandler "admin_mons" }; - protected static int state = -1; + static int state = -1; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) @@ -112,7 +112,7 @@ public class AdminMonsterRace implements IAdminCommandHandler } - class RunRace implements Runnable + private class RunRace implements Runnable { private final int[][] codes; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 7a782b6004..00e59cc08c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index b937970ce0..407536b247 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 59491ae669..deec365bc4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java index b526b6c4fc..06c96aa2ae 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java @@ -95,20 +95,6 @@ public final class AirBind extends AbstractEffect @Override public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) - { - airBind(effector, effected); - } - - @Override - public void onExit(L2Character effector, L2Character effected, Skill skill) - { - if (!effected.isPlayer()) - { - effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); - } - } - - public void airBind(L2Character effector, L2Character effected) { for (L2PcInstance nearbyPlayer : L2World.getInstance().getVisibleObjects(effected, L2PcInstance.class, 1200)) { @@ -123,4 +109,13 @@ public final class AirBind extends AbstractEffect } } } + + @Override + public void onExit(L2Character effector, L2Character effected, Skill skill) + { + if (!effected.isPlayer()) + { + effected.getAI().notifyEvent(CtrlEvent.EVT_THINK); + } + } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index d94354ed72..09813f2027 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -148,7 +148,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java index 48f101724b..679858aa00 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/instances/TalkingIslandPast/TalkingIslandPast.java @@ -112,7 +112,7 @@ public final class TalkingIslandPast extends AbstractInstance return super.onExitZone(character, zone); } - public void onCreatureSee(OnCreatureSee event) + private void onCreatureSee(OnCreatureSee event) { final L2Character creature = event.getSeen(); final L2Npc npc = (L2Npc) event.getSeer(); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java index d1626b7a35..db9aefdc96 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00180_InfernalFlamesBurningInCrystalPrison/Q00180_InfernalFlamesBurningInCrystalPrison.java @@ -30,12 +30,12 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00180_InfernalFlamesBurningInCrystalPrison extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int BAYLOR = 29213; + private static final int BAYLOR = 29213; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Quest Item private static final int BELETH_MARK = 17591; // Item diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java index bf65153e22..873f31f318 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00181_DevilsStrikeBackAdventOfBalok/Q00181_DevilsStrikeBackAdventOfBalok.java @@ -26,12 +26,12 @@ import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.util.Util; /** - * @hlwrave + * @author hlwrave * @URL https://l2wiki.com/Devils_Strike_Back,_Advent_of_Balok */ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest { - // Npc + // NPC private static final int FIOREN = 33044; // Monster private static final int BALOK = 29218; @@ -41,7 +41,7 @@ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest private static final int EWR = 17526; private static final int POUCH = 34861; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; public Q00181_DevilsStrikeBackAdventOfBalok() { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java index 76ba5a82dc..6be0c2486f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00254_LegendaryTales/Q00254_LegendaryTales.java @@ -33,7 +33,7 @@ public class Q00254_LegendaryTales extends Quest private static final int GILMORE = 30754; // Monsters - public enum Bosses + private enum Bosses { EMERALD_HORN(25718), DUST_RIDER(25719), diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java index 132b885349..5e36ea3918 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00465_WeAreFriends/Q00465_WeAreFriends.java @@ -31,10 +31,10 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00465_WeAreFriends extends Quest { - // Npc - public static final int FAIRY_CITIZEN = 32921; - public static final int FAIRY_CITIZEN_SPAWN = 32923; - // item + // NPCs + private static final int FAIRY_CITIZEN = 32921; + private static final int FAIRY_CITIZEN_SPAWN = 32923; + // Item private static final int MARK_OF_FRIENDSHIP = 17377; private static final int FAIRY_LEAF_FLUTE = 17378; private static final int CERTIFICATE_OF_PROMISE = 30384; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java index 57e97aff33..802a78cbf4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java @@ -35,8 +35,8 @@ public class Q00466_PlacingMySmallPower extends Quest { // NPCs private static final int ASTERIOS = 30154; - public static final int NOETI_MIMILEAD = 32895; - public static final int[] COCON = + private static final int NOETI_MIMILEAD = 32895; + private static final int[] COCON = { 19394 // Large Cocoon }; @@ -60,13 +60,13 @@ public class Q00466_PlacingMySmallPower extends Quest 22878 // Fairy Rogue }; // Items - public static final int FAIRY_WING = 17597; - public static final int COCOON_FRAGMENT = 17598; - public static final int KIMERIANS_BREATH = 17599; - public static final int TEMINIELS_TONIC = 17596; - public static final int TONIC_RECIPE = 17603; + private static final int FAIRY_WING = 17597; + private static final int COCOON_FRAGMENT = 17598; + private static final int KIMERIANS_BREATH = 17599; + private static final int TEMINIELS_TONIC = 17596; + private static final int TONIC_RECIPE = 17603; // Reward - public static final int CERTIFICATE_OF_PROMISE = 30384; + private static final int CERTIFICATE_OF_PROMISE = 30384; // Misc private static final int MIN_LEVEL = 90; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java index b3f89230f0..287476a017 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00469_SuspiciousGardener/Q00469_SuspiciousGardener.java @@ -34,8 +34,8 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00469_SuspiciousGardener extends Quest { - // Npc - public static final int GOFINA = 33031; + // NPC + private static final int GOFINA = 33031; // Monsters private static final int APHERIUS_LOOKOUT_BEWILDERED = 22964; // Items diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java index bed461aa18..a2e7b2168d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00471_BreakingThroughTheEmeraldSquare/Q00471_BreakingThroughTheEmeraldSquare.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00471_BreakingThroughTheEmeraldSquare extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int EMABIFI = 25881; + private static final int EMABIFI = 25881; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Items - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00471_BreakingThroughTheEmeraldSquare() { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java index f391c3e2b1..a0f701944a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00472_ChallengeSteamCorridor/Q00472_ChallengeSteamCorridor.java @@ -30,14 +30,14 @@ import com.l2jmobius.gameserver.util.Util; */ public class Q00472_ChallengeSteamCorridor extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int KECHI = 25532; + private static final int KECHI = 25532; // Mis - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00472_ChallengeSteamCorridor() { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java index 608f73b337..444fa47400 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00473_InTheCoralGarden/Q00473_InTheCoralGarden.java @@ -26,18 +26,18 @@ import com.l2jmobius.gameserver.util.Util; /** * @author hlwrave - * @URL: https://l2wiki.com/In_the_Coral_Garden + * @URL https://l2wiki.com/In_the_Coral_Garden */ public class Q00473_InTheCoralGarden extends Quest { - // Npc - public static final int FIOREN = 33044; + // NPC + private static final int FIOREN = 33044; // Monster - public static final int MICHAEL = 25799; + private static final int MICHAEL = 25799; // Misc - public static final int MIN_LEVEL = 97; + private static final int MIN_LEVEL = 97; // Item - public static final int CERTIFICATE = 30387; + private static final int CERTIFICATE = 30387; public Q00473_InTheCoralGarden() { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java index 11a1593e41..45fc3aa169 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00483_IntendedTactic/Q00483_IntendedTactic.java @@ -31,9 +31,9 @@ import com.l2jmobius.gameserver.model.quest.State; */ public class Q00483_IntendedTactic extends Quest { - // Npc - public static final int ENDE = 33357; - // Mobs + // NPC + private static final int ENDE = 33357; + // Monsters private static final int[] MOBS = { 23069, // Vladimir's Warrior @@ -50,7 +50,7 @@ public class Q00483_IntendedTactic extends Quest 25811, // Lazearth 25815 // Ken }; - // items + // Items private static final int LOYAL_SERVANS_BLOOD = 17736; private static final int TRUTTHFUL_ONES_BLOOD = 17737; private static final int TOKEN_OF_INSOLENCE_TOWER = 17624; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java index 135edbc233..7cdab9fd02 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00663_SeductiveWhispers/Q00663_SeductiveWhispers.java @@ -287,7 +287,7 @@ public class Q00663_SeductiveWhispers extends Quest return event; } - public String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) + private String play(L2PcInstance player, boolean isPlayerTurn, boolean isPractice) { boolean isPlayerWin = false; boolean isNpcWin = false; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java index 547652d4b0..e10c113de7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10292_SevenSignsGirlOfDoubt/Q10292_SevenSignsGirlOfDoubt.java @@ -43,7 +43,7 @@ public final class Q10292_SevenSignsGirlOfDoubt extends Quest private static final ItemHolder ELCADIAS_MARK = new ItemHolder(17226, 10); // Misc private static final int MIN_LEVEL = 81; - boolean isBusy = false; + private boolean isBusy = false; // Monster private static final int CREATURE_OF_THE_DUSK1 = 27422; private static final int CREATURE_OF_THE_DUSK2 = 27424; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java index 89c68608d2..84350c9ab8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java @@ -444,7 +444,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest return htmltext; } - public boolean hasCheckedAllRightBooks(QuestState qs) + private boolean hasCheckedAllRightBooks(QuestState qs) { return ((qs.getInt("good1") == 1) && (qs.getInt("good2") == 1) && (qs.getInt("good3") == 1) && (qs.getInt("good4") == 1)); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java index b0d144d1c7..deb26e3b82 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10353_CertificationOfValue/Q10353_CertificationOfValue.java @@ -35,8 +35,8 @@ import com.l2jmobius.gameserver.model.quest.State; public final class Q10353_CertificationOfValue extends Quest { // NPCs - public static final int RIEYI = 33155; - public static final int KYUORI = 33358; + private static final int RIEYI = 33155; + private static final int KYUORI = 33358; private static final int DUMMY_MONSTER = 33349; private static final int[] MONSTERS = { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java index 75cf7b998b..736d36cd68 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10369_NoblesseSoulTesting/Q10369_NoblesseSoulTesting.java @@ -658,7 +658,7 @@ public final class Q10369_NoblesseSoulTesting extends Quest return super.onFirstTalk(npc, player); } - public boolean canProgress(L2PcInstance player) + private boolean canProgress(L2PcInstance player) { return ((player.getLevel() > MIN_LEVEL) && player.isSubClassActive()); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/vehicles/AirShipController.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/vehicles/AirShipController.java index 623b41de9f..ca2a930497 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/vehicles/AirShipController.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/vehicles/AirShipController.java @@ -43,8 +43,12 @@ import ai.AbstractNpcAI; public abstract class AirShipController extends AbstractNpcAI { - protected final class DecayTask implements Runnable + private final class DecayTask implements Runnable { + public DecayTask() + { + } + @Override public void run() { @@ -55,8 +59,12 @@ public abstract class AirShipController extends AbstractNpcAI } } - protected final class DepartTask implements Runnable + private final class DepartTask implements Runnable { + public DepartTask() + { + } + @Override public void run() { @@ -74,14 +82,14 @@ public abstract class AirShipController extends AbstractNpcAI } } - public static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AirShipController.class.getName()); protected int _dockZone = 0; protected int _shipSpawnX = 0; protected int _shipSpawnY = 0; protected int _shipSpawnZ = 0; - protected int _shipHeading = 0; + private final int _shipHeading = 0; protected Location _oustLoc = null; protected int _locationId = 0; @@ -94,8 +102,8 @@ public abstract class AirShipController extends AbstractNpcAI protected Movie _movie = null; - protected boolean _isBusy = false; - protected L2ControllableAirShipInstance _dockedShip = null; + private boolean _isBusy = false; + L2ControllableAirShipInstance _dockedShip = null; private final Runnable _decayTask = new DecayTask(); private final Runnable _departTask = new DepartTask(); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java index 5b72b901c6..65b0955c6e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,61 +81,60 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -178,7 +177,6 @@ public final class Config public static long EFFECT_TICK_RATIO; public static boolean ENABLE_ALTER_SKILLS; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; @@ -234,14 +232,8 @@ public final class Config public static int CASTLE_ZONE_FAME_AQUIRE_POINTS; public static boolean FAME_FOR_DEAD_PLAYERS; public static boolean IS_CRAFTING_ENABLED; - public static boolean CRAFT_MASTERWORK; public static int DWARF_RECIPE_LIMIT; public static int COMMON_RECIPE_LIMIT; - public static boolean ALT_GAME_CREATION; - public static double ALT_GAME_CREATION_SPEED; - public static double ALT_GAME_CREATION_XP_RATE; - public static double ALT_GAME_CREATION_RARE_XPSP_RATE; - public static double ALT_GAME_CREATION_SP_RATE; public static boolean ALT_CLAN_LEADER_INSTANT_ACTIVATION; public static int ALT_CLAN_JOIN_DAYS; public static int ALT_CLAN_CREATE_DAYS; @@ -410,7 +402,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -426,9 +417,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -491,7 +480,6 @@ public final class Config public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_RACE; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -556,18 +544,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -588,8 +564,6 @@ public final class Config public static boolean HBCE_FAIR_PLAY; public static int PLAYER_MOVEMENT_BLOCK_TIME; public static long ABILITY_POINTS_RESET_SP; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -632,12 +606,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -663,7 +635,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -721,10 +692,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -780,15 +747,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Hardin (Agent of Chaos) // -------------------------------------------------- @@ -807,7 +765,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -840,22 +797,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -944,16 +885,12 @@ public final class Config // Anakim public static int ANAKIM_MIN_PLAYERS; public static int ANAKIM_MAX_PLAYERS; - public static int ANAKIM_SPAWN_INTERVAL; - public static int ANAKIM_SPAWN_RANDOM; public static int ANAKIM_MIN_PLAYER_LVL; public static int ANAKIM_MAX_PLAYER_LVL; // Lilith public static int LILITH_MIN_PLAYERS; public static int LILITH_MAX_PLAYERS; - public static int LILITH_SPAWN_INTERVAL; - public static int LILITH_SPAWN_RANDOM; public static int LILITH_MIN_PLAYER_LVL; public static int LILITH_MAX_PLAYER_LVL; @@ -971,14 +908,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1156,7 +1085,6 @@ public final class Config public static int COMMUNITYBOARD_TELEPORT_PRICE; public static int COMMUNITYBOARD_BUFF_PRICE; public static int COMMUNITYBOARD_HEAL_PRICE; - public static boolean COMMUNITYBOARD_COMBAT_DISABLED; public static boolean COMMUNITYBOARD_KARMA_DISABLED; public static boolean COMMUNITYBOARD_CAST_ANIMATIONS; public static boolean COMMUNITY_PREMIUM_SYSTEM_ENABLED; @@ -1564,7 +1492,6 @@ public final class Config EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); ENABLE_ALTER_SKILLS = Character.getBoolean("EnableAlterSkills", true); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); @@ -1630,45 +1557,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1691,14 +1580,8 @@ public final class Config CASTLE_ZONE_FAME_AQUIRE_POINTS = Character.getInt("CastleZoneFameAquirePoints", 125); FAME_FOR_DEAD_PLAYERS = Character.getBoolean("FameForDeadPlayers", true); IS_CRAFTING_ENABLED = Character.getBoolean("CraftingEnabled", true); - CRAFT_MASTERWORK = Character.getBoolean("CraftMasterwork", true); DWARF_RECIPE_LIMIT = Character.getInt("DwarfRecipeLimit", 50); COMMON_RECIPE_LIMIT = Character.getInt("CommonRecipeLimit", 50); - ALT_GAME_CREATION = Character.getBoolean("AltGameCreation", false); - ALT_GAME_CREATION_SPEED = Character.getDouble("AltGameCreationSpeed", 1); - ALT_GAME_CREATION_XP_RATE = Character.getDouble("AltGameCreationXpRate", 1); - ALT_GAME_CREATION_SP_RATE = Character.getDouble("AltGameCreationSpRate", 1); - ALT_GAME_CREATION_RARE_XPSP_RATE = Character.getDouble("AltGameCreationRareXpSpRate", 2); ALT_CLAN_LEADER_INSTANT_ACTIVATION = Character.getBoolean("AltClanLeaderInstantActivation", false); ALT_CLAN_JOIN_DAYS = Character.getInt("DaysBeforeJoinAClan", 1); ALT_CLAN_CREATE_DAYS = Character.getInt("DaysBeforeCreateAClan", 10); @@ -1832,7 +1715,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1848,9 +1730,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1909,7 +1789,6 @@ public final class Config EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_RACE = General.getBoolean("AllowRace", true); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1946,18 +1825,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1985,9 +1852,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -2016,12 +1880,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2214,7 +2076,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2364,15 +2225,11 @@ public final class Config ANAKIM_MIN_PLAYERS = GrandBossSettings.getInt("AnakimMinPlayers", 98); ANAKIM_MAX_PLAYERS = GrandBossSettings.getInt("AnakimMaxPlayers", 120); - ANAKIM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAnakimSpawn", 192); - ANAKIM_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAnakimSpawn", 148); ANAKIM_MIN_PLAYER_LVL = GrandBossSettings.getInt("AnakimMinPlayerLvl", 90); ANAKIM_MAX_PLAYER_LVL = GrandBossSettings.getInt("AnakimMaxPlayerLvl", 94); LILITH_MIN_PLAYERS = GrandBossSettings.getInt("LilithMinPlayers", 98); LILITH_MAX_PLAYERS = GrandBossSettings.getInt("LilithMaxPlayers", 120); - LILITH_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfLilithSpawn", 192); - LILITH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfLilithSpawn", 148); LILITH_MIN_PLAYER_LVL = GrandBossSettings.getInt("LilithMinPlayerLvl", 85); LILITH_MAX_PLAYER_LVL = GrandBossSettings.getInt("LilithMaxPlayerLvl", 89); @@ -2416,15 +2273,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2567,7 +2415,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); @@ -3024,7 +2871,7 @@ public final class Config * @param hexId the hexadecimal ID to store * @param fileName name of the config file */ - public static void saveHexid(int serverId, String hexId, String fileName) + private static void saveHexid(int serverId, String hexId, String fileName) { try { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/concurrent/ThreadPool.java index d157412b2e..932dcc2e4e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java index ecefdbcc03..8fdea9f184 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameServer.java @@ -488,7 +488,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/Shutdown.java index dbaf36b403..72caae1c02 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/Shutdown.java @@ -60,10 +60,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 953b0211c9..c61ba4dc54 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 2fc1234300..3dd467d653 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -253,7 +253,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/TradeList.java index e9a73532b4..cbdb625d6c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/TradeList.java @@ -157,26 +157,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -312,7 +292,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -462,7 +442,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -548,7 +528,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -579,7 +559,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index 05ce165be8..9bed4a3870 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/SystemMessageId.java index e207ca85a4..1ea63df3fe 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -16234,18 +16234,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index 4afbb96199..a7f93dd2f7 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Token.java index fdd2a6c469..0ce6e889b2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index eb1e82aca0..49cce40137 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java index 115d68e53c..8afea20f69 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/Config.java @@ -56,59 +56,59 @@ public final class Config // -------------------------------------------------- // standard - public static final String FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; + private static final String FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; // head - public static final String ALT_SETTINGS_CONFIG_FILE = "./config/main/altsettings.ini"; - public static final String CLANHALL_CONFIG_FILE = "./config/main/clanhall.ini"; - public static final String ENCHANT_CONFIG_FILE = "./config/main/enchant.ini"; + private static final String ALT_SETTINGS_CONFIG_FILE = "./config/main/altsettings.ini"; + private static final String CLANHALL_CONFIG_FILE = "./config/main/clanhall.ini"; + private static final String ENCHANT_CONFIG_FILE = "./config/main/enchant.ini"; public static final String FORTSIEGE_CONFIG_FILE = "./config/main/fort.ini"; - public static final String GEODATA_CONFIG_FILE = "./config/main/geodata.ini"; - public static final String OLYMP_CONFIG_FILE = "./config/main/olympiad.ini"; - public static final String OPTIONS_CONFIG_FILE = "./config/main/options.ini"; - public static final String OTHER_CONFIG_FILE = "./config/main/other.ini"; - public static final String RATES_CONFIG_FILE = "./config/main/rates.ini"; - public static final String SEVENSIGNS_CONFIG_FILE = "./config/main/sevensigns.ini"; + private static final String GEODATA_CONFIG_FILE = "./config/main/geodata.ini"; + private static final String OLYMP_CONFIG_FILE = "./config/main/olympiad.ini"; + private static final String OPTIONS_CONFIG_FILE = "./config/main/options.ini"; + private static final String OTHER_CONFIG_FILE = "./config/main/other.ini"; + private static final String RATES_CONFIG_FILE = "./config/main/rates.ini"; + private static final String SEVENSIGNS_CONFIG_FILE = "./config/main/sevensigns.ini"; public static final String SIEGE_CONFIG_FILE = "./config/main/siege.ini"; - public static final String ELIT_CLANHALL_CONFIG_FILE = "./config/main/eliteclanhall.ini"; - public static final String BOSS_CONFIG_FILE = "./config/main/boss.ini"; - public static final String ACCESS_CONFIG_FILE = "./config/main/access.ini"; - public static final String CRAFTING_CONFIG_FILE = "./config/main/crafting.ini"; - public static final String DEVELOPER_CONFIG_FILE = "./config/main/developer.ini"; - public static final String PHYSICS_CONFIG_FILE = "./config/main/physics.ini"; - public static final String PVP_CONFIG_FILE = "./config/main/pvp.ini"; + private static final String ELIT_CLANHALL_CONFIG_FILE = "./config/main/eliteclanhall.ini"; + private static final String BOSS_CONFIG_FILE = "./config/main/boss.ini"; + private static final String ACCESS_CONFIG_FILE = "./config/main/access.ini"; + private static final String CRAFTING_CONFIG_FILE = "./config/main/crafting.ini"; + private static final String DEVELOPER_CONFIG_FILE = "./config/main/developer.ini"; + private static final String PHYSICS_CONFIG_FILE = "./config/main/physics.ini"; + private static final String PVP_CONFIG_FILE = "./config/main/pvp.ini"; public static final String CLASS_DAMAGE_CONFIG_FILE = "./config/main/classDamage.ini"; // protected - public static final String PROTECT_FLOOD_CONFIG_FILE = "./config/protected/flood.ini"; - public static final String PROTECT_OTHER_CONFIG_FILE = "./config/protected/other.ini"; - public static final String ID_CONFIG_FILE = "./config/protected/idfactory.ini"; - public static final String EXTENDER_CONFIG_FILE = "./config/protected/extender.ini"; - public static final String SCRIPT_CONFIG_FILE = "./config/protected/script.ini"; - public static final String DAEMONS_CONFIG_FILE = "./config/protected/daemons.ini"; + private static final String PROTECT_FLOOD_CONFIG_FILE = "./config/protected/flood.ini"; + private static final String PROTECT_OTHER_CONFIG_FILE = "./config/protected/other.ini"; + private static final String ID_CONFIG_FILE = "./config/protected/idfactory.ini"; + private static final String EXTENDER_CONFIG_FILE = "./config/protected/extender.ini"; + private static final String SCRIPT_CONFIG_FILE = "./config/protected/script.ini"; + private static final String DAEMONS_CONFIG_FILE = "./config/protected/daemons.ini"; public static final String TELNET_CONFIG_FILE = "./config/protected/telnet.ini"; // events - public static final String EVENT_CTF_CONFIG_FILE = "./config/events/ctf.ini"; - public static final String EVENT_DM_CONFIG_FILE = "./config/events/dm.ini"; - public static final String EVENT_TVT_CONFIG_FILE = "./config/events/tvt.ini"; - public static final String EVENT_TW_CONFIG_FILE = "./config/events/tw.ini"; - public static final String EVENT_PC_BANG_POINT_CONFIG_FILE = "./config/events/pcBang.ini"; + private static final String EVENT_CTF_CONFIG_FILE = "./config/events/ctf.ini"; + private static final String EVENT_DM_CONFIG_FILE = "./config/events/dm.ini"; + private static final String EVENT_TVT_CONFIG_FILE = "./config/events/tvt.ini"; + private static final String EVENT_TW_CONFIG_FILE = "./config/events/tw.ini"; + private static final String EVENT_PC_BANG_POINT_CONFIG_FILE = "./config/events/pcBang.ini"; // custom - public static final String CUSTOM_SERVER_CONFIG_FILE = "./config/custom/customserver.ini"; - public static final String AWAY_CONFIG_FILE = "./config/custom/away.ini"; - public static final String BANK_CONFIG_FILE = "./config/custom/bank.ini"; - public static final String BUFFER_CONFIG_FILE = "./config/custom/buffer.ini"; - public static final String EVENT_CHAMPION_CONFIG_FILE = "./config/custom/champion.ini"; - public static final String EVENT_REBIRTH_CONFIG_FILE = "./config/custom/rebirth.ini"; - public static final String EVENT_WEDDING_CONFIG_FILE = "./config/custom/wedding.ini"; - public static final String OFFLINE_CONFIG_FILE = "./config/custom/offline.ini"; + private static final String CUSTOM_SERVER_CONFIG_FILE = "./config/custom/customserver.ini"; + private static final String AWAY_CONFIG_FILE = "./config/custom/away.ini"; + private static final String BANK_CONFIG_FILE = "./config/custom/bank.ini"; + private static final String BUFFER_CONFIG_FILE = "./config/custom/buffer.ini"; + private static final String EVENT_CHAMPION_CONFIG_FILE = "./config/custom/champion.ini"; + private static final String EVENT_REBIRTH_CONFIG_FILE = "./config/custom/rebirth.ini"; + private static final String EVENT_WEDDING_CONFIG_FILE = "./config/custom/wedding.ini"; + private static final String OFFLINE_CONFIG_FILE = "./config/custom/offline.ini"; // network - public static final String SERVER_CONFIG_FILE = "./config/network/gameserver.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/network/loginserver.ini"; + private static final String SERVER_CONFIG_FILE = "./config/network/gameserver.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/network/loginserver.ini"; // others - public static final String BANNED_IP_FILE = "./config/others/banned_ip.cfg"; + private static final String BANNED_IP_FILE = "./config/others/banned_ip.cfg"; public static final String SERVER_NAME_FILE = "./config/others/servername.xml"; // legacy - public static final String LEGACY_BANNED_IP = "./config/banned_ip.cfg"; + private static final String LEGACY_BANNED_IP = "./config/banned_ip.cfg"; // -------------------------------------------------- // Constants diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/concurrent/ThreadPool.java index d157412b2e..932dcc2e4e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/IPSubnet.java index bef13b872f..7d75c052de 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/frmAbout.java index 0f5502129a..51a219f4a7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -122,7 +122,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 2404114904..53da626eba 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index 77083d79af..9045a2ae7a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -40,7 +40,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index 6b43ebdc88..2071d4e874 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index ff808167be..17a7407200 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -53,16 +53,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 6472a9dcb7..c645b87598 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -60,7 +60,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 683dcad3f8..80dfe464e9 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -57,7 +57,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java index cc9278206a..b7ebb0ab71 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/Config.java @@ -80,28 +80,28 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; public static final String TW_CONFIG_FILE = "./config/TerritoryWar.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/concurrent/ThreadPool.java index 7cf193d83a..d812c4ed7d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/IPSubnet.java index 76d4316a77..5fcc947371 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index 02081a7db0..9339db1a52 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/FortUpdater.java index 735a8fac42..17ee5bcf7c 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameServer.java index 7a85ea0f07..9d3df4f489 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameServer.java @@ -489,7 +489,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameTimeController.java index 8327f4e3a9..13123f1744 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index eb04ec076d..90030892dc 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/Shutdown.java index 60c1b88422..2d0a42792f 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/Shutdown.java @@ -62,10 +62,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 654bb1d654..9fa409ed29 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -39,14 +39,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 14d720d07c..d52e685a05 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index 424ef40350..4d9519ede9 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 250e16a8e1..9e58991580 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/engines/items/Item.java index b108cbc07a..ea66d6cdd1 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 07f89c1609..98be2ed443 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.model.L2Object; import com.l2jmobius.gameserver.model.L2World; @@ -382,200 +379,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 4f61d7e46c..8918b5c073 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/TradeList.java index 94618423c6..d8d5e33cf6 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/TradeList.java @@ -157,26 +157,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -312,7 +292,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -456,7 +436,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -542,7 +522,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -573,7 +553,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index ae15645108..ada6177a88 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index 547fe49c48..f4f100a74b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index 79d0bf64f3..d1bfa84d97 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index b091d1e065..c5987d8d0a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -55,12 +55,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -78,13 +78,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -158,7 +158,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -187,7 +187,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -328,7 +328,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -364,7 +364,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index f373b8fb9f..5866a6be88 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 1dbccf6547..90d529acfe 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 346650ee4b..081db9155b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini index 8d77370153..f33d2d3ff9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini @@ -136,10 +136,6 @@ EffectTickRatio = 666 # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -359,46 +355,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/CommunityBoard.ini index 18a84cc6c4..d39ebfbc71 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini index 1704819e88..a5aa25cb84 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -383,10 +379,6 @@ DefaultFinishTime = 5 # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -523,55 +515,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -604,10 +548,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -698,17 +638,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/PVP.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/PVP.ini index 79db01800d..224f8ed029 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/PVP.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/PVP.ini @@ -57,10 +57,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/AbstractNpcAI.java index 5163520584..63d337f19d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -18,14 +18,11 @@ package ai; import java.util.logging.Logger; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; /** * Abstract NPC AI class for datapack based AIs. @@ -73,27 +70,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index b937970ce0..407536b247 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 59491ae669..deec365bc4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 6dcc3787a1..3b4d69cf20 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -100,7 +100,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java index c6642b9893..37c876ceee 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,62 +81,61 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -177,7 +176,6 @@ public final class Config public static boolean SUMMON_STORE_SKILL_COOLTIME; public static long EFFECT_TICK_RATIO; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_SUBCLASS_EVERYWHERE; @@ -410,7 +408,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -426,9 +423,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -490,7 +485,6 @@ public final class Config public static boolean RESTORE_PLAYER_INSTANCE; public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -555,18 +549,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -588,8 +570,6 @@ public final class Config public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int ABILITY_MAX_POINTS; public static long ABILITY_POINTS_RESET_ADENA; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -632,12 +612,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -663,7 +641,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -720,10 +697,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -779,15 +752,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -796,7 +760,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -829,22 +792,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -904,14 +851,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1494,7 +1433,6 @@ public final class Config SUMMON_STORE_SKILL_COOLTIME = Character.getBoolean("SummonStoreSkillCooltime", true); EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_SUBCLASS_EVERYWHERE = Character.getBoolean("AltSubclassEverywhere", false); @@ -1554,45 +1492,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1758,7 +1658,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1774,9 +1673,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1834,7 +1731,6 @@ public final class Config RESTORE_PLAYER_INSTANCE = General.getBoolean("RestorePlayerInstance", false); EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1871,18 +1767,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1910,9 +1794,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -1941,12 +1822,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2138,7 +2017,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 4); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2292,15 +2170,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2443,7 +2312,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/concurrent/ThreadPool.java index d157412b2e..932dcc2e4e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameServer.java index 3f97f29899..212681afd2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameServer.java @@ -481,7 +481,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/Shutdown.java index 39b43e46dc..1faf2780db 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/Shutdown.java @@ -61,10 +61,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 1bc9f89949..bbc6672f94 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 2fc1234300..3dd467d653 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -253,7 +253,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/TradeList.java index 7d0fa18073..e31f0fb735 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/TradeList.java @@ -155,26 +155,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -310,7 +290,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -460,7 +440,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -546,7 +526,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -577,7 +557,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index b5355f61fa..0be7c93deb 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/SystemMessageId.java index 004d0964ac..fc344d15d2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -15913,18 +15913,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Token.java index a104db3c56..c4827f6218 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index deac7202cd..d908f195e1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini index 8d77370153..f33d2d3ff9 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini @@ -136,10 +136,6 @@ EffectTickRatio = 666 # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -359,46 +355,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/CommunityBoard.ini index 18a84cc6c4..d39ebfbc71 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini index 1704819e88..a5aa25cb84 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -383,10 +379,6 @@ DefaultFinishTime = 5 # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -523,55 +515,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -604,10 +548,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -698,17 +638,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/NPC.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/NPC.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/PVP.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/PVP.ini index 79db01800d..224f8ed029 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/PVP.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/PVP.ini @@ -57,10 +57,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/AbstractNpcAI.java index 5163520584..63d337f19d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -18,14 +18,11 @@ package ai; import java.util.logging.Logger; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; /** * Abstract NPC AI class for datapack based AIs. @@ -73,27 +70,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index b937970ce0..407536b247 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 59491ae669..deec365bc4 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 6dcc3787a1..3b4d69cf20 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -100,7 +100,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java index 8dac67610d..815b5d84ce 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,62 +81,61 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -177,7 +176,6 @@ public final class Config public static boolean SUMMON_STORE_SKILL_COOLTIME; public static long EFFECT_TICK_RATIO; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_SUBCLASS_EVERYWHERE; @@ -410,7 +408,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -426,9 +423,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -490,7 +485,6 @@ public final class Config public static boolean RESTORE_PLAYER_INSTANCE; public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -555,18 +549,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -588,8 +570,6 @@ public final class Config public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int ABILITY_MAX_POINTS; public static long ABILITY_POINTS_RESET_ADENA; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -632,12 +612,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -663,7 +641,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -720,10 +697,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -779,15 +752,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -796,7 +760,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -829,22 +792,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -908,14 +855,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1498,7 +1437,6 @@ public final class Config SUMMON_STORE_SKILL_COOLTIME = Character.getBoolean("SummonStoreSkillCooltime", true); EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_SUBCLASS_EVERYWHERE = Character.getBoolean("AltSubclassEverywhere", false); @@ -1558,45 +1496,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1762,7 +1662,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1778,9 +1677,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1838,7 +1735,6 @@ public final class Config RESTORE_PLAYER_INSTANCE = General.getBoolean("RestorePlayerInstance", false); EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1875,18 +1771,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1914,9 +1798,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -1945,12 +1826,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2142,7 +2021,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 4); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2299,15 +2177,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2450,7 +2319,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/concurrent/ThreadPool.java index 7cf193d83a..d812c4ed7d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameServer.java index 3f97f29899..212681afd2 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameServer.java @@ -481,7 +481,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/Shutdown.java index 39b43e46dc..1faf2780db 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/Shutdown.java @@ -61,10 +61,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 1bc9f89949..bbc6672f94 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 2fc1234300..3dd467d653 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -253,7 +253,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/TradeList.java index e9a73532b4..cbdb625d6c 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/TradeList.java @@ -157,26 +157,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -312,7 +292,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -462,7 +442,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -548,7 +528,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -579,7 +559,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index b5355f61fa..0be7c93deb 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/SystemMessageId.java index ae648cf928..096394ef1b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -16231,18 +16231,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Token.java index a104db3c56..c4827f6218 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index deac7202cd..d908f195e1 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini index 90462ddc14..2c03e93a4f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini @@ -136,10 +136,6 @@ EffectTickRatio = 666 # Default: True LifeCrystalNeeded = True -# Require book needed to enchant skills. -# Default: True -EnchantSkillSpBookNeeded = True - # Require spell book needed to learn Divine Inspiration. # Default: True DivineInspirationSpBookNeeded = True @@ -359,46 +355,6 @@ DisableOverEnchanting = True # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- -# These control the chance to get a skill in the augmentation process. -# Default: 15, 30, 45, 60 -AugmentationNGSkillChance = 15 -AugmentationMidSkillChance = 30 -AugmentationHighSkillChance = 45 -AugmentationTopSkillChance = 60 -# Accessory augmentation skills currently disabled -AugmentationAccSkillChance = 0 - -# This controls the chance to get a base stat modifier in the augmentation process. -# Notes: -# This has no dependency on the grade of Life Stone. -# Default: 1 -AugmentationBaseStatChance = 1 - -# These control the chance to get a glow effect in the augmentation process. -# Notes: -# No/Mid Grade Life Stone can not have glow effect if you do not get a skill or base stat modifier. -# Default: 0, 40, 70, 100 -AugmentationNGGlowChance = 0 -AugmentationMidGlowChance = 40 -AugmentationHighGlowChance = 70 -AugmentationTopGlowChance = 100 - -# This will enable retail like weapon augmentation, but then you cant change -# weapon glow, base stat chance, because it wouldnt be retail like again. -RetailLikeAugmentation = True - -# This will have effect ONLY when RetailLikeAugmentation is True. The sum of 4 numbers must be 100! -# You can change probability (in %) of augment color chances - in order yellow, blue, purple, red -# Purple and Red always give skill. Default is 55%,35%,7%,3% for all lifestone grades (ie 7+3=10% -# for skill, not counting blue ones, that are very rare and not useful anyway). -RetailLikeAugmentationNoGradeChance = 55,35,7,3 -RetailLikeAugmentationMidGradeChance = 55,35,7,3 -RetailLikeAugmentationHighGradeChance = 55,35,7,3 -RetailLikeAugmentationTopGradeChance = 55,35,7,3 - -# This will enable retail like accessory augmentation, but then you cant change skill chances for accessory augments -RetailLikeAugmentationAccessory = True - # List of non-augmentable items, currently contains only Grand Boss jewels # Shadow, common, time-limited, hero, pvp, wear items are hardcoded, as well as all etcitems. # Rods can't be augmented too. diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/ConquerableHallSiege.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/ConquerableHallSiege.ini deleted file mode 100644 index 583d5d5021..0000000000 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/ConquerableHallSiege.ini +++ /dev/null @@ -1,24 +0,0 @@ -# -------------------------------------------------- -# Contestable halls general configuration -# -------------------------------------------------- - -# Min level that each clan needs to register -# for the siege -MinClanLevel = 4 - -# Max number of clans allowed to register for -# the battle -MaxAttackers = 500 - -# Max numbers of flags that each clan is allowed -# to put -MaxFlagsPerClan = 1 - -# Enable the fame reward -EnableFame = false - -# Fame amount -FameAmount = 0 - -# Fame Frequency -FameFrequency = 0 diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/CommunityBoard.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/CommunityBoard.ini index 18a84cc6c4..d39ebfbc71 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/CommunityBoard.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/CommunityBoard.ini @@ -38,10 +38,6 @@ CommunityBuffPrice = 0 # Default: 0 (free) CommunityHealPrice = 0 -# Disable Community Board while in combat. -# Default: True -CommunityCombatDisabled = True - # Disable Community Board while player has Karma. # Default: True CommunityKarmaDisabled = True diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini index 1704819e88..a5aa25cb84 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini @@ -69,10 +69,6 @@ GMRestartFighting = True # example: "Announce: hi (HanWik)" GMShowAnnouncerName = False -# Show the GM's name before an announcement made by him -# example: "Nyaran: hi" -GMShowCritAnnouncerName = False - # Give special skills for every GM # 7029,7041-7064,7088-7096,23238-23249 (Master's Blessing) # Default: False @@ -383,10 +379,6 @@ DefaultFinishTime = 5 # Default: True AllowWater = True -# Enable pets for rent (wyvern & strider) from pet managers. -# Default: False -AllowRentPet = False - # Default: True AllowFishing = True @@ -523,55 +515,7 @@ AltItemAuctionExpiredAfter = 14 AltItemAuctionTimeExtendsOnBid = 0 -# --------------------------------------------------------------------------- -# Dimension Rift -# --------------------------------------------------------------------------- - -# Minimal party size to enter rift. Min = 2, Max = 9. -# If while inside the rift, the party becomes smaller, all members will be teleported back. -# Default: 2 -RiftMinPartySize = 2 - -# Number of maximum jumps between rooms allowed, after this time party will be teleported back -# Default: 4 -MaxRiftJumps = 4 - -# Time in ms the party has to wait until the mobs spawn when entering a room. C4 retail: 10s -# Default: 10000 -RiftSpawnDelay = 10000 - -# Time between automatic jumps in seconds -# Default: 480 -AutoJumpsDelayMin = 480 - -# Default: 600 -AutoJumpsDelayMax = 600 - -# Time Multiplier for stay in the boss room -# Default: 1.5 -BossRoomTimeMultiply = 1.5 - -# Cost in dimension fragments to enter the rift, each party member must own this amount -# Default: 18 -RecruitCost = 18 - -# Default: 21 -SoldierCost = 21 - -# Default: 24 -OfficerCost = 24 - -# Default: 27 -CaptainCost = 27 - -# Default: 30 -CommanderCost = 30 - -# Default: 33 -HeroCost = 33 - - -# --------------------------------------------------------------------------- + --------------------------------------------------------------------------- # Punishment # --------------------------------------------------------------------------- @@ -604,10 +548,6 @@ JailDisableChat = True # Default: False JailDisableTransaction = False -# Enchant Skill Details Settings -# Default: 1,5 -NormalEnchantCostMultipiler = 1 -SafeEnchantCostMultipiler = 5 # --------------------------------------------------------------------------- # Custom Components @@ -698,17 +638,9 @@ AllowReportsFromSameClanMembers = False # Default: False HtmlActionCacheDebug = False -# Packet handler debug output -# Default: False -PacketHandlerDebug = False - # Default: False Developer = False -# Don't load Handlers -# Default: False -AltDevNoHandlers = False - # Don't load quests. # Default: False AltDevNoQuests = False diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/NPC.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/NPC.ini index fa9875331e..553bbf6ebf 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/NPC.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/NPC.ini @@ -75,10 +75,6 @@ SkillChancePenaltyForLvLDifferences = 2.5, 3.0, 3.25, 3.5 # Monsters # --------------------------------------------------------------------------- -# Decay Time Task (don't set it too low!) (in milliseconds): -# Default: 5000 -DecayTimeTask = 5000 - # This is the default corpse time (in seconds). # Default: 7 DefaultCorpseTime = 7 @@ -105,11 +101,6 @@ GuardAttackAggroMob = False # Pets # --------------------------------------------------------------------------- -# This option enables or disables the Wyvern manager located in every castle -# to train Wyverns and Striders from Hatchlings. -# Default: False -AllowWyvernUpgrader = False - # This will control the inventory space limit for pets (NOT WEIGHT LIMIT). # Default: 12 MaximumSlotsForPet = 12 diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/PVP.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/PVP.ini index 79db01800d..224f8ed029 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/PVP.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/PVP.ini @@ -57,10 +57,6 @@ AntiFeedInterval = 120 # Misc. # --------------------------------------------------------------------------- -# Should we award a pvp point for killing a player with karma? -# Default: False -AwardPKKillPVPPoint = False - # How much time one stays in PvP mode after hitting an innocent (in ms) # Default: 120000 PvPVsNormalTime = 120000 diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/AbstractNpcAI.java index 5163520584..63d337f19d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -18,14 +18,11 @@ package ai; import java.util.logging.Logger; -import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.network.serverpackets.SocialAction; -import com.l2jmobius.gameserver.util.Broadcast; /** * Abstract NPC AI class for datapack based AIs. @@ -73,27 +70,6 @@ public abstract class AbstractNpcAI extends Quest addFactionCallId(mobs); } - /** - * Broadcasts SocialAction packet to self and known players. - * @param character - * @param actionId - */ - protected void broadcastSocialAction(L2Character character, int actionId) - { - Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId)); - } - - /** - * Broadcasts SocialAction packet to self and known players in specific radius. - * @param character - * @param actionId - * @param radius - */ - protected void broadcastSocialAction(L2Character character, int actionId, int radius) - { - Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius); - } - public void spawnMinions(L2Npc npc, String spawnName) { for (MinionHolder is : npc.getParameters().getMinionList(spawnName)) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java index 23a6d9d11c..f56fb44917 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminBuffs.java @@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler * @param gmchar the player to switch the Game Master skills. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. */ - public static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) + private static void switchSkills(L2PcInstance gmchar, boolean toAuraSkills) { final Collection skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); for (Skill skill : skills) @@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler return ADMIN_COMMANDS; } - public static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) + private static void showBuffs(L2PcInstance activeChar, L2Character target, int page, boolean passive) { final List effects = new ArrayList<>(); if (!passive) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java index 2de3f682c0..e7af999551 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEventEngine.java @@ -464,7 +464,7 @@ public class AdminEventEngine implements IAdminCommandHandler return note + result; } - public void showMainPage(L2PcInstance activeChar) + private void showMainPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -473,7 +473,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showNewEventPage(L2PcInstance activeChar) + private void showNewEventPage(L2PcInstance activeChar) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); @@ -515,7 +515,7 @@ public class AdminEventEngine implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - public void showEventParameters(L2PcInstance activeChar, int teamnumbers) + private void showEventParameters(L2PcInstance activeChar, int teamnumbers) { final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final StringBuilder sb = new StringBuilder(); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java index 66ea2f59a8..1275345964 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminHtml.java @@ -77,7 +77,7 @@ public class AdminHtml implements IAdminCommandHandler * @param activeChar activeChar where html is shown * @param path relative path from directory data/html/admin/ to html */ - public static void showAdminHtml(L2PcInstance activeChar, String path) + static void showAdminHtml(L2PcInstance activeChar, String path) { showHtml(activeChar, "data/html/admin/" + path, false); } @@ -88,7 +88,7 @@ public class AdminHtml implements IAdminCommandHandler * @param path relative path from Config.DATAPACK_ROOT to html. * @param reload {@code true} will reload html and show it {@code false} will show it from cache. */ - public static void showHtml(L2PcInstance activeChar, String path, boolean reload) + private static void showHtml(L2PcInstance activeChar, String path, boolean reload) { String content = null; if (!reload) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index e35d88673f..109c7df4ad 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -42,7 +42,7 @@ import com.l2jmobius.gameserver.util.Util; public class AdminQuest implements IAdminCommandHandler { - public static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AdminQuest.class.getName()); private static final String[] ADMIN_COMMANDS = { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java index cec8869aae..68bd684b6d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSummon.java @@ -26,7 +26,7 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSummon implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + private static final String[] ADMIN_COMMANDS = { "admin_summon" }; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java index 4a3eb0c809..95e5ae55f8 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminSuperHaste.java @@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public final class AdminSuperHaste implements IAdminCommandHandler { - public static final String[] ADMIN_COMMANDS = + static final String[] ADMIN_COMMANDS = { "admin_superhaste", "admin_superhaste_menu", diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index 734fdb9759..d16a61fc1e 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.ClanPrivilege; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -41,6 +42,11 @@ public class ClanWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 04262f43f9..94819d698f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) + private static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm"); @@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) + private static void sendAggroListView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm"); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index fa92ef0e23..ff42fe88ae 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -18,6 +18,7 @@ package handlers.bypasshandlers; import java.util.logging.Level; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -37,6 +38,11 @@ public class PrivateWarehouse implements IBypassHandler @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { + if (!Config.ALLOW_WAREHOUSE) + { + return false; + } + if (!target.isNpc()) { return false; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java index 698ae7e442..6ad945eddd 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java @@ -81,7 +81,7 @@ public class QuestLink implements IBypassHandler * @param npc The table containing quests of the L2NpcInstance * @param quests */ - public static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) + private static void showQuestChooseWindow(L2PcInstance player, L2Npc npc, Collection quests) { final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128); @@ -186,7 +186,7 @@ public class QuestLink implements IBypassHandler * @param npc the L2NpcInstance that chats with the {@code player} * @param questId the Id of the quest to display the message */ - public static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) + private static void showQuestWindow(L2PcInstance player, L2Npc npc, String questId) { String content = null; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index 691db989d3..2a4df3cbca 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -55,16 +55,16 @@ public class DropSearchBoard implements IParseBoardHandler "_bbs_npc_trace" }; - class CBDropHolder + private class CBDropHolder { - int itemId; - int npcId; - byte npcLevel; - long min; - long max; - double chance; - boolean isSpoil; - boolean isRaid; + final int itemId; + final int npcId; + final byte npcLevel; + final long min; + final long max; + final double chance; + final boolean isSpoil; + final boolean isRaid; public CBDropHolder(L2NpcTemplate npcTemplate, DropHolder dropHolder) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 299a98eb0b..bed19004d2 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -77,7 +77,7 @@ public final class HomeBoard implements IParseBoardHandler Config.COMMUNITYBOARD_ENABLE_HEAL ? "_bbsheal" : null }; - public static final BiPredicate COMBAT_CHECK = (command, activeChar) -> + private static final BiPredicate COMBAT_CHECK = (command, activeChar) -> { boolean commandCheck = false; for (String c : CUSTOM_COMMANDS) @@ -92,7 +92,7 @@ public final class HomeBoard implements IParseBoardHandler return commandCheck && (activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.isInsideZone(ZoneId.SIEGE) || activeChar.isInsideZone(ZoneId.PVP)); }; - public static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); + private static final Predicate KARMA_CHECK = player -> Config.COMMUNITYBOARD_KARMA_DISABLED && (player.getReputation() < 0); @Override public String[] getCommunityBoardCommands() diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java index f73e55c8ca..b048c3d206 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/AbstractConditionalHpEffect.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; /** * @author UnAfraid */ -public abstract class AbstractConditionalHpEffect extends AbstractStatEffect +abstract class AbstractConditionalHpEffect extends AbstractStatEffect { private final int _hpPercent; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java index 34efcfba26..e2ac63e41a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockSkill.java @@ -39,7 +39,7 @@ public final class BlockSkill extends AbstractEffect _magicTypes = params.getIntArray("magicTypes", ";"); } - public TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) + private TerminateReturn onSkillUseEvent(OnCreatureSkillUse event) { if (CommonUtil.contains(_magicTypes, event.getSkill().getMagicType())) { @@ -65,5 +65,4 @@ public final class BlockSkill extends AbstractEffect { effected.removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == this); } - } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java index ad204d7b9a..528ff2d5f8 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalDamagePosition.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalDamagePosition extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalDamagePosition(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java index dd3439ab78..cf1f133f39 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRatePositionBonus.java @@ -29,8 +29,8 @@ import com.l2jmobius.gameserver.util.MathUtil; */ public class CriticalRatePositionBonus extends AbstractEffect { - protected final double _amount; - protected final Position _position; + private final double _amount; + private final Position _position; public CriticalRatePositionBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/Fear.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/Fear.java index 4e61caf974..4a89208aa7 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/Fear.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/Fear.java @@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Fear extends AbstractEffect { - public static final int FEAR_RANGE = 500; + private static final int FEAR_RANGE = 500; public Fear(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java index bf91e7c2e8..8f91f4b961 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/GetMomentum.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class GetMomentum extends AbstractEffect { - public static int _ticks; + private static int _ticks; public GetMomentum(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java index 6dcc3787a1..3b4d69cf20 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -100,7 +100,7 @@ public final class KnockBack extends AbstractEffect } } - public void knockBack(L2Character effector, L2Character effected) + private void knockBack(L2Character effector, L2Character effected) { final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected)); final int x = (int) (effected.getX() + (_distance * Math.cos(radians))); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java index 84fe47ac06..c51e3a6d38 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ModifyVital.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; public final class ModifyVital extends AbstractEffect { // Modify types - enum ModifyType + private enum ModifyType { DIFF, SET, diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java index abcf55526a..46e973614f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/RestorationRandom.java @@ -45,7 +45,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public final class RestorationRandom extends AbstractEffect { - final List _products = new ArrayList<>(); + private final List _products = new ArrayList<>(); public RestorationRandom(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java index 70ea70e917..554137c24f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/SoulEating.java @@ -69,7 +69,7 @@ public final class SoulEating extends AbstractEffect effected.getStat().mergeAdd(Stats.MAX_SOULS, _maxSouls); } - public void onExperienceReceived(L2Playable playable, long exp) + private void onExperienceReceived(L2Playable playable, long exp) { // TODO: Verify logic. if (playable.isPlayer() && (exp >= _expNeeded)) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java index b40e433327..a57106e413 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSkillCritical.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSkillCritical extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSkillCritical(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java index c05b4b1b00..d7a8235a17 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/StatBonusSpeed.java @@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.model.stats.Stats; public class StatBonusSpeed extends AbstractEffect { private final BaseStats _stat; - protected final Condition _armorTypeCondition; + private final Condition _armorTypeCondition; public StatBonusSpeed(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java index da879def26..6a3fa59f3b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAttack.java @@ -85,7 +85,7 @@ public final class TriggerSkillByAttack extends AbstractEffect } } - public void onAttackEvent(OnCreatureDamageDealt event) + private void onAttackEvent(OnCreatureDamageDealt event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0)) || (!_allowNormalAttack && !_allowSkillAttack)) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java index b7d80e1e34..be6ee2c31e 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByAvoid.java @@ -46,7 +46,6 @@ public final class TriggerSkillByAvoid extends AbstractEffect /** * @param params */ - public TriggerSkillByAvoid(StatsSet params) { _chance = params.getInt("chance", 100); @@ -54,7 +53,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onAvoidEvent(OnCreatureAttackAvoid event) + private void onAvoidEvent(OnCreatureAttackAvoid event) { if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java index 2ce0c6758c..dc65a5f594 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDamage.java @@ -58,7 +58,7 @@ public final class TriggerSkillByDamage extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillLevel() == 0)) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java index 1c010ed094..df20e39d84 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByDeathBlow.java @@ -56,7 +56,7 @@ public final class TriggerSkillByDeathBlow extends AbstractEffect _attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.L2Character); } - public void onDamageReceivedEvent(OnCreatureDamageReceived event) + private void onDamageReceivedEvent(OnCreatureDamageReceived event) { if (event.getDamage() < event.getTarget().getCurrentHp()) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java index b7ec10f540..cb795007f3 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByKill.java @@ -42,7 +42,7 @@ public final class TriggerSkillByKill extends AbstractEffect _skill = new SkillHolder(params.getInt("skillId", 0), params.getInt("skillLevel", 0)); } - public void onCreatureKilled(OnCreatureKilled event, L2Character target) + private void onCreatureKilled(OnCreatureKilled event, L2Character target) { if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLevel() == 0))) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java index 956ef40eed..fa1871f623 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TriggerSkillByMagicType.java @@ -60,7 +60,7 @@ public final class TriggerSkillByMagicType extends AbstractEffect _targetType = params.getEnum("targetType", TargetType.class, TargetType.TARGET); } - public void onSkillUseEvent(OnCreatureSkillFinishCast event) + private void onSkillUseEvent(OnCreatureSkillFinishCast event) { if (!event.getTarget().isCharacter()) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java index ab0d351cda..feb6e1476c 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedBluntBonus.java @@ -36,11 +36,11 @@ public class TwoHandedBluntBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedBluntBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java index 4d9fe2bfab..5d2fad60d6 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/TwoHandedSwordBonus.java @@ -36,11 +36,11 @@ public class TwoHandedSwordBonus extends AbstractEffect private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask()); private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND); - protected final double _pAtkAmount; - protected final StatModifierType _pAtkmode; + private final double _pAtkAmount; + private final StatModifierType _pAtkmode; - protected final double _accuracyAmount; - protected final StatModifierType _accuracyMode; + private final double _accuracyAmount; + private final StatModifierType _accuracyMode; public TwoHandedSwordBonus(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/itemhandlers/PetFood.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/itemhandlers/PetFood.java index 01078d1d00..70705ac876 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/itemhandlers/PetFood.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/itemhandlers/PetFood.java @@ -54,7 +54,7 @@ public class PetFood implements IItemHandler return true; } - public boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) + private boolean useFood(L2Playable activeChar, int skillId, int skillLevel, L2ItemInstance item) { final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel); if (skill != null) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/playeractions/SitStand.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/playeractions/SitStand.java index bd46201f81..92f486be06 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/playeractions/SitStand.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/playeractions/SitStand.java @@ -58,7 +58,7 @@ public final class SitStand implements IPlayerActionHandler * @param target the target to sit, throne, bench or chair * @return {@code true} if the player can sit, {@code false} otherwise */ - protected boolean useSit(L2PcInstance activeChar, L2Object target) + private boolean useSit(L2PcInstance activeChar, L2Object target) { if (activeChar.getMountType() != MountType.NONE) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java index a1dc41735d..c7762625a8 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java @@ -47,7 +47,7 @@ public class JailHandler implements IPunishmentHandler Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } - public void onPlayerLogin(OnPlayerLogin event) + private void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneId.JAIL)) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java index ed5eed39cc..c14ecbbd8d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/OpSkillAcquireSkillCondition.java @@ -27,7 +27,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class OpSkillAcquireSkillCondition implements ISkillCondition { - final int _skillId; + private final int _skillId; private final boolean _hasLearned; public OpSkillAcquireSkillCondition(StatsSet params) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java index 38ec43195a..a8ef5cf276 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/skillconditionhandlers/TargetMyPartySkillCondition.java @@ -28,7 +28,7 @@ import com.l2jmobius.gameserver.model.skills.Skill; */ public class TargetMyPartySkillCondition implements ISkillCondition { - final boolean _includeMe; + private final boolean _includeMe; public TargetMyPartySkillCondition(StatsSet params) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java index 50a74f01fa..13f2af5ea5 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java @@ -251,7 +251,7 @@ public class Debug implements ITelnetCommand throw new IllegalStateException("Deadlocked Thread not found"); } - public static String getServerStatus() + static String getServerStatus() { int playerCount = 0, objectCount = 0; final int max = LoginServerThread.getInstance().getMaxPlayer(); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java index 856942597c..9ce5fa22bf 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/voicedcommandhandlers/AutoPotion.java @@ -44,11 +44,6 @@ public class AutoPotion implements IVoicedCommandHandler "apoff" }; - public static AutoPotion getInstance() - { - return null; - } - @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java index 8dac67610d..815b5d84ce 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java @@ -71,7 +71,7 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Config { - protected static final Logger LOGGER = Logger.getLogger(Config.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Config.class.getName()); // -------------------------------------------------- // Constants @@ -81,62 +81,61 @@ public final class Config // -------------------------------------------------- // Config File Definitions // -------------------------------------------------- - public static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; - public static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; - public static final String CH_SIEGE_CONFIG_FILE = "./config/ConquerableHallSiege.ini"; - public static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; - public static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; - public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; - public static final String GENERAL_CONFIG_FILE = "./config/General.ini"; public static final String GEOENGINE_CONFIG_FILE = "./config/GeoEngine.ini"; - public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; - public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; - public static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; - public static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; - public static final String NPC_CONFIG_FILE = "./config/NPC.ini"; public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini"; - public static final String PVP_CONFIG_FILE = "./config/PVP.ini"; - public static final String RATES_CONFIG_FILE = "./config/Rates.ini"; - public static final String SERVER_CONFIG_FILE = "./config/Server.ini"; public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini"; - public static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; - public static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; - public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; - public static final String HEXID_FILE = "./config/hexid.txt"; - public static final String IPCONFIG_FILE = "./config/ipconfig.xml"; + public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini"; + private static final String ATTENDANCE_CONFIG_FILE = "./config/AttendanceRewards.ini"; + private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini"; + private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini"; + private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini"; + private static final String GENERAL_CONFIG_FILE = "./config/General.ini"; + private static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.ini"; + private static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.ini"; + private static final String IDFACTORY_CONFIG_FILE = "./config/IdFactory.ini"; + private static final String LOGIN_CONFIG_FILE = "./config/LoginServer.ini"; + private static final String NPC_CONFIG_FILE = "./config/NPC.ini"; + private static final String PVP_CONFIG_FILE = "./config/PVP.ini"; + private static final String RATES_CONFIG_FILE = "./config/Rates.ini"; + private static final String SERVER_CONFIG_FILE = "./config/Server.ini"; + private static final String TELNET_CONFIG_FILE = "./config/Telnet.ini"; + private static final String TRAINING_CAMP_CONFIG_FILE = "./config/TrainingCamp.ini"; + private static final String CHAT_FILTER_FILE = "./config/chatfilter.txt"; + private static final String HEXID_FILE = "./config/hexid.txt"; + private static final String IPCONFIG_FILE = "./config/ipconfig.xml"; // -------------------------------------------------- // Custom Config File Definitions // -------------------------------------------------- - public static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; - public static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; - public static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; - public static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; - public static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; - public static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; - public static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; - public static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; - public static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; - public static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; - public static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; - public static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; - public static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; - public static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; - public static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; - public static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; - public static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; - public static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; - public static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; - public static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; - public static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; - public static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; - public static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; - public static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; - public static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; - public static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini"; - public static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; - public static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; - public static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; + private static final String CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE = "./config/Custom/AllowedPlayerRaces.ini"; + private static final String CUSTOM_AUTO_POTIONS_CONFIG_FILE = "./config/Custom/AutoPotions.ini"; + private static final String CUSTOM_BANKING_CONFIG_FILE = "./config/Custom/Banking.ini"; + private static final String CUSTOM_CHAMPION_MONSTERS_CONFIG_FILE = "./config/Custom/ChampionMonsters.ini"; + private static final String CUSTOM_CHAT_MODERATION_CONFIG_FILE = "./config/Custom/ChatModeration.ini"; + private static final String CUSTOM_COMMUNITY_BOARD_CONFIG_FILE = "./config/Custom/CommunityBoard.ini"; + private static final String CUSTOM_DUALBOX_CHECK_CONFIG_FILE = "./config/Custom/DualboxCheck.ini"; + private static final String CUSTOM_FACTION_SYSTEM_CONFIG_FILE = "./config/Custom/FactionSystem.ini"; + private static final String CUSTOM_FAKE_PLAYERS_CONFIG_FILE = "./config/Custom/FakePlayers.ini"; + private static final String CUSTOM_FIND_PVP_CONFIG_FILE = "./config/Custom/FindPvP.ini"; + private static final String CUSTOM_MULTILANGUAL_SUPPORT_CONFIG_FILE = "./config/Custom/MultilingualSupport.ini"; + private static final String CUSTOM_NPC_STAT_MULTIPIERS_CONFIG_FILE = "./config/Custom/NpcStatMultipliers.ini"; + private static final String CUSTOM_OFFLINE_TRADE_CONFIG_FILE = "./config/Custom/OfflineTrade.ini"; + private static final String CUSTOM_PASSWORD_CHANGE_CONFIG_FILE = "./config/Custom/PasswordChange.ini"; + private static final String CUSTOM_PC_CAFE_CONFIG_FILE = "./config/Custom/PcCafe.ini"; + private static final String CUSTOM_PREMIUM_SYSTEM_CONFIG_FILE = "./config/Custom/PremiumSystem.ini"; + private static final String CUSTOM_PRIVATE_STORE_RANGE_CONFIG_FILE = "./config/Custom/PrivateStoreRange.ini"; + private static final String CUSTOM_PVP_ANNOUNCE_CONFIG_FILE = "./config/Custom/PvpAnnounce.ini"; + private static final String CUSTOM_PVP_REWARD_ITEM_CONFIG_FILE = "./config/Custom/PvpRewardItem.ini"; + private static final String CUSTOM_PVP_TITLE_CONFIG_FILE = "./config/Custom/PvpTitleColor.ini"; + private static final String CUSTOM_RANDOM_SPAWNS_CONFIG_FILE = "./config/Custom/RandomSpawns.ini"; + private static final String CUSTOM_SAYUNE_FOR_ALL_CONFIG_FILE = "./config/Custom/SayuneForAll.ini"; + private static final String CUSTOM_SCREEN_WELCOME_MESSAGE_CONFIG_FILE = "./config/Custom/ScreenWelcomeMessage.ini"; + private static final String CUSTOM_SELL_BUFFS_CONFIG_FILE = "./config/Custom/SellBuffs.ini"; + private static final String CUSTOM_SERVER_TIME_CONFIG_FILE = "./config/Custom/ServerTime.ini"; + private static final String CUSTOM_SCHEME_BUFFER_CONFIG_FILE = "./config/Custom/ShemeBuffer.ini"; + private static final String CUSTOM_STARTING_LOCATION_CONFIG_FILE = "./config/Custom/StartingLocation.ini"; + private static final String CUSTOM_VOTE_REWARD_CONFIG_FILE = "./config/Custom/VoteReward.ini"; + private static final String CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE = "./config/Custom/WalkerBotProtection.ini"; // -------------------------------------------------- // Variable Definitions @@ -177,7 +176,6 @@ public final class Config public static boolean SUMMON_STORE_SKILL_COOLTIME; public static long EFFECT_TICK_RATIO; public static boolean LIFE_CRYSTAL_NEEDED; - public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; public static boolean ALT_GAME_SUBCLASS_EVERYWHERE; @@ -410,7 +408,6 @@ public final class Config public static boolean GM_TRADE_RESTRICTED_ITEMS; public static boolean GM_RESTART_FIGHTING; public static boolean GM_ANNOUNCER_NAME; - public static boolean GM_CRITANNOUNCER_NAME; public static boolean GM_GIVE_SPECIAL_SKILLS; public static boolean GM_GIVE_SPECIAL_AURA_SKILLS; public static boolean GM_DEBUG_HTML_PATHS; @@ -426,9 +423,7 @@ public final class Config public static boolean SKILL_CHECK_REMOVE; public static boolean SKILL_CHECK_GM; public static boolean HTML_ACTION_CACHE_DEBUG; - public static boolean PACKET_HANDLER_DEBUG; public static boolean DEVELOPER; - public static boolean ALT_DEV_NO_HANDLERS; public static boolean ALT_DEV_NO_QUESTS; public static boolean ALT_DEV_NO_SPAWNS; public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS; @@ -490,7 +485,6 @@ public final class Config public static boolean RESTORE_PLAYER_INSTANCE; public static int EJECT_DEAD_PLAYER_TIME; public static boolean ALLOW_WATER; - public static boolean ALLOW_RENTPET; public static boolean ALLOW_FISHING; public static boolean ALLOW_BOAT; public static int BOAT_BROADCAST_RADIUS; @@ -555,18 +549,6 @@ public final class Config public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; - public static int RIFT_MIN_PARTY_SIZE; - public static int RIFT_SPAWN_DELAY; - public static int RIFT_MAX_JUMPS; - public static int RIFT_AUTO_JUMPS_TIME_MIN; - public static int RIFT_AUTO_JUMPS_TIME_MAX; - public static float RIFT_BOSS_ROOM_TIME_MUTIPLY; - public static int RIFT_ENTER_COST_RECRUIT; - public static int RIFT_ENTER_COST_SOLDIER; - public static int RIFT_ENTER_COST_OFFICER; - public static int RIFT_ENTER_COST_CAPTAIN; - public static int RIFT_ENTER_COST_COMMANDER; - public static int RIFT_ENTER_COST_HERO; public static IllegalActionPunishmentType DEFAULT_PUNISH; public static int DEFAULT_PUNISH_PARAM; public static boolean ONLY_GM_ITEMS_FREE; @@ -588,8 +570,6 @@ public final class Config public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int ABILITY_MAX_POINTS; public static long ABILITY_POINTS_RESET_ADENA; - public static int NORMAL_ENCHANT_COST_MULTIPLIER; - public static int SAFE_ENCHANT_COST_MULTIPLIER; public static boolean BOTREPORT_ENABLE; public static String[] BOTREPORT_RESETPOINT_HOUR; public static long BOTREPORT_REPORT_DELAY; @@ -632,12 +612,10 @@ public final class Config public static Map NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; public static Map NPC_SKILL_CHANCE_PENALTY; - public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static boolean GUARD_ATTACK_AGGRO_MOB; - public static boolean ALLOW_WYVERN_UPGRADER; public static double RAID_HP_REGEN_MULTIPLIER; public static double RAID_MP_REGEN_MULTIPLIER; public static double RAID_PDEFENCE_MULTIPLIER; @@ -663,7 +641,6 @@ public final class Config // PvP Settings // -------------------------------------------------- public static boolean KARMA_DROP_GM; - public static boolean KARMA_AWARD_PK_KILL; public static int KARMA_PK_LIMIT; public static String KARMA_NONDROPPABLE_PET_ITEMS; public static String KARMA_NONDROPPABLE_ITEMS; @@ -720,10 +697,6 @@ public final class Config public static float RATE_KARMA_LOST; public static float RATE_KARMA_EXP_LOST; public static float RATE_SIEGE_GUARDS_PRICE; - public static float RATE_DROP_COMMON_HERBS; - public static float RATE_DROP_HP_HERBS; - public static float RATE_DROP_MP_HERBS; - public static float RATE_DROP_SPECIAL_HERBS; public static int PLAYER_DROP_LIMIT; public static int PLAYER_RATE_DROP; public static int PLAYER_RATE_DROP_ITEM; @@ -779,15 +752,6 @@ public final class Config public static int SERVER_RESTART_SCHEDULE_COUNTDOWN; public static String[] SERVER_RESTART_SCHEDULE; - // -------------------------------------------------- - // MMO Settings - // -------------------------------------------------- - public static int MMO_SELECTOR_SLEEP_TIME; - public static int MMO_MAX_SEND_PER_PASS; - public static int MMO_MAX_READ_PER_PASS; - public static int MMO_HELPER_BUFFER_COUNT; - public static boolean MMO_TCP_NODELAY; - // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -796,7 +760,6 @@ public final class Config public static boolean RAIDBOSS_USE_VITALITY; public static float RATE_VITALITY_EXP_MULTIPLIER; public static int VITALITY_MAX_ITEMS_ALLOWED; - public static float RATE_DROP_VITALITY_HERBS; public static float RATE_VITALITY_LOST; public static float RATE_VITALITY_GAIN; @@ -829,22 +792,6 @@ public final class Config public static double ENCHANT_CHANCE_ELEMENT_ENERGY; public static int[] ENCHANT_BLACKLIST; public static boolean DISABLE_OVER_ENCHANTING; - public static int AUGMENTATION_NG_SKILL_CHANCE; - public static int AUGMENTATION_NG_GLOW_CHANCE; - public static int AUGMENTATION_MID_SKILL_CHANCE; - public static int AUGMENTATION_MID_GLOW_CHANCE; - public static int AUGMENTATION_HIGH_SKILL_CHANCE; - public static int AUGMENTATION_HIGH_GLOW_CHANCE; - public static int AUGMENTATION_TOP_SKILL_CHANCE; - public static int AUGMENTATION_TOP_GLOW_CHANCE; - public static int AUGMENTATION_BASESTAT_CHANCE; - public static int AUGMENTATION_ACC_SKILL_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION; - public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE; - public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE; - public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY; public static int[] AUGMENTATION_BLACKLIST; public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS; public static double HP_REGEN_MULTIPLIER; @@ -908,14 +855,6 @@ public final class Config // chatfilter public static List FILTER_LIST; - // Conquerable Halls Settings - public static int CHS_CLAN_MINLEVEL; - public static int CHS_MAX_ATTACKERS; - public static int CHS_MAX_FLAGS_PER_CLAN; - public static boolean CHS_ENABLE_FAME; - public static int CHS_FAME_AMOUNT; - public static int CHS_FAME_FREQUENCY; - // -------------------------------------------------- // GeoEngine // -------------------------------------------------- @@ -1498,7 +1437,6 @@ public final class Config SUMMON_STORE_SKILL_COOLTIME = Character.getBoolean("SummonStoreSkillCooltime", true); EFFECT_TICK_RATIO = Character.getLong("EffectTickRatio", 666); LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true); - ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); ALT_GAME_SUBCLASS_EVERYWHERE = Character.getBoolean("AltSubclassEverywhere", false); @@ -1558,45 +1496,7 @@ public final class Config } Arrays.sort(ENCHANT_BLACKLIST); DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true); - AUGMENTATION_NG_SKILL_CHANCE = Character.getInt("AugmentationNGSkillChance", 15); - AUGMENTATION_NG_GLOW_CHANCE = Character.getInt("AugmentationNGGlowChance", 0); - AUGMENTATION_MID_SKILL_CHANCE = Character.getInt("AugmentationMidSkillChance", 30); - AUGMENTATION_MID_GLOW_CHANCE = Character.getInt("AugmentationMidGlowChance", 40); - AUGMENTATION_HIGH_SKILL_CHANCE = Character.getInt("AugmentationHighSkillChance", 45); - AUGMENTATION_HIGH_GLOW_CHANCE = Character.getInt("AugmentationHighGlowChance", 70); - AUGMENTATION_TOP_SKILL_CHANCE = Character.getInt("AugmentationTopSkillChance", 60); - AUGMENTATION_TOP_GLOW_CHANCE = Character.getInt("AugmentationTopGlowChance", 100); - AUGMENTATION_BASESTAT_CHANCE = Character.getInt("AugmentationBaseStatChance", 1); - AUGMENTATION_ACC_SKILL_CHANCE = Character.getInt("AugmentationAccSkillChance", 0); - - RETAIL_LIKE_AUGMENTATION = Character.getBoolean("RetailLikeAugmentation", true); - String[] array = Character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]); - } - array = Character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(","); - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length]; - for (int i = 0; i < 4; i++) - { - RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]); - } - RETAIL_LIKE_AUGMENTATION_ACCESSORY = Character.getBoolean("RetailLikeAugmentationAccessory", true); - - array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); + String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(","); AUGMENTATION_BLACKLIST = new int[array.length]; for (int i = 0; i < array.length; i++) @@ -1762,7 +1662,6 @@ public final class Config GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false); GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true); GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false); - GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false); GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false); GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false); GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true); @@ -1778,9 +1677,7 @@ public final class Config SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false); SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true); HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false); - PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false); DEVELOPER = General.getBoolean("Developer", false); - ALT_DEV_NO_HANDLERS = General.getBoolean("AltDevNoHandlers", false) || Boolean.getBoolean("nohandlers"); ALT_DEV_NO_QUESTS = General.getBoolean("AltDevNoQuests", false) || Boolean.getBoolean("noquests"); ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns"); ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false); @@ -1838,7 +1735,6 @@ public final class Config RESTORE_PLAYER_INSTANCE = General.getBoolean("RestorePlayerInstance", false); EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); ALLOW_WATER = General.getBoolean("AllowWater", true); - ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); ALLOW_FISHING = General.getBoolean("AllowFishing", true); ALLOW_MANOR = General.getBoolean("AllowManor", true); ALLOW_BOAT = General.getBoolean("AllowBoat", true); @@ -1875,18 +1771,6 @@ public final class Config ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; - RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5); - RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4); - RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000); - RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480); - RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600); - RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f); - RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18); - RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21); - RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24); - RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27); - RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30); - RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33); DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK")); DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0); ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true); @@ -1914,9 +1798,6 @@ public final class Config } HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); - NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); - SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); - BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false); BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":"); BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000; @@ -1945,12 +1826,10 @@ public final class Config NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62")); MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78); NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5")); - DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000); DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7); SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10); CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000); GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false); - ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false); RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100; RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100; RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100; @@ -2142,7 +2021,6 @@ public final class Config final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); - KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 4); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); @@ -2299,15 +2177,6 @@ public final class Config LOGGER.log(Level.WARNING, "Error while loading chat filter words!", e); } - final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_CONFIG_FILE); - - CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500); - CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4); - CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1); - CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false); - CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0); - CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0); - final PropertiesParser geoData = new PropertiesParser(GEOENGINE_CONFIG_FILE); GEODATA_PATH = geoData.getString("GeoDataPath", "./data/geodata/"); @@ -2450,7 +2319,6 @@ public final class Config COMMUNITYBOARD_TELEPORT_PRICE = CommunityBoard.getInt("CommunityTeleportPrice", 0); COMMUNITYBOARD_BUFF_PRICE = CommunityBoard.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_HEAL_PRICE = CommunityBoard.getInt("CommunityHealPrice", 0); - COMMUNITYBOARD_COMBAT_DISABLED = CommunityBoard.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CommunityBoard.getBoolean("CommunityKarmaDisabled", true); COMMUNITYBOARD_CAST_ANIMATIONS = CommunityBoard.getBoolean("CommunityCastAnimations", false); COMMUNITY_PREMIUM_SYSTEM_ENABLED = CommunityBoard.getBoolean("CommunityPremiumSystem", false); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/concurrent/ThreadPool.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/concurrent/ThreadPool.java index 7cf193d83a..d812c4ed7d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/concurrent/ThreadPool.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/concurrent/ThreadPool.java @@ -37,10 +37,10 @@ import com.l2jmobius.Config; */ public final class ThreadPool { - protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); + private static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName()); - protected static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; - protected static ThreadPoolExecutor[] INSTANT_POOLS; + private static ScheduledThreadPoolExecutor[] SCHEDULED_POOLS; + private static ThreadPoolExecutor[] INSTANT_POOLS; private static int THREAD_POOL_RANDOMIZER; /** diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/IPSubnet.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/IPSubnet.java index d21fae60d0..2c10c87122 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/IPSubnet.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/IPSubnet.java @@ -21,9 +21,9 @@ import java.net.UnknownHostException; public class IPSubnet { - final byte[] _addr; - final byte[] _mask; - final boolean _isIPv4; + private final byte[] _addr; + private final byte[] _mask; + private final boolean _isIPv4; public IPSubnet(String input) throws UnknownHostException, NumberFormatException, ArrayIndexOutOfBoundsException { @@ -47,23 +47,12 @@ public class IPSubnet } } - public IPSubnet(InetAddress addr, int mask) throws UnknownHostException - { - _addr = addr.getAddress(); - _isIPv4 = _addr.length == 4; - _mask = getMask(mask, _addr.length); - if (!applyMask(_addr)) - { - throw new UnknownHostException(addr + "/" + mask); - } - } - public byte[] getAddress() { return _addr; } - public boolean applyMask(byte[] addr) + private boolean applyMask(byte[] addr) { // V4 vs V4 or V6 vs V6 checks if (_isIPv4 == (addr.length == 4)) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/TimeUtil.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/TimeUtil.java index d329c4c6b4..5be557015e 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/TimeUtil.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/TimeUtil.java @@ -24,7 +24,7 @@ import java.time.temporal.ChronoUnit; */ public class TimeUtil { - public static int findIndexOfNonDigit(CharSequence text) + private static int findIndexOfNonDigit(CharSequence text) { for (int i = 0; i < text.length(); i++) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java index a11ea8c3b5..6bb671df85 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/commons/util/crypt/ScrambledKeyPair.java @@ -25,8 +25,8 @@ import java.util.logging.Logger; public class ScrambledKeyPair { private static Logger LOGGER = Logger.getLogger(ScrambledKeyPair.class.getName()); - public KeyPair _pair; - public byte[] _scrambledModulus; + private final KeyPair _pair; + private final byte[] _scrambledModulus; public ScrambledKeyPair(KeyPair pPair) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/FortUpdater.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/FortUpdater.java index b38bb8eb81..87dcebad73 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/FortUpdater.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/FortUpdater.java @@ -30,7 +30,7 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory; */ public class FortUpdater implements Runnable { - protected static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); + private static Logger LOGGER = Logger.getLogger(FortUpdater.class.getName()); private final L2Clan _clan; private final Fort _fort; private int _runCount; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameServer.java index 3f97f29899..212681afd2 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameServer.java @@ -481,7 +481,7 @@ public class GameServer INSTANCE = new GameServer(); } - public static void printSection(String s) + private static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 61) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameTimeController.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameTimeController.java index 36afb0b3ac..a8ad089a09 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameTimeController.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/GameTimeController.java @@ -39,9 +39,7 @@ public final class GameTimeController extends Thread public static final int IG_DAYS_PER_DAY = 6; public static final int MILLIS_PER_IG_DAY = (3600000 * 24) / IG_DAYS_PER_DAY; public static final int SECONDS_PER_IG_DAY = MILLIS_PER_IG_DAY / 1000; - public static final int MINUTES_PER_IG_DAY = SECONDS_PER_IG_DAY / 60; public static final int TICKS_PER_IG_DAY = SECONDS_PER_IG_DAY * TICKS_PER_SECOND; - public static final int TICKS_SUN_STATE_CHANGE = TICKS_PER_IG_DAY / 4; private static GameTimeController _instance; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java index 75089ff0f6..ddc33cfc76 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ItemsAutoDestroy.java @@ -46,7 +46,7 @@ public final class ItemsAutoDestroy _items.add(item); } - public synchronized void removeItems() + private synchronized void removeItems() { if (_items.isEmpty()) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/Shutdown.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/Shutdown.java index 39b43e46dc..1faf2780db 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/Shutdown.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/Shutdown.java @@ -61,10 +61,10 @@ public class Shutdown extends Thread private int _secondsShut; private int _shutdownMode; - public static final int SIGTERM = 0; - public static final int GM_SHUTDOWN = 1; - public static final int GM_RESTART = 2; - public static final int ABORT = 3; + private static final int SIGTERM = 0; + private static final int GM_SHUTDOWN = 1; + private static final int GM_RESTART = 2; + private static final int ABORT = 3; private static final String[] MODE_TEXT = { "SIGTERM", diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/AbstractAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/AbstractAI.java index 717f999c27..a800488401 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/AbstractAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/AbstractAI.java @@ -81,7 +81,7 @@ public abstract class AbstractAI implements Ctrl /** Flags about client's state, in order to know which messages to send */ protected volatile boolean _clientMoving; /** Flags about client's state, in order to know which messages to send */ - protected volatile boolean _clientAutoAttacking; + private volatile boolean _clientAutoAttacking; /** Flags about client's state, in order to know which messages to send */ protected int _clientMovingToPawnOffset; @@ -97,7 +97,7 @@ public abstract class AbstractAI implements Ctrl /** Different internal state flags */ protected int _moveToPawnTimeout; - protected Future _followTask = null; + private Future _followTask = null; private static final int FOLLOW_INTERVAL = 1000; private static final int ATTACK_FOLLOW_INTERVAL = 500; @@ -630,7 +630,7 @@ public abstract class AbstractAI implements Ctrl * Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast).
* Caution : Low level function, used by AI subclasses */ - public void clientStopAutoAttack() + void clientStopAutoAttack() { if (_actor.isSummon()) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java index 0d7b8146bd..8c60277855 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2PlayerAI.java @@ -36,14 +36,14 @@ public class L2PlayerAI extends L2PlayableAI { private boolean _thinking; // to prevent recursive thinking - IntentionCommand _nextIntention = null; + private IntentionCommand _nextIntention = null; public L2PlayerAI(L2PcInstance player) { super(player); } - void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) + private void saveNextIntention(CtrlIntention intention, Object arg0, Object arg1) { _nextIntention = new IntentionCommand(intention, arg0, arg1); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java index 805d080343..06f3c98621 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/cache/WarehouseCacheManager.java @@ -28,8 +28,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class WarehouseCacheManager { - protected final Map _cachedWh = new ConcurrentHashMap<>(); - protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; + final Map _cachedWh = new ConcurrentHashMap<>(); + final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000; protected WarehouseCacheManager() { @@ -46,8 +46,12 @@ public class WarehouseCacheManager _cachedWh.remove(pc); } - public class CacheScheduler implements Runnable + private class CacheScheduler implements Runnable { + public CacheScheduler() + { + } + @Override public void run() { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java index 877893bb47..fa2f1da2d9 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Post.java @@ -70,7 +70,7 @@ public class Post insertindb(cp); } - public void insertindb(CPost cp) + private void insertindb(CPost cp) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java index dd22855ae4..ae7b7c6318 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/communitybbs/BB/Topic.java @@ -69,7 +69,7 @@ public class Topic } } - public void insertindb() + private void insertindb() { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java index 50578aad61..adc2b28a17 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/AnnouncementsTable.java @@ -104,7 +104,7 @@ public final class AnnouncementsTable * @param player * @param type */ - public void sendAnnouncements(L2PcInstance player, AnnouncementType type) + private void sendAnnouncements(L2PcInstance player, AnnouncementType type) { for (IAnnouncement announce : _announcements.values()) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java index d72cea4a6f..85ac2368c6 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/sql/impl/SummonEffectsTable.java @@ -60,8 +60,8 @@ public class SummonEffectsTable public static class SummonEffect { - Skill _skill; - int _effectCurTime; + private final Skill _skill; + private final int _effectCurTime; public SummonEffect(Skill skill, int effectCurTime) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java index d732ccb769..6759bfec3f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/LuckyGameData.java @@ -35,8 +35,7 @@ import com.l2jmobius.gameserver.model.holders.LuckyGameDataHolder; public class LuckyGameData implements IGameXmlReader { private final Map _luckyGame = new HashMap<>(); - - final AtomicInteger _serverPlay = new AtomicInteger(); + private final AtomicInteger _serverPlay = new AtomicInteger(); protected LuckyGameData() { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index cceede352d..0ae19f1ae8 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1215,7 +1215,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the transformation skill level * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getTransformSkill(int id, int lvl) + private L2SkillLearn getTransformSkill(int id, int lvl) { return _transformSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1237,7 +1237,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the alchemy skill level * @return the alchemy skill from the Alchemy Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getAlchemySkill(int id, int lvl) + private L2SkillLearn getAlchemySkill(int id, int lvl) { return _alchemySkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1260,7 +1260,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the fishing skill level * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getFishingSkill(int id, int lvl) + private L2SkillLearn getFishingSkill(int id, int lvl) { return _fishingSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1271,7 +1271,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the pledge skill level * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getPledgeSkill(int id, int lvl) + private L2SkillLearn getPledgeSkill(int id, int lvl) { return _pledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1282,7 +1282,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-pledge skill level * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubPledgeSkill(int id, int lvl) + private L2SkillLearn getSubPledgeSkill(int id, int lvl) { return _subPledgeSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } @@ -1294,7 +1294,7 @@ public final class SkillTreesData implements IGameXmlReader * @param classId the transfer skill tree Id * @return the transfer skill from the Transfer Skill Trees for a given {@code classId}, {@code id} and {@code lvl} */ - public L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) + private L2SkillLearn getTransferSkill(int id, int lvl, ClassId classId) { if (_transferSkillTrees.get(classId) != null) { @@ -1310,7 +1310,7 @@ public final class SkillTreesData implements IGameXmlReader * @param race the race skill tree Id * @return the transfer skill from the Race Skill Trees for a given {@code race}, {@code id} and {@code lvl} */ - public L2SkillLearn getRaceSkill(int id, int lvl, Race race) + private L2SkillLearn getRaceSkill(int id, int lvl, Race race) { for (L2SkillLearn skill : getRaceSkillTree(race)) { @@ -1328,7 +1328,7 @@ public final class SkillTreesData implements IGameXmlReader * @param lvl the sub-class skill level * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl} */ - public L2SkillLearn getSubClassSkill(int id, int lvl) + private L2SkillLearn getSubClassSkill(int id, int lvl) { return _subClassSkillTree.get(SkillData.getSkillHashCode(id, lvl)); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/datatables/BotReportTable.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/datatables/BotReportTable.java index 1bc9f89949..bbc6672f94 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/datatables/BotReportTable.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/datatables/BotReportTable.java @@ -595,25 +595,28 @@ public final class BotReportTable } } - class PunishHolder + private class PunishHolder { final Skill _punish; final int _systemMessageId; - PunishHolder(Skill sk, int sysMsg) + public PunishHolder(Skill sk, int sysMsg) { _punish = sk; _systemMessageId = sysMsg; } } - class ResetPointTask implements Runnable + private class ResetPointTask implements Runnable { + public ResetPointTask() + { + } + @Override public void run() { resetPointsAndSchedule(); - } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/items/Item.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/items/Item.java index 3ed24df9e2..7f7ef4ffd0 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/items/Item.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/engines/items/Item.java @@ -21,10 +21,10 @@ import com.l2jmobius.gameserver.model.items.L2Item; public class Item { - public int id; - public String type; - public String name; - public StatsSet set; - public int currentLevel; - public L2Item item; + int id; + String type; + String name; + StatsSet set; + int currentLevel; + L2Item item; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java index 674cf38bea..f9a522fa9c 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/GeoEngine.java @@ -29,15 +29,12 @@ import com.l2jmobius.gameserver.data.xml.impl.DoorData; import com.l2jmobius.gameserver.data.xml.impl.FenceData; import com.l2jmobius.gameserver.geoengine.geodata.ABlock; import com.l2jmobius.gameserver.geoengine.geodata.BlockComplex; -import com.l2jmobius.gameserver.geoengine.geodata.BlockComplexDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockFlat; import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayer; -import com.l2jmobius.gameserver.geoengine.geodata.BlockMultilayerDynamic; import com.l2jmobius.gameserver.geoengine.geodata.BlockNull; import com.l2jmobius.gameserver.geoengine.geodata.GeoFormat; import com.l2jmobius.gameserver.geoengine.geodata.GeoLocation; import com.l2jmobius.gameserver.geoengine.geodata.GeoStructure; -import com.l2jmobius.gameserver.geoengine.geodata.IBlockDynamic; import com.l2jmobius.gameserver.geoengine.geodata.IGeoObject; import com.l2jmobius.gameserver.instancemanager.WarpedSpaceManager; import com.l2jmobius.gameserver.model.L2Object; @@ -276,7 +273,7 @@ public class GeoEngine * @param geoY : Geodata Y * @return {@link ABlock} : Block of geodata. */ - public final ABlock getBlock(int geoX, int geoY) + private final ABlock getBlock(int geoX, int geoY) { final int x = geoX / GeoStructure.BLOCK_CELLS_X; final int y = geoY / GeoStructure.BLOCK_CELLS_Y; @@ -328,7 +325,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell geodata Z coordinate, closest to given coordinates. */ - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) + private final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getHeightNearestOriginal(geoX, geoY, worldZ) : (short) worldZ; @@ -355,7 +352,7 @@ public class GeoEngine * @param worldZ : Cell world Z coordinate. * @return short : Cell NSWE flag byte coordinate, closest to given coordinates. */ - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) + private final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) { final ABlock block = getBlock(geoX, geoY); return block != null ? block.getNsweNearestOriginal(geoX, geoY, worldZ) : (byte) 0xFF; @@ -384,200 +381,6 @@ public class GeoEngine return getHeightNearest(getGeoX(worldX), getGeoY(worldY), worldZ); } - // GEODATA - DYNAMIC - - /** - * Returns calculated NSWE flag byte as a description of {@link IGeoObject}.
- * The {@link IGeoObject} is defined by boolean 2D array, saying if the object is present on given cell or not. - * @param inside : 2D description of {@link IGeoObject} - * @return byte[][] : Returns NSWE flags of {@link IGeoObject}. - */ - public static byte[][] calculateGeoObject(boolean inside[][]) - { - // get dimensions - final int width = inside.length; - final int height = inside[0].length; - - // create object flags for geodata, according to the geo object 2D description - final byte[][] result = new byte[width][height]; - - // loop over each cell of the geo object - for (int ix = 0; ix < width; ix++) - { - for (int iy = 0; iy < height; iy++) - { - if (inside[ix][iy]) - { - // cell is inside geo object, block whole movement (nswe = 0) - result[ix][iy] = 0; - } - else - { - // cell is outside of geo object, block only movement leading inside geo object - - // set initial value -> no geodata change - byte nswe = (byte) 0xFF; - - // perform axial and diagonal checks - if (iy < (height - 1)) - { - if (inside[ix][iy + 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_S; - } - } - if (iy > 0) - { - if (inside[ix][iy - 1]) - { - nswe &= ~GeoStructure.CELL_FLAG_N; - } - } - if (ix < (width - 1)) - { - if (inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_E; - } - } - if (ix > 0) - { - if (inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_W; - } - } - if ((ix < (width - 1)) && (iy < (height - 1))) - { - if (inside[ix + 1][iy + 1] || inside[ix][iy + 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SE; - } - } - if ((ix < (width - 1)) && (iy > 0)) - { - if (inside[ix + 1][iy - 1] || inside[ix][iy - 1] || inside[ix + 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NE; - } - } - if ((ix > 0) && (iy < (height - 1))) - { - if (inside[ix - 1][iy + 1] || inside[ix][iy + 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_SW; - } - } - if ((ix > 0) && (iy > 0)) - { - if (inside[ix - 1][iy - 1] || inside[ix][iy - 1] || inside[ix - 1][iy]) - { - nswe &= ~GeoStructure.CELL_FLAG_NW; - } - } - - result[ix][iy] = nswe; - } - } - } - - return result; - } - - /** - * Add {@link IGeoObject} to the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void addGeoObject(IGeoObject object) - { - toggleGeoObject(object, true); - } - - /** - * Remove {@link IGeoObject} from the geodata. - * @param object : An object using {@link IGeoObject} interface. - */ - public final void removeGeoObject(IGeoObject object) - { - toggleGeoObject(object, false); - } - - /** - * Toggles an {@link IGeoObject} in the geodata. - * @param object : An object using {@link IGeoObject} interface. - * @param add : Add/remove object. - */ - private final void toggleGeoObject(IGeoObject object, boolean add) - { - // get object geo coordinates and data - final int minGX = object.getGeoX(); - final int minGY = object.getGeoY(); - final byte[][] geoData = object.getObjectGeoData(); - - // get min/max block coordinates - int minBX = minGX / GeoStructure.BLOCK_CELLS_X; - int maxBX = ((minGX + geoData.length) - 1) / GeoStructure.BLOCK_CELLS_X; - int minBY = minGY / GeoStructure.BLOCK_CELLS_Y; - int maxBY = ((minGY + geoData[0].length) - 1) / GeoStructure.BLOCK_CELLS_Y; - - // loop over affected blocks in X direction - for (int bx = minBX; bx <= maxBX; bx++) - { - // loop over affected blocks in Y direction - for (int by = minBY; by <= maxBY; by++) - { - ABlock block; - - // conversion to dynamic block must be synchronized to prevent 2 independent threads converting same block - synchronized (_blocks) - { - // get related block - block = _blocks[bx][by]; - - // check for dynamic block - if (!(block instanceof IBlockDynamic)) - { - // null block means no geodata (particular region file is not loaded), no geodata means no geobjects - if (block instanceof BlockNull) - { - continue; - } - - // not a dynamic block, convert it - if (block instanceof BlockFlat) - { - // convert flat block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockFlat) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockComplex) - { - // convert complex block to the dynamic complex block - block = new BlockComplexDynamic(bx, by, (BlockComplex) block); - _blocks[bx][by] = block; - } - else if (block instanceof BlockMultilayer) - { - // convert multilayer block to the dynamic multilayer block - block = new BlockMultilayerDynamic(bx, by, (BlockMultilayer) block); - _blocks[bx][by] = block; - } - } - } - - // add/remove geo object to/from dynamic block - if (add) - { - ((IBlockDynamic) block).addGeoObject(object); - } - else - { - ((IBlockDynamic) block).removeGeoObject(object); - } - } - } - } - // PATHFINDING /** @@ -732,7 +535,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSee(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); @@ -915,7 +718,7 @@ public class GeoEngine * @param instance * @return {@code boolean} : True, when target can be seen. */ - protected final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) + private final boolean checkSeeOriginal(int gox, int goy, int goz, double oheight, int gtx, int gty, int gtz, double theight, Instance instance) { // get line of sight Z coordinates double losoz = goz + ((oheight * Config.PART_OF_CHARACTER_HEIGHT) / 100); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java deleted file mode 100644 index 7bcb2c7d2d..0000000000 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/BlockComplexDynamic.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockComplexDynamic extends BlockComplex implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original FlatBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockFlat block) - { - // load data - final byte nswe = block._nswe; - final byte heightLow = (byte) (block._height & 0x00FF); - final byte heightHigh = (byte) (block._height >> 8); - - // initialize buffer - _buffer = new byte[GeoStructure.BLOCK_CELLS * 3]; - - // save data - for (int i = 0; i < GeoStructure.BLOCK_CELLS; i++) - { - // set nswe - _buffer[i * 3] = nswe; - - // set height - _buffer[(i * 3) + 1] = heightLow; - _buffer[(i * 3) + 2] = heightHigh; - } - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - /** - * Creates {@link BlockComplexDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original ComplexBlock to create a dynamic version from. - */ - public BlockComplexDynamic(int bx, int by, BlockComplex block) - { - // move buffer from BlockComplex object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[GeoStructure.BLOCK_CELLS * 3]; - System.arraycopy(_buffer, 0, _original, 0, GeoStructure.BLOCK_CELLS * 3); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public final short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get nswe - return _original[index]; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height > worldZ ? index : -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)) * 3; - - // get height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // check height and return nswe - return height < worldZ ? index : -1; - } - - @Override - public final short getHeightOriginal(int index) - { - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public final byte getNsweOriginal(int index) - { - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, GeoStructure.BLOCK_CELLS * 3); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - final int ib = (((gx - minBX) * GeoStructure.BLOCK_CELLS_Y) + (gy - minBY)) * 3; - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // set block Z to object height - _buffer[ib + 1] = (byte) (maxOZ & 0x00FF); - _buffer[ib + 2] = (byte) (maxOZ >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java deleted file mode 100644 index 70d46cb451..0000000000 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/BlockMultilayerDynamic.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -import java.util.LinkedList; -import java.util.List; - -/** - * @author Hasha - */ -public final class BlockMultilayerDynamic extends BlockMultilayer implements IBlockDynamic -{ - private final int _bx; - private final int _by; - private final byte[] _original; - private final List _objects; - - /** - * Creates {@link BlockMultilayerDynamic}. - * @param bx : Block X coordinate. - * @param by : Block Y coordinate. - * @param block : The original MultilayerBlock to create a dynamic version from. - */ - public BlockMultilayerDynamic(int bx, int by, BlockMultilayer block) - { - // move buffer from ComplexBlock object to this object - _buffer = block._buffer; - block._buffer = null; - - // get block coordinates - _bx = bx; - _by = by; - - // create copy for dynamic implementation - _original = new byte[_buffer.length]; - System.arraycopy(_buffer, 0, _original, 0, _buffer.length); - - // create list for geo objects - _objects = new LinkedList<>(); - } - - @Override - public short getHeightNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweNearestOriginal(int geoX, int geoY, int worldZ) - { - // get cell index - final int index = getIndexNearestOriginal(geoX, geoY, worldZ); - - // get nswe - return _original[index]; - } - - private final int getIndexNearestOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from bottom) - byte layers = _original[index++]; - - // loop though all cell layers, find closest layer - int limit = Integer.MAX_VALUE; - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // get Z distance and compare with limit - // note: When 2 layers have same distance to worldZ (worldZ is in the middle of them): - // > returns bottom layer - // >= returns upper layer - final int distance = Math.abs(height - worldZ); - if (distance > limit) - { - break; - } - - // update limit and move to next layer - limit = distance; - index += 3; - } - - // return layer index - return index - 3; - } - - @Override - public final int getIndexAboveOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to last layer data (first from bottom) - byte layers = _original[index++]; - index += (layers - 1) * 3; - - // loop though all layers, find first layer above worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is higher than worldZ, return layer index - if (height > worldZ) - { - return index; - } - - // move index to next layer - index -= 3; - } - - // none layer found - return -1; - } - - @Override - public final int getIndexBelowOriginal(int geoX, int geoY, int worldZ) - { - // move index to the cell given by coordinates - int index = 0; - for (int i = 0; i < (((geoX % GeoStructure.BLOCK_CELLS_X) * GeoStructure.BLOCK_CELLS_Y) + (geoY % GeoStructure.BLOCK_CELLS_Y)); i++) - { - // move index by amount of layers for this cell - index += (_original[index] * 3) + 1; - } - - // get layers count and shift to first layer data (first from top) - byte layers = _original[index++]; - - // loop though all layers, find first layer below worldZ - while (layers-- > 0) - { - // get layer height - final int height = (_original[index + 1] & 0x00FF) | (_original[index + 2] << 8); - - // layer height is lower than worldZ, return layer index - if (height < worldZ) - { - return index; - } - - // move index to next layer - index += 3; - } - - // none layer found - return -1; - } - - @Override - public short getHeightOriginal(int index) - { - // get height - return (short) ((_original[index + 1] & 0x00FF) | (_original[index + 2] << 8)); - } - - @Override - public byte getNsweOriginal(int index) - { - // get nswe - return _original[index]; - } - - @Override - public final synchronized void addGeoObject(IGeoObject object) - { - // add geo object, update block geodata when added - if (_objects.add(object)) - { - update(); - } - } - - @Override - public final synchronized void removeGeoObject(IGeoObject object) - { - // remove geo object, update block geodata when removed - if (_objects.remove(object)) - { - update(); - } - } - - private final void update() - { - // copy original geodata, than apply changes - System.arraycopy(_original, 0, _buffer, 0, _original.length); - - // get block geo coordinates - final int minBX = _bx * GeoStructure.BLOCK_CELLS_X; - final int minBY = _by * GeoStructure.BLOCK_CELLS_Y; - final int maxBX = minBX + GeoStructure.BLOCK_CELLS_X; - final int maxBY = minBY + GeoStructure.BLOCK_CELLS_Y; - - // for all objects - for (IGeoObject object : _objects) - { - // get object geo coordinates and other object variables - final int minOX = object.getGeoX(); - final int minOY = object.getGeoY(); - final int minOZ = object.getGeoZ(); - final int maxOZ = minOZ + object.getHeight(); - final byte[][] geoData = object.getObjectGeoData(); - - // calculate min/max geo coordinates for iteration (intersection of block and object) - final int minGX = Math.max(minBX, minOX); - final int minGY = Math.max(minBY, minOY); - final int maxGX = Math.min(maxBX, minOX + geoData.length); - final int maxGY = Math.min(maxBY, minOY + geoData[0].length); - - // iterate over intersection of block and object - for (int gx = minGX; gx < maxGX; gx++) - { - for (int gy = minGY; gy < maxGY; gy++) - { - // get object nswe - final byte objNswe = geoData[gx - minOX][gy - minOY]; - - // object contains no change of data in this cell, continue to next cell - if (objNswe == 0xFF) - { - continue; - } - - // get block index of this cell - int ib = getIndexNearest(gx, gy, minOZ); - - // compare block data and original data, when height differs -> height was affected by other geo object - // -> cell is inside an object -> no need to check/change it anymore (Z is lifted, nswe is 0) - // compare is done in raw format (2 bytes) instead of conversion to short - if ((_buffer[ib + 1] != _original[ib + 1]) || (_buffer[ib + 2] != _original[ib + 2])) - { - continue; - } - - // so far cell is not inside of any object - if (objNswe == 0) - { - // cell is inside of this object -> set nswe to 0 and lift Z up - - // set block nswe - _buffer[ib] = 0; - - // calculate object height, limit to next layer - int z = maxOZ; - int i = getIndexAbove(gx, gy, minOZ); - if (i != -1) - { - int az = getHeight(i); - if (az <= maxOZ) - { - z = az - GeoStructure.CELL_IGNORE_HEIGHT; - } - } - - // set block Z to object height - _buffer[ib + 1] = (byte) (z & 0x00FF); - _buffer[ib + 2] = (byte) (z >> 8); - } - else - { - // cell is outside of this object -> update nswe - - // height different is too high (trying to update another layer), skip - short z = getHeight(ib); - if (Math.abs(z - minOZ) > GeoStructure.CELL_IGNORE_HEIGHT) - { - continue; - } - - // adjust block nswe according to the object nswe - _buffer[ib] &= objNswe; - } - } - } - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java index e1925e6e57..4586e82920 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/GeoStructure.java @@ -32,12 +32,7 @@ public final class GeoStructure public static final byte CELL_FLAG_SW = 1 << 5; public static final byte CELL_FLAG_NE = 1 << 6; public static final byte CELL_FLAG_NW = (byte) (1 << 7); - public static final byte CELL_FLAG_S_AND_E = CELL_FLAG_S | CELL_FLAG_E; - public static final byte CELL_FLAG_S_AND_W = CELL_FLAG_S | CELL_FLAG_W; - public static final byte CELL_FLAG_N_AND_E = CELL_FLAG_N | CELL_FLAG_E; - public static final byte CELL_FLAG_N_AND_W = CELL_FLAG_N | CELL_FLAG_W; - public static final int CELL_SIZE = 16; public static final int CELL_HEIGHT = 8; public static final int CELL_IGNORE_HEIGHT = CELL_HEIGHT * 6; @@ -64,8 +59,8 @@ public final class GeoStructure public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * BLOCK_CELLS_Y; // global geodata - public static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); - public static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); + private static final int GEO_REGIONS_X = ((L2World.TILE_X_MAX - L2World.TILE_X_MIN) + 1); + private static final int GEO_REGIONS_Y = ((L2World.TILE_Y_MAX - L2World.TILE_Y_MIN) + 1); public static final int GEO_BLOCKS_X = GEO_REGIONS_X * REGION_BLOCKS_X; public static final int GEO_BLOCKS_Y = GEO_REGIONS_Y * REGION_BLOCKS_Y; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java deleted file mode 100644 index da227626f4..0000000000 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/geoengine/geodata/IBlockDynamic.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.geoengine.geodata; - -/** - * @author Hasha - */ -public interface IBlockDynamic -{ - /** - * Adds {@link IGeoObject} to the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be added. - */ - void addGeoObject(IGeoObject object); - - /** - * Removes {@link IGeoObject} from the {@link ABlock}. The block will update geodata according the object. - * @param object : {@link IGeoObject} to be removed. - */ - void removeGeoObject(IGeoObject object); -} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java index 2fc1234300..3dd467d653 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/DailyTaskManager.java @@ -253,7 +253,7 @@ public class DailyTaskManager extends AbstractEventManager> }); } - public void resetTrainingCamp() + private void resetTrainingCamp() { if (Config.TRAINING_CAMP_ENABLE) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 37f7cd0a21..0fbe44bc6d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -33,7 +33,7 @@ import com.l2jmobius.gameserver.model.entity.Fort; public final class FortManager implements InstanceListManager { - protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName()); private final Map _forts = new ConcurrentSkipListMap<>(); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 9cce7dd46b..83614e02e7 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.scripting.ScriptEngineManager; */ public final class QuestManager { - protected static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); + private static final Logger LOGGER = Logger.getLogger(QuestManager.class.getName()); /** Map containing all the quests. */ private final Map _quests = new ConcurrentHashMap<>(); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java index 805d7435e9..0522c9ea2b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/ZoneManager.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.zone.ZoneRegion; import com.l2jmobius.gameserver.model.zone.form.ZoneCuboid; import com.l2jmobius.gameserver.model.zone.form.ZoneCylinder; import com.l2jmobius.gameserver.model.zone.form.ZoneNPoly; -import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone; import com.l2jmobius.gameserver.model.zone.type.L2RespawnZone; import com.l2jmobius.gameserver.model.zone.type.L2SpawnTerritory; @@ -62,9 +61,9 @@ public final class ZoneManager implements IGameXmlReader private static final Map SETTINGS = new HashMap<>(); - public static final int SHIFT_BY = 15; - public static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); - public static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); + private static final int SHIFT_BY = 15; + private static final int OFFSET_X = Math.abs(L2World.MAP_MIN_X >> SHIFT_BY); + private static final int OFFSET_Y = Math.abs(L2World.MAP_MIN_Y >> SHIFT_BY); private final Map, Map> _classZones = new HashMap<>(); private final Map _spawnTerritories = new HashMap<>(); @@ -424,7 +423,7 @@ public final class ZoneManager implements IGameXmlReader * @param id the id * @return true, if successful */ - public boolean checkId(int id) + private boolean checkId(int id) { for (Map map : _classZones.values()) { @@ -443,7 +442,7 @@ public final class ZoneManager implements IGameXmlReader * @param zone the zone */ @SuppressWarnings("unchecked") - public void addZone(Integer id, T zone) + private void addZone(Integer id, T zone) { Map map = (Map) _classZones.get(zone.getClass()); if (map == null) @@ -612,7 +611,7 @@ public final class ZoneManager implements IGameXmlReader * @return zone from given coordinates */ @SuppressWarnings("unchecked") - public T getZone(int x, int y, int z, Class type) + private T getZone(int x, int y, int z, Class type) { for (L2ZoneType zone : getRegion(x, y).getZones().values()) { @@ -653,29 +652,6 @@ public final class ZoneManager implements IGameXmlReader return temp; } - /** - * Gets the arena. - * @param character the character - * @return the arena - */ - public final L2ArenaZone getArena(L2Character character) - { - if (character == null) - { - return null; - } - - for (L2ZoneType temp : getInstance().getZones(character.getX(), character.getY(), character.getZ())) - { - if ((temp instanceof L2ArenaZone) && temp.isCharacterInZone(character)) - { - return (L2ArenaZone) temp; - } - } - - return null; - } - /** * Gets the olympiad stadium. * @param character the character @@ -698,33 +674,6 @@ public final class ZoneManager implements IGameXmlReader return null; } - /** - * For testing purposes only. - * @param the generic type - * @param obj the obj - * @param type the type - * @return the closest zone - */ - @SuppressWarnings("unchecked") - public T getClosestZone(L2Object obj, Class type) - { - T zone = getZone(obj, type); - if (zone == null) - { - double closestdis = Double.MAX_VALUE; - for (T temp : (Collection) _classZones.get(type).values()) - { - final double distance = temp.getDistanceToZone(obj); - if (distance < closestdis) - { - closestdis = distance; - zone = temp; - } - } - } - return zone; - } - /** * General storage for debug items used for visualizing zones. * @return list of items diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/TradeList.java index e9a73532b4..cbdb625d6c 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/TradeList.java @@ -157,26 +157,6 @@ public class TradeList return new TradeItem(item, item.getCount(), item.getReferencePrice()); } - /** - * Adjust ItemRequest by corresponding item in this list using its ObjectId - * @param item : ItemRequest to be adjusted - */ - public void adjustItemRequest(ItemRequest item) - { - for (TradeItem filtItem : _items) - { - if (filtItem.getObjectId() == item.getObjectId()) - { - if (filtItem.getCount() < item.getCount()) - { - item.setCount(filtItem.getCount()); - } - return; - } - } - item.setCount(0); - } - /** * Add simplified item to TradeList * @param objectId : int @@ -312,7 +292,7 @@ public class TradeList * @param count : int * @return */ - public synchronized TradeItem removeItem(int objectId, int itemId, long count) + private synchronized TradeItem removeItem(int objectId, int itemId, long count) { if (_locked) { @@ -462,7 +442,7 @@ public class TradeList /** * Cancels TradeList confirmation */ - public void invalidateConfirmation() + private void invalidateConfirmation() { _confirmed = false; } @@ -548,7 +528,7 @@ public class TradeList * @param partner * @return items slots count */ - public int countItemsSlots(L2PcInstance partner) + private int countItemsSlots(L2PcInstance partner) { int slots = 0; @@ -579,7 +559,7 @@ public class TradeList /** * @return the weight of items in tradeList */ - public int calcItemsWeight() + private int calcItemsWeight() { long weight = 0; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java index 6ee4d7e704..1e0c221723 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/transform/Transform.java @@ -122,7 +122,7 @@ public final class Transform implements IIdentifiable return _title; } - public TransformTemplate getTemplate(L2Character creature) + private TransformTemplate getTemplate(L2Character creature) { if (creature.isPlayer()) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/base/SubClass.java index e318f331ee..a044727635 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -36,8 +36,8 @@ public final class SubClass private int _vitalityPoints = 0; private boolean _dualClass = false; - public static final int MAX_VITALITY_POINTS = 140000; - public static final int MIN_VITALITY_POINTS = 0; + private static final int MAX_VITALITY_POINTS = 140000; + private static final int MIN_VITALITY_POINTS = 0; public SubClass() { @@ -137,26 +137,4 @@ public final class SubClass _level = levelValue; } - - public void incLevel() - { - if (!_dualClass && (_level == _maxLevel)) - { - return; - } - - _level++; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } - - public void decLevel() - { - if (_level == Config.BASE_SUBCLASS_LEVEL) - { - return; - } - - _level--; - setExp(ExperienceData.getInstance().getExpForLevel(getLevel())); - } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java index 615a35a89b..e992ddc27d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/events/TimerExecutor.java @@ -52,7 +52,7 @@ public final class TimerExecutor * @param holder * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addTimer(TimerHolder holder) + private boolean addTimer(TimerHolder holder) { final Set> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet()); removeAndCancelTimers(timers, holder::isEqual); @@ -123,25 +123,11 @@ public final class TimerExecutor * @param eventTimer * @return {@code true} if timer were successfully added, {@code false} in case it exists already */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) + private boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent eventTimer) { return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this)); } - /** - * Adds repeating timer - * @param event - * @param params - * @param time - * @param npc - * @param player - * @return {@code true} if timer were successfully added, {@code false} in case it exists already - */ - public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player) - { - return addRepeatingTimer(event, params, time, npc, player, _eventListener); - } - /** * Adds repeating timer * @param event @@ -181,22 +167,6 @@ public final class TimerExecutor } } - /** - * @param timer - */ - public void onTimerCancel(TimerHolder timer) - { - final Set> timers = _timers.get(timer.getEvent()); - if ((timers != null) && timers.remove(timer)) - { - _eventListener.onTimerEvent(timer); - if (timers.isEmpty()) - { - _timers.remove(timer.getEvent()); - } - } - } - /** * Cancels and removes all timers from the _timers map */ @@ -223,15 +193,6 @@ public final class TimerExecutor return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player)); } - /** - * @param event - * @return {@code true} if there is at least one timer with the given event, {@code false} otherwise - */ - public boolean hasTimers(T event) - { - return _timers.containsKey(event); - } - /** * @param event * @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise @@ -305,32 +266,4 @@ public final class TimerExecutor } } } - - /** - * @param event - * @param npc - * @param player - * @return the remaining time of the timer, or -1 in case it doesn't exists - */ - public long getRemainingTime(T event, L2Npc npc, L2PcInstance player) - { - final Set> timers = _timers.get(event); - if ((timers == null) || timers.isEmpty()) - { - return -1; - } - - final Iterator> holders = timers.iterator(); - while (holders.hasNext()) - { - final TimerHolder holder = holders.next(); - if (holder.isEqual(event, npc, player)) - { - holders.remove(); - return holder.getRemainingTime(); - } - } - - return -1; - } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java index b5355f61fa..0be7c93deb 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/holders/TrainingHolder.java @@ -93,11 +93,6 @@ public class TrainingHolder implements Serializable return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - getElapsedTime()); } - public long getRemainingTime(long time) - { - return TimeUnit.SECONDS.toMinutes(Config.TRAINING_CAMP_MAX_DURATION - time); - } - public long getTrainingTime(TimeUnit unit) { return Math.min(unit.convert(Config.TRAINING_CAMP_MAX_DURATION, TimeUnit.SECONDS), unit.convert(_endTime - _startTime, TimeUnit.MILLISECONDS)); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java index 476b2fd451..0786bcdf9e 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/MCritRateFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.items.L2Item; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -37,12 +38,12 @@ public class MCritRateFinalizer implements IStatsFunction double baseValue = calcWeaponPlusBaseValue(creature, stat); if (creature.isPlayer()) { + // Enchanted legs bonus baseValue += calcEnchantBodyPart(creature, L2Item.SLOT_LEGS); } final double witBonus = creature.getWIT() > 0 ? BaseStats.WIT.calcBonus(creature) : 1.; - baseValue *= witBonus * 10; - return Stats.defaultValue(creature, stat, baseValue); + return validateValue(creature, Stats.defaultValue(creature, stat, baseValue * witBonus * 10), 0, Config.MAX_MCRIT_RATE); } @Override diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java index 91d821eb20..d5b22084f2 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/finalizers/RegenCPFinalizer.java @@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.model.stats.finalizers; import java.util.Optional; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.stats.BaseStats; @@ -39,7 +40,7 @@ public class RegenCPFinalizer implements IStatsFunction } final L2PcInstance player = creature.getActingPlayer(); - double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature); + double baseValue = player.getTemplate().getBaseCpRegen(creature.getLevel()) * creature.getLevelMod() * BaseStats.CON.calcBonus(creature) * Config.CP_REGEN_MULTIPLIER; if (player.isSitting()) { baseValue *= 1.5; // Sitting diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java index bccb1a9fdb..9318c24170 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/votereward/VoteSystem.java @@ -40,12 +40,11 @@ public abstract class VoteSystem implements Runnable private static List voteSystems = new ArrayList<>(); - protected int votesDiff; - protected boolean allowReport; - protected int boxes; - protected Map rewards; - protected int checkMins; - protected int lastVotes = 0; + private final int votesDiff; + private final boolean allowReport; + private final int boxes; + private final Map rewards; + private int lastVotes = 0; private final Map playerIps = new HashMap<>(); public static void initialize() @@ -87,26 +86,12 @@ public abstract class VoteSystem implements Runnable } } - public static VoteSystem getVoteSystem(String name) - { - for (VoteSystem vs : voteSystems) - { - if (vs.getSiteName().equals(name)) - { - return vs; - } - } - - return null; - } - public VoteSystem(int votesDiff, boolean allowReport, int boxes, Map rewards, int checkMins) { this.votesDiff = votesDiff; this.allowReport = allowReport; this.boxes = boxes; this.rewards = rewards; - this.checkMins = checkMins; ThreadPool.scheduleAtFixedRate(this, checkMins * 1000 * 60, checkMins * 1000 * 60); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index f431bdab71..0982f340af 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm; public class ZoneCuboid extends L2ZoneForm { private final int _z1, _z2; - Rectangle _r; + private final Rectangle _r; public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/SystemMessageId.java index ae648cf928..096394ef1b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -16231,18 +16231,6 @@ public final class SystemMessageId return VALUES.get(id); } - public static SystemMessageId getSystemMessageId(String name) - { - try - { - return (SystemMessageId) SystemMessageId.class.getField(name).get(null); - } - catch (Exception e) - { - return null; - } - } - private final int _id; private String _name; private byte _params; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java index c89239c35a..9a6d576246 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/loginserverpackets/game/TempBan.java @@ -23,26 +23,21 @@ import com.l2jmobius.commons.network.BaseSendablePacket; */ public class TempBan extends BaseSendablePacket { - public TempBan(String accountName, String ip, long time, String reason) + public TempBan(String accountName, String ip, long time) { writeC(0x0A); writeS(accountName); writeS(ip); writeQ(System.currentTimeMillis() + (time * 60000)); - if (reason != null) - { - writeC(0x01); - writeS(reason); - } - else - { - writeC(0x00); - } - } - - public TempBan(String accountName, String ip, long time) - { - this(accountName, ip, time, null); + // if (reason != null) + // { + // writeC(0x01); + // writeS(reason); + // } + // else + // { + writeC(0x00); + // } } @Override diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java index 300f789024..1666381c1f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/serverpackets/TutorialShowHtml.java @@ -38,18 +38,6 @@ public final class TutorialShowHtml extends AbstractHtmlPacket _type = NORMAL_WINDOW; } - /** - * This constructor is just here to be able to show a tutorial html
- * window bound to an npc. - * @param npcObjId - * @param html - */ - public TutorialShowHtml(int npcObjId, String html) - { - super(npcObjId, html); - _type = NORMAL_WINDOW; - } - public TutorialShowHtml(int npcObjId, String html, int type) { super(npcObjId, html); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java index d23a2c8f2c..a0e0ba255b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/network/telnet/TelnetServer.java @@ -52,7 +52,7 @@ public class TelnetServer } } - public void init() + private void init() { addHandler(new ITelnetCommand() { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java index 55e6aa2b85..ca0cef4b3b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/TaskManager.java @@ -47,12 +47,12 @@ import com.l2jmobius.gameserver.taskmanager.tasks.TaskShutdown; */ public final class TaskManager { - protected static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); + static final Logger LOGGER = Logger.getLogger(TaskManager.class.getName()); private final Map _tasks = new ConcurrentHashMap<>(); - protected final List _currentTasks = new CopyOnWriteArrayList<>(); + final List _currentTasks = new CopyOnWriteArrayList<>(); - protected static final String[] SQL_STATEMENTS = + static final String[] SQL_STATEMENTS = { "SELECT id,task,type,last_activation,param1,param2,param3 FROM global_tasks", "UPDATE global_tasks SET last_activation=? WHERE id=?", @@ -70,13 +70,13 @@ public final class TaskManager public class ExecutedTask implements Runnable { int id; - long lastActivation; - Task task; - TaskTypes type; - String[] params; + private long lastActivation; + private final Task task; + private final TaskTypes type; + private final String[] params; ScheduledFuture scheduled; - public ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException + ExecutedTask(Task ptask, TaskTypes ptype, ResultSet rset) throws SQLException { task = ptask; type = ptype; @@ -150,7 +150,7 @@ public final class TaskManager return lastActivation; } - public void stopTask() + private void stopTask() { task.onDestroy(); @@ -171,7 +171,7 @@ public final class TaskManager registerTask(new TaskShutdown()); } - public void registerTask(Task task) + private void registerTask(Task task) { _tasks.computeIfAbsent(task.getName().hashCode(), k -> { @@ -312,7 +312,7 @@ public final class TaskManager return addUniqueTask(task, type, param1, param2, param3, 0); } - public static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addUniqueTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement ps1 = con.prepareStatement(SQL_STATEMENTS[2])) @@ -348,7 +348,7 @@ public final class TaskManager return addTask(task, type, param1, param2, param3, 0); } - public static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) + private static boolean addTask(String task, TaskTypes type, String param1, String param2, String param3, long lastActivation) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(SQL_STATEMENTS[3])) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java index 6611f812e0..ca3b62485d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskCleanUp.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskCleanUp extends Task { - public static final String NAME = "clean_up"; + private static final String NAME = "clean_up"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java index 2145c0ac71..facfd44730 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskRestart.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public final class TaskRestart extends Task { - public static final String NAME = "restart"; + private static final String NAME = "restart"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java index 95a4fc114a..d4c895f8c5 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/taskmanager/tasks/TaskShutdown.java @@ -25,7 +25,7 @@ import com.l2jmobius.gameserver.taskmanager.TaskManager.ExecutedTask; */ public class TaskShutdown extends Task { - public static final String NAME = "shutdown"; + private static final String NAME = "shutdown"; @Override public String getName() diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ui/frmAbout.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ui/frmAbout.java index 2a2c99186d..bd3851a35a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ui/frmAbout.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ui/frmAbout.java @@ -39,8 +39,8 @@ import com.l2jmobius.Config; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -129,7 +129,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java index a9f8029b98..b5a02a26cd 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/TimeAmountInterpreter.java @@ -13,7 +13,6 @@ package com.l2jmobius.gameserver.util; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; import java.io.IOException; import java.util.Locale; @@ -32,16 +31,6 @@ public class TimeAmountInterpreter // utility class } - /** - * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#NANOSECONDS}. - * @param timeAmountInNanos amount of time in nanoseconds - * @return an user-friendly description of the given time amount - */ - public static String consolidateNanos(long timeAmountInNanos) - { - return consolidate(timeAmountInNanos, NANOSECONDS); - } - /** * Calls {@link #consolidate(long, TimeUnit)} with {@link TimeUnit#MILLISECONDS}. * @param timeAmountInMillis amount of time in milliseconds @@ -58,7 +47,7 @@ public class TimeAmountInterpreter * @param timeUnit unit of the given amount * @return an user-friendly description of the given time amount */ - public static String consolidate(long timeAmount, TimeUnit timeUnit) + private static String consolidate(long timeAmount, TimeUnit timeUnit) { return consolidate(timeAmount, timeUnit, timeUnit, DAYS, "0 " + timeUnit.name().toLowerCase(Locale.ENGLISH)); } @@ -92,7 +81,7 @@ public class TimeAmountInterpreter * @throws RuntimeException if {@code textBuilder} throws an {@link IOException} */ @SuppressWarnings("unchecked") - public static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException + private static T appendConsolidated(T textBuilder, long timeAmount, TimeUnit timeUnit, TimeUnit minConsolidationUnit, TimeUnit maxConsolidationUnit, String noTimeUsedIndicator) throws RuntimeException { try { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java index a0292b85fd..98856a3927 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java @@ -40,7 +40,6 @@ import java.util.stream.Collectors; import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.commons.util.file.filter.ExtFilter; import com.l2jmobius.gameserver.enums.HtmlActionScope; import com.l2jmobius.gameserver.enums.IllegalActionPunishmentType; import com.l2jmobius.gameserver.model.L2Object; @@ -51,7 +50,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.tasks.player.IllegalPlayerActionTask; import com.l2jmobius.gameserver.model.interfaces.ILocational; import com.l2jmobius.gameserver.network.serverpackets.AbstractHtmlPacket; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowBoard; /** @@ -119,15 +117,6 @@ public final class Util return degree; } - public static int convertDegreeToClientHeading(double degree) - { - if (degree < 0) - { - degree = 360 + degree; - } - return (int) (degree * 182.044444444); - } - public static int calculateHeadingFrom(ILocational from, ILocational to) { return calculateHeadingFrom(from.getX(), from.getY(), to.getX(), to.getY()); @@ -447,16 +436,6 @@ public final class Util return dateFormat.format(date); } - public static File[] getDatapackFiles(String dirname, String extention) - { - final File dir = new File(Config.DATAPACK_ROOT, "data/" + dirname); - if (!dir.exists()) - { - return null; - } - return dir.listFiles(new ExtFilter(extention)); - } - public static String getDateString(Date date) { final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -567,18 +546,6 @@ public final class Util buildHtmlLinkCache(player, scope, html); } - /** - * Helper method to send a NpcHtmlMessage to the specified player. - * @param activeChar the player to send the html content to - * @param html the html content - */ - public static void sendHtml(L2PcInstance activeChar, String html) - { - final NpcHtmlMessage npcHtml = new NpcHtmlMessage(); - npcHtml.setHtml(html); - activeChar.sendPacket(npcHtml); - } - /** * Helper method to send a community board html to the specified player.
* HtmlActionCache will be build with npc origin 0 which means the
diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java index e5388f4596..19dd322486 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/cron4j/TaskExecutor.java @@ -257,7 +257,7 @@ public class TaskExecutor /** * Resumes the execution after it has been paused. */ - public void resume() + private void resume() { synchronized (lock) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Token.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Token.java index a104db3c56..c4827f6218 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Token.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Token.java @@ -28,7 +28,7 @@ public abstract class Token public static final short TOKEN_VARIABLE = 6; public static final short TOKEN_SEPARATOR = 7; - protected final int type; + private final int type; Token(int type) { @@ -39,5 +39,4 @@ public abstract class Token { return type; } - } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java index deac7202cd..d908f195e1 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/exp4j/Tokenizer.java @@ -312,12 +312,12 @@ public class Tokenizer return Character.isDigit(ch) || (ch == '.') || (ch == 'e') || (ch == 'E') || (lastCharE && ((ch == '-') || (ch == '+'))); } - public static boolean isAlphabetic(int codePoint) + private static boolean isAlphabetic(int codePoint) { return Character.isLetter(codePoint); } - public static boolean isVariableOrFunctionCharacter(int codePoint) + private static boolean isVariableOrFunctionCharacter(int codePoint) { return isAlphabetic(codePoint) || Character.isDigit(codePoint) || (codePoint == '_') || (codePoint == '.'); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/ui/frmAbout.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/ui/frmAbout.java index 7650598616..bb68336063 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/ui/frmAbout.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/ui/frmAbout.java @@ -37,8 +37,8 @@ import javax.swing.WindowConstants; public class frmAbout { private JFrame frmAbout; - static final String URL = "www.l2jmobius.com"; - URI uri; + private static final String URL = "www.l2jmobius.com"; + final URI uri; public frmAbout() { @@ -101,7 +101,7 @@ public class frmAbout frmAbout.setLocationRelativeTo(null); } - public static URI createURI(String str) + private static URI createURI(String str) { try {