diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/GameServer.java index d4f8414a8a..e6919dfa92 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/GameServer.java @@ -422,9 +422,6 @@ public class GameServer DoorTable doorTable = DoorTable.getInstance(); // Opened by players like L2OFF - // doorTable.getDoor(19160010).openMe(); - // doorTable.getDoor(19160011).openMe(); - doorTable.getDoor(19160012).openMe(); doorTable.getDoor(19160013).openMe(); doorTable.getDoor(19160014).openMe(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/ExtractableItemsData.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/ExtractableItemsData.java index c3bd24f047..971f740480 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/ExtractableItemsData.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/ExtractableItemsData.java @@ -139,7 +139,6 @@ public class ExtractableItemsData } catch (Exception e) { - // if(Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); LOGGER.info("Extractable items data: Can not find './data/csv/extractable_items.csv'"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/FishTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/FishTable.java index 81c1d7906c..21cb4cc1c0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/FishTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/FishTable.java @@ -197,8 +197,7 @@ public class FishTable } if (_Fishs == null) { - // the fish list is empty - LOGGER.warning("Fish are not defined !"); + LOGGER.warning("Fish are not defined!"); return null; } for (FishData f : _Fishs) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java index 932caa5eb1..2104ebc6d5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java @@ -131,7 +131,6 @@ public class RecipeTable extends RecipeController } } - // TODO XMLize the recipe list private void parseList(String line) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AccessLevels.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AccessLevels.java index d28d6494da..22d920898e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AccessLevels.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AccessLevels.java @@ -34,36 +34,12 @@ import com.l2jmobius.gameserver.datatables.AccessLevel; public class AccessLevels { private static final Logger LOGGER = Logger.getLogger(AccessLevels.class.getName()); - /** - * The one and only instance of this class, retriveable by getInstance()
- */ + private static AccessLevels _instance = null; - /** - * Reserved master access level
- */ - // public static final int _masterAccessLevelNum = Config.MASTERACCESS_LEVEL; - /** - * The master access level which can use everything
- */ - - // L2EMU_EDIT - Rayan - - public AccessLevel _masterAccessLevel;/* - * = new AccessLevel(_masterAccessLevelNum, "Master Access", Config.MASTERACCESS_NAME_COLOR, Config.MASTERACCESS_TITLE_COLOR, true, true, true, true, true, true, true, true, true, true, true); //L2EMU_EDIT /** Reserved user access level
- */ - // public static final int _userAccessLevelNum = 0; - /** - * The user access level which can do no administrative tasks
- */ - - // L2EMU_EDIT - Rayan - - public AccessLevel _userAccessLevel;/* - * = new AccessLevel(_userAccessLevelNum, "User", Integer.decode("0xFFFFFF"), Integer.decode("0xFFFFFF"), false, false, false, true, false, true, true, true, true, true, false); //L2EMU_EDIT /** Map of access levels defined in database
- */ + public AccessLevel _masterAccessLevel; + public AccessLevel _userAccessLevel; private final Map _accessLevels = new HashMap<>(); - /** - * Loads the access levels from database
- */ private AccessLevels() { _masterAccessLevel = new AccessLevel(Config.MASTERACCESS_LEVEL, "Master Access", Config.MASTERACCESS_NAME_COLOR, Config.MASTERACCESS_TITLE_COLOR, true, true, true, true, true, true, true, true, true, true, true); @@ -86,11 +62,9 @@ public class AccessLevels boolean takeAggro = false; boolean gainExp = false; - // L2EMU_ADD boolean useNameColor = true; boolean useTitleColor = false; boolean canDisableGmStatus = true; - // L2EMU_ADD while (rset.next()) { @@ -158,14 +132,11 @@ public class AccessLevels takeAggro = rset.getBoolean("takeAggro"); gainExp = rset.getBoolean("gainExp"); - // L2EMU_ADD - Rayan for temp access useNameColor = rset.getBoolean("useNameColor"); useTitleColor = rset.getBoolean("useTitleColor"); canDisableGmStatus = rset.getBoolean("canDisableGmStatus"); - // L2EMU_EDIT - Rayan for temp access _accessLevels.put(accessLevel, new AccessLevel(accessLevel, name, nameColor, titleColor, isGm, allowPeaceAttack, allowFixedRes, allowTransaction, allowAltG, giveDamage, takeAggro, gainExp, useNameColor, useTitleColor, canDisableGmStatus)); - // L2EMU_EDIT } rset.close(); @@ -175,7 +146,6 @@ public class AccessLevels { LOGGER.warning("AccessLevels: Error loading from database " + e); } - // LOGGER.info("AccessLevels: Loaded " + _accessLevels.size() + " Access Levels from database."); LOGGER.info("AccessLevels: Master Access Level is " + Config.MASTERACCESS_LEVEL); LOGGER.info("AccessLevels: User Access Level is " + Config.USERACCESS_LEVEL); if (Config.DEBUG) @@ -225,9 +195,7 @@ public class AccessLevels return; } - // L2EMU_ADD - Rayan - _accessLevels.put(accessLevel, new AccessLevel(accessLevel, "Banned", Integer.decode("0x000000"), Integer.decode("0x000000"), false, false, false, false, false, false, false, false, false, false, false)); - // L2EMU_ADD } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AdminCommandAccessRights.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AdminCommandAccessRights.java index 60152fdfdf..6b8a5aa012 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AdminCommandAccessRights.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/AdminCommandAccessRights.java @@ -33,24 +33,11 @@ import com.l2jmobius.gameserver.datatables.AccessLevel; */ public class AdminCommandAccessRights { - /** - * The logger
- */ protected static final Logger LOGGER = Logger.getLogger(AdminCommandAccessRights.class.getName()); - /** - * The one and only instance of this class, retriveable by getInstance()
- */ private static AdminCommandAccessRights _instance = null; - - /** - * The access rights
- */ private final Map adminCommandAccessRights = new HashMap<>(); - /** - * Loads admin command access rights from database
- */ private AdminCommandAccessRights() { try (Connection con = DatabaseFactory.getConnection()) @@ -122,13 +109,11 @@ public class AdminCommandAccessRights return true; } - // L2EMU_ADD - Visor123 need parse command before check String command = adminCommand; if (adminCommand.indexOf(" ") != -1) { command = adminCommand.substring(0, adminCommand.indexOf(" ")); } - // L2EMU_ADD int acar = 0; if (adminCommandAccessRights.get(command) != null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/CharTemplateTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/CharTemplateTable.java index 5c03b2f732..fae50a00fd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/CharTemplateTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/CharTemplateTable.java @@ -184,7 +184,6 @@ public class CharTemplateTable while (rset.next()) { StatsSet set = new StatsSet(); - // ClassId classId = ClassId.values()[rset.getInt("id")]; set.set("classId", rset.getInt("id")); set.set("className", rset.getString("className")); set.set("raceId", rset.getInt("raceId")); @@ -228,7 +227,7 @@ public class CharTemplateTable set.set("collision_radius", rset.getDouble("m_col_r")); set.set("collision_height", rset.getDouble("m_col_h")); ct = new L2PcTemplate(set); - // 5items must go here + // 5 items must go here for (int x = 1; x < 6; x++) { if (rset.getInt("items" + x) != 0) @@ -283,9 +282,4 @@ public class CharTemplateTable return currId; } - - // public L2CharTemplate[] getAllTemplates() - // { - // return _templates.values().toArray(new L2CharTemplate[_templates.size()]); - // } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java index d357ef2c09..4d921114e7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java @@ -477,17 +477,10 @@ public class ClanTable LOGGER.warning("Could not store clans wars data " + e); } - // SystemMessage msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_BEGUN); - SystemMessage msg = new SystemMessage(SystemMessageId.CLAN_WAR_DECLARED_AGAINST_S1_IF_KILLED_LOSE_LOW_EXP); msg.addString(clan2.getName()); clan1.broadcastToOnlineMembers(msg); - // msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_BEGUN); - // msg.addString(clan1.getName()); - // clan2.broadcastToOnlineMembers(msg); - // clan1 declared clan war. - msg = new SystemMessage(SystemMessageId.CLAN_S1_DECLARED_WAR); msg.addString(clan1.getName()); clan2.broadcastToOnlineMembers(msg); @@ -503,29 +496,12 @@ public class ClanTable clan1.broadcastClanStatus(); clan2.broadcastClanStatus(); - // for(L2ClanMember player: clan1.getMembers()) - // { - // if(player.getPlayerInstance()!=null) - // player.getPlayerInstance().setWantsPeace(0); - // } - // for(L2ClanMember player: clan2.getMembers()) - // { - // if(player.getPlayerInstance()!=null) - // player.getPlayerInstance().setWantsPeace(0); - // } - try (Connection con = DatabaseFactory.getConnection()) { final PreparedStatement statement = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? AND clan2=?"); statement.setInt(1, clanId1); statement.setInt(2, clanId2); statement.execute(); - - // statement = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? AND clan2=?"); - // statement.setInt(1,clanId2); - // statement.setInt(2,clanId1); - // statement.execute(); - statement.close(); } catch (Exception e) @@ -533,8 +509,6 @@ public class ClanTable LOGGER.warning("Could not restore clans wars data " + e); } - // SystemMessage msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_ENDED); - SystemMessage msg = new SystemMessage(SystemMessageId.WAR_AGAINST_S1_HAS_STOPPED); msg.addString(clan2.getName()); clan1.broadcastToOnlineMembers(msg); @@ -542,10 +516,6 @@ public class ClanTable msg = new SystemMessage(SystemMessageId.CLAN_S1_HAS_DECIDED_TO_STOP); msg.addString(clan1.getName()); clan2.broadcastToOnlineMembers(msg); - - // msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_ENDED); - // msg.addString(clan1.getName()); - // clan2.broadcastToOnlineMembers(msg); } public void checkSurrender(L2Clan clan1, L2Clan clan2) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HelperBuffTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HelperBuffTable.java index 3aef7da04f..3682f60414 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HelperBuffTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HelperBuffTable.java @@ -36,23 +36,10 @@ public class HelperBuffTable private static final Logger LOGGER = Logger.getLogger(HennaTable.class.getName()); private static HelperBuffTable _instance; - - /** The table containing all Buff of the Newbie Helper */ public List helperBuff; - private final boolean _initialized = true; - - /** - * The player level since Newbie Helper can give the fisrt buff
- * Used to generate message : "Come back here when you have reached level ...") - */ private int _magicClassLowestLevel = 100; private int _physicClassLowestLevel = 100; - - /** - * The player level above which Newbie Helper won't give any buff
- * Used to generate message : "Only novice character of level ... or less can receive my support magic.") - */ private int _magicClassHighestLevel = 1; private int _physicClassHighestLevel = 1; @@ -235,5 +222,4 @@ public class HelperBuffTable { _physicClassLowestLevel = physicClassLowestLevel; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HennaTreeTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HennaTreeTable.java index f4c597de19..575ac564c8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HennaTreeTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/HennaTreeTable.java @@ -32,11 +32,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2HennaInstance; import com.l2jmobius.gameserver.model.base.ClassId; import com.l2jmobius.gameserver.templates.item.L2Henna; -/** - * This class ... - * @version $Revision$ $Date$ - */ - public class HennaTreeTable { private static Logger LOGGER = Logger.getLogger(HennaTreeTable.class.getName()); @@ -61,9 +56,6 @@ public class HennaTreeTable final ResultSet classlist = statement.executeQuery(); List list; - // int parentClassId; - // L2Henna henna; - classlist: while (classlist.next()) { list = new ArrayList<>(); @@ -141,5 +133,4 @@ public class HennaTreeTable { return _initialized; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/L2PetDataTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/L2PetDataTable.java index 78436c3f83..2c163ef707 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/L2PetDataTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/L2PetDataTable.java @@ -31,8 +31,6 @@ public class L2PetDataTable { private static final Logger LOGGER = Logger.getLogger(L2PetInstance.class.getName()); private static L2PetDataTable _instance; - - // private static final int[] PET_LIST = { 12077, 12312, 12313, 12311, 12527, 12528, 12526 }; private static Map> _petTable; public static L2PetDataTable getInstance() @@ -135,7 +133,6 @@ public class L2PetDataTable public L2PetData getPetData(int petID, int petLevel) { - // LOGGER.info("Getting id "+petID+" level "+ petLevel); return _petTable.get(petID).get(petLevel); } @@ -378,23 +375,23 @@ public class L2PetDataTable { switch (npcId) { - case 12077:// wolf pet a + case 12077: // wolf pet a { return new int[] { 2375 }; } - case 12564:// Sin Eater + case 12564: // Sin Eater { return new int[] { 4425 }; } - case 12311:// hatchling of wind - case 12312:// hatchling of star - case 12313:// hatchling of twilight + case 12311: // hatchling of wind + case 12312: // hatchling of star + case 12313: // hatchling of twilight { return new int[] { @@ -403,9 +400,9 @@ public class L2PetDataTable 3502 }; } - case 12526:// wind strider - case 12527:// Star strider - case 12528:// Twilight strider + case 12526: // wind strider + case 12527: // Star strider + case 12528: // Twilight strider { return new int[] { @@ -414,16 +411,16 @@ public class L2PetDataTable 4424 }; } - case 12621:// Wyvern + case 12621: // Wyvern { return new int[] { 8663 }; } - case 12780:// Baby Buffalo - case 12782:// Baby Cougar - case 12781:// Baby Kookaburra + case 12780: // Baby Buffalo + case 12782: // Baby Cougar + case 12781: // Baby Kookaburra { return new int[] { @@ -445,9 +442,9 @@ public class L2PetDataTable public static boolean isMountable(int npcId) { - return (npcId == 12526 // wind strider - ) || (npcId == 12527 // star strider - ) || (npcId == 12528 // twilight strider - ) || (npcId == 12621); // wyvern + return (npcId == 12526) // wind strider + || (npcId == 12527) // star strider + || (npcId == 12528) // twilight strider + || (npcId == 12621); // wyvern } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/NpcTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/NpcTable.java index 96703f13a1..c769c12516 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/NpcTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/NpcTable.java @@ -318,7 +318,7 @@ public class NpcTable { minion = true; } - case 29001:// queenAnt + case 29001: // queenAnt { if (Config.QA_LEVEL > 0) { @@ -329,10 +329,10 @@ public class NpcTable { level = NpcData.getInt("level"); } - } break; - case 29022: - { // zaken + } + case 29022: // zaken + { if (Config.ZAKEN_LEVEL > 0) { diff = Config.ZAKEN_LEVEL - NpcData.getInt("level"); @@ -342,8 +342,8 @@ public class NpcTable { level = NpcData.getInt("level"); } - } break; + } case 29015: // and minions case 29016: case 29017: @@ -351,7 +351,7 @@ public class NpcTable { minion = true; } - case 29014:// orfen + case 29014: // orfen { if (Config.ORFEN_LEVEL > 0) { @@ -362,8 +362,8 @@ public class NpcTable { level = NpcData.getInt("level"); } - } break; + } case 29007: // and minions case 29008: case 290011: @@ -381,8 +381,8 @@ public class NpcTable { level = NpcData.getInt("level"); } - } break; + } default: { level = NpcData.getInt("level"); @@ -398,7 +398,6 @@ public class NpcTable npcDat.set("name", NpcData.getString("name")); npcDat.set("serverSideName", NpcData.getBoolean("serverSideName")); - // npcDat.set("name", ""); npcDat.set("title", NpcData.getString("title")); npcDat.set("serverSideTitle", NpcData.getBoolean("serverSideTitle")); npcDat.set("collision_radius", NpcData.getDouble("collision_radius")); @@ -410,8 +409,8 @@ public class NpcTable // BOSS POWER CHANGES double multi_value = 1; - if (diff >= 15) - { // means that there is level customization + if (diff >= 15) // means that there is level customization + { multi_value = multi_value * (diff / 10); } else if ((diff > 0) && (diff < 15)) @@ -421,81 +420,75 @@ public class NpcTable if (minion) { - multi_value = multi_value * Config.LEVEL_DIFF_MULTIPLIER_MINION; // allow to increase the power of a value - // that for example, at 40 diff levels is - // equal to - // value = ((40/10)*0.8) = 3,2 --> 220 % more + multi_value = multi_value * Config.LEVEL_DIFF_MULTIPLIER_MINION; } else { switch (id) { - case 29001: - {// queenAnt + case 29001: // queenAnt + { if (Config.QA_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.QA_POWER_MULTIPLIER; } - } break; - case 29022: - { // zaken + } + case 29022: // zaken + { if (Config.ZAKEN_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.ZAKEN_POWER_MULTIPLIER; } - } break; - case 29014: - {// orfen + } + case 29014: // orfen + { if (Config.ORFEN_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.ORFEN_POWER_MULTIPLIER; } - } break; - case 29006: - { // core + } + case 29006: // core + { if (Config.CORE_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.CORE_POWER_MULTIPLIER; } - } break; - case 29019: - { // antharas + } + case 29019: // antharas + { if (Config.ANTHARAS_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.ANTHARAS_POWER_MULTIPLIER; } - } break; - case 29028: - { // valakas + } + case 29028: // valakas + { if (Config.VALAKAS_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.VALAKAS_POWER_MULTIPLIER; } - } break; - case 29020: - { // baium + } + case 29020: // baium + { if (Config.BAIUM_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.BAIUM_POWER_MULTIPLIER; } - } break; - case 29045: - { // frintezza + } + case 29045: // frintezza + { if (Config.FRINTEZZA_POWER_MULTIPLIER > 0) { multi_value = multi_value * Config.FRINTEZZA_POWER_MULTIPLIER; } - } break; - default: - { } } } @@ -520,7 +513,6 @@ public class NpcTable npcDat.set("baseWalkSpd", NpcData.getInt("walkspd")); npcDat.set("baseRunSpd", NpcData.getInt("runspd")); - // constants, until we have stats in DB // constants, until we have stats in DB npcDat.safeSet("baseSTR", NpcData.getInt("str"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate")); npcDat.safeSet("baseCON", NpcData.getInt("con"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate")); @@ -528,9 +520,7 @@ public class NpcTable npcDat.safeSet("baseINT", NpcData.getInt("int"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate")); npcDat.safeSet("baseWIT", NpcData.getInt("wit"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate")); npcDat.safeSet("baseMEN", NpcData.getInt("men"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate")); - /* - * npcDat.set("baseSTR", NpcData.getInt("str")); npcDat.set("baseCON", NpcData.getInt("con")); npcDat.set("baseDEX", NpcData.getInt("dex")); npcDat.set("baseINT", NpcData.getInt("int")); npcDat.set("baseWIT", NpcData.getInt("wit")); npcDat.set("baseMEN", NpcData.getInt("men")); - */ + npcDat.set("baseCpMax", 0); npcDat.set("factionId", NpcData.getString("faction_id")); @@ -620,7 +610,6 @@ public class NpcTable } } - // just wrapper public void reloadAllNpc() { restoreNpcData(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/SpawnTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/SpawnTable.java index 3e7a83b394..c139cfcd56 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/SpawnTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/SpawnTable.java @@ -186,7 +186,6 @@ public class SpawnTable statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, loc_id, periodOfDay FROM custom_spawnlist ORDER BY id"); } - // PreparedStatement statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, loc_id, periodOfDay FROM custom_spawnlist ORDER BY id"); final ResultSet rset = statement.executeQuery(); L2Spawn spawnDat; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TerritoryTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TerritoryTable.java index 2470d43595..bb412da155 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TerritoryTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TerritoryTable.java @@ -40,7 +40,6 @@ public class TerritoryTable public TerritoryTable() { _territory.clear(); - // load all data at server start reload_data(); } @@ -64,7 +63,6 @@ public class TerritoryTable while (rset.next()) { - // final String terr = "sql_terr_" + rset.getString("loc_id"); final int terr = rset.getInt("loc_id"); if (_territory.get(terr) == null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TradeListTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TradeListTable.java index 22c5488240..841ad8d007 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TradeListTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/TradeListTable.java @@ -169,9 +169,7 @@ public class TradeListTable statement1.close(); LOGGER.info("TradeListTable: Loaded " + _lists.size() + " Buylists."); - /* - * Restore Task for reinitialize count of buy item - */ + try { int time = 0; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/AugmentationData.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/AugmentationData.java index d7b61dc764..c6d6cd2541 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/AugmentationData.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/AugmentationData.java @@ -46,7 +46,6 @@ public class AugmentationData { private static final Logger LOGGER = Logger.getLogger(AugmentationData.class.getName()); - // ========================================================= private static AugmentationData _instance; public static final AugmentationData getInstance() @@ -59,21 +58,14 @@ public class AugmentationData return _instance; } - // ========================================================= - // Data Field - // stats private static final int STAT_START = 1; private static final int STAT_END = 14560; private static final int STAT_BLOCKSIZE = 3640; - // private static final int STAT_NUMBEROF_BLOCKS = 4; private static final int STAT_SUBBLOCKSIZE = 91; - // private static final int STAT_NUMBEROF_SUBBLOCKS = 40; // skills private static final int BLUE_START = 14561; - // private static final int PURPLE_START = 14578; - // private static final int RED_START = 14685; private static final int SKILLS_BLOCKSIZE = 178; // basestats @@ -87,8 +79,6 @@ public class AugmentationData private final Map> _purpleSkills; private final Map> _redSkills; - // ========================================================= - // Constructor @SuppressWarnings("unchecked") private AugmentationData() { @@ -131,9 +121,6 @@ public class AugmentationData getInstance(); } - // ========================================================= - // Nested Class - public class augmentationSkill { private final int _skillId; @@ -216,15 +203,10 @@ public class AugmentationData } } - // ========================================================= - // Method - Private - private final void load() { // Load the skillmap - // Note: the skillmap data is only used when generating new augmentations - // the client expects a different id in order to display the skill in the - // items description... + // Note: the skillmap data is only used when generating new augmentations the client expects a different id in order to display the skill in the items description. try { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); @@ -421,9 +403,6 @@ public class AugmentationData } } - // ========================================================= - // Properties - Public - /** * Generate a new random augmentation * @param item @@ -433,11 +412,7 @@ public class AugmentationData */ public L2Augmentation generateRandomAugmentation(L2ItemInstance item, int lifeStoneLevel, int lifeStoneGrade) { - // Note that stat12 stands for stat 1 AND 2 (same for stat34 ;p ) - // this is because a value can contain up to 2 stat modifications - // (there are two short values packed in one integer value, meaning 4 stat modifications at max) - // for more info take a look at getAugStatsById(...) - + // Note: stat12 stands for stat 1 AND 2 (same for stat34 ;p ) this is because a value can contain up to 2 stat modifications (there are two short values packed in one integer value, meaning 4 stat modifications at max) for more info take a look at getAugStatsById(...) // Note: lifeStoneGrade: (0 means low grade, 3 top grade) // First: determine whether we will add a skill/baseStatModifier or not because this determine which color could be the result int skill_Chance = 0; @@ -496,15 +471,10 @@ public class AugmentationData // Second: decide which grade the augmentation result is going to have: // 0:yellow, 1:blue, 2:purple, 3:red - // The chances used here are most likely custom, - // whats known is: u can also get a red result from a normal grade lifeStone - // however I will make it so that a higher grade lifeStone will more likely result in a - // higher grade augmentation... and the augmentation result will at least have the grade - // of the life stone - // Second: Calculate the subblock offset for the choosen color, - // and the level of the lifeStone - // whats known is: you cant have yellow with skill(or baseStatModifier) - // noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow + // The chances used here are most likely custom, whats known is: u can also get a red result from a normal grade lifeStone however I will make it so that a higher grade lifeStone will more likely result in a higher grade augmentation... + // and the augmentation result will at least have the grade of the life stone + // Second: Calculate the subblock offset for the choosen color, and the level of the lifeStone + // Whats is known: you cant have yellow with skill(or baseStatModifier) noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow if ((stat34 == 0) && !generateSkill) { resultColor = Rnd.get(0, 100); @@ -679,8 +649,7 @@ public class AugmentationData final augmentationStat as = _augmentationStats[block].get((stats[i] - 1)); temp.add(new AugStat(as.getStat(), as.getSingleStatValue(subblock))); } - else - // twin stat + else // twin stat { stats[i] -= 13; // rescale to 0 (if first of first combined block) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/ZoneData.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/ZoneData.java index cb0dd329ac..b690ed9a44 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/ZoneData.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/xml/ZoneData.java @@ -75,7 +75,6 @@ public class ZoneData { private static final Logger LOGGER = Logger.getLogger(ZoneData.class.getName()); - // ========================================================= private static ZoneData _instance; public static final ZoneData getInstance() @@ -88,11 +87,6 @@ public class ZoneData return _instance; } - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public ZoneData() { LOGGER.info("Loading zones..."); @@ -100,7 +94,6 @@ public class ZoneData load(); } - // reload public void reload() { synchronized (_instance) @@ -110,9 +103,6 @@ public class ZoneData } } - // ========================================================= - // Method - Private - private final void load() { int zoneCount = 0; @@ -269,9 +259,6 @@ public class ZoneData temp = new L2BossZone(zoneId, boss_id); break; } - /* - * else if(zoneType.equals("SkillZone")) { temp = new L2SkillZone(zoneId); } - */ case "EffectZone": { zoneId = effect_zone_id; @@ -309,7 +296,6 @@ public class ZoneData } // get the zone shape from file if any - int[][] coords = null; int[] point; final List rs = new ArrayList<>(); @@ -436,11 +422,7 @@ public class ZoneData } } - else // Create this zone. Parsing for cuboids is a - // bit different than for other polygons - // cuboids need exactly 2 points to be defined. - // Other polygons need at least 3 (one per - // vertex) + else // Create this zone. Parsing for cuboids is a bit different than for other polygons cuboids need exactly 2 points to be defined. Other polygons need at least 3 (one per vertex) if (zoneShape.equalsIgnoreCase("Cuboid")) { if (coords.length == 2) @@ -475,8 +457,7 @@ public class ZoneData } else if (zoneShape.equalsIgnoreCase("Cylinder")) { - // A Cylinder zone requires a center point - // at x,y and a radius + // A cylinder zone requires a center point at x,y and a radius attrs = d.getAttributes(); final int zoneRad = Integer.parseInt(attrs.getNamedItem("rad").getNodeValue()); if ((coords.length == 1) && (zoneRad > 0)) @@ -524,8 +505,7 @@ public class ZoneData FishingZoneManager.getInstance().addWaterZone((L2WaterZone) temp); } - // Register the zone into any world region it intersects with... - // currently 11136 test for each zone :> + // Register the zone into any world region it intersects with currently 11136 test for each zone :> int ax; int ay; int bx; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentItem.java index ef37fc015c..5437a0e868 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentItem.java @@ -164,16 +164,6 @@ final class DocumentItem extends DocumentBase Node first = n.getFirstChild(); for (n = first; n != null; n = n.getNextSibling()) { - // No tables in item xmls. - // if ("table".equals(n.getNodeName())) - // { - // if (_currentItem.item != null) - // { - // throw new IllegalStateException("Item created but table node found! Item " + itemId); - // } - // parseTable(n); - // } - // else if ("set".equals(n.getNodeName())) { if (_currentItem.item != null) @@ -182,12 +172,6 @@ final class DocumentItem extends DocumentBase } parseBeanSet(n, _currentItem.set, 1); } - // Handled bellow, after item type is set. - // else if ("for".equals(n.getNodeName())) - // { - // makeItem(); - // parseTemplate(n, _currentItem.item); - // } } if (className.equals("Weapon")) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentSkill.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentSkill.java index 1f76148479..a2cf475fbc 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentSkill.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/engines/DocumentSkill.java @@ -188,10 +188,8 @@ final class DocumentSkill extends DocumentBase { _currentSkill.enchsets1[i] = new StatsSet(); _currentSkill.enchsets1[i].set("skill_id", _currentSkill.id); - // currentSkill.enchsets1[i] = currentSkill.sets[currentSkill.sets.length-1]; _currentSkill.enchsets1[i].set("level", i + 101); _currentSkill.enchsets1[i].set("name", _currentSkill.name); - // currentSkill.enchsets1[i].set("skillType", "NOTDONE"); for (n = first; n != null; n = n.getNextSibling()) { @@ -218,11 +216,9 @@ final class DocumentSkill extends DocumentBase for (int i = 0; i < enchantLevels2; i++) { _currentSkill.enchsets2[i] = new StatsSet(); - // currentSkill.enchsets2[i] = currentSkill.sets[currentSkill.sets.length-1]; _currentSkill.enchsets2[i].set("skill_id", _currentSkill.id); _currentSkill.enchsets2[i].set("level", i + 141); _currentSkill.enchsets2[i].set("name", _currentSkill.name); - // currentSkill.enchsets2[i].set("skillType", "NOTDONE"); for (n = first; n != null; n = n.getNextSibling()) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/geoeditorcon/GeoEditorThread.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/geoeditorcon/GeoEditorThread.java index 8246ee9c37..296da15e3b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/geoeditorcon/GeoEditorThread.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/geoeditorcon/GeoEditorThread.java @@ -34,8 +34,7 @@ public class GeoEditorThread extends Thread private int _mode = 0; // 0 - don't send coords, 1 - send each - // validateposition from client, 2 - send in - // intervals of _sendDelay ms. + // validateposition from client, 2 - send in intervals of _sendDelay ms. private int _sendDelay = 1000; // default - once in second private final Socket _geSocket; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/PathFinding.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/PathFinding.java index 37b74dc4a2..86abeb9d8f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/PathFinding.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/PathFinding.java @@ -43,111 +43,6 @@ public abstract class PathFinding public abstract List findPath(int x, int y, int z, int tx, int ty, int tz, boolean playable); - // @formatter:off - /* - public List search(AbstractNode start, AbstractNode end, int instanceId) - { - // The simplest grid-based pathfinding. - // Drawback is not having higher cost for diagonal movement (means funny routes) - // Could be optimized e.g. not to calculate backwards as far as forwards. - - // List of Visited Nodes - LinkedList visited = new LinkedList(); - - // List of Nodes to Visit - LinkedList to_visit = new LinkedList(); - to_visit.add(start); - - int i = 0; - while (i < 800) - { - AbstractNode node; - try - { - node = to_visit.removeFirst(); - } - catch (Exception e) - { - // No Path found - return null; - } - if (node.equals(end)) //path found! - return constructPath(node, instanceId); - else - { - i++; - visited.add(node); - node.attachNeighbors(); - Node[] neighbors = node.getNeighbors(); - if (neighbors == null) - continue; - for (Node n : neighbors) - { - if (!visited.contains(n) && !to_visit.contains(n)) - { - n.setParent(node); - to_visit.add(n); - } - } - } - } - //No Path found - return null; - } - */ - /* - public List searchAStar(Node start, Node end, int instanceId) - { - // Not operational yet? - int start_x = start.getLoc().getX(); - int start_y = start.getLoc().getY(); - int end_x = end.getLoc().getX(); - int end_y = end.getLoc().getY(); - //List of Visited Nodes - FastNodeList visited = new FastNodeList(800);//TODO! Add limit to cfg - - // List of Nodes to Visit - BinaryNodeHeap to_visit = new BinaryNodeHeap(800); - to_visit.add(start); - - int i = 0; - while (i < 800)//TODO! Add limit to cfg - { - AbstractNode node; - try - { - node = to_visit.removeFirst(); - } - catch (Exception e) - { - // No Path found - return null; - } - if (node.equals(end)) //path found! - return constructPath(node, instanceId); - else - { - visited.add(node); - node.attachNeighbors(); - for (Node n : node.getNeighbors()) - { - if (!visited.contains(n) && !to_visit.contains(n)) - { - i++; - n.setParent(node); - n.setCost(Math.abs(start_x - n.getLoc().getNodeX()) + Math.abs(start_y - n.getLoc().getNodeY()) - + Math.abs(end_x - n.getLoc().getNodeX()) + Math.abs(end_y - n.getLoc().getNodeY())); - to_visit.add(n); - } - } - } - } - //No Path found - return null; - } - */ - // @formatter:on - /** * Convert geodata position to pathnode position * @param geo_pos diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellNodeBuffer.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellNodeBuffer.java index 5747e430ea..d3cb0379b2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellNodeBuffer.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellNodeBuffer.java @@ -344,7 +344,6 @@ public class CellNodeBuffer final int dX = x - _targetX; final int dY = y - _targetY; final int dZ = z - _targetZ; - // Math.abs(dx) + Math.abs(dy) + Math.abs(dz) / 16 double result = Math.sqrt((dX * dX) + (dY * dY) + ((dZ * dZ) / 256.0)); if (result > weight) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellPathFinding.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellPathFinding.java index 3262c41738..970a0fe2e1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellPathFinding.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/CellPathFinding.java @@ -334,7 +334,6 @@ public class CellPathFinding extends PathFinding if (playable) { i.playableOverflows++; - // System.err.println("Overflow, size requested: " + size + " playable:"+playable); } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/NodeLoc.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/NodeLoc.java index 6e46bd766d..621b944a22 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/NodeLoc.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/geodata/pathfinding/cellnodes/NodeLoc.java @@ -132,7 +132,6 @@ public class NodeLoc extends AbstractNodeLoc result = (prime * result) + (((_geoHeight & 0xFFFF) << 1) | nswe); return result; - // return super.hashCode(); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AdminCommandHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AdminCommandHandler.java index 0504b301e6..d2d976fee2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AdminCommandHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AdminCommandHandler.java @@ -149,7 +149,6 @@ public class AdminCommandHandler registerAdminCommandHandler(new AdminChristmas()); registerAdminCommandHandler(new AdminBan()); registerAdminCommandHandler(new AdminPolymorph()); - // registerAdminCommandHandler(new AdminBanChat()); registerAdminCommandHandler(new AdminReload()); registerAdminCommandHandler(new AdminKick()); registerAdminCommandHandler(new AdminMonsterRace()); @@ -186,9 +185,7 @@ public class AdminCommandHandler registerAdminCommandHandler(new AdminNoble()); registerAdminCommandHandler(new AdminBuffs()); registerAdminCommandHandler(new AdminAio()); - registerAdminCommandHandler(new AdminWho()); // L2OFF command - // ATTENTION: adding new command handlers, you have to change the - // sql file containing the access levels rights + registerAdminCommandHandler(new AdminWho()); LOGGER.info("AdminCommandHandler: Loaded " + _datatable.size() + " handlers."); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoAnnouncementHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoAnnouncementHandler.java index 810cda4aa9..c0dc28d9ac 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoAnnouncementHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoAnnouncementHandler.java @@ -74,7 +74,6 @@ public class AutoAnnouncementHandler catch (Exception e) { e.printStackTrace(); - // ignore } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoChatHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoChatHandler.java index d28fb564aa..c12c7cb893 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoChatHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/AutoChatHandler.java @@ -599,18 +599,13 @@ public class AutoChatHandler implements SpawnListener LOGGER.info("AutoChatHandler: Chat definition added for NPC ID " + _npcInstance.getNpcId() + " (Object ID = " + _npcInstance.getObjectId() + ")."); } - // If global chat isn't enabled for the parent instance, - // then handle the chat task locally. + // If global chat isn't enabled for the parent instance, then handle the chat task locally. if (!chatInst.isGlobal()) { setActive(true); } } - /* - * protected AutoChatDefinition(AutoChatInstance chatInst, L2NpcInstance npcInst) { this(chatInst, npcInst, null, -1); } - */ - protected String[] getChatTexts() { if (_chatTexts != null) @@ -667,8 +662,7 @@ public class AutoChatHandler implements SpawnListener if (getChatDelay() == 0) { - // Schedule it set to 5Ms, isn't error, if use 0 sometine - // chatDefinition return null in AutoChatRunner + // Schedule it set to 5Ms, isn't error, if use 0 sometimes chatDefinition return null in AutoChatRunner _chatTask = ThreadPool.schedule(acr, 5); } else diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ICustomByPassHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ICustomByPassHandler.java index 8c558f7b3b..9201215f41 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ICustomByPassHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ICustomByPassHandler.java @@ -23,9 +23,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public interface ICustomByPassHandler { - /** - * @return as String - - */ String[] getByPassCommands(); void handleCommand(String command, L2PcInstance player, String parameters); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IItemHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IItemHandler.java index 9325a87f62..2ac6d36e69 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IItemHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IItemHandler.java @@ -19,13 +19,6 @@ package com.l2jmobius.gameserver.handler; import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance; -/** - * Mother class of all itemHandlers.
- *
- * an IItemHandler implementation has to be stateless - * @version $Revision: 1.1.4.3 $ $Date: 2005/03/27 15:30:09 $ - */ - public interface IItemHandler { /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ISkillHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ISkillHandler.java index 529d43ca85..71869588c2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ISkillHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ISkillHandler.java @@ -23,11 +23,6 @@ import com.l2jmobius.gameserver.model.L2Skill; import com.l2jmobius.gameserver.model.L2Skill.SkillType; import com.l2jmobius.gameserver.model.actor.L2Character; -/** - * an IItemHandler implementation has to be stateless - * @version $Revision: 1.2.2.2.2.3 $ $Date: 2005/04/03 15:55:06 $ - */ - public interface ISkillHandler { /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IUserCommandHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IUserCommandHandler.java index 8a3409790d..faf8cde33a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IUserCommandHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IUserCommandHandler.java @@ -18,10 +18,6 @@ package com.l2jmobius.gameserver.handler; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * This class ... - * @version $Revision: 1.1.2.1.2.2 $ $Date: 2005/03/27 15:30:10 $ - */ public interface IUserCommandHandler { /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IVoicedCommandHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IVoicedCommandHandler.java index 0d60d16f24..980049b783 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IVoicedCommandHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/IVoicedCommandHandler.java @@ -18,10 +18,6 @@ package com.l2jmobius.gameserver.handler; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * This class ... - * @version $Revision: 1.1.4.2 $ $Date: 2005/03/27 15:30:09 $ - */ public interface IVoicedCommandHandler { /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java index 807ee3be63..6e831d775b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java @@ -64,10 +64,6 @@ import com.l2jmobius.gameserver.handler.itemhandlers.SpecialXMas; import com.l2jmobius.gameserver.handler.itemhandlers.SpiritShot; import com.l2jmobius.gameserver.handler.itemhandlers.SummonItems; -/** - * This class manages handlers of items - * @version $Revision: 1.1.4.3 $ $Date: 2005/03/27 15:30:09 $ - */ public class ItemHandler { private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/SkillHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/SkillHandler.java index a41d7eebc3..68014b9dc2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/SkillHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/SkillHandler.java @@ -57,10 +57,6 @@ import com.l2jmobius.gameserver.handler.skillhandlers.ZakenPlayer; import com.l2jmobius.gameserver.handler.skillhandlers.ZakenSelf; import com.l2jmobius.gameserver.model.L2Skill.SkillType; -/** - * This class ... - * @version $Revision: 1.1.4.4 $ $Date: 2005/04/03 15:55:06 $ - */ public class SkillHandler { private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName()); @@ -134,9 +130,6 @@ public class SkillHandler return _datatable.get(skillType); } - /** - * @return - */ public int size() { return _datatable.size(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java index e6d7369149..b24555b2fc 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java @@ -37,10 +37,6 @@ import com.l2jmobius.gameserver.handler.usercommandhandlers.PartyInfo; import com.l2jmobius.gameserver.handler.usercommandhandlers.SiegeStatus; import com.l2jmobius.gameserver.handler.usercommandhandlers.Time; -/** - * This class ... - * @version $Revision: 1.1.2.1.2.5 $ $Date: 2005/03/27 15:30:09 $ - */ public class UserCommandHandler { private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName()); @@ -106,9 +102,6 @@ public class UserCommandHandler return _datatable.get(new Integer(userCommand)); } - /** - * @return - */ public int size() { return _datatable.size(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/VoicedCommandHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/VoicedCommandHandler.java index 3c0b7ab17f..c3aac66fb0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/VoicedCommandHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/VoicedCommandHandler.java @@ -34,10 +34,6 @@ import com.l2jmobius.gameserver.handler.voicedcommandhandlers.TvTCmd; import com.l2jmobius.gameserver.handler.voicedcommandhandlers.Voting; import com.l2jmobius.gameserver.handler.voicedcommandhandlers.Wedding; -/** - * This class ... - * @version $Revision: 1.1.4.6 $ $Date: 2009/05/12 19:44:09 $ - */ public class VoicedCommandHandler { private static Logger LOGGER = Logger.getLogger(GameServer.class.getName()); @@ -144,9 +140,6 @@ public class VoicedCommandHandler return _datatable.get(command); } - /** - * @return - */ public int size() { return _datatable.size(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAdmin.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAdmin.java index 134a4749a8..4aaac6d25e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAdmin.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAdmin.java @@ -77,11 +77,6 @@ public class AdminAdmin implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - StringTokenizer st = new StringTokenizer(command); final CommandEnum comm = CommandEnum.valueOf(st.nextToken()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAio.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAio.java index fcf9c0374c..a22330428a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAio.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAio.java @@ -53,11 +53,6 @@ public class AdminAio implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command); final CommandEnum comm = CommandEnum.valueOf(st.nextToken()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java index 095d377998..5bf2118ae9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminAnnouncements.java @@ -71,11 +71,6 @@ public class AdminAnnouncements implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command); final String comm_s = st.nextToken(); @@ -91,18 +86,18 @@ public class AdminAnnouncements implements IAdminCommandHandler switch (comm) { - case admin_list_announcements: + case admin_list_announcements: { Announcements.getInstance().listAnnouncements(activeChar); - return true; + return true; } - case admin_reload_announcements: + case admin_reload_announcements: { Announcements.getInstance().loadAnnouncements(); Announcements.getInstance().listAnnouncements(activeChar); - return true; + return true; } - case admin_announce_menu: + case admin_announce_menu: { if (st.hasMoreTokens()) { @@ -114,25 +109,22 @@ public class AdminAnnouncements implements IAdminCommandHandler Announcements.getInstance().announceToAll(text); } Announcements.getInstance().listAnnouncements(activeChar); - return true; + return true; } - /* - */ - case admin_announce_announcements: + case admin_announce_announcements: { for (L2PcInstance player : L2World.getInstance().getAllPlayers()) { Announcements.getInstance().showAnnouncements(player); } Announcements.getInstance().listAnnouncements(activeChar); - return true; + return true; } - case admin_add_announcement: + case admin_add_announcement: { if (st.hasMoreTokens()) { text = command.replace(comm_s + " ", ""); - // text = st.nextToken(); } if (!text.equals("")) { @@ -141,9 +133,9 @@ public class AdminAnnouncements implements IAdminCommandHandler return true; } BuilderUtil.sendSysMessage(activeChar, "You cannot announce Empty message"); - return false; + return false; } - case admin_del_announcement: + case admin_del_announcement: { if (st.hasMoreTokens()) { @@ -164,9 +156,9 @@ public class AdminAnnouncements implements IAdminCommandHandler return true; } BuilderUtil.sendSysMessage(activeChar, "Usage: //del_announcement (number >=0)"); - return false; + return false; } - case admin_announce: + case admin_announce: { // Call method from another class if (Config.GM_ANNOUNCER_NAME) @@ -174,9 +166,9 @@ public class AdminAnnouncements implements IAdminCommandHandler command = command + " [ " + activeChar.getName() + " ]"; } Announcements.getInstance().handleAnnounce(command, 15); - return true; + return true; } - case admin_critannounce: + case admin_critannounce: { String text1 = command.substring(19); if (Config.GM_CRITANNOUNCER_NAME && (text1.length() > 0)) @@ -185,14 +177,14 @@ public class AdminAnnouncements implements IAdminCommandHandler } final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), Say2.CRITICAL_ANNOUNCE, "", text1); Broadcast.toAllOnlinePlayers(cs); - return true; + return true; } - case admin_list_autoannouncements: + case admin_list_autoannouncements: { AutoAnnouncementHandler.getInstance().listAutoAnnouncements(activeChar); - return true; + return true; } - case admin_add_autoannouncement: + case admin_add_autoannouncement: { if (st.hasMoreTokens()) { @@ -226,9 +218,9 @@ public class AdminAnnouncements implements IAdminCommandHandler return false; } BuilderUtil.sendSysMessage(activeChar, "Usage: //add_autoannouncement (Seconds > 30) "); - return false; + return false; } - case admin_del_autoannouncement: + case admin_del_autoannouncement: { if (st.hasMoreTokens()) { @@ -256,12 +248,12 @@ public class AdminAnnouncements implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Usage: //del_autoannouncement (number >= 0)"); return false; - } + } } - case admin_autoannounce: + case admin_autoannounce: { AutoAnnouncementHandler.getInstance().listAutoAnnouncements(activeChar); - return true; + return true; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminBuffs.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminBuffs.java index f149411932..a6f1477d74 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminBuffs.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminBuffs.java @@ -51,11 +51,6 @@ public class AdminBuffs implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - StringTokenizer st = new StringTokenizer(command, " "); CommandEnum comm = CommandEnum.valueOf(st.nextToken()); @@ -249,5 +244,4 @@ public class AdminBuffs implements IAdminCommandHandler remover.sendMessage("Can not remove effects from " + playername + ". Player appears offline."); } } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCTFEngine.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCTFEngine.java index c13dc3af68..7e845eddf4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCTFEngine.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCTFEngine.java @@ -112,11 +112,6 @@ public class AdminCTFEngine implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command); final CommandEnum comm = CommandEnum.valueOf(st.nextToken()); @@ -743,7 +738,6 @@ public class AdminCTFEngine implements IAdminCommandHandler replyMSG.append("
[CTF Engine]



"); replyMSG.append(""); - // if(!CTF._joining && !CTF._started && !CTF._teleport) if (!CTF.is_inProgress()) { replyMSG.append(""); @@ -816,7 +810,6 @@ public class AdminCTFEngine implements IAdminCommandHandler replyMSG.append(""); - // if(!CTF._joining && !CTF._started && !CTF._teleport) if (!CTF.is_inProgress()) { replyMSG.append(""); @@ -825,7 +818,6 @@ public class AdminCTFEngine implements IAdminCommandHandler replyMSG.append("
"); replyMSG.append(CTF._flagsX.get(CTF._teams.indexOf(team)) + ", " + CTF._flagsY.get(CTF._teams.indexOf(team)) + ", " + CTF._flagsZ.get(CTF._teams.indexOf(team)) + "
"); - // if(!CTF._joining && !CTF._started && !CTF._teleport) if (!CTF.is_inProgress()) { if (CTF.checkStartJoinOk()) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCache.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCache.java index 97347ea977..f3a71649dd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCache.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCache.java @@ -56,11 +56,6 @@ public class AdminCache implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command, " "); final CommandEnum comm = CommandEnum.valueOf(st.nextToken()); @@ -73,13 +68,13 @@ public class AdminCache implements IAdminCommandHandler switch (comm) { case admin_cache_htm_reload: - case admin_cache_htm_rebuild: + case admin_cache_htm_rebuild: { HtmCache.getInstance().reload(Config.DATAPACK_ROOT); BuilderUtil.sendSysMessage(activeChar, "Cache[HTML]: " + HtmCache.getInstance().getMemoryUsage() + " MB on " + HtmCache.getInstance().getLoadedFiles() + " file(s) loaded."); - return true; + return true; } - case admin_cache_reload_path: + case admin_cache_reload_path: { if (st.hasMoreTokens()) { @@ -89,9 +84,9 @@ public class AdminCache implements IAdminCommandHandler return true; } BuilderUtil.sendSysMessage(activeChar, "Usage: //cache_reload_path "); - return false; + return false; } - case admin_cache_reload_file: + case admin_cache_reload_file: { if (st.hasMoreTokens()) { @@ -107,20 +102,20 @@ public class AdminCache implements IAdminCommandHandler return true; } BuilderUtil.sendSysMessage(activeChar, "Usage: //cache_reload_file "); - return false; + return false; } case admin_cache_crest_rebuild: - case admin_cache_crest_reload: + case admin_cache_crest_reload: { CrestCache.getInstance().reload(); BuilderUtil.sendSysMessage(activeChar, "Cache[Crest]: " + String.format("%.3f", CrestCache.getInstance().getMemoryUsage()) + " megabytes on " + CrestCache.getInstance().getLoadedFiles() + " files loaded"); - return true; + return true; } - case admin_cache_crest_fix: + case admin_cache_crest_fix: { CrestCache.getInstance().convertOldPedgeFiles(); BuilderUtil.sendSysMessage(activeChar, "Cache[Crest]: crests fixed"); - return true; + return true; } default: { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java index f8930b55ce..e58171443c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChangeAccessLevel.java @@ -35,13 +35,7 @@ public class AdminChangeAccessLevel implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - handleChangeLevel(command, activeChar); - return true; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChristmas.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChristmas.java index a9c26635d0..20e576c091 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChristmas.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminChristmas.java @@ -25,8 +25,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class AdminChristmas implements IAdminCommandHandler { - // private final static Logger LOGGER = LogFactory.getLog(AdminChristmas.class); - private static final String[] ADMIN_COMMANDS = { "admin_christmas_start", @@ -36,11 +34,6 @@ public class AdminChristmas implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_christmas_start")) { startChristmas(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCreateItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCreateItem.java index 8b9a60f1d9..32d97477b5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCreateItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminCreateItem.java @@ -19,7 +19,6 @@ package com.l2jmobius.gameserver.handler.admincommandhandlers; import java.util.StringTokenizer; import java.util.logging.Logger; -import com.l2jmobius.gameserver.datatables.SkillTable; import com.l2jmobius.gameserver.datatables.xml.ItemTable; import com.l2jmobius.gameserver.handler.IAdminCommandHandler; import com.l2jmobius.gameserver.model.L2World; @@ -50,22 +49,15 @@ public class AdminCreateItem implements IAdminCommandHandler private enum CommandEnum { - admin_l2jmobius, admin_itemcreate, admin_create_item, admin_mass_create, admin_clear_inventory } - @SuppressWarnings("null") @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command); final CommandEnum comm = CommandEnum.valueOf(st.nextToken()); @@ -77,83 +69,6 @@ public class AdminCreateItem implements IAdminCommandHandler switch (comm) { - /* - * Command //l2jmobius, it gives useful items to Gm character Crystals, Gemstones, Bss-ss, scrolls, elixirs, etc To be complete... - */ - case admin_l2jmobius: - { - // Command usable only by Administrator - if ((activeChar.getAccessLevel().getLevel() != 1) || !activeChar.isGM()) - { - BuilderUtil.sendSysMessage(activeChar, "Only Administrators can use this command!"); - return false; - } - L2PcInstance Player = null; - // Items can be added only to self Gm - if (Player == null) - { - activeChar.setTarget(activeChar); - Player = activeChar; - } - Player.getInventory().addItem("Admin", 1458, 5000, Player, activeChar); // Cry d - Player.getInventory().addItem("Admin", 1459, 5000, Player, activeChar); // Cry c - Player.getInventory().addItem("Admin", 1460, 5000, Player, activeChar); // Cry b - Player.getInventory().addItem("Admin", 1461, 5000, Player, activeChar); // Cry a - Player.getInventory().addItem("Admin", 1462, 5000, Player, activeChar); // Cry s - Player.getInventory().addItem("Admin", 2130, 200, Player, activeChar); // Gem d - Player.getInventory().addItem("Admin", 2131, 200, Player, activeChar); // Gem c - Player.getInventory().addItem("Admin", 2132, 200, Player, activeChar); // Gem b - Player.getInventory().addItem("Admin", 2133, 200, Player, activeChar); // Gem a - Player.getInventory().addItem("Admin", 2134, 200, Player, activeChar); // Gem s - Player.getInventory().addItem("Admin", 736, 10, Player, activeChar); // Scroll of Escape - Player.getInventory().addItem("Admin", 737, 10, Player, activeChar); // Scroll of Resurrection - Player.getInventory().addItem("Admin", 1538, 10, Player, activeChar); // Blessed Scroll of Escape - Player.getInventory().addItem("Admin", 1829, 10, Player, activeChar); // Scroll of Escape: Clan Hall - Player.getInventory().addItem("Admin", 1830, 10, Player, activeChar); // Scroll of Escape: Castle - Player.getInventory().addItem("Admin", 3936, 10, Player, activeChar); // Blessed Scroll of Resurrection - Player.getInventory().addItem("Admin", 5858, 10, Player, activeChar); // Blessed Scroll of Escape: Clan Hall - Player.getInventory().addItem("Admin", 5859, 10, Player, activeChar); // Blessed Scroll of Escape: Castle - Player.getInventory().addItem("Admin", 1467, 1000, Player, activeChar); // Soulshot: S-grade - Player.getInventory().addItem("Admin", 2514, 1000, Player, activeChar); // Spiritshot: S-grade - Player.getInventory().addItem("Admin", 3952, 1000, Player, activeChar); // Blessed Spiritshot: S Grade - Player.getInventory().addItem("Admin", 8627, 10, Player, activeChar); // Elixir of Life (S-Grade) - Player.getInventory().addItem("Admin", 8633, 10, Player, activeChar); // Elixir of Mental Strength (S-Grade) - Player.getInventory().addItem("Admin", 8639, 10, Player, activeChar); // Elixir of CP (S-Grade) - Player.getInventory().addItem("Admin", 8874, 10, Player, activeChar); // Einhasad's Holy Water - final ItemList il = new ItemList(Player, true); - Player.sendPacket(il); - BuilderUtil.sendSysMessage(activeChar, "Items added successfully!"); - activeChar.addSkill(SkillTable.getInstance().getInfo(7029, 4), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7041, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7042, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7043, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7044, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7045, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7046, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7047, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7048, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7049, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7050, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7051, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7052, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7053, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7054, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7055, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7056, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7057, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7058, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7059, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7058, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7059, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7060, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7061, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7062, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7063, 1), true); - activeChar.addSkill(SkillTable.getInstance().getInfo(7064, 1), true); - activeChar.sendSkillList(); - BuilderUtil.sendSysMessage(activeChar, "Gm skills added successfully!"); - return true; - } case admin_itemcreate: { AdminHelpPage.showHelpPage(activeChar, "itemcreation.htm"); @@ -212,7 +127,6 @@ public class AdminCreateItem implements IAdminCommandHandler else { AdminHelpPage.showHelpPage(activeChar, "itemcreation.htm"); - // BuilderUtil.sendSysMessage(activeChar, "Usage: //itemcreate [amount]"); return true; } return false; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDMEngine.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDMEngine.java index d2d5ad186f..ef0d23085b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDMEngine.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDMEngine.java @@ -54,11 +54,6 @@ public class AdminDMEngine implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_dmevent")) { showMainPage(activeChar); @@ -73,9 +68,7 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.startsWith("admin_dmevent_desc ")) { if (DM.set_eventDesc(command.substring(19))) @@ -88,7 +81,6 @@ public class AdminDMEngine implements IAdminCommandHandler } } - else if (command.startsWith("admin_dmevent_minlvl ")) { if (!DM.checkMinLevel(Integer.valueOf(command.substring(21)))) @@ -104,9 +96,7 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.startsWith("admin_dmevent_maxlvl ")) { if (!DM.checkMaxLevel(Integer.valueOf(command.substring(21)))) @@ -122,9 +112,7 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.startsWith("admin_dmevent_join_loc ")) { if (DM.set_joiningLocationName(command.substring(23))) @@ -135,9 +123,7 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.startsWith("admin_dmevent_npc ")) { if (DM.set_npcId(Integer.valueOf(command.substring(18)))) @@ -148,15 +134,12 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.equals("admin_dmevent_npc_pos")) { DM.setNpcPos(activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_dmevent_reward ")) { if (DM.set_rewardId(Integer.valueOf(command.substring(21)))) @@ -167,9 +150,7 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.startsWith("admin_dmevent_reward_amount ")) { if (DM.set_rewardAmount(Integer.valueOf(command.substring(28)))) @@ -180,15 +161,12 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.equals("admin_dmevent_spawnpos")) { DM.setPlayersPos(activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_dmevent_color ")) { if (DM.set_playerColors(Integer.decode("0x" + command.substring(20)))) @@ -199,9 +177,7 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress"); } - } - else if (command.equals("admin_dmevent_join")) { if (DM.startJoin()) @@ -213,13 +189,11 @@ public class AdminDMEngine implements IAdminCommandHandler BuilderUtil.sendSysMessage(activeChar, "Cannot startJoin, check LOGGER for info.."); } } - else if (command.equals("admin_dmevent_teleport")) { DM.startTeleport(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_start")) { if (DM.startEvent()) @@ -230,47 +204,39 @@ public class AdminDMEngine implements IAdminCommandHandler { BuilderUtil.sendSysMessage(activeChar, "Cannot startEvent, check LOGGER for info.."); } - } - else if (command.equals("admin_dmevent_startevent")) { DM.startEvent(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_abort")) { BuilderUtil.sendSysMessage(activeChar, "Aborting event"); DM.abortEvent(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_finish")) { DM.finishEvent(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_sit")) { DM.sit(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_load")) { DM.loadData(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_save")) { DM.saveData(); showMainPage(activeChar); } - else if (command.equals("admin_dmevent_dump")) { DM.dumpData(); @@ -351,7 +317,6 @@ public class AdminDMEngine implements IAdminCommandHandler replyMSG.append(DM._players.size() + " players participating."); replyMSG.append("

"); } - else if (DM.is_started()) { replyMSG.append(""); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDelete.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDelete.java index 95b72c8b73..36b24dde2d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDelete.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDelete.java @@ -33,8 +33,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class AdminDelete implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminDelete.class); - private static final String[] ADMIN_COMMANDS = { "admin_delete" @@ -43,11 +41,6 @@ public class AdminDelete implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_delete")) { handleDelete(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDisconnect.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDisconnect.java index f2d623ac74..60d2b9a993 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDisconnect.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDisconnect.java @@ -37,11 +37,6 @@ public class AdminDisconnect implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_character_disconnect")) { disconnectCharacter(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDonator.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDonator.java index f076555f88..d42e45a60e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDonator.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDonator.java @@ -41,11 +41,6 @@ public class AdminDonator implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (activeChar == null) { return false; @@ -129,8 +124,6 @@ public class AdminDonator implements IAdminCommandHandler */ private void updateDatabase(L2PcInstance player, boolean newDonator) { - // prevents any NPE. - // ---------------- if (player == null) { return; @@ -141,7 +134,6 @@ public class AdminDonator implements IAdminCommandHandler PreparedStatement stmt = con.prepareStatement(newDonator ? INSERT_DATA : DEL_DATA); // if it is a new donator insert proper data - // -------------------------------------------- if (newDonator) { stmt.setInt(1, player.getObjectId()); @@ -165,14 +157,9 @@ public class AdminDonator implements IAdminCommandHandler } } - // Updates That Will be Executed by MySQL - // ---------------------------------------- String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator) VALUES (?,?,?,?,?)"; String DEL_DATA = "UPDATE characters_custom_data SET donator = 0 WHERE obj_Id=?"; - /** - * @return - */ @Override public String[] getAdminCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDoorControl.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDoorControl.java index 84c554ddf7..6c584e209a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDoorControl.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminDoorControl.java @@ -44,7 +44,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminDoorControl implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminDoorControl.class); private static DoorTable _doorTable; private static final String[] ADMIN_COMMANDS = { @@ -54,21 +53,14 @@ public class AdminDoorControl implements IAdminCommandHandler "admin_closeall" }; - // private static final Map doorMap = new HashMap(); //FIXME: should we jute remove this? - @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - _doorTable = DoorTable.getInstance(); L2Object target2 = null; - if (command.startsWith("admin_close ")) // id + if (command.startsWith("admin_close ")) { try { @@ -96,7 +88,7 @@ public class AdminDoorControl implements IAdminCommandHandler return false; } } - else if (command.equals("admin_close")) // target + else if (command.equals("admin_close")) { target2 = activeChar.getTarget(); @@ -109,7 +101,7 @@ public class AdminDoorControl implements IAdminCommandHandler BuilderUtil.sendSysMessage(activeChar, "Incorrect target."); } } - else if (command.startsWith("admin_open ")) // id + else if (command.startsWith("admin_open ")) { try { @@ -137,7 +129,7 @@ public class AdminDoorControl implements IAdminCommandHandler return false; } } - else if (command.equals("admin_open")) // target + else if (command.equals("admin_open")) { target2 = activeChar.getTarget(); @@ -150,7 +142,6 @@ public class AdminDoorControl implements IAdminCommandHandler BuilderUtil.sendSysMessage(activeChar, "Incorrect target."); } } - // need optimize cycle // set limits on the ID doors that do not cycle to close doors else if (command.equals("admin_closeall")) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditChar.java index 84564fac5f..5761d5d861 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditChar.java @@ -276,7 +276,7 @@ public class AdminEditChar implements IAdminCommandHandler } activeChar.sendPacket(SystemMessageId.CHARACTER_DOES_NOT_EXIST); return false; - } // given a player name:{} displays an information window + } case admin_show_characters: { String val = ""; @@ -371,7 +371,7 @@ public class AdminEditChar implements IAdminCommandHandler return false; } return true; - } // find all the player connections from a given IPv4 number + } case admin_find_account: { String val = ""; @@ -387,7 +387,7 @@ public class AdminEditChar implements IAdminCommandHandler } findCharactersPerAccount(activeChar, val); return true; - } // list all the characters from an account (useful for GMs w/o DB access) + } case admin_save_modifications: { String val = ""; @@ -413,7 +413,7 @@ public class AdminEditChar implements IAdminCommandHandler } adminModifyCharacter(activeChar, val); return true; - } // consider it deprecated... + } case admin_rec: { String val = ""; @@ -501,9 +501,6 @@ public class AdminEditChar implements IAdminCommandHandler final ClassId classId = ClassId.getClassIdByOrdinal(classidval); if (!player.isSubClassActive()) { - // while(classId.level() != 0){ //go to root - // classId = classId.getParent(); - // } player.setBaseClass(classId); } String newclass = player.getTemplate().className; @@ -871,11 +868,11 @@ public class AdminEditChar implements IAdminCommandHandler L2PcInstance target; if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance)) { - target = (L2PcInstance) activeChar.getTarget();// Target - player + target = (L2PcInstance) activeChar.getTarget(); // Target - player } else { - target = activeChar;// No target + target = activeChar; // No target } if (target != null) { @@ -997,7 +994,7 @@ public class AdminEditChar implements IAdminCommandHandler replyMSG = new StringBuilder(); for (int i = CharactersStart; i < CharactersEnd; i++) - { // Add player info into new Table row + { replyMSG.append("" + players[i].getName() + "" + players[i].getTemplate().className + "" + players[i].getLevel() + ""); } @@ -1219,7 +1216,7 @@ public class AdminEditChar implements IAdminCommandHandler StringBuilder replyMSG = new StringBuilder(); for (L2PcInstance player : players) - { // Add player info into new Table row + { name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditNpc.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditNpc.java index e31a95f71c..dfa73f91ff 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditNpc.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEditNpc.java @@ -83,11 +83,6 @@ public class AdminEditNpc implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_showShop ")) { String[] args = command.split(" "); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEffects.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEffects.java index b93d8395c9..e8e90dba54 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEffects.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEffects.java @@ -125,7 +125,6 @@ public class AdminEffects implements IAdminCommandHandler BuilderUtil.sendSysMessage(activeChar, "Now, you can be seen."); } } - else if (command.startsWith("admin_invis")) { activeChar.getAppearance().setInvisible(); @@ -140,7 +139,6 @@ public class AdminEffects implements IAdminCommandHandler activeChar.broadcastUserInfo(); BuilderUtil.sendSysMessage(activeChar, "Now, you can be seen."); } - else if (command.startsWith("admin_earthquake")) { try @@ -157,7 +155,6 @@ public class AdminEffects implements IAdminCommandHandler BuilderUtil.sendSysMessage(activeChar, "Use: //earthquake "); } } - else if (command.startsWith("admin_atmosphere")) { try @@ -170,7 +167,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_npc_say")) { try @@ -190,7 +186,6 @@ public class AdminEffects implements IAdminCommandHandler else { activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT); - return false; } } @@ -199,7 +194,6 @@ public class AdminEffects implements IAdminCommandHandler BuilderUtil.sendSysMessage(activeChar, "Target Npc before. Use: //npc_say"); } } - else if (command.equals("admin_play_sounds")) { AdminHelpPage.showHelpPage(activeChar, "songs/songs.htm"); @@ -224,7 +218,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.equals("admin_para") || command.equals("admin_para_menu")) { String type = "1"; @@ -260,7 +253,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.equals("admin_unpara") || command.equals("admin_unpara_menu")) { try @@ -278,7 +270,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_para_all")) { try @@ -299,7 +290,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_unpara_all")) { try @@ -314,7 +304,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_bighead")) { try @@ -332,7 +321,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_shrinkhead")) { try @@ -350,7 +338,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_polyself")) { try @@ -369,7 +356,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_unpolyself")) { try @@ -387,7 +373,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.equals("admin_clear_teams")) { try @@ -402,7 +387,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_setteam_close")) { try @@ -432,7 +416,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_setteam")) { String val = command.substring(14); @@ -462,7 +445,6 @@ public class AdminEffects implements IAdminCommandHandler player.broadcastUserInfo(); } - else if (command.startsWith("admin_social")) { try @@ -537,7 +519,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("debuff")) { try @@ -556,7 +537,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_abnormal")) { try @@ -637,7 +617,6 @@ public class AdminEffects implements IAdminCommandHandler { } } - else if (command.startsWith("admin_effect")) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEnchant.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEnchant.java index cf3a6ae6c0..3b9f4de23b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEnchant.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEnchant.java @@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.util.Util; */ public class AdminEnchant implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminEnchant.class); private static final String[] ADMIN_COMMANDS = { "admin_seteh", // 6 @@ -59,11 +58,6 @@ public class AdminEnchant implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_enchant")) { showMainPage(activeChar); @@ -251,5 +245,4 @@ public class AdminEnchant implements IAdminCommandHandler { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEventEngine.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEventEngine.java index b9fefa4cc0..69c8904a2f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEventEngine.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminEventEngine.java @@ -194,13 +194,11 @@ public class AdminEventEngine implements IAdminCommandHandler file.delete(); showMainPage(activeChar); } - else if (command.startsWith("admin_event_name")) { tempName += command.substring(17); showNewEventPage(activeChar); } - else if (command.equalsIgnoreCase("admin_delete_buffer")) { try @@ -213,7 +211,6 @@ public class AdminEventEngine implements IAdminCommandHandler tempBuffer = ""; } } - else if (command.startsWith("admin_event_store")) { FileOutputStream file = null; @@ -314,7 +311,6 @@ public class AdminEventEngine implements IAdminCommandHandler showEventControl(activeChar); } - else if (command.startsWith("admin_event_control_sit")) { StringTokenizer st = new StringTokenizer(command.substring(24), "-"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminExpSp.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminExpSp.java index 7fc6763925..89fea6d6fa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminExpSp.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminExpSp.java @@ -48,11 +48,6 @@ public class AdminExpSp implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_add_exp_sp")) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFightCalculator.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFightCalculator.java index 806b3432c0..13c1caea8c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFightCalculator.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFightCalculator.java @@ -36,8 +36,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class AdminFightCalculator implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminFightCalculator.class); - private static final String[] ADMIN_COMMANDS = { "admin_fight_calculator", @@ -45,15 +43,9 @@ public class AdminFightCalculator implements IAdminCommandHandler "admin_fcs", }; - // TODO: remove from gm list etc etc @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - try { if (command.startsWith("admin_fight_calculator_show")) @@ -252,8 +244,6 @@ public class AdminFightCalculator implements IAdminCommandHandler sAtk1 = 100000 / sAtk1; sAtk2 = 100000 / sAtk2; - // Formulas f = Formulas.getInstance(); - for (int i = 0; i < 10000; i++) { final boolean _miss1 = Formulas.calcHitMiss(npc1, npc2); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFortSiege.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFortSiege.java index 7a0ce17e12..980867f90a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFortSiege.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminFortSiege.java @@ -35,8 +35,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminFortSiege implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminFortSiege.class); - private static final String[] ADMIN_COMMANDS = { "admin_fortsiege", @@ -56,11 +54,6 @@ public class AdminFortSiege implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command, " "); command = st.nextToken(); // Get actual command @@ -72,14 +65,6 @@ public class AdminFortSiege implements IAdminCommandHandler fort = FortManager.getInstance().getFort(st.nextToken()); } - // Get fort - // String val = ""; - // - // if(st.hasMoreTokens()) - // { - // val = st.nextToken(); - // } - // No fort specified if ((fort == null) || (fort.getFortId() < 0)) { @@ -117,19 +102,6 @@ public class AdminFortSiege implements IAdminCommandHandler fort.getSiege().registerDefender(player, true); } } - // FIXME - // else if (command.equalsIgnoreCase("admin_add_guard")) - // { - // try - // { - // int npcId = Integer.parseInt(val); - // fort.getSiege().getFortSiegeGuardManager().addFortSiegeGuard(activeChar, npcId); - // } - // catch (Exception e) - // { - // BuilderUtil.sendSysMessage(activeChar, "Usage: //add_guard npcId"); - // } - // } else if (command.equalsIgnoreCase("admin_clear_fortsiege_list")) { fort.getSiege().clearSiegeClan(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGeodata.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGeodata.java index 8e62b5e7a8..1e478470d4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGeodata.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGeodata.java @@ -39,19 +39,9 @@ public class AdminGeodata implements IAdminCommandHandler "admin_geomap" }; - // private static final int REQUIRED_LEVEL = Config.GM_MIN; - @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - // if (!Config.ALT_PRIVILEGES_ADMIN) - // { - // if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) - // { - // return false; - // } - // } - if (command.equals("admin_geo_pos")) { final int worldX = activeChar.getX(); @@ -147,9 +137,4 @@ public class AdminGeodata implements IAdminCommandHandler { return _adminCommands; } - - // private boolean checkLevel(int level) - // { - // return (level >= REQUIRED_LEVEL); - // } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGm.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGm.java index 4268c6483a..8844023d4d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGm.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGm.java @@ -39,11 +39,6 @@ public class AdminGm implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_gm")) { handleGm(activeChar); @@ -63,8 +58,6 @@ public class AdminGm implements IAdminCommandHandler if (activeChar.isGM()) { GmListTable.getInstance().deleteGm(activeChar); - // activeChar.setIsGM(false); - BuilderUtil.sendSysMessage(activeChar, "You no longer have GM status."); if (Config.DEBUG) @@ -75,8 +68,6 @@ public class AdminGm implements IAdminCommandHandler else { GmListTable.getInstance().addGm(activeChar, false); - // activeChar.setIsGM(true); - BuilderUtil.sendSysMessage(activeChar, "You now have GM status."); if (Config.DEBUG) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java index d1f77fbfa8..004ab2e54f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminGmChat.java @@ -40,11 +40,6 @@ public class AdminGmChat implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_gmchat")) { handleGmChat(command, activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminHeal.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminHeal.java index 3e58e17511..42cc744cb6 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminHeal.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminHeal.java @@ -111,7 +111,6 @@ public class AdminHeal implements IAdminCommandHandler } catch (NumberFormatException nbe) { - // ignore } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKick.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKick.java index c100c5491d..f414f3fd48 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKick.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKick.java @@ -35,11 +35,6 @@ public class AdminKick implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_kick")) { StringTokenizer st = new StringTokenizer(command); @@ -93,5 +88,4 @@ public class AdminKick implements IAdminCommandHandler { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKill.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKill.java index d6de2b6491..8b94549c57 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKill.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminKill.java @@ -47,11 +47,6 @@ public class AdminKill implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_kill")) { StringTokenizer st = new StringTokenizer(command, " "); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLevel.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLevel.java index ee1743ca2d..861a27efc8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLevel.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLevel.java @@ -38,11 +38,6 @@ public class AdminLevel implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final L2Object targetChar = activeChar.getTarget(); final StringTokenizer st = new StringTokenizer(command, " "); final String actualCommand = st.nextToken(); // Get actual command diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLogin.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLogin.java index 0c9af1687a..2716d1b551 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLogin.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminLogin.java @@ -32,8 +32,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminLogin implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminDelete.class); - private static final String[] ADMIN_COMMANDS = { "admin_server_gm_only", @@ -43,18 +41,9 @@ public class AdminLogin implements IAdminCommandHandler "admin_server_login" }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_server_gm_only")) { gmOnly(); @@ -163,14 +152,9 @@ public class AdminLogin implements IAdminCommandHandler Config.SERVER_GMONLY = true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList() - */ @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMammon.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMammon.java index 7f1cf5b0db..a5e9be7e0c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMammon.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMammon.java @@ -50,11 +50,6 @@ public class AdminMammon implements IAdminCommandHandler @SuppressWarnings("deprecation") public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - int npcId = 0; int teleportIndex = -1; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminManor.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminManor.java index b846fd514b..14223dd99b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminManor.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminManor.java @@ -134,10 +134,6 @@ public class AdminManor implements IAdminCommandHandler return _adminCommands; } - /* - * private String formatTime(long millis) { String s = ""; int secs = (int) millis/1000; int mins = secs/60; secs -= mins*60; int hours = mins/60; mins -= hours*60; if (hours>0) s += hours + ":"; s += mins + ":"; s += secs; return s; } - */ - private void showMainPage(L2PcInstance activeChar) { NpcHtmlMessage adminReply = new NpcHtmlMessage(5); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassControl.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassControl.java index 5ec351b208..4f3c000521 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassControl.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassControl.java @@ -39,11 +39,6 @@ public class AdminMassControl implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_mass")) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassRecall.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassRecall.java index 2f740b7f74..0bb4337f41 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassRecall.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMassRecall.java @@ -41,11 +41,6 @@ public class AdminMassRecall implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_recallclan")) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMenu.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMenu.java index ca2032d435..0102142eaf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMenu.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMenu.java @@ -60,11 +60,6 @@ public class AdminMenu implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_char_manage")) { showMainPage(activeChar); @@ -334,9 +329,6 @@ public class AdminMenu implements IAdminCommandHandler showMainPage(activeChar); } - /** - * @param activeChar - */ private void showMainPage(L2PcInstance activeChar) { AdminHelpPage.showHelpPage(activeChar, "charmanage.htm"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMobGroup.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMobGroup.java index adc1e0ef85..77d5d20e5b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMobGroup.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMobGroup.java @@ -60,11 +60,6 @@ public class AdminMobGroup implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_mobmenu")) { showMainPage(activeChar, command); @@ -149,10 +144,6 @@ public class AdminMobGroup implements IAdminCommandHandler return true; } - /** - * @param activeChar - * @param command - */ private void showMainPage(L2PcInstance activeChar, String command) { String filename = "mobgroup.htm"; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMonsterRace.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMonsterRace.java index 513125a4df..dd165f3547 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMonsterRace.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminMonsterRace.java @@ -32,8 +32,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class AdminMonsterRace implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminMonsterRace.class); - private static final String[] ADMIN_COMMANDS = { "admin_mons" @@ -44,11 +42,6 @@ public class AdminMonsterRace implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equalsIgnoreCase("admin_mons")) { handleSendPacket(activeChar); @@ -68,7 +61,6 @@ public class AdminMonsterRace implements IAdminCommandHandler /* * -1 0 to initialize the race 0 15322 to start race 13765 -1 in middle of race -1 0 to end the race 8003 to 8027 */ - final int[][] codes = { { @@ -137,13 +129,6 @@ public class AdminMonsterRace implements IAdminCommandHandler @Override public void run() { - // int[][] speeds1 = MonsterRace.getInstance().getSpeeds(); - // MonsterRace.getInstance().newSpeeds(); - // int[][] speeds2 = MonsterRace.getInstance().getSpeeds(); - /* - * int[] speed = new int[8]; for (int i=0; i<8; i++) { for (int j=0; j<20; j++) { //LOGGER.info("Adding "+speeds1[i][j] +" and "+ speeds2[i][j]); speed[i] += (speeds1[i][j]*1);// + (speeds2[i][j]*1); } LOGGER.info("Total speed for "+(i+1)+" = "+speed[i]); } - */ - MonRaceInfo spk = new MonRaceInfo(codes[2][0], codes[2][1], MonsterRace.getInstance().getMonsters(), MonsterRace.getInstance().getSpeeds()); activeChar.sendPacket(spk); activeChar.broadcastPacket(spk); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminNoble.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminNoble.java index eea2693a85..d0cfeefad5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminNoble.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminNoble.java @@ -40,11 +40,6 @@ public class AdminNoble implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (activeChar == null) { return false; @@ -112,14 +107,8 @@ public class AdminNoble implements IAdminCommandHandler } } - /** - * @param player - * @param newNoble - */ private void updateDatabase(L2PcInstance player, boolean newNoble) { - // prevents any NPE. - // ---------------- if (player == null) { return; @@ -128,9 +117,6 @@ public class AdminNoble implements IAdminCommandHandler try (Connection con = DatabaseFactory.getConnection()) { PreparedStatement stmt = con.prepareStatement(newNoble ? INSERT_DATA : DEL_DATA); - - // if it is a new donator insert proper data - // -------------------------------------------- if (newNoble) { stmt.setInt(1, player.getObjectId()); @@ -141,8 +127,7 @@ public class AdminNoble implements IAdminCommandHandler stmt.execute(); stmt.close(); } - else - // deletes from database + else // deletes from database { stmt.setInt(1, player.getObjectId()); stmt.execute(); @@ -155,14 +140,9 @@ public class AdminNoble implements IAdminCommandHandler } } - // Updates That Will be Executed by MySQL - // ---------------------------------------- String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator) VALUES (?,?,?,?,?)"; String DEL_DATA = "UPDATE characters_custom_data SET noble = 0 WHERE obj_Id=?"; - /** - * @return - */ @Override public String[] getAdminCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPForge.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPForge.java index 8678b0aace..d2b3718b11 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPForge.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPForge.java @@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminPForge implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminKick.class); private static final String[] ADMIN_COMMANDS = { "admin_forge", @@ -41,11 +40,6 @@ public class AdminPForge implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_forge")) { showMainPage(activeChar); @@ -214,5 +208,4 @@ public class AdminPForge implements IAdminCommandHandler { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPetition.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPetition.java index 4e3f5b365b..21fb65371f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPetition.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPetition.java @@ -158,5 +158,4 @@ public class AdminPetition implements IAdminCommandHandler { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPledge.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPledge.java index 451949d38d..6ef5d84afe 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPledge.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPledge.java @@ -66,11 +66,6 @@ public class AdminPledge implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - final StringTokenizer st = new StringTokenizer(command); final CommandEnum comm = CommandEnum.valueOf(st.nextToken()); @@ -256,5 +251,4 @@ public class AdminPledge implements IAdminCommandHandler { AdminHelpPage.showHelpPage(activeChar, "game_menu.htm"); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPolymorph.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPolymorph.java index d6cd253bfd..f325e72151 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPolymorph.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminPolymorph.java @@ -45,11 +45,6 @@ public class AdminPolymorph implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_polymorph")) { StringTokenizer st = new StringTokenizer(command); @@ -94,12 +89,6 @@ public class AdminPolymorph implements IAdminCommandHandler return ADMIN_COMMANDS; } - /** - * @param activeChar - * @param obj - * @param id - * @param type - */ private void doPolymorph(L2PcInstance activeChar, L2Object obj, String id, String type) { if (obj != null) @@ -127,10 +116,6 @@ public class AdminPolymorph implements IAdminCommandHandler } } - /** - * @param activeChar - * @param target - */ private void doUnpoly(L2PcInstance activeChar, L2Object target) { if (target != null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminQuest.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminQuest.java index c3d9cf26e3..541561f2dd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminQuest.java @@ -28,18 +28,9 @@ public class AdminQuest implements IAdminCommandHandler "admin_quest_reload" }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - // syntax will either be: // quest_reload // quest_reload @@ -90,14 +81,9 @@ public class AdminQuest implements IAdminCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList() - */ @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRepairChar.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRepairChar.java index 4850855497..d86c27efa7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRepairChar.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRepairChar.java @@ -43,13 +43,7 @@ public class AdminRepairChar implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - handleRepair(command); - return true; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRes.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRes.java index cd2c9b2b79..2a46da67cb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRes.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRes.java @@ -45,11 +45,6 @@ public class AdminRes implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_res ")) { handleRes(activeChar, command.split(" ")[1]); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRideWyvern.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRideWyvern.java index d074b8df73..3b493bb515 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRideWyvern.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminRideWyvern.java @@ -38,11 +38,6 @@ public class AdminRideWyvern implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_ride")) { if (activeChar.isMounted() || (activeChar.getPet() != null)) @@ -97,5 +92,4 @@ public class AdminRideWyvern implements IAdminCommandHandler { return ADMIN_COMMANDS; } - } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminScript.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminScript.java index e76aeccc0e..5d64017e12 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminScript.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminScript.java @@ -44,11 +44,6 @@ public class AdminScript implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_load_script")) { File file; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShop.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShop.java index 44edb344a6..f519922987 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShop.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShop.java @@ -44,11 +44,6 @@ public class AdminShop implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_buy")) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShutdown.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShutdown.java index 639d71715d..47ff8d319b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShutdown.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminShutdown.java @@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminShutdown implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminShutdown.class); private static final String[] ADMIN_COMMANDS = { "admin_server_shutdown", @@ -161,5 +160,4 @@ public class AdminShutdown implements IAdminCommandHandler { Shutdown.getInstance().abort(activeChar); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSiege.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSiege.java index c4f2179af7..1ea3285e5c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSiege.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSiege.java @@ -40,7 +40,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil; */ public class AdminSiege implements IAdminCommandHandler { - // private static Logger LOGGER = Logger.getLogger(AdminSiege.class); private static final String[] ADMIN_COMMANDS = { "admin_siege", @@ -67,11 +66,6 @@ public class AdminSiege implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - StringTokenizer st = new StringTokenizer(command, " "); command = st.nextToken(); // Get actual command diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSkill.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSkill.java index 1ced0f44fd..eafc2912af 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSkill.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSkill.java @@ -61,11 +61,6 @@ public class AdminSkill implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_show_skills")) { showMainPage(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSpawn.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSpawn.java index e1544c93fe..e25cf853bf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSpawn.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminSpawn.java @@ -263,8 +263,7 @@ public class AdminSpawn implements IAdminCommandHandler permanent = false; spawn.set_customBossInstance(true); // for raids, this value is used in order to segnalate to not save respawn time - status for custom instance } - // else - // { + if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcId()) != null) { RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template1.getStatsSet().getDouble("baseHpMax"), template1.getStatsSet().getDouble("baseMpMax"), permanent); @@ -282,7 +281,6 @@ public class AdminSpawn implements IAdminCommandHandler } BuilderUtil.sendSysMessage(activeChar, "Created " + template1.name + " on " + target.getObjectId()); - // } } catch (Exception e) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTarget.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTarget.java index b9cc533743..57f5dba3e4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTarget.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTarget.java @@ -37,11 +37,6 @@ public class AdminTarget implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_target")) { handleTarget(command, activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTeleport.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTeleport.java index 77a1ec1b2f..6f5a97733f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTeleport.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTeleport.java @@ -386,8 +386,8 @@ public class AdminTeleport implements IAdminCommandHandler case admin_recall_npc: { recallNPC(activeChar); - } break; + } case admin_gonorth: case admin_gosouth: case admin_goeast: @@ -456,8 +456,8 @@ public class AdminTeleport implements IAdminCommandHandler case admin_tele: { showTeleportWindow(activeChar); - } break; + } case admin_teleto: { String val = ""; @@ -504,7 +504,6 @@ public class AdminTeleport implements IAdminCommandHandler } private void teleportTo(L2PcInstance activeChar, int x, int y, int z) - // private void teleportTo(L2PcInstance activeChar, String Cords) { activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); activeChar.teleToLocation(x, y, z, false); @@ -562,9 +561,7 @@ public class AdminTeleport implements IAdminCommandHandler if ((target != null) && (target instanceof L2PcInstance)) { player = (L2PcInstance) target; - } /* - * else if(target != null && target instanceof L2NpcInstance){ npc = (L2NpcInstance) target; } - */ + } else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); @@ -585,9 +582,7 @@ public class AdminTeleport implements IAdminCommandHandler activeChar.teleToLocation(x, y, z, true); BuilderUtil.sendSysMessage(activeChar, "You have teleported to character " + player.getName() + "."); - } /* - * else if(npc!=null) { int x = npc.getX(); int y = npc.getY(); int z = npc.getZ(); activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); activeChar.teleToLocation(x, y, z, true); BuilderUtil.sendSysMessage(activeChar, "You have teleported to npc " + npc.getName() + "."); } - */ + } } private void recallNPC(L2PcInstance activeChar) @@ -629,8 +624,6 @@ public class AdminTeleport implements IAdminCommandHandler try { - // L2MonsterInstance mob = new L2MonsterInstance(monsterTemplate, template1); - spawn = new L2Spawn(template1); spawn.setX(activeChar.getX()); spawn.setY(activeChar.getY()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTest.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTest.java index 19200c4c2f..1b8732fb56 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTest.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTest.java @@ -187,10 +187,6 @@ public class AdminTest implements IAdminCommandHandler return true; } - /** - * @param activeChar - * @param id - */ private void adminTestSkill(L2PcInstance activeChar, int id) { L2Character player; @@ -209,10 +205,6 @@ public class AdminTest implements IAdminCommandHandler } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList() - */ @Override public String[] getAdminCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTvTEngine.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTvTEngine.java index 5e598333e9..b4c2ac177e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTvTEngine.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminTvTEngine.java @@ -67,11 +67,6 @@ public class AdminTvTEngine implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_tvt")) { showMainPage(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminUnblockIp.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminUnblockIp.java index fcd0e7cd90..b6e488c8ef 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminUnblockIp.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminUnblockIp.java @@ -39,18 +39,9 @@ public class AdminUnblockIp implements IAdminCommandHandler "admin_unblockip" }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.startsWith("admin_unblockip ")) { try @@ -66,7 +57,6 @@ public class AdminUnblockIp implements IAdminCommandHandler } catch (StringIndexOutOfBoundsException e) { - // Send syntax to the user SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); sm.addString("Usage mode: //unblockip "); activeChar.sendPacket(sm); @@ -84,10 +74,7 @@ public class AdminUnblockIp implements IAdminCommandHandler private boolean unblockIp(String ipAddress, L2PcInstance activeChar) { - // LoginServerThread.getInstance().unBlockip(ipAddress); LOGGER.warning("IP removed by GM " + activeChar.getName()); - return true; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminVIPEngine.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminVIPEngine.java index 0fcf51fe02..04af09ae77 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminVIPEngine.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminVIPEngine.java @@ -47,18 +47,12 @@ public class AdminVIPEngine implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - if (command.equals("admin_vip")) { showMainPage(activeChar); } else if (command.startsWith("admin_vip_setteam ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -77,7 +71,6 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP.setTeam(params[1], activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_randomteam")) { if (VIP._started || VIP._joining) @@ -89,10 +82,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP.setRandomTeam(activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_settime ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -111,10 +102,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._time = Integer.valueOf(params[1]) * 60 * 1000; showMainPage(activeChar); } - else if (command.startsWith("admin_vip_endnpc ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -133,10 +122,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP.endNPC(Integer.valueOf(params[1]), activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_joinnpc ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -155,10 +142,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP.joinNPC(Integer.valueOf(params[1]), activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_setdelay ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -177,15 +162,12 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._delay = Integer.valueOf(params[1]) * 60 * 1000; showMainPage(activeChar); } - else if (command.startsWith("admin_vip_joininit")) { VIP.startJoin(activeChar); } - else if (command.startsWith("admin_vip_joinlocxyz ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -204,10 +186,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP.setJoinLOC(params[1], params[2], params[3]); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_joinnpc ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -226,10 +206,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP.joinNPC(Integer.valueOf(params[1]), activeChar); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_setarea ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -247,10 +225,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._joinArea = params[1]; showMainPage(activeChar); } - else if (command.startsWith("admin_vip_vipreward ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -269,10 +245,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._vipReward = Integer.valueOf(params[1]); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_viprewardamount ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -291,10 +265,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._vipRewardAmount = Integer.valueOf(params[1]); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_notvipreward ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -313,10 +285,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._notVipReward = Integer.valueOf(params[1]); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_notviprewardamount ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -335,10 +305,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._notVipRewardAmount = Integer.valueOf(params[1]); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_thevipreward ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); @@ -357,10 +325,8 @@ public class AdminVIPEngine implements IAdminCommandHandler VIP._theVipReward = Integer.valueOf(params[1]); showMainPage(activeChar); } - else if (command.startsWith("admin_vip_theviprewardamount ")) { - // if(VIP._started == true || VIP._joining == true) if (VIP._inProgress) { BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminWalker.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminWalker.java index 0998a90297..5ee60e338c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminWalker.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminWalker.java @@ -50,11 +50,6 @@ public class AdminWalker implements IAdminCommandHandler @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { - /* - * if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " + - * activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); } - */ - try { String[] parts = command.split(" "); @@ -188,9 +183,6 @@ public class AdminWalker implements IAdminCommandHandler } } - /** - * @param activeChar - */ private void mainMenu(L2PcInstance activeChar) { final NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId()); @@ -207,9 +199,6 @@ public class AdminWalker implements IAdminCommandHandler activeChar.sendPacket(html); } - /** - * @param activeChar - */ private void addMenu(L2PcInstance activeChar) { final NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminZone.java index 9348baedae..79edcb4599 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/admincommandhandlers/AdminZone.java @@ -37,19 +37,12 @@ public class AdminZone implements IAdminCommandHandler "admin_zone_reload" }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); // Get actual command - // String val = ""; - // if (st.countTokens() >= 1) {val = st.nextToken();} - if (actualCommand.equalsIgnoreCase("admin_zone_check")) { if (activeChar.isInsideZone(ZoneId.PVP)) @@ -106,14 +99,9 @@ public class AdminZone implements IAdminCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList() - */ @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/custom/ExtractableByPassHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/custom/ExtractableByPassHandler.java index ff6b841583..f1746df049 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/custom/ExtractableByPassHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/custom/ExtractableByPassHandler.java @@ -43,7 +43,6 @@ public class ExtractableByPassHandler implements ICustomByPassHandler return _IDS; } - // custom_extractOne custom_extractAll @Override public void handleCommand(String command, L2PcInstance player, String parameters) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java index f04a285926..56ea9461cb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSoulShot.java @@ -137,7 +137,6 @@ public class BeastSoulShot implements IItemHandler } // If the player doesn't have enough beast soulshot remaining, remove any auto soulshot task. - // TODO: test ss if (!Config.DONT_DESTROY_SS) { if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java index d55a2fb55e..1f2db62fa5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BeastSpiritShot.java @@ -149,7 +149,6 @@ public class BeastSpiritShot implements IItemHandler } } - // TODO: test ss if (!Config.DONT_DESTROY_SS) { if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java index 4595f9409c..edee081e34 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/BlessedSpiritShot.java @@ -35,7 +35,7 @@ import com.l2jmobius.gameserver.util.Broadcast; */ public class BlessedSpiritShot implements IItemHandler { - // all the items ids that this handler knowns + // All the items ids that this handler knows private static final int[] ITEM_IDS = { 3947, @@ -55,10 +55,6 @@ public class BlessedSpiritShot implements IItemHandler 2164 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { @@ -111,7 +107,6 @@ public class BlessedSpiritShot implements IItemHandler } // Consume Blessed Spiritshot if player has enough of them - // TODO: test ss if (!Config.DONT_DESTROY_SS) { if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CharChangePotions.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CharChangePotions.java index b7b46f0cd4..9eade8c518 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CharChangePotions.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CharChangePotions.java @@ -46,8 +46,7 @@ public class CharChangePotions implements IItemHandler 5245, 5246, 5247, - 5248 - // Hair Style + 5248, // Hair Style }; @Override @@ -78,75 +77,75 @@ public class CharChangePotions implements IItemHandler switch (itemId) { - case 5235: + case 5235: { activeChar.getAppearance().setFace(0); - break; + break; } - case 5236: + case 5236: { activeChar.getAppearance().setFace(1); - break; + break; } - case 5237: + case 5237: { activeChar.getAppearance().setFace(2); - break; + break; } - case 5238: + case 5238: { activeChar.getAppearance().setHairColor(0); - break; + break; } - case 5239: + case 5239: { activeChar.getAppearance().setHairColor(1); - break; + break; } - case 5240: + case 5240: { activeChar.getAppearance().setHairColor(2); - break; + break; } - case 5241: + case 5241: { activeChar.getAppearance().setHairColor(3); - break; + break; } - case 5242: + case 5242: { activeChar.getAppearance().setHairStyle(0); - break; + break; } - case 5243: + case 5243: { activeChar.getAppearance().setHairStyle(1); - break; + break; } - case 5244: + case 5244: { activeChar.getAppearance().setHairStyle(2); - break; + break; } - case 5245: + case 5245: { activeChar.getAppearance().setHairStyle(3); - break; + break; } - case 5246: + case 5246: { activeChar.getAppearance().setHairStyle(4); - break; + break; } - case 5247: + case 5247: { activeChar.getAppearance().setHairStyle(5); - break; + break; } - case 5248: + case 5248: { activeChar.getAppearance().setHairStyle(6); - break; + break; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChestKey.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChestKey.java index 633ae09ca1..8ec68706da 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChestKey.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChestKey.java @@ -40,8 +40,7 @@ public class ChestKey implements IItemHandler 6669, 6670, 6671, - 6672 - // deluxe key + 6672, // deluxe key }; @Override @@ -54,7 +53,7 @@ public class ChestKey implements IItemHandler L2PcInstance activeChar = (L2PcInstance) playable; final int itemId = item.getItemId(); - L2Skill skill = SkillTable.getInstance().getInfo(2229, itemId - 6664);// box key skill + L2Skill skill = SkillTable.getInstance().getInfo(2229, itemId - 6664); // box key skill L2Object target = activeChar.getTarget(); if (!(target instanceof L2ChestInstance)) @@ -81,5 +80,4 @@ public class ChestKey implements IItemHandler { return ITEM_IDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChristmasTree.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChristmasTree.java index d08a5bd519..4b603ad783 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChristmasTree.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ChristmasTree.java @@ -35,8 +35,7 @@ public class ChristmasTree implements IItemHandler private static final int[] ITEM_IDS = { 5560, /* x-mas tree */ - 5561 - /* Special x-mas tree */ + 5561, /* Special x-mas tree */ }; private static final int[] NPC_IDS = diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompBlessedSpiritShotPacks.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompBlessedSpiritShotPacks.java index 3f0130fd11..d9a4bd94f5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompBlessedSpiritShotPacks.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompBlessedSpiritShotPacks.java @@ -24,11 +24,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ItemList; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.1.2.1.2.3 $ $Date: 2005/03/27 15:30:07 $ - */ - public class CompBlessedSpiritShotPacks implements IItemHandler { private static final int[] ITEM_IDS = @@ -61,13 +56,13 @@ public class CompBlessedSpiritShotPacks implements IItemHandler int itemToCreateId; int amount; - if (itemId < 5200) - { // Normal Compressed Package of SpiritShots + if (itemId < 5200) // Normal Compressed Package of SpiritShots + { itemToCreateId = itemId - 1199; // Gives id of matching item for this pack amount = 300; } - else - { // Greater Compressed Package of Spirithots + else // Greater Compressed Package of Spirithots + { itemToCreateId = itemId - 1315; // Gives id of matching item for this pack amount = 1000; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompShotPacks.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompShotPacks.java index d456b1ff7f..d16e0434d1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompShotPacks.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompShotPacks.java @@ -24,11 +24,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ItemList; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.1.2.1.2.3 $ $Date: 2005/03/27 15:30:07 $ - */ - public class CompShotPacks implements IItemHandler { private static final int[] ITEM_IDS = @@ -38,16 +33,13 @@ public class CompShotPacks implements IItemHandler 5136, 5137, 5138, - 5139, /**/ + 5139, 5250, 5251, 5252, 5253, 5254, 5255 - // SS - // 5140, 5141, 5142, 5143, 5144, 5145, /**/ 5256, 5257, 5258, 5259, 5260, 5261, // SpS - // 5146, 5147, 5148, 5149, 5150, 5151, /**/ 5262, 5263, 5264, 5265, 5266, 5267 // BSpS }; @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompSpiritShotPacks.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompSpiritShotPacks.java index 38d4c0b456..b3ed23b106 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompSpiritShotPacks.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CompSpiritShotPacks.java @@ -24,11 +24,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ItemList; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.1.2.1.2.3 $ $Date: 2005/03/27 15:30:07 $ - */ - public class CompSpiritShotPacks implements IItemHandler { private static final int[] ITEM_IDS = @@ -60,13 +55,13 @@ public class CompSpiritShotPacks implements IItemHandler int itemToCreateId; int amount; - if (itemId < 5200) - { // Normal Compressed Package of SpiritShots + if (itemId < 5200) // Normal Compressed Package of SpiritShots + { itemToCreateId = itemId - 2631; // Gives id of matching item for this pack amount = 300; } - else - { // Greater Compressed Package of Spirithots + else // Greater Compressed Package of Spirithots + { itemToCreateId = itemId - 2747; // Gives id of matching item for this pack amount = 1000; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CrystalCarol.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CrystalCarol.java index 8690dffbbd..c3edf2d7bb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CrystalCarol.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/CrystalCarol.java @@ -22,11 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; -/** - * This class ... - * @version $Revision: 1.2.4.4 $ $Date: 2005/03/27 15:30:07 $ - */ - public class CrystalCarol implements IItemHandler { private static final int[] ITEM_IDS = @@ -66,137 +61,115 @@ public class CrystalCarol implements IItemHandler L2PcInstance activeChar = (L2PcInstance) playable; final int itemId = item.getItemId(); - if (itemId == 5562) - { // crystal_carol_01 + if (itemId == 5562) // crystal_carol_01 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2140, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_01"); } - else if (itemId == 5563) - { // crystal_carol_02 + else if (itemId == 5563) // crystal_carol_02 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2141, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_02"); } - else if (itemId == 5564) - { // crystal_carol_03 + else if (itemId == 5564) // crystal_carol_03 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2142, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_03"); } - else if (itemId == 5565) - { // crystal_carol_04 + else if (itemId == 5565) // crystal_carol_04 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2143, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_04"); } - else if (itemId == 5566) - { // crystal_carol_05 + else if (itemId == 5566) // crystal_carol_05 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2144, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_05"); } - else if (itemId == 5583) - { // crystal_carol_06 + else if (itemId == 5583) // crystal_carol_06 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2145, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_06"); } - else if (itemId == 5584) - { // crystal_carol_07 + else if (itemId == 5584) // crystal_carol_07 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2146, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_07"); } - else if (itemId == 5585) - { // crystal_carol_08 + else if (itemId == 5585) // crystal_carol_08 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2147, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_08"); } - else if (itemId == 5586) - { // crystal_carol_09 + else if (itemId == 5586) // crystal_carol_09 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2148, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_09"); } - else if (itemId == 5587) - { // crystal_carol_10 + else if (itemId == 5587) // crystal_carol_10 + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2149, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_carol_10"); } - else if (itemId == 4411) - { // crystal_journey + else if (itemId == 4411) // crystal_journey + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2069, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_journey"); } - else if (itemId == 4412) - { // crystal_battle + else if (itemId == 4412) // crystal_battle + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2068, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_battle"); } - else if (itemId == 4413) - { // crystal_love + else if (itemId == 4413) // crystal_love + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2070, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_love"); } - else if (itemId == 4414) - { // crystal_solitude + else if (itemId == 4414) // crystal_solitude + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2072, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_solitude"); } - else if (itemId == 4415) - { // crystal_festival + else if (itemId == 4415) // crystal_festival + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2071, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_festival"); } - else if (itemId == 4416) - { // crystal_celebration + else if (itemId == 4416) // crystal_celebration + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2073, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_celebration"); } - else if (itemId == 4417) - { // crystal_comedy + else if (itemId == 4417) // crystal_comedy + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2067, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_comedy"); } - else if (itemId == 5010) - { // crystal_victory + else if (itemId == 5010) // crystal_victory + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2066, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_victory"); } - else if (itemId == 6903) - { // music_box_m + else if (itemId == 6903) // music_box_m + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2187, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"EtcSound.battle"); } - else if (itemId == 7061) - { // crystal_birthday + else if (itemId == 7061) // crystal_birthday + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2073, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound2.crystal_celebration"); } - else if (itemId == 7062) - { // crystal_wedding + else if (itemId == 7062) // crystal_wedding + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2230, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"SkillSound5.wedding"); } - else if (itemId == 8555) - { // VVKorea + else if (itemId == 8555) // VVKorea + { final MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2272, 1, 1, 0); activeChar.broadcastPacket(MSU); - // playCrystalSound(activeChar,"EtcSound.VVKorea"); } activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Crystals.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Crystals.java index 8e57282de9..69ccf41dc5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Crystals.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Crystals.java @@ -151,8 +151,6 @@ public class Crystals implements IItemHandler if (skill != null) { activeChar.doCast(skill); - // We have the consume on XML skills - // playable.destroyItem("Consume", item.getObjectId(), 1, null, false); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnchantScrolls.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnchantScrolls.java index 470dfac72a..567666d033 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnchantScrolls.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnchantScrolls.java @@ -56,8 +56,7 @@ public class EnchantScrolls implements IItemHandler 961, 962, 6577, - 6578 - // s grade + 6578, // s grade }; @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnergyStone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnergyStone.java index 45b7222c57..c17853b23a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnergyStone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/EnergyStone.java @@ -33,6 +33,13 @@ import com.l2jmobius.gameserver.skills.l2skills.L2SkillCharge; public class EnergyStone implements IItemHandler { + private static final int ITEM_IDS[] = + { + 5589 + }; + private EffectCharge _effect; + private L2SkillCharge _skill; + public EnergyStone() { } @@ -100,7 +107,8 @@ public class EnergyStone implements IItemHandler final SystemMessage sm = new SystemMessage(SystemMessageId.FORCE_INCREASED_TO_S1); sm.addNumber(_effect.getLevel()); activeChar.sendPacket(sm); - } else if (_effect.numCharges == 2) + } + else if (_effect.numCharges == 2) { activeChar.sendPacket(SystemMessageId.FORCE_MAXLEVEL_REACHED); } @@ -132,12 +140,4 @@ public class EnergyStone implements IItemHandler { return ITEM_IDS; } - - private static final int ITEM_IDS[] = - { - 5589 - }; - private EffectCharge _effect; - private L2SkillCharge _skill; - } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ExtractableItems.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ExtractableItems.java index d7528d4fd4..3743ffa2da 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ExtractableItems.java @@ -127,7 +127,6 @@ public class ExtractableItems implements IItemHandler } } - // by Azagthtot @Override public void useItem(L2Playable playable, L2ItemInstance item) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Firework.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Firework.java index 98961eb4ac..5dadc0219f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Firework.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Firework.java @@ -27,14 +27,8 @@ import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.0.0.0.0.0 $ $Date: 2005/09/02 19:41:13 $ - */ - public class Firework implements IItemHandler { - // Modified by Baghak (Prograsso): Added Firework support private static final int[] ITEM_IDS = { 6403, @@ -115,9 +109,6 @@ public class Firework implements IItemHandler return; } - /* - * Elven Firecracker - */ if (itemId == 6403) // elven_firecracker, xml: 2023 { MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2023, 1, 1, 0); @@ -126,9 +117,6 @@ public class Firework implements IItemHandler useFw(activeChar, 2023, 1); playable.destroyItem("Consume", item.getObjectId(), 1, null, false); } - /* - * Firework - */ else if (itemId == 6406) // firework, xml: 2024 { MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2024, 1, 1, 0); @@ -137,9 +125,6 @@ public class Firework implements IItemHandler useFw(activeChar, 2024, 1); playable.destroyItem("Consume", item.getObjectId(), 1, null, false); } - /* - * Lage Firework - */ else if (itemId == 6407) // large_firework, xml: 2025 { MagicSkillUse MSU = new MagicSkillUse(playable, activeChar, 2025, 1, 1, 0); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/FishShots.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/FishShots.java index 14f2939a88..b15638e19c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/FishShots.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/FishShots.java @@ -53,10 +53,6 @@ public class FishShots implements IItemHandler 2186 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { @@ -101,8 +97,6 @@ public class FishShots implements IItemHandler final L2Object oldTarget = activeChar.getTarget(); activeChar.setTarget(activeChar); - // activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT)); - MagicSkillUse MSU = new MagicSkillUse(activeChar, SKILL_IDS[grade], 1, 0, 0); Broadcast.toSelfAndKnownPlayers(activeChar, MSU); activeChar.setTarget(oldTarget); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Harvester.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Harvester.java index 4b752d48e2..0413defab8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Harvester.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Harvester.java @@ -35,7 +35,6 @@ public class Harvester implements IItemHandler private static final int[] ITEM_IDS = { 5125 - /* Harvester */ }; L2PcInstance _activeChar; L2MonsterInstance _target; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/HeroCustomItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/HeroCustomItem.java index 903937692d..b3adbef596 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/HeroCustomItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/HeroCustomItem.java @@ -32,7 +32,6 @@ public class HeroCustomItem implements IItemHandler { public HeroCustomItem() { - // null } protected static final Logger LOGGER = Logger.getLogger(HeroCustomItem.class.getName()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/JackpotSeed.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/JackpotSeed.java index cdb5fb9d44..98adb5e9c8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/JackpotSeed.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/JackpotSeed.java @@ -36,15 +36,13 @@ public class JackpotSeed implements IItemHandler private static int[] _itemIds = { 6389, // small seed - 6390 - // large seed + 6390, // large seed }; private static int[] _npcIds = { 12774, // Young Pumpkin - 12777 - // Large Young Pumpkin + 12777, // Large Young Pumpkin }; @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Maps.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Maps.java index 61139b3425..6f850c4ba8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Maps.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Maps.java @@ -23,14 +23,9 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.serverpackets.RadarControl; import com.l2jmobius.gameserver.network.serverpackets.ShowMiniMap; -/** - * This class provides handling for items that should display a map when double clicked. - * @version $Revision: 1.1.4.3 $ $Date: 2005/03/27 15:30:07 $ - */ - public class Maps implements IItemHandler { - // all the items ids that this handler knowns + // All the items ids that this handler knows private static final int[] ITEM_IDS = { 1665, @@ -38,10 +33,6 @@ public class Maps implements IItemHandler 7063 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/MysteryPotion.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/MysteryPotion.java index 8f0e6122b4..03b93f2e90 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/MysteryPotion.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/MysteryPotion.java @@ -49,7 +49,6 @@ public class MysteryPotion implements IItemHandler } L2PcInstance activeChar = (L2PcInstance) playable; - // item.getItem().getEffects(item, activeChar); // Use a summon skill effect for fun ;) MagicSkillUse MSU = new MagicSkillUse(playable, playable, 2103, 1, 0, 0); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/NobleCustomItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/NobleCustomItem.java index 801830a729..c3a95e1744 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/NobleCustomItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/NobleCustomItem.java @@ -25,9 +25,13 @@ import com.l2jmobius.gameserver.network.serverpackets.SocialAction; public class NobleCustomItem implements IItemHandler { + private static final int ITEM_IDS[] = + { + Config.NOOBLE_CUSTOM_ITEM_ID + }; + public NobleCustomItem() { - // null } @Override @@ -68,10 +72,4 @@ public class NobleCustomItem implements IItemHandler { return ITEM_IDS; } - - private static final int ITEM_IDS[] = - { - Config.NOOBLE_CUSTOM_ITEM_ID - }; - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/PaganKeys.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/PaganKeys.java index 5075f0ebbd..63b9a11f9a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/PaganKeys.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/PaganKeys.java @@ -86,7 +86,7 @@ public class PaganKeys implements IItemHandler switch (itemId) { - case 8273: // AnteroomKey + case 8273: // AnteroomKey { if (door.getDoorName().startsWith("Anteroom")) { @@ -99,7 +99,6 @@ public class PaganKeys implements IItemHandler } else { - // test with: activeChar.sendPacket(new SystemMessage(SystemMessage.FAILED_TO_UNLOCK_DOOR)); activeChar.sendMessage("You failed to open Anterooms Door."); activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 13)); final PlaySound playSound = new PlaySound("interfacesound.system_close_01"); @@ -110,9 +109,9 @@ public class PaganKeys implements IItemHandler { activeChar.sendMessage("Incorrect Door."); } - break; + break; } - case 8274: // Chapelkey, Capel Door has a Gatekeeper?? I use this key for Altar Entrance and Chapel_Door + case 8274: // Chapelkey, Capel Door has a Gatekeeper?? I use this key for Altar Entrance and Chapel_Door { if (door.getDoorName().startsWith("Altar_Entrance") || door.getDoorName().startsWith("Chapel_Door")) { @@ -135,9 +134,9 @@ public class PaganKeys implements IItemHandler { activeChar.sendMessage("Incorrect Door."); } - break; + break; } - case 8275: // Key of Darkness + case 8275: // Key of Darkness { if (door.getDoorName().startsWith("Door_of_Darkness")) { @@ -160,7 +159,7 @@ public class PaganKeys implements IItemHandler { activeChar.sendMessage("Incorrect Door."); } - break; + break; } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Potions.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Potions.java index 1e1508671b..249ac7c73d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Potions.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Potions.java @@ -43,11 +43,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.2.4.4 $ $Date: 2005/03/27 15:30:07 $ - */ - public class Potions implements IItemHandler { protected static final Logger LOGGER = Logger.getLogger(Potions.class.getName()); @@ -214,28 +209,24 @@ public class Potions implements IItemHandler L2PcInstance activeChar; activeChar = (L2PcInstance) playable; - // if(activeChar._inEventTvT && TvT._started && !Config.TVT_ALLOW_POTIONS) if (activeChar._inEventTvT && TvT.is_started() && !Config.TVT_ALLOW_POTIONS) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } - // if(activeChar._inEventDM && DM._started && !Config.DM_ALLOW_POTIONS) if (activeChar._inEventDM && DM.is_started() && !Config.DM_ALLOW_POTIONS) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } - // if(activeChar._inEventCTF && CTF._started && !Config.CTF_ALLOW_POTIONS) if (activeChar._inEventCTF && CTF.is_started() && !Config.CTF_ALLOW_POTIONS) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } - // if(activeChar._inEventVIP && VIP._started) if (activeChar._inEventVIP && VIP._started) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); @@ -248,10 +239,6 @@ public class Potions implements IItemHandler return; } - /* - * if(activeChar.isAllSkillsDisabled()) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } - */ - if (!Config.ALLOW_POTS_IN_PVP && (activeChar.isInDuel() || (activeChar.getPvpFlag() != 0))) { activeChar.sendMessage("You Cannot Use Potions In PvP!"); @@ -760,10 +747,6 @@ public class Potions implements IItemHandler { return; } - - /* - * if(res) { playable.destroyItem("Consume", item.getObjectId(), 1, null, false); } - */ } private boolean isEffectReplaceable(L2Playable activeChar, Enum effectType, int itemId) @@ -865,8 +848,7 @@ public class Potions implements IItemHandler final L2Skill skill = SkillTable.getInstance().getInfo(magicId, level); if (skill != null) { - // Return false if potion is in reuse - // so is not destroyed from inventory + // Return false if potion is in reuse so is not destroyed from inventory if (activeChar.isSkillDisabled(skill)) { if ((skill.getId() != 2166)) @@ -908,8 +890,8 @@ public class Potions implements IItemHandler { for (Integer potion : possible_potions) { - if ((potion >= 8600) && (potion <= 8614)) - { // herbs are directly destroyed + if ((potion >= 8600) && (potion <= 8614)) // herbs are directly destroyed + { continue; } @@ -1058,22 +1040,17 @@ public class Potions implements IItemHandler private PotionsSkills(int potion_item, int skill_identifier, int skill_level) { - // Map skills = new HashMap(); skills.put(skill_identifier, skill_level); - // potion_id_skills.put(potion_item, skills); potion_id = potion_item; } private PotionsSkills(int potion_item, Integer[] skill_identifiers, Integer[] skill_levels) { - // Map skills = new HashMap(); for (int i = 0; i < skill_identifiers.length; i++) { - skills.put(skill_identifiers[i], skill_levels[i]); // each skill of a particular potion - // can have just 1 level, not more + skills.put(skill_identifiers[i], skill_levels[i]); // each skill of a particular potion can have just 1 level, not more } potion_id = potion_item; - // potion_id_skills.put(potion_item, skills); } } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Recipes.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Recipes.java index 4211b496b9..20d374490f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Recipes.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Recipes.java @@ -25,11 +25,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.1.2.5.2.5 $ $Date: 2005/04/06 16:13:51 $ - */ - public class Recipes implements IItemHandler { private final int[] ITEM_IDS; @@ -57,7 +52,8 @@ public class Recipes implements IItemHandler { SystemMessage sm = new SystemMessage(SystemMessageId.RECIPE_ALREADY_REGISTERED); activeChar.sendPacket(sm); - } else if (rp.isDwarvenRecipe()) + } + else if (rp.isDwarvenRecipe()) { if (activeChar.hasDwarvenCraft()) { @@ -88,7 +84,8 @@ public class Recipes implements IItemHandler SystemMessage sm = new SystemMessage(SystemMessageId.CANT_REGISTER_NO_ABILITY_TO_CRAFT); activeChar.sendPacket(sm); } - } else if (activeChar.hasCommonCraft()) + } + else if (activeChar.hasCommonCraft()) { if (rp.getLevel() > activeChar.getCommonCraft()) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Remedy.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Remedy.java index 7aeec65f30..c469177379 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Remedy.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Remedy.java @@ -26,11 +26,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; -/** - * This class ... - * @version $Revision: 1.1.2.4 $ $Date: 2005/04/06 16:13:51 $ - */ - public class Remedy implements IItemHandler { private static int[] ITEM_IDS = diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/RollingDice.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/RollingDice.java index f04a18815c..f133797136 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/RollingDice.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/RollingDice.java @@ -30,10 +30,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Util; -/** - * This class ... - * @version $Revision: 1.1.4.2 $ $Date: 2005/03/27 15:30:07 $ - */ public class RollingDice implements IItemHandler { private static final int[] ITEM_IDS = diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfEscape.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfEscape.java index f7ce37a673..9d74ba9744 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfEscape.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfEscape.java @@ -40,14 +40,9 @@ import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import com.l2jmobius.gameserver.network.serverpackets.SetupGauge; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.2.3 $ $Date: 2009/04/29 14:01:12 $ - */ - public class ScrollOfEscape implements IItemHandler { - // all the items ids that this handler knowns + // All the items ids that this handler knows private static final int[] ITEM_IDS = { 736, @@ -86,10 +81,6 @@ public class ScrollOfEscape implements IItemHandler 7619 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { @@ -112,39 +103,30 @@ public class ScrollOfEscape implements IItemHandler return; } - // if(activeChar._inEventTvT && TvT._started) if (activeChar._inEventTvT && TvT.is_started()) { activeChar.sendMessage("You can't use Scroll of Escape in TvT."); return; } - // if(activeChar._inEventDM && DM._started) if (activeChar._inEventDM && DM.is_started()) { activeChar.sendMessage("You can't use Scroll of Escape in DM."); return; } - // if(activeChar._inEventCTF && CTF._started) if (activeChar._inEventCTF && CTF.is_started()) { activeChar.sendMessage("You can't use Scroll of Escape in CTF."); return; } - // if(activeChar._inEventVIP && VIP._started) if (activeChar._inEventVIP && VIP._started) { activeChar.sendMessage("You can't use Scroll of Escape in VIP."); return; } - // not usefull - /* - * if(GrandBossManager.getInstance().getZone(activeChar) != null && !activeChar.isGM()) { activeChar.sendMessage("You Can't Use SOE In Grand boss zone!"); return; } - */ - // Check to see if player is on olympiad if (activeChar.isInOlympiadMode()) { @@ -185,7 +167,6 @@ public class ScrollOfEscape implements IItemHandler return; } - // activeChar.abortCast(); activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); // SoE Animation section // Check if this is a blessed scroll, if it is then shorten the cast time. diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfResurrection.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfResurrection.java index 7c563fd224..135b6460ff 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfResurrection.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/ScrollOfResurrection.java @@ -29,14 +29,9 @@ import com.l2jmobius.gameserver.model.entity.siege.Castle; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.1.2.2.2.7 $ $Date: 2005/04/05 19:41:13 $ - */ - public class ScrollOfResurrection implements IItemHandler { - // all the items ids that this handler knows + // All the items ids that this handler knows private static final int[] ITEM_IDS = { 737, @@ -45,10 +40,6 @@ public class ScrollOfResurrection implements IItemHandler 6387 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { @@ -76,7 +67,6 @@ public class ScrollOfResurrection implements IItemHandler } final int itemId = item.getItemId(); - // boolean blessedScroll = (itemId != 737); final boolean humanScroll = (itemId == 3936) || (itemId == 3959) || (itemId == 737); final boolean petScroll = (itemId == 6387) || (itemId == 737); @@ -175,25 +165,25 @@ public class ScrollOfResurrection implements IItemHandler switch (itemId) { - case 737: + case 737: { skillId = 2014; - break; // Scroll of Resurrection + break; // Scroll of Resurrection } - case 3936: + case 3936: { skillId = 2049; - break; // Blessed Scroll of Resurrection + break; // Blessed Scroll of Resurrection } - case 3959: + case 3959: { skillId = 2062; - break; // L2Day - Blessed Scroll of Resurrection + break; // L2Day - Blessed Scroll of Resurrection } - case 6387: + case 6387: { skillId = 2179; - break; // Blessed Scroll of Resurrection: For Pets + break; // Blessed Scroll of Resurrection: For Pets } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Scrolls.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Scrolls.java index 0136357486..8e760db151 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Scrolls.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/Scrolls.java @@ -27,11 +27,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; -/** - * This class ... - * @version $Revision: 1.1.6.4 $ $Date: 2005/04/06 18:25:18 $ - */ - public class Scrolls implements IItemHandler { private static final int[] ITEM_IDS = @@ -204,30 +199,30 @@ public class Scrolls implements IItemHandler } switch (itemId) { - case 8954: // Blue Primeval Crystal XML: 2306 + case 8954: // Blue Primeval Crystal XML: 2306 { activeChar.sendPacket(new MagicSkillUse(playable, playable, 2306, 1, 1, 0)); activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2306, 1, 1, 0)); activeChar.addExpAndSp(0, 50000); - break; + break; } - case 8955: // Green Primeval Crystal XML: 2306 + case 8955: // Green Primeval Crystal XML: 2306 { activeChar.sendPacket(new MagicSkillUse(playable, playable, 2306, 2, 1, 0)); activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2306, 2, 1, 0)); activeChar.addExpAndSp(0, 100000); - break; + break; } - case 8956: // Red Primeval Crystal XML: 2306 + case 8956: // Red Primeval Crystal XML: 2306 { activeChar.sendPacket(new MagicSkillUse(playable, playable, 2306, 3, 1, 0)); activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2306, 3, 1, 0)); activeChar.addExpAndSp(0, 200000); - break; + break; } - default: + default: { - break; + break; } } return; @@ -235,162 +230,162 @@ public class Scrolls implements IItemHandler switch (itemId) { - case 3926: // Scroll of Guidance XML:2050 + case 3926: // Scroll of Guidance XML:2050 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2050, 1, 1, 0)); useScroll(activeChar, 2050, 1); - break; + break; } - case 3927: // Scroll of Death Whipser XML:2051 + case 3927: // Scroll of Death Whipser XML:2051 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2051, 1, 1, 0)); useScroll(activeChar, 2051, 1); - break; + break; } - case 3928: // Scroll of Focus XML:2052 + case 3928: // Scroll of Focus XML:2052 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2052, 1, 1, 0)); useScroll(activeChar, 2052, 1); - break; + break; } - case 3929: // Scroll of Greater Acumen XML:2053 + case 3929: // Scroll of Greater Acumen XML:2053 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2053, 1, 1, 0)); useScroll(activeChar, 2053, 1); - break; + break; } - case 3930: // Scroll of Haste XML:2054 + case 3930: // Scroll of Haste XML:2054 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2054, 1, 1, 0)); useScroll(activeChar, 2054, 1); - break; + break; } - case 3931: // Scroll of Agility XML:2055 + case 3931: // Scroll of Agility XML:2055 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2055, 1, 1, 0)); useScroll(activeChar, 2055, 1); - break; + break; } - case 3932: // Scroll of Mystic Enpower XML:2056 + case 3932: // Scroll of Mystic Enpower XML:2056 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2056, 1, 1, 0)); useScroll(activeChar, 2056, 1); - break; + break; } - case 3933: // Scroll of Might XML:2057 + case 3933: // Scroll of Might XML:2057 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2057, 1, 1, 0)); useScroll(activeChar, 2057, 1); - break; + break; } - case 3934: // Scroll of Wind Walk XML:2058 + case 3934: // Scroll of Wind Walk XML:2058 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2058, 1, 1, 0)); useScroll(activeChar, 2058, 1); - break; + break; } - case 3935: // Scroll of Shield XML:2059 + case 3935: // Scroll of Shield XML:2059 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2059, 1, 1, 0)); useScroll(activeChar, 2059, 1); - break; + break; } - case 4218: // Scroll of Mana Regeneration XML:2064 + case 4218: // Scroll of Mana Regeneration XML:2064 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2064, 1, 1, 0)); useScroll(activeChar, 2064, 1); - break; + break; } - case 5593: // SP Scroll Low Grade XML:2167 + case 5593: // SP Scroll Low Grade XML:2167 { activeChar.sendPacket(new MagicSkillUse(playable, playable, 2167, 1, 1, 0)); activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2167, 1, 1, 0)); activeChar.addExpAndSp(0, 500); - break; + break; } - case 5594: // SP Scroll Medium Grade XML:2167 + case 5594: // SP Scroll Medium Grade XML:2167 { activeChar.sendPacket(new MagicSkillUse(playable, playable, 2167, 1, 1, 0)); activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2167, 1, 1, 0)); activeChar.addExpAndSp(0, 5000); - break; + break; } - case 5595: // SP Scroll High Grade XML:2167 + case 5595: // SP Scroll High Grade XML:2167 { activeChar.sendPacket(new MagicSkillUse(playable, playable, 2167, 1, 1, 0)); activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2167, 1, 1, 0)); activeChar.addExpAndSp(0, 100000); - break; + break; } - case 6037: // Scroll of Waking XML:2170 + case 6037: // Scroll of Waking XML:2170 { // activeChar.broadcastPacket(new MagicSkillUse(playable, playable, 2170, 1, 1, 0)); useScroll(activeChar, 2170, 1); - break; + break; } - case 9146: // Scroll of Guidance - For Event XML:2050 + case 9146: // Scroll of Guidance - For Event XML:2050 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2050, 1, 1, 0)); useScroll(activeChar, 2050, 1); - break; + break; } - case 9147: // Scroll of Death Whipser - For Event XML:2051 + case 9147: // Scroll of Death Whipser - For Event XML:2051 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2051, 1, 1, 0)); useScroll(activeChar, 2051, 1); - break; + break; } - case 9148: // Scroll of Focus - For Event XML:2052 + case 9148: // Scroll of Focus - For Event XML:2052 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2052, 1, 1, 0)); useScroll(activeChar, 2052, 1); - break; + break; } - case 9149: // Scroll of Acumen - For Event XML:2053 + case 9149: // Scroll of Acumen - For Event XML:2053 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2053, 1, 1, 0)); useScroll(activeChar, 2053, 1); - break; + break; } - case 9150: // Scroll of Haste - For Event XML:2054 + case 9150: // Scroll of Haste - For Event XML:2054 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2054, 1, 1, 0)); useScroll(activeChar, 2054, 1); - break; + break; } - case 9151: // Scroll of Agility - For Event XML:2055 + case 9151: // Scroll of Agility - For Event XML:2055 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2055, 1, 1, 0)); useScroll(activeChar, 2055, 1); - break; + break; } - case 9152: // Scroll of Enpower - For Event XML:2056 + case 9152: // Scroll of Enpower - For Event XML:2056 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2056, 1, 1, 0)); useScroll(activeChar, 2056, 1); - break; + break; } - case 9153: // Scroll of Might - For Event XML:2057 + case 9153: // Scroll of Might - For Event XML:2057 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2057, 1, 1, 0)); useScroll(activeChar, 2057, 1); - break; + break; } - case 9154: // Scroll of Wind Walk - For Event XML:2058 + case 9154: // Scroll of Wind Walk - For Event XML:2058 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2058, 1, 1, 0)); useScroll(activeChar, 2058, 1); - break; + break; } - case 9155: // Scroll of Shield - For Event XML:2059 + case 9155: // Scroll of Shield - For Event XML:2059 { activeChar.broadcastPacket(new MagicSkillUse(playable, activeChar, 2059, 1, 1, 0)); useScroll(activeChar, 2059, 1); - break; + break; } - default: + default: { - break; + break; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulCrystals.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulCrystals.java index 788c540a09..da724149c5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulCrystals.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulCrystals.java @@ -30,15 +30,9 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * This class ... - * @version $Revision: 1.2.4 $ $Date: 2005/08/14 21:31:07 $ - */ - public class SoulCrystals implements IItemHandler { - // First line is for Red Soul Crystals, second is Green and third is Blue Soul Crystals, - // ordered by ascending level, from 0 to 13... + // First line is for Red Soul Crystals, second is Green and third is Blue Soul Crystals, ordered by ascending level, from 0 to 13. private static final int[] ITEM_IDS = { 4629, diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java index 6dbd169f99..7115836aab 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SoulShots.java @@ -30,10 +30,6 @@ import com.l2jmobius.gameserver.templates.item.L2Item; import com.l2jmobius.gameserver.templates.item.L2Weapon; import com.l2jmobius.gameserver.util.Broadcast; -/** - * This class ... - * @version $Revision: 1.2.4.4 $ $Date: 2005/03/27 15:30:07 $ - */ public class SoulShots implements IItemHandler { // All the item IDs that this handler knows. @@ -57,10 +53,6 @@ public class SoulShots implements IItemHandler 2154 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { @@ -108,7 +100,6 @@ public class SoulShots implements IItemHandler final int saSSCount = (int) activeChar.getStat().calcStat(Stats.SOULSHOT_COUNT, 0, null, null); final int SSCount = saSSCount == 0 ? weaponItem.getSoulShotCount() : saSSCount; - // TODO: test ss if (!Config.DONT_DESTROY_SS) { if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), SSCount, null, false)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpecialXMas.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpecialXMas.java index 1739a6a16b..2c9dd4797d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpecialXMas.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpecialXMas.java @@ -55,13 +55,9 @@ public class SpecialXMas implements IItemHandler { ShowXMasSeal SXS = new ShowXMasSeal(5555); activeChar.sendPacket(SXS); - // activeChar.broadcastPacket(SXS); } } - /** - * @see com.l2jmobius.gameserver.handler.IItemHandler#getItemIds() - */ @Override public int[] getItemIds() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java index 637cc714d3..e264d40c56 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SpiritShot.java @@ -29,10 +29,6 @@ import com.l2jmobius.gameserver.templates.item.L2Item; import com.l2jmobius.gameserver.templates.item.L2Weapon; import com.l2jmobius.gameserver.util.Broadcast; -/** - * This class ... - * @version $Revision: 1.1.2.1.2.5 $ $Date: 2005/03/27 15:30:07 $ - */ public class SpiritShot implements IItemHandler { // All the item IDs that this handler knows. @@ -56,10 +52,6 @@ public class SpiritShot implements IItemHandler 2159 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useItem(L2Playable playable, L2ItemInstance item) { @@ -101,7 +93,6 @@ public class SpiritShot implements IItemHandler } // Consume Spiritshot if player has enough of them - // TODO: test ss if (!Config.DONT_DESTROY_SS) { if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java index 44b5848ede..ab76195058 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java @@ -60,7 +60,6 @@ public class SummonItems implements IItemHandler return; } - // if(activeChar._inEventTvT && TvT._started && !Config.TVT_ALLOW_SUMMON) if (activeChar._inEventTvT && TvT.is_started() && !Config.TVT_ALLOW_SUMMON) { final ActionFailed af = ActionFailed.STATIC_PACKET; @@ -68,7 +67,6 @@ public class SummonItems implements IItemHandler return; } - // if(activeChar._inEventDM && DM._started && !Config.DM_ALLOW_SUMMON) if (activeChar._inEventDM && DM.is_started() && !Config.DM_ALLOW_SUMMON) { final ActionFailed af = ActionFailed.STATIC_PACKET; @@ -76,7 +74,6 @@ public class SummonItems implements IItemHandler return; } - // if(activeChar._inEventCTF && CTF._started && !Config.CTF_ALLOW_SUMMON) if (activeChar._inEventCTF && CTF.is_started() && !Config.CTF_ALLOW_SUMMON) { final ActionFailed af = ActionFailed.STATIC_PACKET; @@ -150,8 +147,6 @@ public class SummonItems implements IItemHandler try { L2Spawn spawn = new L2Spawn(npcTemplate); - // if(spawn == null) - // return; spawn.setId(IdFactory.getInstance().getNextId()); spawn.setX(activeChar.getX()); spawn.setY(activeChar.getY()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java index 46450810ac..3b9a30f641 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java @@ -29,11 +29,9 @@ import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; /** - * This class ... * @author earendil * @version $Revision: 1.1.2.2.2.4 $ $Date: 2005/04/06 16:13:48 $ */ - public class BalanceLife implements ISkillHandler { private static final SkillType[] SKILL_IDS = @@ -44,7 +42,6 @@ public class BalanceLife implements ISkillHandler @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { - // L2Character activeChar = activeChar; // check for other effects try { @@ -81,7 +78,7 @@ public class BalanceLife implements ISkillHandler } // Avoid characters heal inside Baium lair from outside - if (/* (activeChar.isInsideZone(12007) || target.isInsideZone(12007)) && */ (((GrandBossManager.getInstance().getZone(activeChar) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(activeChar) != null)))) + if (((GrandBossManager.getInstance().getZone(activeChar) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(activeChar) != null))) { continue; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java index e12a4045a3..a2ac32d335 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java @@ -54,8 +54,7 @@ public class BeastFeed implements ISkillHandler LOGGER.info("Beast Feed casting succeded."); - // This is just a dummy skill handler for the golden food and crystal food skills, - // since the AI responce onSkillUse handles the rest. + // This is just a dummy skill handler for the golden food and crystal food skills, since the AI responce onSkillUse handles the rest. } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Blow.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Blow.java index 2994b29b8c..c64edc0a54 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Blow.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Blow.java @@ -39,7 +39,7 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType; import com.l2jmobius.gameserver.util.Util; /** - * @author Steuf-Shyla-L2jMobius + * @author Steuf-Shyla */ public class Blow implements ISkillHandler { @@ -72,7 +72,7 @@ public class Blow implements ISkillHandler // Check firstly if target dodges skill final boolean skillIsEvaded = Formulas.calcPhysicalSkillEvasion(target, skill); - byte _successChance = 0;// = SIDE; + byte _successChance = 0; if (skill.getName().equals("Backstab")) { @@ -88,7 +88,8 @@ public class Blow implements ISkillHandler { _successChance = (byte) Config.BACKSTAB_ATTACK_SIDE; } - } else if (activeChar.isBehindTarget()) + } + else if (activeChar.isBehindTarget()) { _successChance = (byte) Config.BLOW_ATTACK_BEHIND; } @@ -101,12 +102,6 @@ public class Blow implements ISkillHandler _successChance = (byte) Config.BLOW_ATTACK_SIDE; } - // If skill requires Crit or skill requires behind, - // calculate chance based on DEX, Position and on self BUFF - /* - * if ((skill.getCondition() & L2Skill.COND_BEHIND) != 0) { if (skill.getName().equals("Backstab")) { _successChance = (byte) Config.BACKSTAB_ATTACK_BEHIND; } else { _successChance = (byte) Config.BLOW_ATTACK_BEHIND; } } - */ - boolean success = true; if ((skill.getCondition() & L2Skill.COND_CRIT) != 0) @@ -116,22 +111,11 @@ public class Blow implements ISkillHandler if (!skillIsEvaded && success) { - // no reflection implemented - // final byte reflect = Formulas.getInstance().calcSkillReflect(target, skill); - if (skill.hasEffects()) { - /* - * if (reflect == Formulas.getInstance().SKILL_REFLECT_SUCCEED) { activeChar.stopSkillEffects(skill.getId()); skill.getEffects(target, activeChar); SystemMessage sm = SystemMessageId.YOU_FEEL_S1_EFFECT); sm.addSkillName(skill); activeChar.sendPacket(sm); } else { - */ - // no shield reflection - // final byte shld = Formulas.getInstance().calcShldUse(activeChar, target, skill); target.stopSkillEffects(skill.getId()); - // if (Formulas.getInstance().calcSkillSuccess(activeChar, target, skill, shld, false, false, true)) - if (Formulas.getInstance().calcSkillSuccess(activeChar, target, skill, ss, sps, bss)) { - // skill.getEffects(activeChar, target, new Env(shld, false, false, false)); skill.getEffects(activeChar, target, ss, sps, bss); final SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT); sm.addSkillName(skill); @@ -144,7 +128,6 @@ public class Blow implements ISkillHandler activeChar.sendPacket(sm); return; } - // } } final L2ItemInstance weapon = activeChar.getActiveWeaponInstance(); @@ -154,7 +137,6 @@ public class Blow implements ISkillHandler soul = (ss && (weapon.getItemType() == L2WeaponType.DAGGER)); } - // byte shld = Formulas.getInstance().calcShldUse(activeChar, target, skill); final boolean shld = Formulas.calcShldUse(activeChar, target); // Critical hit @@ -163,8 +145,7 @@ public class Blow implements ISkillHandler // Critical damage condition is applied for sure if there is skill critical condition if ((skill.getCondition() & L2Skill.COND_CRIT) != 0) { - crit = true; - // if there is not critical condition, calculate critical chance + crit = true; // if there is not critical condition, calculate critical chance } else if (Formulas.calcCrit(skill.getBaseCritRate() * 10 * BaseStats.DEX.calcBonus(activeChar))) { @@ -173,9 +154,6 @@ public class Blow implements ISkillHandler double damage = Formulas.calcBlowDamage(activeChar, target, skill, shld, crit, soul); - // if (soul) - // weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); - if (skill.getDmgDirectlyToHP() && (target instanceof L2PcInstance)) { // no vegeange implementation @@ -185,13 +163,9 @@ public class Blow implements ISkillHandler activeChar }; - /* - * This loop iterates over previous array but, if skill damage is not reflected it stops on first iteration (target) and misses activeChar - */ for (L2Character targ : ts) { final L2PcInstance player = (L2PcInstance) targ; - // L2PcInstance player = (L2PcInstance)target; if (!player.isInvul()) { // Check and calculate transfered damage @@ -200,8 +174,7 @@ public class Blow implements ISkillHandler { int tDmg = ((int) damage * (int) player.getStat().calcStat(Stats.TRANSFER_DAMAGE_PERCENT, 0, null, null)) / 100; - // Only transfer dmg up to current HP, it should - // not be killed + // Only transfer dmg up to current HP, it should not be killed if (summon.getCurrentHp() < tDmg) { tDmg = (int) summon.getCurrentHp() - 1; @@ -254,8 +227,8 @@ public class Blow implements ISkillHandler { break; } - } // end for - } // end skill directlyToHp check + } + } else { target.reduceCurrentHp(damage, activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Charge.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Charge.java index a8da1c7a0a..7692cfdafa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Charge.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Charge.java @@ -26,19 +26,10 @@ import com.l2jmobius.gameserver.model.L2Skill.SkillType; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * This class ... - * @version $Revision: 1.1.2.2.2.9 $ $Date: 2005/04/04 19:08:01 $ - */ - public class Charge implements ISkillHandler { static Logger LOGGER = Logger.getLogger(Charge.class.getName()); - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { /* SkillType.CHARGE */ diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java index e040ef2789..6696c42936 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java @@ -51,7 +51,7 @@ public class ClanGate implements ISkillHandler { return; } - // need more checking... + if (player.isInFunEvent() || player.isInsideZone(ZoneId.NOLANDING) || player.isInOlympiadMode() || player.isInsideZone(ZoneId.PVP) || (GrandBossManager.getInstance().getZone(player) != null)) { player.sendMessage("Cannot open the portal here."); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Continuous.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Continuous.java index 023aaed7d2..e9db55dac4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Continuous.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Continuous.java @@ -40,10 +40,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.skills.Formulas; -/** - * This class ... - * @version $Revision: 1.1.2.2.2.9 $ $Date: 2005/04/03 15:55:04 $ - */ public class Continuous implements ISkillHandler { private static final SkillType[] SKILL_IDS = @@ -255,9 +251,7 @@ public class Continuous implements ISkillHandler continue; } - // if this is a debuff let the duel manager know about it - // so the debuff can be removed after the duel - // (player & target must be in the same duel) + // if this is a debuff let the duel manager know about it so the debuff can be removed after the duel (player & target must be in the same duel) if ((target instanceof L2PcInstance) && (player != null) && ((L2PcInstance) target).isInDuel() && ((skill.getSkillType() == SkillType.DEBUFF) || (skill.getSkillType() == SkillType.BUFF)) && (player.getDuelId() == ((L2PcInstance) target).getDuelId())) { DuelManager dm = DuelManager.getInstance(); @@ -325,13 +319,6 @@ public class Continuous implements ISkillHandler } } - // // self Effect :] - // L2Effect effect = activeChar.getFirstEffect(skill.getId()); - // if(effect != null && effect.isSelfEffect()) - // { - // //Replace old effect with new one. - // effect.exit(false); - // } skill.getEffectsSelf(activeChar); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/CpDam.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/CpDam.java index 6aaad126f9..1554092ea9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/CpDam.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/CpDam.java @@ -25,33 +25,21 @@ import com.l2jmobius.gameserver.model.actor.L2Playable; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.skills.Formulas; -/* +/** * Just a quick draft to support Wrath skill. Missing angle based calculation etc. */ - public class CpDam implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Mdam.class); - - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { SkillType.CPDAM }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { if (!(activeChar instanceof L2Playable)) { - // no cp damages for not playable instances return; } @@ -60,12 +48,6 @@ public class CpDam implements ISkillHandler return; } - /* - * boolean ss = false; boolean sps = false; boolean bss = false; L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance(); if(weaponInst != null) { if(skill.isMagic()) { if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; } else - * if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) { sps = true; } } else if(weaponInst.getChargedSoulshot() == L2ItemInstance.CHARGED_SOULSHOT) { ss = true; } } // If there is no weapon equipped, check for an active summon. else if(activeChar instanceof L2Summon) - * { L2Summon activeSummon = (L2Summon) activeChar; if(activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } else if(activeSummon.getChargedSpiritShot() == - * L2ItemInstance.CHARGED_SPIRITSHOT) { ss = true; activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } activeSummon = null; } weaponInst = null; - */ final boolean bss = activeChar.checkBss(); final boolean sps = activeChar.checkSps(); final boolean ss = activeChar.checkSs(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Craft.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Craft.java index c56b405771..b6c2935209 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Craft.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Craft.java @@ -25,27 +25,14 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.SystemMessageId; -/** - * This class ... - * @version $Revision: 1.1.2.2.2.4 $ $Date: 2005/04/06 16:13:48 $ - */ - public class Craft implements ISkillHandler { - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { SkillType.COMMON_CRAFT, SkillType.DWARVEN_CRAFT }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java index de4c41cb36..8757d0b11d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java @@ -54,8 +54,7 @@ public class DeluxeKey implements ISkillHandler LOGGER.info("Delux key casting succeded."); - // This is just a dummy skill handler for the golden food and crystal food skills, - // since the AI responce onSkillUse handles the rest. + // This is just a dummy skill handler for the golden food and crystal food skills, since the AI responce onSkillUse handles the rest. } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Disablers.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Disablers.java index 9826c826a9..14670cfad7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Disablers.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Disablers.java @@ -583,15 +583,11 @@ public class Disablers implements ISkillHandler _negateId = skill.getNegateId(); negateEffect(target, SkillType.BUFF, _negatePower, _negateId); } - else - // all others negate type skills + else // all others negate type skills { _negateSkillTypes = skill.getNegateSkillTypes(); _negateEffectTypes = skill.getNegateEffectTypes(); _negatePower = skill.getNegatePower(); - /* - * Negate LOGGER LOGGER.info("EFFECT-TYPES: "); for(String effect: _negateEffectTypes) LOGGER.info(" "+effect); LOGGER.info("SKILL-TYPES: "); for(String skillt: _negateSkillTypes) LOGGER.info(" "+skillt); - */ for (String stat : _negateSkillTypes) { stat = stat.toLowerCase().intern(); @@ -682,7 +678,7 @@ public class Disablers implements ISkillHandler LOGGER.warning(e.getMessage()); } } - } // end for + } for (String stat : _negateEffectTypes) { EffectType effect_type = null; @@ -724,11 +720,11 @@ public class Disablers implements ISkillHandler break; } } - } // end for - } // end else - } // end case - }// end switch - } // end for + } + } + } + } + } if (skill.isMagic()) { @@ -754,7 +750,7 @@ public class Disablers implements ISkillHandler effect.exit(false); } skill.getEffectsSelf(activeChar); - } // end void + } private void negateEffect(L2Character target, SkillType type, double power) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java index a4fa0e321e..80d843c52e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java @@ -53,8 +53,7 @@ public class DrainSoul implements ISkillHandler LOGGER.info("Soul Crystal casting succeded."); - // This is just a dummy skill handler for the soul crystal skill, - // since the Soul Crystal item handler already does everything. + // This is just a dummy skill handler for the soul crystal skill, since the Soul Crystal item handler already does everything. } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Fishing.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Fishing.java index 1ca347191e..c546d4d15d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Fishing.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Fishing.java @@ -39,8 +39,6 @@ import com.l2jmobius.gameserver.util.Util; public class Fishing implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(SiegeFlag.class); - // protected SkillType[] _skillIds = {SkillType.FISHING}; private static final SkillType[] SKILL_IDS = { SkillType.FISHING @@ -56,9 +54,7 @@ public class Fishing implements ISkillHandler final L2PcInstance player = (L2PcInstance) activeChar; - /* - * If fishing is disabled, there isn't much point in doing anything else, unless you are GM. so this got moved up here, before anything else. - */ + // If fishing is disabled, there isn't much point in doing anything else, unless you are GM. so this got moved up here, before anything else. if (!Config.ALLOWFISHING && !player.isGM()) { player.sendMessage("Fishing server is currently ofline"); @@ -83,8 +79,6 @@ public class Fishing implements ISkillHandler L2Weapon weaponItem = player.getActiveWeaponItem(); if (((weaponItem == null) || (weaponItem.getItemType() != L2WeaponType.ROD))) { - // Fishing poles are not installed - // player.sendPacket(SystemMessageId.FISHING_POLE_NOT_EQUIPPED)); return; } @@ -121,9 +115,8 @@ public class Fishing implements ISkillHandler // if(!player.isGM()) return; } - /* - * If fishing is enabled, here is the code that was striped from startFishing() in L2PcInstance. Decide now where will the hook be cast... - */ + + // If fishing is enabled, here is the code that was striped from startFishing() in L2PcInstance. Decide now where will the hook be cast... final int rnd = Rnd.get(200) + 200; final double angle = Util.convertHeadingToDegree(player.getHeading()); final double radian = Math.toRadians(angle); @@ -134,17 +127,12 @@ public class Fishing implements ISkillHandler final int x = player.getX() + x1; final int y = player.getY() + y1; int z = player.getZ() - 30; - /* - * ...and if the spot is in a fishing zone. If it is, it will then position the hook on the water surface. If not, you have to be GM to proceed past here... in that case, the hook will be positioned using the old Z lookup method. - */ + // ...and if the spot is in a fishing zone. If it is, it will then position the hook on the water surface. If not, you have to be GM to proceed past here... in that case, the hook will be positioned using the old Z lookup method. L2FishingZone aimingTo = FishingZoneManager.getInstance().isInsideFishingZone(x, y, z); L2WaterZone water = FishingZoneManager.getInstance().isInsideWaterZone(x, y, z); if ((aimingTo != null) && (water != null) && (GeoData.getInstance().canSeeTarget(player.getX(), player.getY(), player.getZ() + 50, x, y, water.getWaterZ() - 50))) { z = water.getWaterZ() + 10; - // player.sendMessage("Hook x,y: " + x + "," + y + " - Water Z, - // Player Z:" + z + ", " + player.getZ()); //debug line, shows hook - // landing related coordinates. Uncoment if needed. } else if ((aimingTo != null) && (water != null) && GeoData.getInstance().canSeeTarget(player.getX(), player.getY(), player.getZ() + 50, x, y, water.getWaterZ() - 50)) { @@ -160,24 +148,19 @@ public class Fishing implements ISkillHandler return; } - /* - * Of course since you can define fishing water volumes of any height, the function needs to be changed to cope with that. Still, this is assuming that fishing zones water surfaces, are always above "sea level". - */ + // Of course since you can define fishing water volumes of any height, the function needs to be changed to cope with that. Still, this is assuming that fishing zones water surfaces, are always above "sea level". if ((player.getZ() <= -3800) || (player.getZ() < (z - 32))) { // You can't fish in water player.sendPacket(SystemMessageId.CANNOT_FISH_UNDER_WATER); - // if(!player.isGM()) return; } - // Has enough bait, consume 1 and update inventory. Start fishing - // follows. + // Has enough bait, consume 1 and update inventory. Start fishing follows. lure2 = player.getInventory().destroyItem("Consume", player.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND), 1, player, null); InventoryUpdate iu = new InventoryUpdate(); iu.addModifiedItem(lure2); player.sendPacket(iu); - // If everything else checks out, actually cast the hook and start - // fishing... :P + // If everything else checks out, actually cast the hook and start fishing... :P player.startFishing(x, y, z); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java index e3e055e696..065534b47a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java @@ -32,7 +32,6 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType; public class FishingSkill implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(SiegeFlag.class); private static final SkillType[] SKILL_IDS = { SkillType.PUMPING, @@ -85,8 +84,8 @@ public class FishingSkill implements ISkillHandler final double gradebonus = 1 + (weaponItem.getCrystalType() * 0.1); int dmg = (int) (skill.getPower() * gradebonus * SS); - if (player.getSkillLevel(1315) <= (skill.getLevel() - 2)) // 1315 - Fish Expertise - {// Penalty + if (player.getSkillLevel(1315) <= (skill.getLevel() - 2)) // 1315 - Fish Expertise Penalty + { player.sendPacket(SystemMessageId.REELING_PUMPING_3_LEVELS_HIGHER_THAN_FISHING_PENALTY); pen = 50; final int penatlydmg = dmg - pen; @@ -102,12 +101,11 @@ public class FishingSkill implements ISkillHandler weaponInst.setChargedFishshot(false); } - if (skill.getSkillType() == SkillType.REELING)// Realing + if (skill.getSkillType() == SkillType.REELING) // Realing { fish.useRealing(dmg, pen); } - else - // Pumping + else // Pumping { fish.usePomping(dmg, pen); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java index f7c1241be5..7f10cba80c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java @@ -25,10 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; -/* - * Mobs can teleport players to them - */ - public class GetPlayer implements ISkillHandler { private static final SkillType[] SKILL_IDS = @@ -54,7 +50,6 @@ public class GetPlayer implements ISkillHandler continue; } - // trg.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ(), true); trg.setXYZ(activeChar.getX() + Rnd.get(-10, 10), activeChar.getY() + Rnd.get(-10, 10), activeChar.getZ()); trg.sendPacket(new ValidateLocation(trg)); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java index cf86946fdf..d44dd0904a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; /** * @author Forsaiken */ - public class GiveSp implements ISkillHandler { private static final SkillType[] SKILL_IDS = diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Heal.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Heal.java index 3b30bf0996..486d72ec8b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Heal.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Heal.java @@ -33,20 +33,8 @@ import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.skills.Stats; -/** - * This class ... - * @version $Revision: 1.1.2.2.2.4 $ $Date: 2005/04/06 16:13:48 $ - */ - public class Heal implements ISkillHandler { - // all the items ids that this handler knowns - // private static Logger LOGGER = Logger.getLogger(Heal.class); - - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { SkillType.HEAL, @@ -54,10 +42,6 @@ public class Heal implements ISkillHandler SkillType.HEAL_STATIC }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { @@ -96,7 +80,7 @@ public class Heal implements ISkillHandler } // Avoid players heal inside Baium lair from outside - if (/* (activeChar.isInsideZone(12007) || target.isInsideZone(12007)) && */ (((GrandBossManager.getInstance().getZone(player) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(activeChar) != null)))) + if (((GrandBossManager.getInstance().getZone(player) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(activeChar) != null))) { continue; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java index 3fc1f14243..8901e56d03 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java @@ -27,19 +27,8 @@ import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.skills.Stats; -/** - * This class ... - * @version $Revision: 1.1.2.2.2.1 $ $Date: 2005/03/02 15:38:36 $ - */ - public class ManaHeal implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(ManaHeal.class); - - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { SkillType.MANAHEAL, @@ -47,10 +36,6 @@ public class ManaHeal implements ISkillHandler SkillType.MANAHEAL_PERCENT }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useSkill(L2Character actChar, L2Skill skill, L2Object[] targets) { @@ -64,7 +49,6 @@ public class ManaHeal implements ISkillHandler double mp = skill.getPower(); if (skill.getSkillType() == SkillType.MANAHEAL_PERCENT) { - // double mp = skill.getPower(); mp = (target.getMaxMp() * mp) / 100.0; } else @@ -72,10 +56,6 @@ public class ManaHeal implements ISkillHandler mp = (skill.getSkillType() == SkillType.MANARECHARGE) ? target.calcStat(Stats.RECHARGE_MP_RATE, mp, null, null) : mp; } - // if ((target.getCurrentMp() + mp) >= target.getMaxMp()) - // { - // mp = target.getMaxMp() - target.getCurrentMp(); - // } target.setLastHealAmount((int) mp); target.setCurrentMp(mp + target.getCurrentMp()); final StatusUpdate sump = new StatusUpdate(target.getObjectId()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Manadam.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Manadam.java index 4afadfb60c..da8e28d675 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Manadam.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Manadam.java @@ -50,10 +50,6 @@ public class Manadam implements ISkillHandler return; } - /* - * boolean ss = false; boolean bss = false; L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance(); if(weaponInst != null) { if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; - * weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } else if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) { ss = true; weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } } weaponInst = null; - */ final boolean sps = activeChar.checkSps(); final boolean bss = activeChar.checkBss(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Mdam.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Mdam.java index 23064e9b6b..742dd14837 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Mdam.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Mdam.java @@ -28,29 +28,14 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.skills.Formulas; -/** - * This class ... - * @version $Revision: 1.1.2.8.2.9 $ $Date: 2005/04/05 19:41:23 $ - */ - public class Mdam implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Mdam.class); - - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { SkillType.MDAM, SkillType.DEATHLINK }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { @@ -115,8 +100,7 @@ public class Mdam implements ISkillHandler sm.addSkillName(skill.getId()); activeChar.sendPacket(sm); } - else // activate attacked effects, if any - if (Formulas.getInstance().calcSkillSuccess(activeChar, target, skill, false, sps, bss)) + else if (Formulas.getInstance().calcSkillSuccess(activeChar, target, skill, false, sps, bss)) // activate attacked effects, if any { // Like L2OFF must remove the first effect only if the second effect is successful target.stopSkillEffects(skill.getId()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Pdam.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Pdam.java index 67f3f8d1af..06003df75e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Pdam.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Pdam.java @@ -45,13 +45,8 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType; public class Pdam implements ISkillHandler { - // all the items ids that this handler knowns private static Logger LOGGER = Logger.getLogger(Pdam.class.getName()); - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ private static final SkillType[] SKILL_IDS = { SkillType.PDAM, @@ -59,10 +54,6 @@ public class Pdam implements ISkillHandler /* , SkillType.CHARGEDAM */ }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance) - */ @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { @@ -117,12 +108,7 @@ public class Pdam implements ISkillHandler continue; } - /* - * if(target.isInvul()){ continue; } - */ - // Calculate skill evasion - // Formulas.getInstance(); if (Formulas.calcPhysicalSkillEvasion(target, skill)) { activeChar.sendPacket(new SystemMessage(SystemMessageId.ATTACK_FAILED)); @@ -185,11 +171,9 @@ public class Pdam implements ISkillHandler sm.addSkillName(skill.getId()); activeChar.sendPacket(sm); } - else // activate attacked effects, if any - if (f.calcSkillSuccess(activeChar, target, skill, soul, false, false)) + else if (f.calcSkillSuccess(activeChar, target, skill, soul, false, false)) // activate attacked effects, if any { // Like L2OFF must remove the first effect if the second effect lands - // target.stopSkillEffects(skill.getId()); skill.getEffects(activeChar, target, ss, sps, bss); SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT); sm.addSkillName(skill.getId()); @@ -229,8 +213,7 @@ public class Pdam implements ISkillHandler // Half Kill! activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE)); } - else - // 2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1) + else // 2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1) { // If is a monster damage is (CurrentHp - 1) so HP = 1 if (target instanceof L2NpcInstance) @@ -251,8 +234,7 @@ public class Pdam implements ISkillHandler activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE_SUCCESSFUL)); } } - else // Make damage directly to HP - if (skill.getDmgDirectlyToHP() || !(activeChar instanceof L2Playable)) + else if (skill.getDmgDirectlyToHP() || !(activeChar instanceof L2Playable)) // Make damage directly to HP { if (target instanceof L2PcInstance) { @@ -295,8 +277,7 @@ public class Pdam implements ISkillHandler target.reduceCurrentHp(damage, activeChar); } } - else // only players can reduce CPs each other - if ((activeChar instanceof L2PcInstance) && (target instanceof L2PcInstance) && !target.isInvul()) + else if ((activeChar instanceof L2PcInstance) && (target instanceof L2PcInstance) && !target.isInvul()) // only players can reduce CPs each other { final L2PcInstance player = (L2PcInstance) target; @@ -324,8 +305,7 @@ public class Pdam implements ISkillHandler target.reduceCurrentHp(damage, activeChar); } } - else - // No - damage + else // No - damage { activeChar.sendPacket(new SystemMessage(SystemMessageId.ATTACK_FAILED)); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Recall.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Recall.java index 3c978e41ec..8da548a9fa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Recall.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Recall.java @@ -34,7 +34,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Recall implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Recall.class); private static final SkillType[] SKILL_IDS = { SkillType.RECALL @@ -128,11 +127,6 @@ public class Recall implements ISkillHandler continue; } - /* - * Like L2OFF player can be recalled also if he is on combat/rooted if(targetChar.isRooted() || targetChar.isInCombat()) { SystemMessage sm = SystemMessageId.S1_IS_ENGAGED_IN_COMBAT_AND_CANNOT_BE_SUMMONED); sm.addString(targetChar.getName()); activeChar.sendPacket(sm); sm = null; - * continue; } - */ - if ((GrandBossManager.getInstance().getZone(targetChar) != null) && !targetChar.isGM()) { activeChar.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java index 8f6802bffe..6e749c1fa6 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java @@ -31,15 +31,8 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.skills.Formulas; import com.l2jmobius.gameserver.taskmanager.DecayTaskManager; -/** - * This class ... - * @version $Revision: 1.1.2.5.2.4 $ $Date: 2005/04/03 15:55:03 $ - */ - public class Resurrect implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Resurrect.class); - private static final SkillType[] SKILL_IDS = { SkillType.RESURRECT diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Spoil.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Spoil.java index 62e46a09d1..6ca715ef62 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Spoil.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Spoil.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.skills.Formulas; */ public class Spoil implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Spoil.class); private static final SkillType[] SKILL_IDS = { SkillType.SPOIL @@ -67,7 +66,6 @@ public class Spoil implements ISkillHandler continue; } - // SPOIL SYSTEM by Lbaldi boolean spoil = false; if (!target.isDead()) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java index 2d5211103f..34e838cefe 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java @@ -38,7 +38,6 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType; */ public class StrSiegeAssault implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(StrSiegeAssault.class); private static final SkillType[] SKILL_IDS = { SkillType.STRSIEGEASSAULT diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java index a2d1418019..51583bcbc3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java @@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.util.Util; public class SummonFriend implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(SummonFriend.class); private static final SkillType[] SKILL_IDS = { SkillType.SUMMON_FRIEND diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Sweep.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Sweep.java index c3a064669e..12bed2ecbb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Sweep.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Sweep.java @@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Sweep implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Sweep.class); private static final SkillType[] SKILL_IDS = { SkillType.SWEEP diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java index d193b12bec..85f67b5dbf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java @@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.util.Util; */ public class TakeCastle implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(TakeCastle.class); private static final SkillType[] SKILL_IDS = { SkillType.TAKECASTLE diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Unlock.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Unlock.java index e5bb4b4fc8..d8b52f5b16 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Unlock.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/Unlock.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.skills.Formulas; public class Unlock implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(Unlock.class); private static final SkillType[] SKILL_IDS = { SkillType.UNLOCK diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java index f405318e20..3015c489cd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; public class ZakenPlayer implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(ZakenPlayer.class); private static final SkillType[] SKILL_IDS = { SkillType.ZAKENPLAYER diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java index 12a29665b8..00227d5b3d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; public class ZakenSelf implements ISkillHandler { - // private static Logger LOGGER = Logger.getLogger(ZakenSelf.class); private static final SkillType[] SKILL_IDS = { SkillType.ZAKENSELF diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanPenalty.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanPenalty.java index b2a89f6b45..04e069587f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanPenalty.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanPenalty.java @@ -33,10 +33,6 @@ public class ClanPenalty implements IUserCommandHandler 100 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useUserCommand(int id, L2PcInstance activeChar) { @@ -91,10 +87,6 @@ public class ClanPenalty implements IUserCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanWarsList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanWarsList.java index a276e81eb1..7c6912f42e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanWarsList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/ClanWarsList.java @@ -40,10 +40,6 @@ public class ClanWarsList implements IUserCommandHandler 90 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useUserCommand(int id, L2PcInstance activeChar) { @@ -65,24 +61,21 @@ public class ClanWarsList implements IUserCommandHandler { PreparedStatement statement; - if (id == 88) + if (id == 88) // Attack List { - // Attack List activeChar.sendPacket(SystemMessageId.CLANS_YOU_DECLARED_WAR_ON); statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan1=? and clan_id=clan2 and clan2 not in (select clan1 from clan_wars where clan2=?)"); statement.setInt(1, clan.getClanId()); statement.setInt(2, clan.getClanId()); } - else if (id == 89) + else if (id == 89) // Under Attack List { - // Under Attack List activeChar.sendPacket(SystemMessageId.CLANS_THAT_HAVE_DECLARED_WAR_ON_YOU); statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan2=? and clan_id=clan1 and clan1 not in (select clan2 from clan_wars where clan1=?)"); statement.setInt(1, clan.getClanId()); statement.setInt(2, clan.getClanId()); } - else - // ID = 90 + else // ID = 90 { // War List activeChar.sendPacket(SystemMessageId.WAR_LIST); @@ -97,16 +90,14 @@ public class ClanWarsList implements IUserCommandHandler final String clanName = rset.getString("clan_name"); final int ally_id = rset.getInt("ally_id"); - if (ally_id > 0) + if (ally_id > 0) // Target With Ally { - // Target With Ally sm = new SystemMessage(SystemMessageId.S1_S2_ALLIANCE); sm.addString(clanName); sm.addString(rset.getString("ally_name")); } - else + else // Target Without Ally { - // Target Without Ally sm = new SystemMessage(SystemMessageId.S1_NO_ALLI_EXISTS); sm.addString(clanName); } @@ -126,10 +117,6 @@ public class ClanWarsList implements IUserCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/DisMount.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/DisMount.java index 110556e9f5..0fe6ac5093 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/DisMount.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/DisMount.java @@ -30,10 +30,6 @@ public class DisMount implements IUserCommandHandler 62 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public synchronized boolean useUserCommand(int id, L2PcInstance activeChar) { @@ -54,10 +50,6 @@ public class DisMount implements IUserCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Escape.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Escape.java index 35d9eda222..f9a3e15445 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Escape.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Escape.java @@ -34,10 +34,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SetupGauge; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.util.Broadcast; -/** - * - * - */ public class Escape implements IUserCommandHandler { private static final int[] COMMAND_IDS = @@ -45,10 +41,6 @@ public class Escape implements IUserCommandHandler 52 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useUserCommand(int id, L2PcInstance activeChar) { @@ -150,7 +142,7 @@ public class Escape implements IUserCommandHandler MagicSkillUse msk = new MagicSkillUse(activeChar, 1050, 1, unstuckTimer, 0); activeChar.setTarget(null); // Like retail we haven't self target - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, msk, 810000/* 900 */); + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, msk, 810000); SetupGauge sg = new SetupGauge(0, unstuckTimer); activeChar.sendPacket(sg); // End SoE Animation section @@ -198,10 +190,6 @@ public class Escape implements IUserCommandHandler } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Loc.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Loc.java index ae21acef7a..5d3c452d68 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Loc.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Loc.java @@ -22,10 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * - * - */ public class Loc implements IUserCommandHandler { private static final int[] COMMAND_IDS = @@ -33,10 +29,6 @@ public class Loc implements IUserCommandHandler 0 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useUserCommand(int id, L2PcInstance activeChar) { @@ -45,104 +37,104 @@ public class Loc implements IUserCommandHandler switch (_nearestTown) { - case 0: + case 0: { msg = SystemMessageId.LOC_TI_S1_S2_S3; - break; + break; } - case 1: + case 1: { msg = SystemMessageId.LOC_ELVEN_S1_S2_S3; - break; + break; } - case 2: + case 2: { msg = SystemMessageId.LOC_DARK_ELVEN_S1_S2_S3; - break; + break; } - case 3: + case 3: { msg = SystemMessageId.LOC_ORC_S1_S2_S3; - break; + break; } - case 4: + case 4: { msg = SystemMessageId.LOC_DWARVEN_S1_S2_S3; - break; + break; } - case 5: + case 5: { msg = SystemMessageId.LOC_GLUDIO_S1_S2_S3; - break; + break; } - case 6: + case 6: { msg = SystemMessageId.LOC_GLUDIN_S1_S2_S3; - break; + break; } - case 7: + case 7: { msg = SystemMessageId.LOC_DION_S1_S2_S3; - break; + break; } - case 8: + case 8: { msg = SystemMessageId.LOC_GIRAN_S1_S2_S3; - break; + break; } - case 9: + case 9: { msg = SystemMessageId.LOC_OREN_S1_S2_S3; - break; + break; } - case 10: + case 10: { msg = SystemMessageId.LOC_ADEN_S1_S2_S3; - break; + break; } - case 11: + case 11: { msg = SystemMessageId.LOC_HUNTER_S1_S2_S3; - break; + break; } - case 12: + case 12: { msg = SystemMessageId.LOC_GIRAN_HARBOR_S1_S2_S3; - break; + break; } - case 13: + case 13: { msg = SystemMessageId.LOC_HEINE_S1_S2_S3; - break; + break; } - case 14: + case 14: { msg = SystemMessageId.LOC_RUNE_S1_S2_S3; - break; + break; } - case 15: + case 15: { msg = SystemMessageId.LOC_GODDARD_S1_S2_S3; - break; + break; } - case 16: + case 16: { msg = SystemMessageId.LOC_SCHUTTGART_S1_S2_S3; - break; + break; } - case 17: + case 17: { msg = SystemMessageId.LOC_FLORAN_S1_S2_S3; - break; + break; } - case 18: + case 18: { msg = SystemMessageId.LOC_PRIMEVAL_ISLE_S1_S2_S3; - break; + break; } - default: + default: { - msg = SystemMessageId.LOC_ADEN_S1_S2_S3; + msg = SystemMessageId.LOC_ADEN_S1_S2_S3; } } @@ -155,10 +147,6 @@ public class Loc implements IUserCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Mount.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Mount.java index f3ac12aad7..01fcd7763b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Mount.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Mount.java @@ -37,10 +37,6 @@ public class Mount implements IUserCommandHandler 61 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public synchronized boolean useUserCommand(int id, L2PcInstance activeChar) { @@ -125,10 +121,6 @@ public class Mount implements IUserCommandHandler return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/OfflineShop.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/OfflineShop.java index 20df289420..170b413434 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/OfflineShop.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/OfflineShop.java @@ -41,11 +41,6 @@ public class OfflineShop implements IUserCommandHandler 114 }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ - @SuppressWarnings("null") @Override public synchronized boolean useUserCommand(int id, L2PcInstance player) { @@ -70,7 +65,7 @@ public class OfflineShop implements IUserCommandHandler } final TradeList storeListBuy = player.getBuyList(); - if ((storeListBuy == null) && (storeListBuy.getItemCount() == 0)) + if ((storeListBuy == null) || (storeListBuy.getItemCount() == 0)) { player.sendMessage("Your buy list is empty."); player.sendPacket(ActionFailed.STATIC_PACKET); @@ -78,7 +73,7 @@ public class OfflineShop implements IUserCommandHandler } final TradeList storeListSell = player.getSellList(); - if ((storeListSell == null) && (storeListSell.getItemCount() == 0)) + if ((storeListSell == null) || (storeListSell.getItemCount() == 0)) { player.sendMessage("Your sell list is empty."); player.sendPacket(ActionFailed.STATIC_PACKET); @@ -128,8 +123,7 @@ public class OfflineShop implements IUserCommandHandler return false; } - // Prevent player from logging out if they are a festival participant nd it is in progress, - // otherwise notify party members that the player is not longer a participant. + // Prevent player from logging out if they are a festival participant nd it is in progress, otherwise notify party members that the player is not longer a participant. if (player.isFestivalParticipant()) { if (SevenSignsFestival.getInstance().isFestivalInitialized()) @@ -167,10 +161,6 @@ public class OfflineShop implements IUserCommandHandler return false; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public int[] getUserCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Time.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Time.java index c6c801d25a..173c6a9e07 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Time.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/usercommandhandlers/Time.java @@ -22,10 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * - * - */ public class Time implements IUserCommandHandler { private static final int[] COMMAND_IDS = @@ -33,9 +29,6 @@ public class Time implements IUserCommandHandler 77 }; - /* - * (non-Javadoc) - */ @Override public boolean useUserCommand(int id, L2PcInstance activeChar) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/AwayCmd.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/AwayCmd.java index 31da1f6a58..214e5aa8fc 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/AwayCmd.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/AwayCmd.java @@ -35,10 +35,6 @@ public class AwayCmd implements IVoicedCommandHandler "back" }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(String, com.l2jmobius.gameserver.model.L2PcInstance), String) - */ @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String text) { @@ -55,11 +51,6 @@ public class AwayCmd implements IVoicedCommandHandler public static final int ZONE_PEACE = 2; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() - */ - private boolean away(L2PcInstance activeChar, String text) { Siege siege = SiegeManager.getInstance().getSiege(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/BankingCmd.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/BankingCmd.java index 46a399a7e7..36a90e0f6f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/BankingCmd.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/BankingCmd.java @@ -34,9 +34,6 @@ public class BankingCmd implements IVoicedCommandHandler "deposit" }; - /** - * @see com.l2jmobius.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { @@ -92,9 +89,6 @@ public class BankingCmd implements IVoicedCommandHandler return true; } - /** - * @see com.l2jmobius.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() - */ @Override public String[] getVoicedCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/OfflineShop.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/OfflineShop.java index f16fe69bdb..32a6b55ac0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/OfflineShop.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/OfflineShop.java @@ -124,8 +124,7 @@ public class OfflineShop implements IVoicedCommandHandler return false; } - // Prevent player from logging out if they are a festival participant nd it is in progress, - // otherwise notify party members that the player is not longer a participant. + // Prevent player from logging out if they are a festival participant nd it is in progress, otherwise notify party members that the player is not longer a participant. if (player.isFestivalParticipant()) { if (SevenSignsFestival.getInstance().isFestivalInitialized()) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Repair.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Repair.java index 6fc58f53c9..ac85249a89 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Repair.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Repair.java @@ -56,7 +56,6 @@ public class Repair implements IVoicedCommandHandler, ICustomByPassHandler return false; } - // Send activeChar HTML page if (command.startsWith("repair")) { final String htmContent = HtmCache.getInstance().getHtm("data/html/mods/repair/repair.htm"); @@ -66,9 +65,6 @@ public class Repair implements IVoicedCommandHandler, ICustomByPassHandler activeChar.sendPacket(npcHtmlMessage); return true; } - // Command for enter repairFunction from html - - // LOGGER.warning("Repair Attempt: Failed. "); return false; } @@ -88,14 +84,12 @@ public class Repair implements IVoicedCommandHandler, ICustomByPassHandler result += rset.getString(1) + ";"; } } - // LOGGER.warning("Repair Attempt: Output Result for searching characters on account:"+result); rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); - // return result; } return result; } @@ -260,10 +254,6 @@ public class Repair implements IVoicedCommandHandler, ICustomByPassHandler return _BYPASSCMD; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.ICustomByPassHandler#handleCommand(java.lang.String, com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void handleCommand(String command, L2PcInstance activeChar, String repairChar) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/StatsCmd.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/StatsCmd.java index d73e0e007c..ca73c2a95f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/StatsCmd.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/StatsCmd.java @@ -140,7 +140,6 @@ public class StatsCmd implements IVoicedCommandHandler return false; } final L2PcInstance targetp = (L2PcInstance) activeChar.getTarget(); - // L2PcInstance pc = L2World.getInstance().getPlayer(target); if (targetp != null) { NpcHtmlMessage adminReply = new NpcHtmlMessage(5); @@ -172,5 +171,4 @@ public class StatsCmd implements IVoicedCommandHandler { return VOICED_COMMANDS; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Voting.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Voting.java index 902ff39aaa..12c85cbb8c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Voting.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Voting.java @@ -90,9 +90,6 @@ public class Voting implements IVoicedCommandHandler return true; } - /** - * @see com.l2jmobius.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() - */ @Override public String[] getVoicedCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Wedding.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Wedding.java index 74463ef152..4e8d7851a7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Wedding.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/voicedcommandhandlers/Wedding.java @@ -53,10 +53,6 @@ public class Wedding implements IVoicedCommandHandler "gotolove" }; - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jmobius.gameserver.model.L2PcInstance) - */ @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { @@ -218,13 +214,6 @@ public class Wedding implements IVoicedCommandHandler return false; } - // check if target has player on friendlist - /* - * boolean FoundOnFriendList = false; int objectId; Connection con = null; try { con = L2DatabaseFactory.getConnection(false); PreparedStatement statement; statement = con.prepareStatement("SELECT friend_id FROM character_friends WHERE char_id=?"); statement.setInt(1, - * ptarget.getObjectId()); ResultSet rset = statement.executeQuery(); while(rset.next()) { objectId = rset.getInt("friend_id"); if(objectId == activeChar.getObjectId()) { FoundOnFriendList = true; } } } catch(Exception e) { if(Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); - * LOGGER.warning( "could not read friend data:" + e); } finally { CloseUtil.close(con); con = null; } - */ - if (!activeChar.getFriendList().contains(ptarget.getObjectId())) { activeChar.sendMessage("The player you want to ask is not on your friends list, you must first be on each others friends list before you choose to engage."); @@ -232,7 +221,6 @@ public class Wedding implements IVoicedCommandHandler } ptarget.setEngageRequest(true, activeChar.getObjectId()); - // ptarget.sendMessage("Player "+activeChar.getName()+" wants to engage with you."); ConfirmDlg dlg = new ConfirmDlg(614); dlg.addString(activeChar.getName() + " asking you to engage. Do you want to start a new relationship?"); ptarget.sendPacket(dlg); @@ -454,10 +442,6 @@ public class Wedding implements IVoicedCommandHandler } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.handler.IUserCommandHandler#getUserCommandList() - */ @Override public String[] getVoicedCommandList() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/BitSetIDFactory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/BitSetIDFactory.java index 119004dcbd..9703407cfe 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/BitSetIDFactory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/BitSetIDFactory.java @@ -39,10 +39,6 @@ public class BitSetIDFactory extends IdFactory public class BitSetCapacityCheck implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/CompactionIDFactory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/CompactionIDFactory.java index 8cb70373d2..f0faf9d1f9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/CompactionIDFactory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/CompactionIDFactory.java @@ -118,19 +118,13 @@ public class CompactionIDFactory extends IdFactory @Override public synchronized int getNextId() { - /* if (_freeSize == 0) */return _curOID++; - /* - * else return _freeOIDs[--_freeSize]; - */ + return _curOID++; } @Override public synchronized void releaseId(int id) { // dont release ids until we are sure it isnt messing up - /* - * if (_freeSize >= _freeOIDs.length) { int[] tmp = new int[_freeSize + STACK_SIZE_INCREMENT]; System.arraycopy(_freeOIDs, 0, tmp, 0, _freeSize); _freeOIDs = tmp; } _freeOIDs[_freeSize++] = id; - */ } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/IdFactory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/IdFactory.java index 002c035117..7f074670fa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/IdFactory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/IdFactory.java @@ -196,10 +196,6 @@ public abstract class IdFactory } } - /** - * @return - * @throws SQLException - */ protected int[] extractUsedObjectIDTable() throws SQLException { try (Connection con = DatabaseFactory.getConnection()) @@ -219,7 +215,6 @@ public abstract class IdFactory s.executeUpdate("insert into temporaryObjectTable (object_id) select obj_id from characters"); s.executeUpdate("insert into temporaryObjectTable (object_id) select object_id from items"); s.executeUpdate("insert into temporaryObjectTable (object_id) select clan_id from clan_data"); - // s.executeUpdate("insert into temporaryObjectTable (object_id) select crest_id from clan_data where crest_id > 0"); s.executeUpdate("insert into temporaryObjectTable (object_id) select object_id from itemsonground"); ResultSet result = s.executeQuery("select count(object_id) from temporaryObjectTable"); @@ -227,7 +222,6 @@ public abstract class IdFactory result.next(); final int size = result.getInt(1); final int[] tmp_obj_ids = new int[size]; - // LOGGER.info("tmp table size: " + tmp_obj_ids.length); result.close(); result = s.executeQuery("select object_id from temporaryObjectTable ORDER BY object_id"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 329b0827f8..8d97838b27 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -86,7 +86,6 @@ public class StackIDFactory extends IdFactory { final PreparedStatement ps = con.prepareStatement(check); ps.setInt(1, _tempOID); - // ps.setInt(1, _curOID); ps.setInt(2, id); final ResultSet rs = ps.executeQuery(); while (rs.next()) @@ -100,7 +99,6 @@ public class StackIDFactory extends IdFactory } } - // int hole = id - _curOID; int hole = id - _tempOID; if (hole > (N - idx)) { @@ -108,10 +106,8 @@ public class StackIDFactory extends IdFactory } for (int i = 1; i <= hole; i++) { - // LOGGER.info("Free ID added " + (_tempOID)); _freeOIDStack.push(_tempOID); _tempOID++; - // _curOID++; } if (hole < (N - idx)) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ArenaManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ArenaManager.java index 9f3e7c9787..1f078b4818 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ArenaManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ArenaManager.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.zone.type.L2ArenaZone; public class ArenaManager { - // ========================================================= private static ArenaManager _instance; private static final Logger LOGGER = Logger.getLogger(ArenaManager.class.getName()); @@ -39,21 +38,12 @@ public class ArenaManager return _instance; } - // ========================================================= - - // ========================================================= - // Data Field private List _arenas; - // ========================================================= - // Constructor public ArenaManager() { } - // ========================================================= - // Property - Public - public void addArena(L2ArenaZone arena) { if (_arenas == null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AutoSaveManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AutoSaveManager.java index fa46b1e021..2cc4ecdfe6 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AutoSaveManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AutoSaveManager.java @@ -159,9 +159,7 @@ public class AutoSaveManager { int erased = 0; - /* - * Perform the clean here instead of every time that the skills are saved in order to do it in once step because if skill have 0 reuse delay doesn't affect the game, just makes the table grows bigger - */ + // Perform the clean here instead of every time that the skills are saved in order to do it in once step because if skill have 0 reuse delay doesn't affect the game, just makes the table grows bigger try (Connection con = DatabaseFactory.getConnection()) { PreparedStatement statement; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AwayManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AwayManager.java index 7ca9770ef0..7ac1bd3cf9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AwayManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/AwayManager.java @@ -77,10 +77,6 @@ public final class AwayManager _awayPlayers = Collections.synchronizedMap(new WeakHashMap()); } - /** - * @param activeChar - * @param text - */ public void setAway(L2PcInstance activeChar, String text) { activeChar.set_awaying(true); @@ -93,9 +89,6 @@ public final class AwayManager ThreadPool.schedule(new setPlayerAwayTask(activeChar, text), Config.AWAY_TIMER * 1000); } - /** - * @param activeChar - */ public void setBack(L2PcInstance activeChar) { activeChar.sendMessage("You are back from Away Status in " + Config.BACK_TIMER + " Sec."); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/BoatManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/BoatManager.java index a7abc046f9..5a05c3493f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/BoatManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/BoatManager.java @@ -41,10 +41,6 @@ public class BoatManager return SingletonHolder._instance; } - // ========================================================= - - // ========================================================= - // Data Field private Map _staticItems = new HashMap<>(); public BoatManager() @@ -53,8 +49,6 @@ public class BoatManager load(); } - // ========================================================= - // Method - Private private final void load() { if (!Config.ALLOW_BOAT) @@ -141,10 +135,6 @@ public class BoatManager } } - /** - * @param line - * @return - */ private L2BoatInstance parseLine(String line) { L2BoatInstance boat; @@ -175,7 +165,6 @@ public class BoatManager npcDat.set("baseEvasRate", 38); npcDat.set("baseCritRate", 38); - // npcDat.set("name", ""); npcDat.set("collision_radius", 0); npcDat.set("collision_height", 0); npcDat.set("sex", "male"); @@ -205,7 +194,6 @@ public class BoatManager boat = new L2BoatInstance(IdFactory.getInstance().getNextId(), template, name); boat.getPosition().setHeading(heading); boat.setXYZ(xspawn, yspawn, zspawn); - // boat.spawnMe(); int IdWaypoint1 = Integer.parseInt(st.nextToken()); int IdWTicket1 = Integer.parseInt(st.nextToken()); @@ -235,12 +223,6 @@ public class BoatManager return boat; } - // ========================================================= - // Property - Public - /** - * @param boatId - * @return - */ public L2BoatInstance GetBoat(int boatId) { if (_staticItems == null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CastleManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CastleManager.java index 5577d07bb0..be4f3fa7de 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CastleManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CastleManager.java @@ -42,12 +42,8 @@ public class CastleManager return SingletonHolder._instance; } - // ========================================================= - // Data Field private List _castles; - // ========================================================= - // Constructor private static final int _castleCirclets[] = { 0, @@ -67,9 +63,6 @@ public class CastleManager load(); } - // ========================================================= - // Method - Public - public final int findNearestCastlesIndex(L2Object obj) { int index = getCastleIndex(obj); @@ -99,8 +92,6 @@ public class CastleManager return index; } - // ========================================================= - // Method - Private private final void load() { LOGGER.info("Initializing CastleManager"); @@ -125,9 +116,6 @@ public class CastleManager } } - // ========================================================= - // Property - Public - public final Castle getCastleById(int castleId) { for (Castle temp : getCastles()) @@ -300,7 +288,6 @@ public class CastleManager } } - // TODO: // added: remove clan cirlet for clan leaders public void removeCirclet(L2ClanMember member, int castleId) { @@ -349,7 +336,6 @@ public class CastleManager // continue removing offline } } - // else offline-player circlet removal PreparedStatement statement = null; try (Connection con = DatabaseFactory.getConnection()) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ChristmasManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ChristmasManager.java index c5f4047799..ba1bd92562 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ChristmasManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ChristmasManager.java @@ -126,7 +126,7 @@ public class ChristmasManager "May you have the best of Christmas this year and all your dreams come true.", "May the miracle of Christmas fill your heart with warmth and love. Merry Christmas!" }; - + protected String[] sender = { "Santa Claus", @@ -170,7 +170,7 @@ public class ChristmasManager "Reindeer Rudolf", "Christmas Elf" }; - + // Presents List: protected int[] presents = { @@ -238,23 +238,14 @@ public class ChristmasManager 9138, /* Santa Hat #2 */ 8936, /* Santa's Antlers Hat */ 6394, /* Red Party Mask */ - 5808 - /* Black Party Mask */ + 5808, /* Black Party Mask */ }; - // The message task sent at fixed rate protected Future _XMasMessageTask = null; - protected Future _XMasPresentsTask = null; - - // Manager should only be Initialized once: protected int isManagerInit = 0; - - // Interval of Christmas actions: protected long _IntervalOfChristmas = 600000; // 10 minutes - private final int first = 25000; - private final int last = 73099; /************************************** Initial Functions **************************************/ @@ -323,8 +314,6 @@ public class ChristmasManager activeChar.sendMessage("Terminating! This may take a while, please be patient..."); } - // Tasks: - ThreadPool.execute(new DeleteSpawns()); endFestiveMessagesAtFixedRate(); @@ -336,8 +325,6 @@ public class ChristmasManager checkIfOkToAnnounce(); } - /************************************ - Tree management - *************************************/ - /** * Main function - spawns all trees. */ @@ -437,7 +424,6 @@ public class ChristmasManager /** * Delete all x-mas spawned trees from the world. Delete all x-mas trees spawns, and clears the L2NpcInstance tree queue. */ - public class DeleteSpawns implements Runnable { @Override @@ -505,12 +491,9 @@ public class ChristmasManager } } - /**************************** - send players festive messages - *****************************/ - /** * Ends X-Mas messages sent to players, and terminates the thread. */ - private void endFestiveMessagesAtFixedRate() { if (_XMasMessageTask != null) @@ -532,9 +515,7 @@ public class ChristmasManager /** * Sends X-Mas messages to all world players. - * @author Darki699 */ - class SendXMasMessage implements Runnable { @Override @@ -592,13 +573,9 @@ public class ChristmasManager return message[rand.nextInt(message.length)]; } - /******************************* - give special items trees - ********************************/ - // Trees , Carols , Tokens of love, Fireworks, Santa Hats. - /** * Starts X-Mas Santa presents sent to all players, and initialize the thread. */ - private void givePresentsAtFixedRate() { final XMasPresentGivingTask XMasPresents = new XMasPresentGivingTask(); @@ -666,8 +643,6 @@ public class ChristmasManager } } - /************************************ - spawn NPCs in towns - ***************************************/ - // NPC Ids: 31863 , 31864 public class SpawnSantaNPCs implements Runnable { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClanHallManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClanHallManager.java index 39dad3fe56..3961685f5a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClanHallManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClanHallManager.java @@ -60,7 +60,6 @@ public class ClanHallManager load(); } - /** Load All Clan Hall */ private final void load() { LOGGER.info("Initializing ClanHallManager"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClassDamageManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClassDamageManager.java index bd60384fad..d024bb3dfb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClassDamageManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/ClassDamageManager.java @@ -94,16 +94,9 @@ public class ClassDamageManager { damage_by_mage.put(class_id, Double.parseDouble(scriptSetting.getProperty(key_string))); } - // LOGGER.info("class: "+class_name+" key: "+key_string+" classid: "+class_id); - // LOGGER.info("multiplier: "+Double.parseDouble(scriptSetting.getProperty(key_string))); } LOGGER.info("Loaded " + id_to_name.size() + " classes Damages configurations"); - - /* - * int class_id = 114; LOGGER.info("class: "+id_to_name.get(class_id)+" classid: "+class_id); LOGGER.info("multiplier to fighter: "+damage_to_fighter.get(class_id)); LOGGER.info("multiplier to mage: "+damage_to_mage.get(class_id)); - * LOGGER.info("multiplier by fighter: "+damage_by_fighter.get(class_id)); LOGGER.info("multiplier by mage: "+damage_by_mage.get(class_id)); - */ } catch (Exception e) { @@ -234,5 +227,4 @@ public class ClassDamageManager return output; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CoupleManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CoupleManager.java index c05c7d0af3..ea75b4ccd0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CoupleManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CoupleManager.java @@ -35,8 +35,6 @@ public class CoupleManager { protected static final Logger LOGGER = Logger.getLogger(CoupleManager.class.getName()); - // ========================================================= - // Data Field private final List _couples = new ArrayList<>(); public static final CoupleManager getInstance() @@ -51,16 +49,12 @@ public class CoupleManager load(); } - // ========================================================= - // Method - Public public void reload() { _couples.clear(); load(); } - // ========================================================= - // Method - Private private final void load() { try (Connection con = DatabaseFactory.getConnection()) @@ -87,8 +81,6 @@ public class CoupleManager } } - // ========================================================= - // Property - Public public final Wedding getCouple(int coupleId) { final int index = getCoupleIndex(coupleId); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CursedWeaponsManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CursedWeaponsManager.java index 2a238a160d..e13d8f52a5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CursedWeaponsManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CursedWeaponsManager.java @@ -78,8 +78,6 @@ public class CursedWeaponsManager LOGGER.info("Loaded: " + _cursedWeapons.size() + " cursed weapon(s)."); } - // ========================================================= - // Method - Private public final void reload() { if (!Config.ALLOW_CURSED_WEAPONS) @@ -171,7 +169,6 @@ public class CursedWeaponsManager } } - // Store cursed weapon _cursedWeapons.put(id, cw); } } @@ -291,8 +288,6 @@ public class CursedWeaponsManager } } - // ========================================================= - // Properties - Public public synchronized void checkDrop(L2Attackable attackable, L2PcInstance player) { if ((attackable instanceof L2SiegeGuardInstance) || (attackable instanceof L2RiftInvaderInstance) || (attackable instanceof L2FestivalMonsterInstance) || (attackable instanceof L2GrandBossInstance) || (attackable instanceof L2FortSiegeGuardInstance) || (attackable instanceof L2CommanderInstance)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CustomNpcInstanceManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CustomNpcInstanceManager.java index 8853037425..040527bf93 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CustomNpcInstanceManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/CustomNpcInstanceManager.java @@ -279,7 +279,6 @@ public final class CustomNpcInstanceManager */ public final void updateRemoveInDB(customInfo ciToRemove) { - // } public final void AddInDB(customInfo ciToAdd) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DayNightSpawnManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DayNightSpawnManager.java index 09150a97a0..a75ab5b32b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DayNightSpawnManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DayNightSpawnManager.java @@ -46,8 +46,6 @@ public class DayNightSpawnManager private final List _nightCreatures = new ArrayList<>(); private final Map _bosses = new ConcurrentHashMap<>(); - // private static int _currentState; // 0 = Day, 1 = Night - public static DayNightSpawnManager getInstance() { if (_instance == null) @@ -60,7 +58,6 @@ public class DayNightSpawnManager private DayNightSpawnManager() { - // Prevent external initialization. LOGGER.info("DayNightSpawnManager: Day/Night handler initialised"); } @@ -84,7 +81,7 @@ public class DayNightSpawnManager _nightCreatures.add(spawnDat); } - /* + /** * Spawn Day Creatures, and Unspawn Night Creatures */ public void spawnDayCreatures() @@ -92,7 +89,7 @@ public class DayNightSpawnManager spawnCreatures(_nightCreatures, _dayCreatures, "night", "day"); } - /* + /** * Spawn Night Creatures, and Unspawn Day Creatures */ public void spawnNightCreatures() diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DuelManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DuelManager.java index 8cdc2743a7..4a200ce622 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DuelManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/DuelManager.java @@ -29,7 +29,6 @@ public class DuelManager { private static final Logger LOGGER = Logger.getLogger(DuelManager.class.getName()); - // ========================================================= private static DuelManager _instance; public static final DuelManager getInstance() @@ -41,22 +40,15 @@ public class DuelManager return _instance; } - // ========================================================= - // Data Field private final List _duels; private int _currentDuelId = 0x90; - // ========================================================= - // Constructor private DuelManager() { LOGGER.info("Initializing DuelManager"); _duels = new ArrayList<>(); } - // ========================================================= - // Method - Private - private int getNextDuelId() { _currentDuelId++; @@ -81,9 +73,6 @@ public class DuelManager return null; } - // ========================================================= - // Method - Public - public void addDuel(L2PcInstance playerA, L2PcInstance playerB, int partyDuel) { if ((playerA == null) || (playerB == null)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FishingZoneManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FishingZoneManager.java index 07703c309b..14638d7c4d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FishingZoneManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FishingZoneManager.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.zone.type.L2WaterZone; public class FishingZoneManager { - // ========================================================= private static FishingZoneManager _instance; private static final Logger LOGGER = Logger.getLogger(FishingZoneManager.class.getName()); @@ -39,22 +38,13 @@ public class FishingZoneManager return _instance; } - // ========================================================= - - // ========================================================= - // Data Field private List _fishingZones; private List _waterZones; - // ========================================================= - // Constructor public FishingZoneManager() { } - // ========================================================= - // Property - Public - public void addFishingZone(L2FishingZone fishingZone) { if (_fishingZones == null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortManager.java index 2cba406f8c..53c4bba516 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortManager.java @@ -41,12 +41,8 @@ public class FortManager return SingletonHolder._instance; } - // ========================================================= - // Data Field private final List _forts = new ArrayList<>(); - // ========================================================= - // Constructor public FortManager() { LOGGER.info("Initializing FortManager"); @@ -54,9 +50,6 @@ public class FortManager load(); } - // ========================================================= - // Method - Public - public final int findNearestFortIndex(L2Object obj) { int index = getFortIndex(obj); @@ -83,8 +76,6 @@ public class FortManager return index; } - // ========================================================= - // Method - Private private final void load() { try (Connection con = DatabaseFactory.getConnection()) @@ -112,8 +103,6 @@ public class FortManager } } - // ========================================================= - // Property - Public public final Fort getFortById(int fortId) { for (Fort f : _forts) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeGuardManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeGuardManager.java index 21b35de0bb..6c49bd8a69 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeGuardManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeGuardManager.java @@ -33,25 +33,18 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; /** * @author programmos, scoria dev */ - public class FortSiegeGuardManager { private static final Logger LOGGER = Logger.getLogger(FortSiegeGuardManager.class.getName()); - // ========================================================= - // Data Field private final Fort _fort; private final List _siegeGuardSpawn = new ArrayList<>(); - // ========================================================= - // Constructor public FortSiegeGuardManager(Fort fort) { _fort = fort; } - // ========================================================= - // Method - Public /** * Add guard.
*
@@ -199,8 +192,6 @@ public class FortSiegeGuardManager _siegeGuardSpawn.clear(); } - // ========================================================= - // Method - Private /** * Load guards.
*
@@ -285,9 +276,6 @@ public class FortSiegeGuardManager } } - // ========================================================= - // Proeprty - public final Fort getFort() { return _fort; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeManager.java index 8038f75223..7aeceb835b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FortSiegeManager.java @@ -58,8 +58,6 @@ public class FortSiegeManager load(); } - // ========================================================= - // Data Field private int _attackerMaxClans = 500; // Max number of clans private int _attackerRespawnDelay = 20000; // Time in ms. Changeable in siege.config private int _defenderMaxClans = 500; // Max number of clans @@ -173,8 +171,6 @@ public class FortSiegeManager character.removeSkill(SkillTable.getInstance().getInfo(247, 1)); } - // ========================================================= - // Method - Private private final void load() { LOGGER.info("Initializing FortSiegeManager"); @@ -282,8 +278,6 @@ public class FortSiegeManager } } - // ========================================================= - // Property - Public public final List getCommanderSpawnList(int _fortId) { if (_commanderSpawnList.containsKey(_fortId)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FourSepulchersManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FourSepulchersManager.java index 2c2dbd4709..5c0944af61 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FourSepulchersManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/FourSepulchersManager.java @@ -49,8 +49,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; import com.l2jmobius.gameserver.util.Util; /** - * This class ... - * @version $Revision: $ $Date: $ * @author sandman TODO: Gatekeepers shouting some text when doors get opened..so far unknown in leaked C4 is this text: 1000502 [brushes hinders competitor's monster.] which is really ugly translation TODO: Victim should attack one npc, when u save this NPC debuff zones will not be activated and * NPC will polymorph into some kind of Tammed Beast xD and shout: 1000503 [many thanks rescue.] which is again really ugly translation. When Victim kill this NPC, debuff zones will get activated with current core its impossible to make attack npc * npc i will try to search where is this * prevented but still is unknown which npc u need to save to survive in next room without debuffs @@ -314,42 +312,32 @@ public class FourSepulchersManager extends GrandBossManager { timeCalculator(); final long currentTime = Calendar.getInstance().getTimeInMillis(); - // if current time >= time of entry beginning and if current time < time - // of entry beginning + time of entry end - if ((currentTime >= _coolDownTimeEnd) && (currentTime < _entryTimeEnd)) // entry - // time - // check + // if current time >= time of entry beginning and if current time < time of entry beginning + time of entry end + if ((currentTime >= _coolDownTimeEnd) && (currentTime < _entryTimeEnd)) // entry time check { clean(); _changeEntryTimeTask = ThreadPool.schedule(new ChangeEntryTime(), 0); LOGGER.info("FourSepulchersManager: Beginning in Entry time"); } - else if ((currentTime >= _entryTimeEnd) && (currentTime < _warmUpTimeEnd)) // warmup - // time - // check + else if ((currentTime >= _entryTimeEnd) && (currentTime < _warmUpTimeEnd)) // warmup time check { clean(); _changeWarmUpTimeTask = ThreadPool.schedule(new ChangeWarmUpTime(), 0); LOGGER.info("FourSepulchersManager: Beginning in WarmUp time"); } - else if ((currentTime >= _warmUpTimeEnd) && (currentTime < _attackTimeEnd)) // attack - // time - // check + else if ((currentTime >= _warmUpTimeEnd) && (currentTime < _attackTimeEnd)) // attack time check { clean(); _changeAttackTimeTask = ThreadPool.schedule(new ChangeAttackTime(), 0); LOGGER.info("FourSepulchersManager: Beginning in Attack time"); } - else - // else cooldown time and without cleanup because it's already - // implemented + else // cooldown time and without cleanup because it's already implemented { _changeCoolDownTimeTask = ThreadPool.schedule(new ChangeCoolDownTime(), 0); LOGGER.info("FourSepulchersManager: Beginning in Cooldown time"); } } - // phase end times calculator protected void timeCalculator() { Calendar tmp = Calendar.getInstance(); @@ -401,7 +389,6 @@ public class FourSepulchersManager extends GrandBossManager protected void spawnManagers() { _managers = new ArrayList<>(); - // L2Spawn spawnDat; int i = 31921; for (L2Spawn spawnDat; i <= 31924; i++) @@ -1288,8 +1275,6 @@ public class FourSepulchersManager extends GrandBossManager if (Rnd.get(48) == 0) { spawnKeyBoxMob = true; - // LOGGER.info("FourSepulchersManager.SpawnMonster: - // Set to spawn Church of Viscount Key Mob."); } break; } @@ -1518,8 +1503,6 @@ public class FourSepulchersManager extends GrandBossManager protected void locationShadowSpawns() { final int locNo = Rnd.get(4); - // LOGGER.info("FourSepulchersManager.LocationShadowSpawns: Location index - // is " + locNo + "."); final int[] gateKeeper = { 31929, @@ -1713,7 +1696,7 @@ public class FourSepulchersManager extends GrandBossManager } min = minuteSelect(min); - String msg = min + " minute(s) have passed."; // now this is a proper message^^ + String msg = min + " minute(s) have passed."; if (min == 90) { msg = "Game over. The teleport will appear momentarily"; @@ -1731,8 +1714,7 @@ public class FourSepulchersManager extends GrandBossManager LOGGER.warning("FourSepulchersManager: managerSay(): manager is not Sepulcher instance"); continue; } - // hall not used right now, so its manager will not tell you - // anything :) + // hall not used right now, so its manager will not tell you anything :) // if you don't need this - delete next two lines. if (!_hallInUse.get(temp.getNpcId()).booleanValue()) { @@ -1777,12 +1759,7 @@ public class FourSepulchersManager extends GrandBossManager tmp.setTimeInMillis(Calendar.getInstance().getTimeInMillis() - _warmUpTimeEnd); if ((tmp.get(Calendar.MINUTE) + 5) < Config.FS_TIME_ATTACK) { - managerSay((byte) tmp.get(Calendar.MINUTE)); // byte - // because - // minute - // cannot be - // more than - // 59 + managerSay((byte) tmp.get(Calendar.MINUTE)); // byte because minute cannot be more than 59 ThreadPool.schedule(new ManagerSay(), 5 * 60000); } // attack time ending chat @@ -1803,26 +1780,20 @@ public class FourSepulchersManager extends GrandBossManager @Override public void run() { - // LOGGER.info("FourSepulchersManager:In Entry Time"); _inEntryTime = true; _inWarmUpTime = false; _inAttackTime = false; _inCoolDownTime = false; long interval = 0; - // if this is first launch - search time when entry time will be - // ended: - // counting difference between time when entry time ends and current - // time - // and then launching change time task + // if this is first launch - search time when entry time will be ended: counting difference between time when entry time ends and current time and then launching change time task if (_firstTimeRun) { interval = _entryTimeEnd - Calendar.getInstance().getTimeInMillis(); } else { - interval = Config.FS_TIME_ENTRY * 60000; // else use stupid - // method + interval = Config.FS_TIME_ENTRY * 60000; // else use stupid method } // launching saying process... @@ -1841,17 +1812,13 @@ public class FourSepulchersManager extends GrandBossManager @Override public void run() { - // LOGGER.info("FourSepulchersManager:In Warm-Up Time"); _inEntryTime = true; _inWarmUpTime = false; _inAttackTime = false; _inCoolDownTime = false; long interval = 0; - // searching time when warmup time will be ended: - // counting difference between time when warmup time ends and - // current time - // and then launching change time task + // searching time when warmup time will be ended: counting difference between time when warmup time ends and current time and then launching change time task if (_firstTimeRun) { interval = _warmUpTimeEnd - Calendar.getInstance().getTimeInMillis(); @@ -1875,7 +1842,6 @@ public class FourSepulchersManager extends GrandBossManager @Override public void run() { - // LOGGER.info("FourSepulchersManager:In Attack Time"); _inEntryTime = false; _inWarmUpTime = false; _inAttackTime = true; @@ -1900,11 +1866,8 @@ public class FourSepulchersManager extends GrandBossManager for (double min = Calendar.getInstance().get(Calendar.MINUTE); min < _newCycleMin; min++) { // looking for next shout time.... - if ((min % 5) == 0)// check if min can be divided by 5 + if ((min % 5) == 0) // check if min can be divided by 5 { - // LOGGER.info(Calendar.getInstance().getTime() - // + " Atk announce scheduled to " + min - // + " minute of this hour."); final Calendar inter = Calendar.getInstance(); inter.set(Calendar.MINUTE, (int) min); ThreadPool.schedule(new ManagerSay(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis()); @@ -1916,10 +1879,7 @@ public class FourSepulchersManager extends GrandBossManager { ThreadPool.schedule(new ManagerSay(), 5 * 60400); } - // searching time when attack time will be ended: - // counting difference between time when attack time ends and - // current time - // and then launching change time task + // searching time when attack time will be ended: counting difference between time when attack time ends and current time and then launching change time task if (_firstTimeRun) { interval = _attackTimeEnd - Calendar.getInstance().getTimeInMillis(); @@ -1943,7 +1903,6 @@ public class FourSepulchersManager extends GrandBossManager @Override public void run() { - // LOGGER.info("FourSepulchersManager:In Cool-Down Time"); _inEntryTime = false; _inWarmUpTime = false; _inAttackTime = false; @@ -1952,18 +1911,15 @@ public class FourSepulchersManager extends GrandBossManager clean(); Calendar time = Calendar.getInstance(); - // one hour = 55th min to 55 min of next hour, so we check for this, - // also check for first launch + // one hour = 55th min to 55 min of next hour, so we check for this, also check for first launch if ((Calendar.getInstance().get(Calendar.MINUTE) > _newCycleMin) && !_firstTimeRun) { time.set(Calendar.HOUR, Calendar.getInstance().get(Calendar.HOUR) + 1); } time.set(Calendar.MINUTE, _newCycleMin); - // LOGGER.info("FourSepulchersManager: Entry time: " + time.getTime()); if (_firstTimeRun) { - _firstTimeRun = false; // cooldown phase ends event hour, so it - // will be not first run + _firstTimeRun = false; // cooldown phase ends event hour, so it will be not first run } final long interval = time.getTimeInMillis() - Calendar.getInstance().getTimeInMillis(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/GrandBossManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/GrandBossManager.java index 2cbc8c9937..491e023766 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/GrandBossManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/GrandBossManager.java @@ -99,8 +99,7 @@ public class GrandBossManager final ResultSet rset = statement.executeQuery(); while (rset.next()) { - // Read all info from DB, and store it for AI to read and decide what to do - // faster than accessing DB in real time + // Read all info from DB, and store it for AI to read and decide what to do faster than accessing DB in real time StatsSet info = new StatsSet(); final int bossId = rset.getInt("boss_id"); info.set("loc_x", rset.getInt("loc_x")); @@ -232,18 +231,11 @@ public class GrandBossManager return temp.getZoneName().equalsIgnoreCase(zoneType); } - /* - * The rest - */ - public Integer getBossStatus(int bossId) { return _bossStatus.get(bossId); } - /* - * public void setBossStatus(int bossId, int status) { _bossStatus.remove(bossId); _bossStatus.put(bossId, status); } - */ public void setBossStatus(int bossId, int status) { _bossStatus.put(bossId, status); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/MercTicketManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/MercTicketManager.java index 6c5687e691..de6defbee1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/MercTicketManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/MercTicketManager.java @@ -44,10 +44,6 @@ public class MercTicketManager { protected static Logger LOGGER = Logger.getLogger(MercTicketManager.class.getName()); - // ========================================================= - - // ========================================================= - // Data Field private final List _droppedTickets = new ArrayList<>(); public static final MercTicketManager getInstance() @@ -246,8 +242,7 @@ public class MercTicketManager 20, 20, 20, - 20 - // Schuttgart + 20, // Schuttgart }; private static final int[] MERCS_MAX_PER_CASTLE = { @@ -259,8 +254,7 @@ public class MercTicketManager 400, // Innadril 400, // Goddard 400, // Rune - 400 - // Schuttgart + 400, // Schuttgart }; private static final int[] ITEM_IDS = @@ -444,8 +438,7 @@ public class MercTicketManager 7937, 7938, 7939, - 7940 - // Schuttgart + 7940, // Schuttgart }; private static final int[] NPC_IDS = @@ -629,13 +622,9 @@ public class MercTicketManager 35036, 35037, 35038, - 35039 - // Schuttgart + 35039, // Schuttgart }; - // ========================================================= - // Method - Public - // returns the castleId for the passed ticket item id public int getTicketCastleId(int itemId) { if (((itemId >= ITEM_IDS[0]) && (itemId <= ITEM_IDS[9])) || ((itemId >= ITEM_IDS[10]) && (itemId <= ITEM_IDS[19]))) @@ -683,8 +672,6 @@ public class MercTicketManager load(); } - // ========================================================= - // Method - Private private final void load() { // load merc tickets into the world @@ -725,7 +712,6 @@ public class MercTicketManager if (NPC_IDS[i] == npcId) // Find the index of the item used { // only handle tickets if a siege is not ongoing in this npc's castle - if ((castle != null) && !castle.getSiege().getIsInProgress()) { itemId = ITEM_IDS[i]; @@ -753,8 +739,6 @@ public class MercTicketManager } } - // ========================================================= - // Property - Public /** * Checks if the passed item has reached the limit of number of dropped tickets that this SPECIFIC item may have in its castle * @param itemId diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/OlympiadStadiaManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/OlympiadStadiaManager.java index 465aea2190..8699a81c36 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/OlympiadStadiaManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/OlympiadStadiaManager.java @@ -27,7 +27,6 @@ public class OlympiadStadiaManager { protected static Logger LOGGER = Logger.getLogger(OlympiadStadiaManager.class.getName()); - // ========================================================= private static OlympiadStadiaManager _instance; public static final OlympiadStadiaManager getInstance() @@ -40,21 +39,12 @@ public class OlympiadStadiaManager return _instance; } - // ========================================================= - - // ========================================================= - // Data Field private List _olympiadStadias; - // ========================================================= - // Constructor public OlympiadStadiaManager() { } - // ========================================================= - // Property - Public - public void addStadium(L2OlympiadStadiumZone arena) { if (_olympiadStadias == null) @@ -93,18 +83,4 @@ public class OlympiadStadiaManager return null; } - - @Deprecated - public final L2OlympiadStadiumZone getOlympiadStadiumById(int olympiadStadiumId) - { - for (L2OlympiadStadiumZone temp : _olympiadStadias) - { - if (temp.getStadiumId() == olympiadStadiumId) - { - return temp; - } - } - return null; - } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/PetitionManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/PetitionManager.java index 84fb8a6cb4..4945c27c56 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/PetitionManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/PetitionManager.java @@ -87,7 +87,6 @@ public final class PetitionManager private class Petition { private final long _submitTime = System.currentTimeMillis(); - // private long _endTime = -1; private final int _id; private final PetitionType _type; @@ -126,8 +125,6 @@ public final class PetitionManager public boolean endPetitionConsultation(PetitionState endState) { setState(endState); - // _endTime = System.currentTimeMillis(); - if ((_responder != null) && (_responder.isOnline() == 1)) { if (endState == PetitionState.Responder_Reject) @@ -181,11 +178,6 @@ public final class PetitionManager return _responder; } - // public long getEndTime() - // { - // return _endTime; - // } - public long getSubmitTime() { return _submitTime; @@ -205,7 +197,6 @@ public final class PetitionManager { if ((_petitioner == null) || (_petitioner.isOnline() == 0)) { - // endPetitionConsultation(PetitionState.Petitioner_Missing); return; } @@ -517,9 +508,6 @@ public final class PetitionManager public boolean sendActivePetitionMessage(L2PcInstance player, String messageText) { - // if (!isPlayerInConsultation(player)) - // return false; - CreatureSay cs; for (Petition currPetition : _pendingPetitions.values()) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java index 711c5422c9..930eb6bd4f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/QuestManager.java @@ -104,8 +104,6 @@ public class QuestManager extends ScriptManager } } - // ========================================================= - // Property - Public public final Quest getQuest(String name) { return getQuests().get(name); @@ -134,8 +132,7 @@ public class QuestManager extends ScriptManager _questCount++; } - // Note: HastMap will replace the old value if the key already exists - // so there is no need to explicitly try to remove the old reference. + // Note: HastMap will replace the old value if the key already exists so there is no need to explicitly try to remove the old reference. getQuests().put(newQuest.getName(), newQuest); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeGuardManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeGuardManager.java index 281d7553c8..a8686710f0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeGuardManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeGuardManager.java @@ -34,20 +34,14 @@ public class SiegeGuardManager { private static Logger LOGGER = Logger.getLogger(SiegeGuardManager.class.getName()); - // ========================================================= - // Data Field private final Castle _castle; private final List _siegeGuardSpawn = new ArrayList<>(); - // ========================================================= - // Constructor public SiegeGuardManager(Castle castle) { _castle = castle; } - // ========================================================= - // Method - Public /** * Add guard.
*
@@ -188,8 +182,6 @@ public class SiegeGuardManager _siegeGuardSpawn.clear(); } - // ========================================================= - // Method - Private /** * Load guards.
*
@@ -282,9 +274,6 @@ public class SiegeGuardManager } } - // ========================================================= - // Proeprty - public final Castle getCastle() { return _castle; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeManager.java index 11d32d847d..8d90baaf6d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/SiegeManager.java @@ -53,8 +53,6 @@ public class SiegeManager return SingletonHolder._instance; } - // ========================================================= - // Data Field private int _attackerMaxClans = 500; // Max number of clans private int _attackerRespawnDelay = 20000; // Time in ms. Changeable in siege.config private int _defenderMaxClans = 500; // Max number of clans @@ -72,17 +70,11 @@ public class SiegeManager private boolean _teleport_to_siege = false; private boolean _teleport_to_siege_town = false; - // private List _sieges; - - // ========================================================= - // Constructor private SiegeManager() { load(); } - // ========================================================= - // Method - Public public final void addSiegeSkills(L2PcInstance character) { character.addSkill(SkillTable.getInstance().getInfo(246, 1), false); @@ -196,8 +188,6 @@ public class SiegeManager character.removeSkill(SkillTable.getInstance().getInfo(247, 1)); } - // ========================================================= - // Method - Private private final void load() { LOGGER.info("Initializing SiegeManager"); @@ -292,7 +282,6 @@ public class SiegeManager } catch (Exception e) { - // _initialized = false; LOGGER.warning("Error while loading siege data."); e.printStackTrace(); @@ -314,8 +303,6 @@ public class SiegeManager } } - // ========================================================= - // Property - Public public final List getArtefactSpawnList(int _castleId) { if (_artefactSpawnList.containsKey(_castleId)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/TownManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/TownManager.java index 22e14e7c51..138ff615f4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/TownManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/instancemanager/TownManager.java @@ -29,7 +29,6 @@ public class TownManager { private static final Logger LOGGER = Logger.getLogger(TownManager.class.getName()); - // ========================================================= private static TownManager _instance; public static final TownManager getInstance() @@ -42,21 +41,12 @@ public class TownManager return _instance; } - // ========================================================= - - // ========================================================= - // Data Field private List _towns; - // ========================================================= - // Constructor public TownManager() { } - // ========================================================= - // Property - Public - public void addTown(L2TownZone arena) { if (_towns == null) @@ -230,7 +220,6 @@ public class TownManager public final boolean townHasCastleInSiege(int townId) { - // int[] castleidarray = {0,0,0,0,0,0,0,1,2,3,4,0,5,0,0,6,0}; final int[] castleidarray = { 0, @@ -269,7 +258,6 @@ public class TownManager public final boolean townHasCastleInSiege(int x, int y) { final int curtown = MapRegionTable.getInstance().getMapRegion(x, y); - // int[] castleidarray = {0,0,0,0,0,1,0,2,3,4,5,0,0,6,0,0,0,0}; final int[] castleidarray = { 0, diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ClanWarehouse.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ClanWarehouse.java index 0af8131e20..2769bea4eb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ClanWarehouse.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ClanWarehouse.java @@ -22,8 +22,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public final class ClanWarehouse extends Warehouse { - // private static final Logger LOGGER = Logger.getLogger(PcWarehouse.class); - private final L2Clan _clan; public ClanWarehouse(L2Clan clan) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CombatFlag.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CombatFlag.java index 67f3b0fd72..d4a3c82aaf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CombatFlag.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CombatFlag.java @@ -30,11 +30,8 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; /** * @author programmos, scoria dev */ - public class CombatFlag { - // private static final Logger LOGGER = Logger.getLogger(CombatFlag.class); - protected L2PcInstance _player = null; public int playerId = 0; private L2ItemInstance _item = null; @@ -44,16 +41,9 @@ public class CombatFlag private final int _itemId; - // private int _heading; - // private int _fortId; - - // ========================================================= - // Constructor - public CombatFlag(/* int fort_id, */final int x, int y, int z, int heading, int item_id) + public CombatFlag(final int x, int y, int z, int heading, int item_id) { - // _fortId = fort_id; _location = new Location(x, y, z, heading); - // _heading = heading; _itemId = item_id; } @@ -82,8 +72,7 @@ public class CombatFlag public void activate(L2PcInstance player, L2ItemInstance item) { - // if the player is mounted, attempt to unmount first. Only allow picking up - // the comabt flag if unmounting is successful. + // if the player is mounted, attempt to unmount first. Only allow picking up the comabt flag if unmounting is successful. if (player.isMounted()) { // TODO: dismount @@ -125,13 +114,11 @@ public class CombatFlag // Refresh player stats _player.broadcastUserInfo(); - // _player.setCombatFlagEquipped(true); } public void dropIt() { // Reset player stats - // _player.setCombatFlagEquipped(false); removeSkill(); _player.destroyItem("DieDrop", _item, null, false); _item = null; @@ -153,5 +140,4 @@ public class CombatFlag _player.removeSkill(SkillTable.getInstance().getInfo(3358, 1), false); _player.sendSkillList(); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CursedWeapon.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CursedWeapon.java index c8c1b06bd2..563766c65c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CursedWeapon.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/CursedWeapon.java @@ -72,8 +72,6 @@ public class CursedWeapon private int _playerKarma = 0; private int _playerPkKills = 0; - // ========================================================= - // Constructor public CursedWeapon(int itemId, int skillId, String name) { _name = name; @@ -82,8 +80,6 @@ public class CursedWeapon _skillMaxLevel = SkillTable.getInstance().getMaxLevel(_skillId, 0); } - // ========================================================= - // Private public void endOfLife() { if (_isActivated) @@ -147,9 +143,7 @@ public class CursedWeapon } } } - else // either this cursed weapon is in the inventory of someone who has another cursed weapon equipped, - // OR this cursed weapon is on the ground. - if ((_player != null) && (_player.getInventory().getItemByItemId(_itemId) != null)) + else if ((_player != null) && (_player.getInventory().getItemByItemId(_itemId) != null)) // either this cursed weapon is in the inventory of someone who has another cursed weapon equipped, OR this cursed weapon is on the ground. { final L2ItemInstance rhand = _player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (rhand != null) @@ -270,10 +264,6 @@ public class CursedWeapon _player.broadcastUserInfo(); sm.addZoneName(_player.getX(), _player.getY(), _player.getZ()); // Region Name - - // EndTime: if dropped from player, the endTime is the same then before - // cancelTask(); - // _endTime = 0; } sm.addItemName(_itemId); @@ -290,7 +280,6 @@ public class CursedWeapon } /** - * Yesod:
* Rebind the passive skill belonging to the CursedWeapon. Invoke this method if the weapon owner switches to a subclass. */ public void giveSkill() @@ -303,7 +292,6 @@ public class CursedWeapon } L2Skill skill = SkillTable.getInstance().getInfo(_skillId, level); - // Yesod: // To properly support subclasses this skill can not be stored. _player.addSkill(skill, false); @@ -329,8 +317,6 @@ public class CursedWeapon _player.sendSkillList(); } - // ========================================================= - // Public public void reActivate() { _isActivated = true; @@ -367,8 +353,7 @@ public class CursedWeapon public void activate(L2PcInstance player, L2ItemInstance item) { _player = player; - // if the player is mounted, attempt to unmount first. Only allow picking up - // the zariche if unmounting is successful. + // if the player is mounted, attempt to unmount first. Only allow picking up the zariche if unmounting is successful. if (player.isMounted()) { if (_player.setMountType(0)) @@ -528,8 +513,6 @@ public class CursedWeapon saveData(); } - // ========================================================= - // Setter public void setDisapearChance(int disapearChance) { _disapearChance = disapearChance; @@ -601,8 +584,6 @@ public class CursedWeapon _item = item; } - // ========================================================= - // Getter public boolean isActivated() { return _isActivated; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/Inventory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/Inventory.java index 9c9edca334..02062beb05 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/Inventory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/Inventory.java @@ -43,8 +43,6 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType; */ public abstract class Inventory extends ItemContainer { - // protected static final Logger LOGGER = Logger.getLogger(Inventory.class); - public interface PaperdollListener { void notifyEquiped(int slot, L2ItemInstance inst); @@ -228,9 +226,6 @@ public abstract class Inventory extends ItemContainer } } - /** - * private void InventoryUpdate() { // TODO Auto-generated method stub } - **/ @Override public void notifyEquiped(int slot, L2ItemInstance item) { @@ -606,12 +601,6 @@ public abstract class Inventory extends ItemContainer } } - /* - * final class FormalWearListener implements PaperdollListener { public void notifyUnequiped(int slot, L2ItemInstance item) { if (!(getOwner() != null && getOwner() instanceof L2PcInstance)) return; L2PcInstance owner = (L2PcInstance)getOwner(); if (item.getItemId() == 6408) - * owner.setIsWearingFormalWear(false); } public void notifyEquiped(int slot, L2ItemInstance item) { if (!(getOwner() != null && getOwner() instanceof L2PcInstance)) return; L2PcInstance owner = (L2PcInstance)getOwner(); // If player equip Formal Wear unequip weapons and abort cast/attack if - * (item.getItemId() == 6408) { owner.setIsWearingFormalWear(true); if (owner.isCastingNow()) owner.abortCast(); if (owner.isAttackingNow()) owner.abortAttack(); setPaperdollItem(PAPERDOLL_LHAND, null); setPaperdollItem(PAPERDOLL_RHAND, null); setPaperdollItem(PAPERDOLL_LRHAND, null); } else { - * if (!owner.isWearingFormalWear()) return; // Don't let weapons be equipped if player is wearing Formal Wear if (slot == PAPERDOLL_LHAND || slot == PAPERDOLL_RHAND || slot == PAPERDOLL_LRHAND) { setPaperdollItem(slot, null); } } } } - */ /** * Constructor of the inventory */ @@ -723,8 +712,6 @@ public abstract class Inventory extends ItemContainer @Override protected void removeItem(L2ItemInstance item) { - // Unequip item if equiped - // if (item.isEquipped()) unEquipItemInSlotAndRecord(item.getEquipSlot()); for (int i = 0; i < _paperdoll.length; i++) { if (_paperdoll[i] == item) @@ -968,7 +955,7 @@ public abstract class Inventory extends ItemContainer { if ((getOwner() != null) && (getOwner() instanceof L2PcInstance)) { - old.getAugmentation().removeBoni((L2PcInstance) getOwner()); + old.getAugmentation().removeBonus((L2PcInstance) getOwner()); } } @@ -1075,11 +1062,10 @@ public abstract class Inventory extends ItemContainer slot = L2Item.SLOT_GLOVES; break; } - // case PAPERDOLL_CHEST: slot = item.getItem().getBodyPart(); break;// fall through case PAPERDOLL_CHEST: { slot = L2Item.SLOT_CHEST; - break; // TODO + break; } case PAPERDOLL_LEGS: { @@ -1111,7 +1097,6 @@ public abstract class Inventory extends ItemContainer * @param slot : int designating the slot of the paperdoll * @return L2ItemInstance[] : list of changes */ - // public synchronized L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot) public L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot) { final ChangeRecorder recorder = newRecorder(); @@ -1140,7 +1125,6 @@ public abstract class Inventory extends ItemContainer * @param pdollSlot : int designating the slot * @return L2ItemInstance designating the item in slot before change */ - // public synchronized L2ItemInstance unEquipItemInSlot(int pdollSlot) public L2ItemInstance unEquipItemInSlot(int pdollSlot) { return setPaperdollItem(pdollSlot, null); @@ -1151,7 +1135,6 @@ public abstract class Inventory extends ItemContainer * @param slot : int designating the slot * @return L2ItemInstance[] : list of items altered */ - // public synchronized L2ItemInstance[] unEquipItemInSlotAndRecord(int slot) public L2ItemInstance[] unEquipItemInSlotAndRecord(int slot) { final ChangeRecorder recorder = newRecorder(); @@ -1227,7 +1210,7 @@ public abstract class Inventory extends ItemContainer case L2Item.SLOT_DHAIR: { setPaperdollItem(PAPERDOLL_HAIR, null); - setPaperdollItem(PAPERDOLL_FACE, null);// this should be the same as in DHAIR + setPaperdollItem(PAPERDOLL_FACE, null); // this should be the same as in DHAIR pdollSlot = PAPERDOLL_DHAIR; break; } @@ -1254,7 +1237,7 @@ public abstract class Inventory extends ItemContainer case L2Item.SLOT_CHEST: { pdollSlot = PAPERDOLL_CHEST; - break; // TODO: пїЅпїЅпїЅпїЅ "пїЅпїЅпїЅпїЅпїЅ" + break; } case L2Item.SLOT_FULL_ARMOR: { @@ -1284,7 +1267,7 @@ public abstract class Inventory extends ItemContainer case L2Item.SLOT_LR_HAND: { setPaperdollItem(PAPERDOLL_LHAND, null); - setPaperdollItem(PAPERDOLL_RHAND, null);// this should be the same as in LRHAND + setPaperdollItem(PAPERDOLL_RHAND, null); // this should be the same as in LRHAND pdollSlot = PAPERDOLL_LRHAND; break; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemContainer.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemContainer.java index b5266037e1..a7d8de3b9e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemContainer.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemContainer.java @@ -31,8 +31,8 @@ import com.l2jmobius.gameserver.datatables.xml.ItemTable; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance.ItemLocation; -import com.l2jmobius.gameserver.templates.item.L2Item; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.templates.item.L2Item; /** * @author Advi @@ -158,7 +158,6 @@ public abstract class ItemContainer { if ((item != null) && (item.getItemId() == itemId) && ((item.getEnchantLevel() == enchantLevel) || (enchantLevel < 0))) { - // if (item.isAvailable((L2PcInstance)getOwner(), true) || item.getItem().getType2() == 3)//available or quest item if (item.isStackable()) { count = item.getCount(); @@ -426,7 +425,7 @@ public abstract class ItemContainer if (sourceitem.isAugmented()) { - sourceitem.getAugmentation().removeBoni(actor); + sourceitem.getAugmentation().removeBonus(actor); } refreshWeight(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemInfo.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemInfo.java index 2f6148f377..a96f62bcc0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemInfo.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemInfo.java @@ -25,35 +25,16 @@ import com.l2jmobius.gameserver.templates.item.L2Item; */ public class ItemInfo { - /** Identifier of the L2ItemInstance */ private int _objectId; - - /** The L2Item template of the L2ItemInstance */ private L2Item _item; - - /** The level of enchant on the L2ItemInstance */ private int _enchant; - - /** The augmentation of the item */ private int _augmentation; - - /** The quantity of L2ItemInstance */ private int _count; - - /** The price of the L2ItemInstance */ private int _price; - - /** The custom L2ItemInstance types (used loto, race tickets) */ private int _type1; private int _type2; - - /** If True the L2ItemInstance is equipped */ private int _equipped; - - /** The action to do clientside (1=ADD, 2=MODIFY, 3=REMOVE) */ - private int _change; - - /** The mana of this item */ + private int _change; // 1=ADD, 2=MODIFY, 3=REMOVE private int _mana; /** @@ -77,7 +58,7 @@ public class ItemInfo // Get the enchant level of the L2ItemInstance _enchant = item.getEnchantLevel(); - // Get the augmentation boni + // Get the augmentation bonus if (item.isAugmented()) { _augmentation = item.getAugmentation().getAugmentationId(); @@ -137,7 +118,7 @@ public class ItemInfo // Get the enchant level of the L2ItemInstance _enchant = item.getEnchantLevel(); - // Get the augmentation boni + // Get the augmentation bonus if (item.isAugmented()) { _augmentation = item.getAugmentation().getAugmentationId(); @@ -179,7 +160,7 @@ public class ItemInfo return _enchant; } - public int getAugemtationBoni() + public int getAugemtationBonus() { return _augmentation; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemRequest.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemRequest.java index ad2fcc155d..6ff9cc88f2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemRequest.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/ItemRequest.java @@ -16,9 +16,6 @@ */ package com.l2jmobius.gameserver.model; -/** - * - */ public class ItemRequest { int _objectId; @@ -81,9 +78,6 @@ public class ItemRequest return _enchant; } - /** - * @param enchant - */ public void setEnchant(int enchant) { _enchant = enchant; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Augmentation.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Augmentation.java index 4c26078b68..32344277fb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Augmentation.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Augmentation.java @@ -32,7 +32,7 @@ import com.l2jmobius.gameserver.skills.funcs.FuncAdd; import com.l2jmobius.gameserver.skills.funcs.LambdaConst; /** - * Used to store an augmentation and its boni + * Used to store an augmentation and its bonus * @author durgus */ public final class L2Augmentation @@ -41,14 +41,14 @@ public final class L2Augmentation private final L2ItemInstance _item; private int _effectsId = 0; - private augmentationStatBoni _boni = null; + private augmentationStatBonus _bonus = null; private L2Skill _skill = null; public L2Augmentation(L2ItemInstance item, int effects, L2Skill skill, boolean save) { _item = item; _effectsId = effects; - _boni = new augmentationStatBoni(_effectsId); + _bonus = new augmentationStatBonus(_effectsId); _skill = skill; // write to DB if save is true @@ -63,16 +63,13 @@ public final class L2Augmentation this(item, effects, SkillTable.getInstance().getInfo(skill, skillLevel), save); } - // ========================================================= - // Nested Class - - public class augmentationStatBoni + public class augmentationStatBonus { private final Stats _stats[]; private final float _values[]; private boolean _active; - public augmentationStatBoni(int augmentationId) + public augmentationStatBonus(int augmentationId) { _active = false; List as = AugmentationData.getInstance().getAugStatsById(augmentationId); @@ -89,9 +86,9 @@ public final class L2Augmentation } } - public void applyBoni(L2PcInstance player) + public void applyBonus(L2PcInstance player) { - // make sure the boni are not applyed twice.. + // make sure the bonus are not applyed twice.. if (_active) { return; @@ -105,9 +102,9 @@ public final class L2Augmentation _active = true; } - public void removeBoni(L2PcInstance player) + public void removeBonus(L2PcInstance player) { - // make sure the boni is not removed twice + // make sure the bonus is not removed twice if (!_active) { return; @@ -183,12 +180,12 @@ public final class L2Augmentation } /** - * Applys the boni to the player. + * Applies the bonus to the player. * @param player */ - public void applyBoni(L2PcInstance player) + public void applyBonus(L2PcInstance player) { - _boni.applyBoni(player); + _bonus.applyBonus(player); // add the skill if any if (_skill != null) @@ -207,12 +204,12 @@ public final class L2Augmentation } /** - * Removes the augmentation boni from the player. + * Removes the augmentation bonus from the player. * @param player */ - public void removeBoni(L2PcInstance player) + public void removeBonus(L2PcInstance player) { - _boni.removeBoni(player); + _bonus.removeBonus(player); // remove the skill if any if (_skill != null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Clan.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Clan.java index e1dfa3a6eb..081e6167be 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Clan.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Clan.java @@ -54,10 +54,6 @@ import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.network.serverpackets.UserInfo; -/** - * This class ... - * @version $Revision: 1.7.2.4.2.7 $ $Date: 2005/04/06 16:13:41 $ - */ public class L2Clan { private static final Logger LOGGER = Logger.getLogger(L2Clan.class.getName()); @@ -234,10 +230,6 @@ public class L2Clan return _leader; } - /** - * @param member - * @return - */ public boolean setLeader(L2ClanMember member) { if (member == null) @@ -281,7 +273,6 @@ public class L2Clan return true; } - // public void setNewLeader(L2ClanMember member) public void setNewLeader(L2ClanMember member, L2PcInstance activeChar) { if (activeChar.isRiding() || activeChar.isFlying()) @@ -304,7 +295,6 @@ public class L2Clan return; } - // L2PcInstance exLeader = _leader.getPlayerInstance(); if (setLeader(member)) { SystemMessage sm = new SystemMessage(SystemMessageId.CLAN_LEADER_PRIVILEGES_HAVE_BEEN_TRANSFERRED_TO_S1); @@ -394,8 +384,7 @@ public class L2Clan if (leadssubpledge != 0) { - // Sub-unit leader withdraws, position becomes vacant and leader - // should appoint new via NPC + // Sub-unit leader withdraws, position becomes vacant and leader should appoint new via NPC getSubPledge(leadssubpledge).setLeaderName(""); updateSubPledgeInDB(leadssubpledge); } @@ -586,24 +575,17 @@ public class L2Clan catch (NullPointerException e) { e.printStackTrace(); - // null } } return result.toArray(new L2PcInstance[result.size()]); } - /** - * @return - */ public int getAllyId() { return _allyId; } - /** - * @return - */ public String getAllyName() { return _allyName; @@ -614,41 +596,26 @@ public class L2Clan _allyCrestId = allyCrestId; } - /** - * @return - */ public int getAllyCrestId() { return _allyCrestId; } - /** - * @return - */ public int getLevel() { return _level; } - /** - * @return - */ public int getHasCastle() { return _hasCastle; } - /** - * @return hasFort - */ public int getHasFort() { return _hasFort; } - /** - * @return - */ public int getHasHideout() { return _hasHideout; @@ -662,73 +629,46 @@ public class L2Clan _crestId = crestId; } - /** - * @return Returns the clanCrestId. - */ public int getCrestId() { return _crestId; } - /** - * @param crestLargeId The id of pledge LargeCrest. - */ public void setCrestLargeId(int crestLargeId) { _crestLargeId = crestLargeId; } - /** - * @return Returns the clan CrestLargeId - */ public int getCrestLargeId() { return _crestLargeId; } - /** - * @param allyId The allyId to set. - */ public void setAllyId(int allyId) { _allyId = allyId; } - /** - * @param allyName The allyName to set. - */ public void setAllyName(String allyName) { _allyName = allyName; } - /** - * @param hasCastle The hasCastle to set. - */ public void setHasCastle(int hasCastle) { _hasCastle = hasCastle; } - /** - * @param hasFort - */ public void setHasFort(int hasFort) { _hasFort = hasFort; } - /** - * @param hasHideout The hasHideout to set. - */ public void setHasHideout(int hasHideout) { _hasHideout = hasHideout; } - /** - * @param level The level to set. - */ public void setLevel(int level) { _level = level; @@ -747,10 +687,6 @@ public class L2Clan } } - /** - * @param name - * @return - */ public boolean isMember(String name) { return name == null ? false : _members.containsKey(name); @@ -1067,10 +1003,6 @@ public class L2Clan } } - /** - * used to retrieve all skills - * @return - */ public final L2Skill[] getAllSkills() { if (_skills == null) @@ -1171,7 +1103,6 @@ public class L2Clan catch (NullPointerException e) { e.printStackTrace(); - // null } } } @@ -1197,7 +1128,6 @@ public class L2Clan } catch (NullPointerException e) { - // null e.printStackTrace(); } } @@ -1213,7 +1143,6 @@ public class L2Clan for (L2Skill skill : _skills.values()) { - // if (skill.getMinPledgeClass() <= cm.getPledgeClass()) { cm.addSkill(skill, false); // Skill is not saved to player DB @@ -1250,7 +1179,6 @@ public class L2Clan } catch (NullPointerException e) { - // null e.printStackTrace(); } } @@ -1269,19 +1197,11 @@ public class L2Clan } catch (NullPointerException e) { - // null e.printStackTrace(); } } } - /* - * @Override public String toString() { return getName(); } - */ - - /** - * @return - */ public boolean hasCrest() { return _hasCrest; @@ -1425,9 +1345,6 @@ public class L2Clan _skillList.remove(deleteSkill); } - /** - * @return - */ public List getSkills() { return _skillList; @@ -1466,9 +1383,6 @@ public class L2Clan _leaderName = leaderName; } - /** - * @param pledgeName - */ public void setName(String pledgeName) { _subPledgeName = pledgeName; @@ -1669,7 +1583,6 @@ public class L2Clan { if (_subPledges.get(pledgeType) != null) { - // LOGGER.warning("found sub-unit with id: "+pledgeType); switch (pledgeType) { case SUBUNIT_ACADEMY: @@ -1739,7 +1652,6 @@ public class L2Clan { PreparedStatement statement = con.prepareStatement("SELECT privs,rank,party FROM clan_privs WHERE clan_id=?"); statement.setInt(1, _clanId); - // LOGGER.warning("clanPrivs restore for ClanId : "+_clanId); ResultSet rset = statement.executeQuery(); // Go though the recordset of this SQL query @@ -1749,10 +1661,6 @@ public class L2Clan // int party = rset.getInt("party"); final int privileges = rset.getInt("privs"); - // Create a SubPledge object for each record - // RankPrivs privs = new RankPrivs(rank, party, privileges); - // _Privs.put(rank, privs); - _privs.get(rank).setPrivs(privileges); } @@ -1845,10 +1753,6 @@ public class L2Clan } } - /** - * used to retrieve all RankPrivs - * @return - */ public final RankPrivs[] getAllRankPrivs() { if (_privs == null) @@ -2053,11 +1957,6 @@ public class L2Clan } return false; } - /* - * Custom feature working, member with privileges can invite only in their pledge int leadssubpledge = getLeaderSubPledge(activeChar.getName()); if (pledgeType != -1 && !activeChar.isClanLeader()) { if (activeChar.getPledgeType() != pledgeType) { if (leadssubpledge == 0) { - * activeChar.sendMessage("Invite to another subunit is not allowed."); return false; } else if (leadssubpledge != pledgeType) { activeChar.sendMessage("Invite to another subunit is not allowed."); return false; } } else if (leadssubpledge != 0) { - * activeChar.sendMessage("Invite to another subunit is not allowed."); return false; } } - */ return true; } @@ -2337,7 +2236,6 @@ public class L2Clan setAllyId(0); setAllyName(null); - // 24*60*60*1000 = 86400000 setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000), PENALTY_TYPE_DISSOLVE_ALLY); updateClanInDB(); @@ -2557,11 +2455,6 @@ public class L2Clan // notify all the members about it broadcastToOnlineMembers(new SystemMessage(SystemMessageId.CLAN_LEVEL_INCREASED)); broadcastToOnlineMembers(new PledgeShowInfoUpdate(this)); - /* - * Micht : - use PledgeShowInfoUpdate instead of PledgeStatusChanged to update clan level ingame - remove broadcastClanStatus() to avoid members duplication - */ - // clan.broadcastToOnlineMembers(new PledgeStatusChanged(clan)); - // clan.broadcastClanStatus(); } public void setAllyCrest(int crestId) @@ -2581,10 +2474,6 @@ public class L2Clan } } - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ @Override public String toString() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ClanMember.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ClanMember.java index 87f8d1694c..40a01e20cb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ClanMember.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ClanMember.java @@ -24,10 +24,6 @@ import com.l2jmobius.commons.database.DatabaseFactory; import com.l2jmobius.gameserver.instancemanager.SiegeManager; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * This class ... - * @version $Revision: 1.5.4.2 $ $Date: 2005/03/27 15:29:33 $ - */ public class L2ClanMember { private final L2Clan _clan; @@ -224,7 +220,6 @@ public class L2ClanMember catch (Exception e) { e.printStackTrace(); - // LOGGER.warning("could not set char power_grade:"+e); } } @@ -271,7 +266,6 @@ public class L2ClanMember catch (Exception e) { e.printStackTrace(); - // LOGGER.warning("could not set char power_grade:"+e); } } @@ -557,7 +551,6 @@ public class L2ClanMember catch (SQLException e) { e.printStackTrace(); - // LOGGER.warning("could not set apprentice/sponsor:"+e.getMessage()); } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2DropCategory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2DropCategory.java index 1e345c86da..a90ef4f491 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2DropCategory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2DropCategory.java @@ -42,13 +42,7 @@ public class L2DropCategory public void addDropData(L2DropData drop, boolean raid) { - if (drop.isQuestDrop()) - { - // if (_questDrops == null) - // _questDrops = new ArrayList(0); - // _questDrops.add(drop); - } - else + if (!drop.isQuestDrop()) { _drops.add(drop); _categoryChance += drop.getChance(); @@ -72,9 +66,7 @@ public class L2DropCategory return _categoryType == -1; } - // this returns the chance for the category to be visited in order to check if - // drops might come from it. Category -1 (spoil) must always be visited - // (but may return 0 or many drops) + // this returns the chance for the category to be visited in order to check if drops might come from it. Category -1 (spoil) must always be visited (but may return 0 or many drops) public int getCategoryChance() { if (_categoryType >= 0) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Effect.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Effect.java index 66c9c406ae..877eecc9c8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Effect.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Effect.java @@ -106,22 +106,15 @@ public abstract class L2Effect private static final Func[] _emptyFunctionSet = new Func[0]; - // member _effector is the instance of L2Character that cast/used the spell/skill that is - // causing this effect. Do not confuse with the instance of L2Character that - // is being affected by this effect. + // member _effector is the instance of L2Character that cast/used the spell/skill that is causing this effect. Do not confuse with the instance of L2Character that is being affected by this effect. private final L2Character _effector; - // member _effected is the instance of L2Character that was affected - // by this effect. Do not confuse with the instance of L2Character that - // catsed/used this effect. + // member _effected is the instance of L2Character that was affected by this effect. Do not confuse with the instance of L2Character that catsed/used this effect. protected final L2Character _effected; // the skill that was used. public L2Skill _skill; - // or the items that was used. - // private final L2Item _item; - // the value of an update private final Lambda _lambda; @@ -245,7 +238,6 @@ public abstract class L2Effect _currentTask = null; _periodfirsttime = newfirsttime; final int duration = _period - _periodfirsttime; - // LOGGER.warning("Period: "+_period+"-"+_periodfirsttime+"="+duration); _currentTask = new EffectTask(duration * 1000, -1); _currentFuture = ThreadPool.schedule(_currentTask, duration * 1000); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2EnchantSkillLearn.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2EnchantSkillLearn.java index a9d21c98ab..528df9420a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2EnchantSkillLearn.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2EnchantSkillLearn.java @@ -18,11 +18,6 @@ package com.l2jmobius.gameserver.model; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * This class ... - * @version $Revision: 1.2.4.2 $ $Date: 2005/03/27 15:29:33 $ - */ - public final class L2EnchantSkillLearn { // these two build the primary key @@ -114,35 +109,35 @@ public final class L2EnchantSkillLearn byte result; switch (ply.getLevel()) { - case 76: + case 76: { result = rate76; - break; + break; } - case 77: + case 77: { result = rate77; - break; + break; } - case 78: + case 78: { result = rate78; - break; + break; } - case 79: + case 79: { result = rate79; - break; + break; } - case 80: + case 80: { result = rate80; - break; + break; } - default: + default: { result = rate80; - break; + break; } } return result; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Fishing.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Fishing.java index 6806e504f2..e6927cbad7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Fishing.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Fishing.java @@ -34,8 +34,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public class L2Fishing implements Runnable { - // ========================================================= - // Data Field private L2PcInstance _fisher; private int _time; private int _stop = 0; @@ -45,7 +43,6 @@ public class L2Fishing implements Runnable private int _deceptiveMode = 0; private Future _fishAiTask; private boolean _thinking; - // Fish datas private final int _fishId; private final int _fishMaxHp; private int _fishCurHp; @@ -80,7 +77,6 @@ public class L2Fishing implements Runnable } } - // ========================================================= public L2Fishing(L2PcInstance Fisher, FishData fish, boolean isNoob, boolean isUpperGrade, int lureId) { _fisher = Fisher; @@ -456,7 +452,6 @@ public class L2Fishing implements Runnable } catch (Exception e) { - // Nothing } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Manor.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Manor.java index 228d4de41f..8b5a0f71e8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Manor.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Manor.java @@ -207,11 +207,7 @@ public class L2Manor { if (seed.getCrop() == cropId) { - return seed.getReward(type); - // there can be several - // seeds with same crop, but - // reward should be the same for - // all + return seed.getReward(type); // there can be several seeds with same crop, but reward should be the same for all } } return -1; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ManufactureList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ManufactureList.java index aaac400a23..c4d76caa11 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ManufactureList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ManufactureList.java @@ -80,5 +80,4 @@ public class L2ManufactureList { _list = list; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2MinionData.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2MinionData.java index 219a08fadc..08ea106323 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2MinionData.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2MinionData.java @@ -95,5 +95,4 @@ public class L2MinionData } return _minionAmountMin; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Object.java index 524c6a181e..ee2560126e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Object.java @@ -44,12 +44,10 @@ import com.l2jmobius.gameserver.network.serverpackets.GetItem; *
  • L2ItemInstance
  • *
  • L2Potion
  • */ - public abstract class L2Object { private final Logger LOGGER = Logger.getLogger(L2Object.class.getName()); - // ========================================================= - // Data Field + private boolean _isVisible; // Object visibility private ObjectKnownList _knownList; private String _name; @@ -60,14 +58,8 @@ public abstract class L2Object // Objects can only see objects in same instancezone, instance 0 is normal world -1 the all seeing world private int _instanceId = 0; - // ========================================================= - // Constructor - // by Azagthtot private BaseExtender _extender = null; - // ========================================================= - // Constructor - public L2Object(int objectId) { _objectId = objectId; @@ -161,8 +153,6 @@ public abstract class L2Object } } - // ========================================================= - // Event - Public public void onAction(L2PcInstance player) { player.sendPacket(ActionFailed.STATIC_PACKET); @@ -201,7 +191,6 @@ public abstract class L2Object fireEvent(EventType.SPAWN.name, (Object[]) null); } - // ========================================================= // Position - Should remove to fully move to L2ObjectPosition public final void setXYZ(int x, int y, int z) { @@ -243,8 +232,6 @@ public abstract class L2Object return getPosition().getZ(); } - // ========================================================= - // Method - Public /** * Remove a L2Object from the world.
    *
    @@ -341,8 +328,7 @@ public abstract class L2Object } } - // this can synchronize on others instancies, so it's out of - // synchronized, to avoid deadlocks + // this can synchronize on others instancies, so it's out of synchronized, to avoid deadlocks // Remove the L2ItemInstance from the world L2World.getInstance().removeVisibleObject(this, oldregion); } @@ -393,8 +379,7 @@ public abstract class L2Object getPosition().getWorldRegion().addVisibleObject(this); } - // this can synchronize on others instances, so it's out of - // synchronized, to avoid deadlocks + // this can synchronize on others instances, so it's out of synchronized, to avoid deadlocks // Add the L2Object spawn in the world as a visible object L2World.getInstance().addVisibleObject(this, getPosition().getWorldRegion(), null); @@ -434,8 +419,7 @@ public abstract class L2Object getPosition().setWorldRegion(L2World.getInstance().getRegion(getPosition().getWorldPosition())); } - // these can synchronize on others instances, so they're out of - // synchronized, to avoid deadlocks + // these can synchronize on others instances, so they're out of synchronized, to avoid deadlocks // Add the L2Object spawn in the _allobjects of L2World L2World.getInstance().storeObject(this); @@ -450,8 +434,7 @@ public abstract class L2Object LOGGER.info("ATTENTION: no region found for location " + x + "," + y + "," + z + ". It's not possible to spawn object " + _objectId + " here..."); return; } - // this can synchronize on others instances, so it's out of - // synchronized, to avoid deadlocks + // this can synchronize on others instances, so it's out of synchronized, to avoid deadlocks // Add the L2Object spawn in the world as a visible object L2World.getInstance().addVisibleObject(this, region, null); @@ -470,11 +453,6 @@ public abstract class L2Object } } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public public boolean isAttackable() { return false; @@ -496,7 +474,6 @@ public abstract class L2Object */ public final boolean isVisible() { - // return getPosition().getWorldRegion() != null && _IsVisible; return getPosition().getWorldRegion() != null; } @@ -588,9 +565,7 @@ public abstract class L2Object { if (this instanceof L2PcInstance) { - // We don't want some ugly looking disappear/appear effects, so don't update - // the knownlist here, but players usually enter instancezones through teleporting - // and the teleport will do the revalidation for us. + // We don't want some ugly looking disappear/appear effects, so don't update the knownlist here, but players usually enter instancezones through teleporting and the teleport will do the revalidation for us. } else { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Party.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Party.java index a444c061c3..df6f83c0ab 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Party.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Party.java @@ -70,8 +70,6 @@ public class L2Party 1.71 }; - // private static final Logger LOGGER = Logger.getLogger(L2Party.class); - private static final int PARTY_POSITION_BROADCAST = 10000; public static final int ITEM_LOOTER = 0; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2PetData.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2PetData.java index 666eb52bf1..888691a94d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2PetData.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2PetData.java @@ -20,11 +20,8 @@ public class L2PetData { public static final String PET_TYPE = "typeID"; public static final String PET_LEVEL = "level"; - // public static final String PET_EXP = "exp"; public static final String PET_MAX_EXP = "expMax"; - // public static final String PET_HP = "hp"; public static final String PET_MAX_HP = "hpMax"; - // public static final String PET_MP = "mp"; public static final String PET_MAX_MP = "mpMax"; public static final String PET_PATK = "patk"; public static final String PET_PDEF = "pdef"; @@ -36,11 +33,9 @@ public class L2PetData public static final String PET_SPEED = "speed"; public static final String PET_ATK_SPEED = "atk_speed"; public static final String PET_CAST_SPEED = "cast_speed"; - // public static final String PET_FEED = "feed"; public static final String PET_MAX_FEED = "feedMax"; public static final String PET_FEED_BATTLE = "feedbattle"; public static final String PET_FEED_NORMAL = "feednormal"; - // public static final String PET_LOAD = "load"; public static final String PET_MAX_LOAD = "loadMax"; public static final String PET_REGEN_HP = "hpregen"; public static final String PET_REGEN_MP = "mpregen"; @@ -49,11 +44,8 @@ public class L2PetData private int _petId; private int _petLevel; private float _ownerExpTaken; - // private int petExp; private long _petMaxExp; - // private int petHP; private int _petMaxHP; - // private int petMP; private int _petMaxMP; private int _petPAtk; private int _petPDef; @@ -65,7 +57,6 @@ public class L2PetData private int _petSpeed; private int _petAtkSpeed; private int _petCastSpeed; - // private int petFeed; private int _petMaxFeed; private int _petFeedBattle; private int _petFeedNormal; @@ -75,17 +66,14 @@ public class L2PetData public void setStat(String stat, int value) { - // if (stat.equalsIgnoreCase(PET_EXP)) { this.setPetExp(value); } if (stat.equalsIgnoreCase(PET_MAX_EXP)) { setPetMaxExp(value); } - // else if (stat.equalsIgnoreCase(PET_HP)) { this.setPetHP(value); } else if (stat.equalsIgnoreCase(PET_MAX_HP)) { setPetMaxHP(value); } - // else if (stat.equalsIgnoreCase(PET_MP)) { this.setPetMP(value); } else if (stat.equalsIgnoreCase(PET_MAX_MP)) { setPetMaxMP(value); @@ -130,7 +118,6 @@ public class L2PetData { setPetCastSpeed(value); } - // else if (stat.equalsIgnoreCase(PET_FEED)) { this.setPetFeed(value); } else if (stat.equalsIgnoreCase(PET_MAX_FEED)) { setPetMaxFeed(value); @@ -143,7 +130,6 @@ public class L2PetData { setPetFeedBattle(value); } - // else if (stat.equalsIgnoreCase(PET_LOAD)) { this.setPetLoad(value); } else if (stat.equalsIgnoreCase(PET_MAX_LOAD)) { setPetMaxLoad(value); @@ -160,7 +146,6 @@ public class L2PetData public void setStat(String stat, long value) { - // if (stat.equalsIgnoreCase(PET_EXP)) { this.setPetExp(value); } if (stat.equalsIgnoreCase(PET_MAX_EXP)) { setPetMaxExp(value); @@ -169,14 +154,12 @@ public class L2PetData public void setStat(String stat, float value) { - // if (stat.equalsIgnoreCase(PET_EXP)) { this.setPetExp(value); } if (stat.equalsIgnoreCase(OWNER_EXP_TAKEN)) { setOwnerExpTaken(value); } } - // ID public int getPetID() { return _petId; @@ -187,7 +170,6 @@ public class L2PetData _petId = pPetID; } - // Level public int getPetLevel() { return _petLevel; @@ -198,11 +180,6 @@ public class L2PetData _petLevel = pPetLevel; } - // Exp - // public int getPetExp() { return petExp; } - // public void setPetExp(int petExp) { this.petExp = petExp; } - - // Max Exp public long getPetMaxExp() { return _petMaxExp; @@ -223,11 +200,6 @@ public class L2PetData _ownerExpTaken = pOwnerExpTaken; } - // HP - // public int getPetHP() { return petHP; } - // public void setPetHP(int petHP) { this.petHP = petHP; } - - // Max HP public int getPetMaxHP() { return _petMaxHP; @@ -238,11 +210,6 @@ public class L2PetData _petMaxHP = pPetMaxHP; } - // Mp - // public int getPetMP() { return petMP; } - // public void setPetMP(int petMP) { this.petMP = petMP; } - - // Max Mp public int getPetMaxMP() { return _petMaxMP; @@ -253,7 +220,6 @@ public class L2PetData _petMaxMP = pPetMaxMP; } - // PAtk public int getPetPAtk() { return _petPAtk; @@ -264,7 +230,6 @@ public class L2PetData _petPAtk = pPetPAtk; } - // PDef public int getPetPDef() { return _petPDef; @@ -275,7 +240,6 @@ public class L2PetData _petPDef = pPetPDef; } - // MAtk public int getPetMAtk() { return _petMAtk; @@ -286,7 +250,6 @@ public class L2PetData _petMAtk = pPetMAtk; } - // MDef public int getPetMDef() { return _petMDef; @@ -297,7 +260,6 @@ public class L2PetData _petMDef = pPetMDef; } - // Accuracy public int getPetAccuracy() { return _petAccuracy; @@ -308,7 +270,6 @@ public class L2PetData _petAccuracy = pPetAccuracy; } - // Evasion public int getPetEvasion() { return _petEvasion; @@ -319,7 +280,6 @@ public class L2PetData _petEvasion = pPetEvasion; } - // Critical public int getPetCritical() { return _petCritical; @@ -330,7 +290,6 @@ public class L2PetData _petCritical = pPetCritical; } - // Speed public int getPetSpeed() { return _petSpeed; @@ -341,7 +300,6 @@ public class L2PetData _petSpeed = pPetSpeed; } - // Atk Speed public int getPetAtkSpeed() { return _petAtkSpeed; @@ -352,7 +310,6 @@ public class L2PetData _petAtkSpeed = pPetAtkSpeed; } - // Cast Speed public int getPetCastSpeed() { return _petCastSpeed; @@ -363,11 +320,6 @@ public class L2PetData _petCastSpeed = pPetCastSpeed; } - // Feed - // public int getPetFeed(){ return petFeed; } - // public void setPetFeed(int petFeed) { this.petFeed = petFeed; } - - // MaxFeed public int getPetMaxFeed() { return _petMaxFeed; @@ -378,7 +330,6 @@ public class L2PetData _petMaxFeed = pPetMaxFeed; } - // Normal Feed public int getPetFeedNormal() { return _petFeedNormal; @@ -389,7 +340,6 @@ public class L2PetData _petFeedNormal = pPetFeedNormal; } - // Battle Feed public int getPetFeedBattle() { return _petFeedBattle; @@ -400,11 +350,6 @@ public class L2PetData _petFeedBattle = pPetFeedBattle; } - // Load - // public int getPetLoad() { return petLoad; } - // public void setPetLoad(int petLoad) { this.petLoad = petLoad; } - - // Max Load public int getPetMaxLoad() { return _petMaxLoad; @@ -415,7 +360,6 @@ public class L2PetData _petMaxLoad = pPetMaxLoad; } - // Regen HP public int getPetRegenHP() { return _petRegenHP; @@ -426,7 +370,6 @@ public class L2PetData _petRegenHP = pPetRegenHP; } - // Regen MP public int getPetRegenMP() { return _petRegenMP; @@ -440,17 +383,6 @@ public class L2PetData @Override public String toString() { - return "PetID: " + _petId + " \tPetLevel: " + _petLevel + " \t" + - // PET_EXP + ": " + getPetExp() + " \t" + - PET_MAX_EXP + ": " + _petMaxExp + " \t" + - // PET_HP + ": " + getPetHP() + " \t" + - PET_MAX_HP + ": " + _petMaxHP + " \t" + - // PET_MP + ": " + getPetMP() + " \t" + - PET_MAX_MP + ": " + _petMaxMP + " \t" + PET_PATK + ": " + _petPAtk + " \t" + PET_PDEF + ": " + _petPDef + " \t" + PET_MATK + ": " + _petMAtk + " \t" + PET_MDEF + ": " + _petMDef + " \t" + PET_ACCURACY + ": " + _petAccuracy + " \t" + PET_EVASION + ": " + _petEvasion + " \t" + PET_CRITICAL + ": " + _petCritical + " \t" + PET_SPEED + ": " + _petSpeed + " \t" + PET_ATK_SPEED + ": " + _petAtkSpeed + " \t" + PET_CAST_SPEED + ": " + _petCastSpeed + " \t" + - // PET_FEED + ": " + getPetFeed() + " \t" + - PET_MAX_FEED + ": " + _petMaxFeed + " \t" + PET_FEED_BATTLE + ": " + _petFeedBattle + " \t" + PET_FEED_NORMAL + ": " + _petFeedNormal + " \t" + - // PET_LOAD + ": " + getPetLoad() + " \t" + - PET_MAX_LOAD + ": " + _petMaxLoad + " \t" + PET_REGEN_HP + ": " + _petRegenHP + " \t" + PET_REGEN_MP + ": " + _petRegenMP; + return "PetID: " + _petId + " \tPetLevel: " + _petLevel + " \t" + PET_MAX_EXP + ": " + _petMaxExp + " \t" + PET_MAX_HP + ": " + _petMaxHP + " \t" + PET_MAX_MP + ": " + _petMaxMP + " \t" + PET_PATK + ": " + _petPAtk + " \t" + PET_PDEF + ": " + _petPDef + " \t" + PET_MATK + ": " + _petMAtk + " \t" + PET_MDEF + ": " + _petMDef + " \t" + PET_ACCURACY + ": " + _petAccuracy + " \t" + PET_EVASION + ": " + _petEvasion + " \t" + PET_CRITICAL + ": " + _petCritical + " \t" + PET_SPEED + ": " + _petSpeed + " \t" + PET_ATK_SPEED + ": " + _petAtkSpeed + " \t" + PET_CAST_SPEED + ": " + _petCastSpeed + " \t" + PET_MAX_FEED + ": " + _petMaxFeed + " \t" + PET_FEED_BATTLE + ": " + _petFeedBattle + " \t" + PET_FEED_NORMAL + ": " + _petFeedNormal + " \t" + PET_MAX_LOAD + ": " + _petMaxLoad + " \t" + PET_REGEN_HP + ": " + _petRegenHP + " \t" + PET_REGEN_MP + ": " + _petRegenMP; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Potion.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Potion.java index f6533c34d5..ddd4feb800 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Potion.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Potion.java @@ -23,16 +23,10 @@ import com.l2jmobius.Config; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.gameserver.model.actor.L2Character; -/** - * This class ... - * @version $Revision: 1.2.2.1.2.5 $ $Date: 2005/03/27 15:29:30 $ - */ public class L2Potion extends L2Object { protected static final Logger LOGGER = Logger.getLogger(L2Character.class.getName()); - // private L2Character _target; - private Future _potionhpRegTask; private Future _potionmpRegTask; protected int _milliseconds; @@ -111,7 +105,6 @@ public class L2Potion extends L2Object public void setCurrentHpPotion1(L2Character activeChar, int item) { _potion = item; - // _target = activeChar; switch (_potion) { @@ -223,12 +216,6 @@ public class L2Potion extends L2Object public void setCurrentMpPotion1(L2Character activeChar, int item) { _potion = item; - // _target = activeChar; - // - // switch(_potion) - // { - // null - // } } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Radar.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Radar.java index 334ea4eca0..00d9db3cca 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Radar.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Radar.java @@ -64,8 +64,7 @@ public final class L2Radar public void loadMarkers() { - // TODO: Need method to re-send radar markers after load/teleport/death - // etc. + // TODO: Need method to re-send radar markers after load/teleport/death etc. } private static class RadarMarker diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ShortCut.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ShortCut.java index f371f2422e..18fa58209c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ShortCut.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2ShortCut.java @@ -16,10 +16,6 @@ */ package com.l2jmobius.gameserver.model; -/** - * This class ... - * @version $Revision: 1.3.4.1 $ $Date: 2005/03/27 15:29:32 $ - */ public class L2ShortCut { public static final int TYPE_ITEM = 1; @@ -41,7 +37,6 @@ public class L2ShortCut _type = shortcutType; _id = shortcutId; _level = shortcutLevel; - // _unk = unknown; } public int getId() diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2SiegeClan.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2SiegeClan.java index 79c0c4cb1c..f4d55e211c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2SiegeClan.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2SiegeClan.java @@ -23,10 +23,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance; public class L2SiegeClan { - // ========================================================================================== - // Instance - // =============================================================== - // Data Field private int _clanId = 0; private List _flag = new ArrayList<>(); private int _numFlagsAdded = 0; @@ -40,17 +36,12 @@ public class L2SiegeClan DEFENDER_PENDING } - // ========================================================= - // Constructor - public L2SiegeClan(int clanId, SiegeClanType type) { _clanId = clanId; _type = type; } - // ========================================================= - // Method - Public public int getNumFlags() { return _numFlagsAdded; @@ -71,7 +62,6 @@ public class L2SiegeClan final boolean ret = getFlag().remove(flag); - // flag.deleteMe(); // check if null objects or dups remain in the list. // for some reason, this might be happening sometimes... // delete false duplicates: if this flag got deleted, delete its copies too. @@ -79,7 +69,6 @@ public class L2SiegeClan { while (getFlag().remove(flag)) { - // } } @@ -119,8 +108,6 @@ public class L2SiegeClan } } - // ========================================================= - // Property public final int getClanId() { return _clanId; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Skill.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Skill.java index 85cf44760c..556f069116 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Skill.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2Skill.java @@ -73,10 +73,6 @@ import com.l2jmobius.gameserver.skills.l2skills.L2SkillSummon; import com.l2jmobius.gameserver.templates.StatsSet; import com.l2jmobius.gameserver.util.Util; -/** - * This class... - * @version $Revision: 1.3.2.8.2.22 $ $Date: 2005/04/06 16:13:42 $ - */ public abstract class L2Skill { protected static final Logger LOGGER = Logger.getLogger(L2Skill.class.getName()); @@ -786,9 +782,6 @@ public abstract class L2Skill */ public final double getPower(L2Character activeChar) { - /* - * if(_skillType == SkillType.DEATHLINK && activeChar != null) return _power * Math.pow(1.7165 - activeChar.getCurrentHp() / activeChar.getMaxHp(), 2) * 0.577; else - */ if ((_skillType == SkillType.FATALCOUNTER) && (activeChar != null)) { return _power * 3.5 * (1 - (activeChar.getCurrentHp() / activeChar.getMaxHp())); @@ -1341,11 +1334,6 @@ public abstract class L2Skill } } - // int weapons[] = {L2Weapon.WEAPON_TYPE_ETC, L2Weapon.WEAPON_TYPE_BOW, - // L2Weapon.WEAPON_TYPE_POLE, L2Weapon.WEAPON_TYPE_DUALFIST, - // L2Weapon.WEAPON_TYPE_DUAL, L2Weapon.WEAPON_TYPE_BLUNT, - // L2Weapon.WEAPON_TYPE_SWORD, L2Weapon.WEAPON_TYPE_DAGGER}; - public final boolean getWeaponDependancy(L2Character activeChar) { if (getWeaponDependancy(activeChar, false)) @@ -1706,18 +1694,12 @@ public abstract class L2Skill { continue; } - /* - * if(src.isInOlympiadMode() && !src.isOlympiadStart()) { continue; } if(src.getParty() != null && ((L2PcInstance) obj).getParty() != null && src.getParty().getPartyLeaderOID() == ((L2PcInstance) obj).getParty().getPartyLeaderOID()) { continue; } - */ if (!srcInArena && (!((L2Character) obj).isInsideZone(ZoneId.PVP) || ((L2Character) obj).isInsideZone(ZoneId.SIEGE))) { if (checkPartyClan(src, obj)) { continue; } - /* - * if(src.getClanId() != 0 && src.getClanId() == ((L2PcInstance) obj).getClanId()) { continue; } - */ if ((src.getAllyId() != 0) && (src.getAllyId() == ((L2PcInstance) obj).getAllyId())) { continue; @@ -1739,18 +1721,12 @@ public abstract class L2Skill { continue; } - /* - * if(src.isInOlympiadMode() && !src.isOlympiadStart()) { continue; } - */ if ((src.getParty() != null) && (trg.getParty() != null) && (src.getParty().getPartyLeaderOID() == trg.getParty().getPartyLeaderOID())) { continue; } if (!srcInArena && (!((L2Character) obj).isInsideZone(ZoneId.PVP) || ((L2Character) obj).isInsideZone(ZoneId.SIEGE))) { - /* - * if(src.getClanId() != 0 && src.getClanId() == trg.getClanId()) { continue; } - */ if (checkPartyClan(src, obj)) { continue; @@ -1910,9 +1886,6 @@ public abstract class L2Skill { continue; } - /* - * if(src.getClan() != null && trg.getClan() != null) { if(src.getClan().getClanId() == trg.getClan().getClanId()) { continue; } } - */ if (!src.checkPvpSkill(obj, this)) { continue; @@ -1940,9 +1913,6 @@ public abstract class L2Skill { continue; } - /* - * if(src.getClan() != null && trg.getClan() != null) { if(src.getClan().getClanId() == trg.getClan().getClanId()) { continue; } } - */ if (checkPartyClan(src, obj)) { continue; @@ -2049,8 +2019,7 @@ public abstract class L2Skill } } return targetList.toArray(new L2Character[targetList.size()]); - // TODO multiface targets all around right now. need it to just get targets - // the character is facing. + // TODO multiface targets all around right now. need it to just get targets the character is facing. } case TARGET_PARTY: { @@ -2097,7 +2066,6 @@ public abstract class L2Skill continue; } // check if allow interference is allowed if player is not on event but target is on event - // if(((TvT._started && !Config.TVT_ALLOW_INTERFERENCE) || (CTF._started && !Config.CTF_ALLOW_INTERFERENCE) || (DM._started && !Config.DM_ALLOW_INTERFERENCE)) && !player.isGM()) if (((TvT.is_started() && !Config.TVT_ALLOW_INTERFERENCE) || (CTF.is_started() && !Config.CTF_ALLOW_INTERFERENCE) || (DM.is_started() && !Config.DM_ALLOW_INTERFERENCE))/* && !player.isGM() */) { if ((partyMember._inEventTvT && !player._inEventTvT) || (!partyMember._inEventTvT && player._inEventTvT)) @@ -2249,15 +2217,6 @@ public abstract class L2Skill continue; } } - /* - * The target_ally or target_corpse_ally have to work indipendent on duel/party status if(player.isInDuel() && (player.getDuelId() != ((L2PcInstance) newTarget).getDuelId() || player.getParty() != null && !player.getParty().getPartyMembers().contains(newTarget))) { - * continue; } - */ - /* - * }else if(newTarget instanceof L2Summon){ L2PcInstance trg = ((L2Summon) newTarget).getOwner(); if(trg == src) { continue; } //if src is in event and trg not OR viceversa: //to be fixed for mixed events status (in TvT joining phase, someone can attack a partecipating - * CTF player with area attack) if( ((src._inEvent || src._inEventCTF || src._inEventDM || src._inEventTvT || src._inEventVIP) && (!trg._inEvent && !trg._inEventCTF && !trg._inEventDM && !trg._inEventTvT && !trg._inEventVIP)) || ((trg._inEvent || trg._inEventCTF || - * trg._inEventDM || trg._inEventTvT || trg._inEventVIP) && (!src._inEvent && !src._inEventCTF && !src._inEventDM && !src._inEventTvT && !src._inEventVIP)) ){ continue; } } - */ L2Summon pet = ((L2PcInstance) newTarget).getPet(); if ((pet != null) && Util.checkIfInRange(radius, activeChar, pet, true) && !onlyFirst && (((_targetType == SkillTargetType.TARGET_CORPSE_ALLY) && pet.isDead()) || ((_targetType == SkillTargetType.TARGET_ALLY) && !pet.isDead())) && player.checkPvpSkill(newTarget, this)) { @@ -2351,11 +2310,6 @@ public abstract class L2Skill { continue; } - /* - * //check if allow interference is allowed if player is not on event but target is on event //if(((TvT._started && !Config.TVT_ALLOW_INTERFERENCE) || (CTF._started && !Config.CTF_ALLOW_INTERFERENCE) || (DM._started && !Config.DM_ALLOW_INTERFERENCE)) && !player.isGM()) - * if(((TvT.is_inProgress() && !Config.TVT_ALLOW_INTERFERENCE) || (CTF.is_inProgress() && !Config.CTF_ALLOW_INTERFERENCE) || (DM.is_inProgress() && !Config.DM_ALLOW_INTERFERENCE))) { if((newTarget._inEventTvT && !player._inEventTvT) || (!newTarget._inEventTvT && - * player._inEventTvT)) { continue; } if((newTarget._inEventCTF && !player._inEventCTF) || (!newTarget._inEventCTF && player._inEventCTF)) { continue; } if((newTarget._inEventDM && !player._inEventDM) || (!newTarget._inEventDM && player._inEventDM)) { continue; } } - */ L2Summon pet = newTarget.getPet(); if ((pet != null) && Util.checkIfInRange(radius, activeChar, pet, true) && !onlyFirst && (((_targetType == SkillTargetType.TARGET_CORPSE_CLAN) && pet.isDead()) || ((_targetType == SkillTargetType.TARGET_CLAN) && !pet.isDead())) && player.checkPvpSkill(newTarget, this)) { @@ -2967,10 +2921,6 @@ public abstract class L2Skill skillMastery = true; } - /* - * if(_skillType==SkillType.BUFF) for(L2Effect ef: effector.getAllEffects()) { if(ef!=null && ef.getSkill()!=null){ if(ef.getSkill().getId() == getId() && ef.getSkill().getLevel() > getLevel()) return _emptyEffectSet; } } - */ - final Env env = new Env(); env.player = effector; env.target = effected; @@ -2994,9 +2944,6 @@ public abstract class L2Skill effects.add(e); } } - /* - * L2Effect e = et.getEffect(env); if(e != null) { effects.add(e); } e = null; - */ } if (effects.size() == 0) @@ -3128,7 +3075,6 @@ public abstract class L2Skill } } - // Author Jose Moreira public boolean isAbnormalEffectByName(int abnormalEffect) { // Function to know if the skill has "abnormalEffect" diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2TradeList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2TradeList.java index af1a61e4c1..31c25d0ba9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2TradeList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2TradeList.java @@ -278,24 +278,6 @@ public class L2TradeList return bool; } - /* - * public boolean validateTrade(L2PcInstance player) { Inventory playersInv = player.getInventory(); L2ItemInstance playerItem, temp; for(int y = 0; y < _items.size(); y++) { temp = _items.get(y); playerItem = playersInv.getItemByObjectId(temp.getObjectId()); if(playerItem == null || - * playerItem.getCount() < temp.getCount()) return false; } playersInv = null; playerItem = null; temp = null; return true; } - */ - - /* - * //Call validate before this public void tradeItems(L2PcInstance player, L2PcInstance reciever) { Inventory playersInv = player.getInventory(); Inventory recieverInv = reciever.getInventory(); L2ItemInstance playerItem, recieverItem, temp, newitem; InventoryUpdate update = new - * InventoryUpdate(); ItemTable itemTable = ItemTable.getInstance(); //boolean isValid; //LinkedList itemsToAdd = new LinkedList(); //LinkedList itemsToRemove = new LinkedList(); //LinkedList countsToRemove = new LinkedList(); - * for(int y = 0; y < _items.size(); y++) { temp = _items.get(y); playerItem = playersInv.getItemByObjectId(temp.getObjectId()); if(playerItem == null) { continue; } newitem = itemTable.createItem("L2TradeList", playerItem.getItemId(), playerItem.getCount(), player); - * newitem.setEnchantLevel(temp.getEnchantLevel()); // DIRTY FIX: Fix for trading pet collar not updating pet with new collar object id changePetItemObjectId(playerItem.getObjectId(), newitem.getObjectId()); playerItem = playersInv.destroyItem("!L2TradeList!", playerItem.getObjectId(), - * temp.getCount(), null, null); recieverItem = recieverInv.addItem("!L2TradeList!", newitem, null, null); if(playerItem == null) { LOGGER.warning("L2TradeList: PlayersInv.destroyItem returned NULL!"); continue; } if(playerItem.getLastChange() == L2ItemInstance.MODIFIED) { - * update.addModifiedItem(playerItem); } else { L2World world = L2World.getInstance(); world.removeObject(playerItem); update.addRemovedItem(playerItem); world = null; } player.sendPacket(update); update = null; update = new InventoryUpdate(); if(recieverItem.getLastChange() == - * L2ItemInstance.MODIFIED) { update.addModifiedItem(recieverItem); } else { update.addNewItem(recieverItem); } reciever.sendPacket(update); } // weight status update both player and reciever StatusUpdate su = new StatusUpdate(player.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, - * player.getCurrentLoad()); player.sendPacket(su); su = null; su = new StatusUpdate(reciever.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, reciever.getCurrentLoad()); reciever.sendPacket(su); su = null; playersInv = null; recieverInv = null; playerItem = null; recieverItem = null; temp - * = null; newitem = null; update = null; itemTable = null; } private void changePetItemObjectId(int oldObjectId, int newObjectId) { Connection con = null; try { con = L2DatabaseFactory.getConnection(false); PreparedStatement statement = - * con.prepareStatement("UPDATE pets SET item_obj_id = ? WHERE item_obj_id = ?"); statement.setInt(1, newObjectId); statement.setInt(2, oldObjectId); statement.executeUpdate(); DatabaseUtils.close(statement); statement = null; } catch(Exception e) { - * LOGGER.warning("could not change pet item object id: " + e); } finally { CloseUtil.close(con); con = null; } } - */ public void updateBuyList(L2PcInstance player, List list) { TradeItem temp; @@ -348,23 +330,6 @@ public class L2TradeList } } - /* - * public synchronized void buySellItems(L2PcInstance buyer, List buyerslist, L2PcInstance seller, List sellerslist) { Inventory sellerInv = seller.getInventory(); Inventory buyerInv = buyer.getInventory(); //TradeItem buyerItem = null; TradeItem temp2 = null; - * L2ItemInstance sellerItem = null; L2ItemInstance temp = null; L2ItemInstance newitem = null; L2ItemInstance adena = null; int enchantLevel = 0; InventoryUpdate buyerupdate = new InventoryUpdate(); InventoryUpdate sellerupdate = new InventoryUpdate(); ItemTable itemTable = - * ItemTable.getInstance(); int amount = 0; int x = 0; int y = 0; List sysmsgs = new ArrayList(); SystemMessage msg = null; for(TradeItem buyerItem : buyerslist) { for(x = 0; x < sellerslist.size(); x++)//find in sellerslist { temp2 = sellerslist.get(x); - * if(temp2.getItemId() == buyerItem.getItemId()) { sellerItem = sellerInv.getItemByItemId(buyerItem.getItemId()); break; } } if(sellerItem != null) { if(buyerItem.getCount() > temp2.getCount()) { amount = temp2.getCount(); } if(buyerItem.getCount() > sellerItem.getCount()) { amount = - * sellerItem.getCount(); } else { amount = buyerItem.getCount(); } if(buyerItem.getCount() > Integer.MAX_VALUE / buyerItem.getOwnersPrice()) { LOGGER.warning("Integer Overflow on Cost. Possible Exploit attempt between " + buyer.getName() + " and " + seller.getName() + "."); return; } //int cost - * = amount * buyerItem.getOwnersPrice(); enchantLevel = sellerItem.getEnchantLevel(); sellerItem = sellerInv.destroyItem("", sellerItem.getObjectId(), amount, null, null); // buyer.reduceAdena(cost); // seller.addAdena(cost); newitem = itemTable.createItem("L2TradeList", sellerItem.getItemId(), - * amount, buyer, seller); newitem.setEnchantLevel(enchantLevel); temp = buyerInv.addItem("", newitem, null, null); if(amount == 1)//system msg stuff { msg = SystemMessageId.S1_PURCHASED_S2); msg.addString(buyer.getName()); msg.addItemName(sellerItem.getItemId()); sysmsgs.add(msg); msg = null; - * msg = SystemMessageId.S1_PURCHASED_S2); msg.addString("You"); msg.addItemName(sellerItem.getItemId()); sysmsgs.add(msg); msg = null; } else { msg = SystemMessageId.S1_PURCHASED_S3_S2_S); msg.addString(buyer.getName()); msg.addItemName(sellerItem.getItemId()); msg.addNumber(amount); - * sysmsgs.add(msg); msg = null; msg = SystemMessageId.S1_PURCHASED_S3_S2_S); msg.addString("You"); msg.addItemName(sellerItem.getItemId()); msg.addNumber(amount); sysmsgs.add(msg); msg = null; } if(temp2.getCount() == buyerItem.getCount()) { sellerslist.remove(temp2); buyerItem.setCount(0); } - * else { if(buyerItem.getCount() < temp2.getCount()) { temp2.setCount(temp2.getCount() - buyerItem.getCount()); } else { buyerItem.setCount(buyerItem.getCount() - temp2.getCount()); } } if(sellerItem.getLastChange() == L2ItemInstance.MODIFIED) { sellerupdate.addModifiedItem(sellerItem); } else - * { L2World world = L2World.getInstance(); world.removeObject(sellerItem); sellerupdate.addRemovedItem(sellerItem); world = null; } if(temp.getLastChange() == L2ItemInstance.MODIFIED) { buyerupdate.addModifiedItem(temp); } else { buyerupdate.addNewItem(temp); } //} sellerItem = null; } } - * if(newitem != null) { //updateSellList(seller,sellerslist); adena = seller.getInventory().getAdenaInstance(); adena.setLastChange(L2ItemInstance.MODIFIED); sellerupdate.addModifiedItem(adena); adena = buyer.getInventory().getAdenaInstance(); adena.setLastChange(L2ItemInstance.MODIFIED); - * buyerupdate.addModifiedItem(adena); seller.sendPacket(sellerupdate); buyer.sendPacket(buyerupdate); y = 0; for(x = 0; x < sysmsgs.size(); x++) { if(y == 0) { seller.sendPacket(sysmsgs.get(x)); y = 1; } else { buyer.sendPacket(sysmsgs.get(x)); y = 0; } } } sellerInv = null; buyerInv = null; - * temp2 = null; sellerItem = null; temp = null; newitem = null; adena = null; buyerupdate = null; sellerupdate = null; itemTable = null; sysmsgs = null; msg = null; } - */ - public boolean isGm() { return _gm; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java index 33ffa86b80..fbf6ba5675 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java @@ -41,13 +41,8 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance; */ public final class L2World { - /** The LOGGER. */ private static Logger LOGGER = Logger.getLogger(L2World.class.getName()); - /* - * biteshift, defines number of regions note, shifting by 15 will result in regions corresponding to map tiles shifting by 12 divides one tile to 8x8 regions - */ - /** The Constant SHIFT_BY. */ public static final int SHIFT_BY = 12; // Geodata min/max tiles @@ -57,10 +52,6 @@ public final class L2World public static final int TILE_Y_MAX = 25; // Map dimensions - // public static final int MAP_MIN_X = -131072; - // public static final int MAP_MAX_X = 228608; - // public static final int MAP_MIN_Y = -262144; - // public static final int MAP_MAX_Y = 262144; public static final int TILE_SIZE = 32768; public static final int MAP_MIN_X = (TILE_X_MIN - 20) * TILE_SIZE; public static final int MAP_MAX_X = (TILE_X_MAX - 19) * TILE_SIZE; @@ -79,11 +70,6 @@ public final class L2World /** The Constant REGIONS_Y. */ private static final int REGIONS_Y = (MAP_MAX_Y >> SHIFT_BY) + OFFSET_Y; - // public static final int WORLD_SIZE_X = L2World.MAP_MAX_X - L2World.MAP_MIN_X + 1 >> 15; - // public static final int WORLD_SIZE_Y = L2World.MAP_MAX_Y - L2World.MAP_MIN_Y + 1 >> 15; - - // private Map _allGms; - /** HashMap(String Player name, L2PcInstance) containing all the players in game. */ private static Map _allPlayers = new ConcurrentHashMap<>(); @@ -99,15 +85,8 @@ public final class L2World /** The _world regions. */ private L2WorldRegion[][] _worldRegions; - /** - * Constructor of L2World.
    - *
    - */ private L2World() { - // _allGms = new HashMap(); - // _allPlayers = new HashMap().shared(); - _petsInstance = new ConcurrentHashMap<>(); _allObjects = L2ObjectMap.createL2ObjectMap(); @@ -177,8 +156,7 @@ public final class L2World */ public void removeObject(L2Object object) { - _allObjects.remove(object); // suggestion by whatev - // IdFactory.getInstance().releaseId(object.getObjectId()); + _allObjects.remove(object); } /** @@ -189,8 +167,7 @@ public final class L2World { for (L2Object o : list) { - _allObjects.remove(o); // suggestion by whatev - // IdFactory.getInstance().releaseId(object.getObjectId()); + _allObjects.remove(o); } } @@ -202,8 +179,7 @@ public final class L2World { for (L2Object o : objects) { - _allObjects.remove(o); // suggestion by whatev - // IdFactory.getInstance().releaseId(object.getObjectId()); + _allObjects.remove(o); } } @@ -482,8 +458,7 @@ public final class L2World } } - // Get all visible objects contained in the _visibleObjects of L2WorldRegions - // in a circular area of 2000 units + // Get all visible objects contained in the _visibleObjects of L2WorldRegions in a circular area of 2000 units List visibles = getVisibleObjects(object, 2000); if (Config.DEBUG) { @@ -572,8 +547,6 @@ public final class L2World return; } - // removeObject(object); - if (oldRegion != null) { // Remove the object from the L2ObjectHashSet(L2Object) _visibleObjects of L2WorldRegion @@ -621,10 +594,6 @@ public final class L2World { removeFromAllPlayers((L2PcInstance) object); } - - // If selected L2Object is a GM L2PcInstance, remove it from Set(L2PcInstance) _gmList of GmListTable - // if (((L2PcInstance)object).isGM()) - // GmListTable.getInstance().deleteGm((L2PcInstance)object); } } } @@ -761,14 +730,9 @@ public final class L2World final int y1 = _object.getY(); final double dx = x1 - x; - // if (dx > radius || -dx > radius) - // continue; final double dy = y1 - y; - // if (dy > radius || -dy > radius) - // continue; - // If the visible object is inside the circular area - // add the object to the FastList result + // If the visible object is inside the circular area add the object to the FastList result if (((dx * dx) + (dy * dy)) < sqRadius) { result.add(_object); @@ -834,11 +798,7 @@ public final class L2World final int z1 = _object.getZ(); final long dx = x1 - x; - // if (dx > radius || -dx > radius) - // continue; final long dy = y1 - y; - // if (dy > radius || -dy > radius) - // continue; final long dz = z1 - z; if (((dx * dx) + (dy * dy) + (dz * dz)) < sqRadius) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2WorldRegion.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2WorldRegion.java index ff4e113ba6..eaebf5ed05 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2WorldRegion.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2WorldRegion.java @@ -38,19 +38,11 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneManager; import com.l2jmobius.gameserver.model.zone.L2ZoneType; import com.l2jmobius.gameserver.model.zone.type.L2PeaceZone; -/** - * This class ... - * @version $Revision: 1.3.4.4 $ $Date: 2005/03/27 15:29:33 $ - */ public final class L2WorldRegion { private static Logger LOGGER = Logger.getLogger(L2WorldRegion.class.getName()); - /** - * L2ObjectHashSet(L2PlayableInstance) containing L2PlayableInstance of all player & summon in game in this L2WorldRegion - */ private final L2ObjectSet _allPlayable; - /** L2ObjectHashSet(L2Object) containing L2Object visible in this L2WorldRegion */ private final L2ObjectSet _visibleObjects; private final List _surroundingRegions; private final int _tileX; @@ -61,10 +53,9 @@ public final class L2WorldRegion public L2WorldRegion(int pTileX, int pTileY) { - _allPlayable = L2ObjectSet.createL2PlayerSet(); // new L2ObjectHashSet(); - _visibleObjects = L2ObjectSet.createL2ObjectSet(); // new L2ObjectHashSet(); + _allPlayable = L2ObjectSet.createL2PlayerSet(); + _visibleObjects = L2ObjectSet.createL2ObjectSet(); _surroundingRegions = new ArrayList<>(); - // _surroundingRegions.add(this); //done in L2World.initRegions() _tileX = pTileX; _tileY = pTileY; @@ -234,11 +225,6 @@ public final class L2WorldRegion ((L2SiegeGuardAI) mob.getAI()).stopAITask(); } } - - // Stop HP/MP/CP Regeneration task - // try this: allow regen, but only until mob is 100% full...then stop - // it until the grid is made active. - // mob.getStatus().stopHpMpRegeneration(); } } if (Config.DEBUG) @@ -255,9 +241,6 @@ public final class L2WorldRegion c++; // Start HP/MP/CP Regeneration task ((L2Attackable) o).getStatus().startHpMpRegeneration(); - - // start the ai - // ((L2AttackableAI) mob.getAI()).startAITask(); } else if (o instanceof L2NpcInstance) { @@ -317,8 +300,7 @@ public final class L2WorldRegion // turn the AI on or off to match the region's activation. switchAI(value); - // TODO - // turn the geodata on or off to match the region's activation. + // TODO: turn the geodata on or off to match the region's activation. if (Config.DEBUG) { if (value) @@ -442,9 +424,6 @@ public final class L2WorldRegion */ public List getSurroundingRegions() { - // change to return L2WorldRegion[] ? - // this should not change after initialization, so maybe changes are not necessary - return _surroundingRegions; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcFreight.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcFreight.java index 4967b3dd45..60e5946081 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcFreight.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcFreight.java @@ -25,9 +25,7 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class PcFreight extends ItemContainer { - // private static final Logger LOGGER = Logger.getLogger(PcFreight.class); - - private final L2PcInstance _owner; // This is the L2PcInstance that owns this Freight; + private final L2PcInstance _owner; private int _activeLocationId; public PcFreight(L2PcInstance owner) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcInventory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcInventory.java index 20db5f6b82..57c0ec5c5d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcInventory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcInventory.java @@ -812,7 +812,5 @@ public class PcInventory extends Inventory } return count; - } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcWarehouse.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcWarehouse.java index 8b2779494c..0bf5a30e09 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcWarehouse.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PcWarehouse.java @@ -21,8 +21,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class PcWarehouse extends Warehouse { - // private static final Logger LOGGER = Logger.getLogger(PcWarehouse.class); - private final L2PcInstance _owner; public PcWarehouse(L2PcInstance owner) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PlayerStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PlayerStatus.java index 4cf43b4052..3cb65b0832 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PlayerStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/PlayerStatus.java @@ -89,5 +89,4 @@ public class PlayerStatus CUR_CP = (int) actor.getCurrentCp(); MAX_CP = actor.getMaxCp(); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/TradeList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/TradeList.java index cb1f653d1a..cb53779325 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/TradeList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/TradeList.java @@ -639,7 +639,6 @@ public class TradeList if ((item == null) || (titem.getCount() < 1)) { - // LOGGER.warning(_owner.getName() + ": Invalid Item in TradeList"); return false; } } @@ -981,11 +980,6 @@ public class TradeList final SystemMessage msg2 = SystemMessage.sendString("You spent " + price + " " + item.getItemName()); player.sendPacket(msg2); - - /* - * L2ItemInstance item = playerInventory.getItemByItemId(Config.SELL_ITEM); playerInventory.destroyItem("PrivateStore", item.getObjectId(), price, player, _owner); playerIU.addItem(item); L2ItemInstance item2 = ownerInventory.getItemByItemId(Config.SELL_ITEM); - * ownerInventory.addItem("PrivateStore", item2.getObjectId(), price, _owner, player); ownerIU.addItem(ownerInventory.getItemByItemId(Config.SELL_ITEM)); - */ } else { @@ -1413,5 +1407,4 @@ public class TradeList } return null; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java index adc1e24198..b062ffe0ea 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Attackable.java @@ -81,8 +81,6 @@ import com.l2jmobius.gameserver.util.Util; */ public class L2Attackable extends L2NpcInstance { - // protected static Logger LOGGER = Logger.getLogger(L2Attackable.class); - /** * This class contains all AggroInfo of the L2Attackable against the attacker L2Character.
    *
    @@ -400,8 +398,6 @@ public class L2Attackable extends L2NpcInstance return _ai; } - // get condition to hate, actually isAggressive() is checked - // by monster and karma by guards in motheds that overwrite this one. /** * Not used.
    *
    @@ -445,11 +441,6 @@ public class L2Attackable extends L2NpcInstance @Override public void reduceCurrentHp(double damage, L2Character attacker, boolean awake) { - /* - * if ((this instanceof L2SiegeGuardInstance) && (attacker instanceof L2SiegeGuardInstance)) //if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; if ((this instanceof L2MonsterInstance)&&(attacker instanceof - * L2MonsterInstance)) if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; - */ - if (isRaid() && (attacker != null) && (attacker.getParty() != null) && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { if (_firstCommandChannelAttacked == null) // looting right isn't set @@ -474,11 +465,7 @@ public class L2Attackable extends L2NpcInstance _commandChannelLastAttack = System.currentTimeMillis(); // update last attack time } } - /* - * // CommandChannel if(_commandChannelTimer == null && isRaid() && attacker != null) { if(attacker.isInParty() && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { _firstCommandChannelAttacked = - * attacker.getParty().getCommandChannel(); _commandChannelTimer = new CommandChannelTimer(this, attacker.getParty().getCommandChannel()); ThreadPoolManager.scheduleGeneral(_commandChannelTimer, 300000); // 5 min _firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, - * Say2.PARTYROOM_ALL, "", "You have looting rights!")); } } - */ + if (isEventMob) { return; @@ -580,7 +567,6 @@ public class L2Attackable extends L2NpcInstance } setChampion(false); - // TODO if (Config.L2JMOD_CHAMPION_ENABLE) { // Set champion on next spawn @@ -878,8 +864,7 @@ public class L2Attackable extends L2NpcInstance rewards.remove(pl); // Remove the L2PcInstance from the L2Attackable rewards } - else // Add L2PcInstance of the party (that have attacked or not) to members that can be rewarded - // and in range of the monster. + else // Add L2PcInstance of the party (that have attacked or not) to members that can be rewarded and in range of the monster. if (Util.checkIfInRange(Config.ALT_PARTY_RANGE, this, pl, true)) { rewardedMembers.add(pl); @@ -997,7 +982,7 @@ public class L2Attackable extends L2NpcInstance */ public void addDamageHate(L2Character attacker, int damage, int aggro) { - if (attacker == null /* || _aggroList == null */) + if (attacker == null) { return; } @@ -1168,7 +1153,7 @@ public class L2Attackable extends L2NpcInstance int maxHate = 0; - // While Interating over This Map Removing Object is Not Allowed + // While iterating over This Map Removing Object is Not Allowed synchronized (_aggroList) { // Go through the aggroList of the L2Attackable @@ -1180,8 +1165,6 @@ public class L2Attackable extends L2NpcInstance } if (ai._attacker.isAlikeDead() || !getKnownList().knowsObject(ai._attacker) || !ai._attacker.isVisible() || ((ai._attacker instanceof L2PcInstance) && (((L2PcInstance) ai._attacker).isOnline() == 0) && !((L2PcInstance) ai._attacker).isInOfflineMode())) // if player go in offline - // mode, he - // must be hated however { ai._hate = 0; } @@ -1202,15 +1185,6 @@ public class L2Attackable extends L2NpcInstance return mostHated; } - /** - * useful to give correctly the item to players - * @return - */ - /* - * public L2Character getMostDamager(){ if(getAggroListRP().isEmpty() || isAlikeDead()) return null; //L2Character mostDamager = null; int maxDamage = 0; // While Interating over This Map Removing Object is Not Allowed synchronized (getAggroList()) { // Go through the aggroList of the - * L2Attackable for(AggroInfo ai : _aggroList.values()) { if(ai == null) { continue; } if(ai._attacker.isAlikeDead() || !getKnownList().knowsObject(ai._attacker) || !ai._attacker.isVisible() || ai._attacker instanceof L2PcInstance && ((L2PcInstance)ai._attacker).isOffline() ) { ai._damage = 0; } - * if(ai._damage > maxDamage) { _mostDamager = ai._attacker; maxDamage = ai._damage; } } } return _mostDamager; } - */ /** * Return the hate level of the L2Attackable against this L2Character contained in _aggroList.
    *
    @@ -1238,7 +1212,7 @@ public class L2Attackable extends L2NpcInstance if ((ai._attacker instanceof L2PcInstance) && (((L2PcInstance) ai._attacker).getAppearance().getInvisible() || ((L2PcInstance) ai._attacker).isSpawnProtected() || ((L2PcInstance) ai._attacker).isTeleportProtected() || ai._attacker.isInvul())) { - // Remove Object Should Use This Method and Can be Blocked While Interating + // Remove Object Should Use This Method and Can be Blocked While iterating _aggroList.remove(target); return 0; @@ -1273,9 +1247,8 @@ public class L2Attackable extends L2NpcInstance { // Get default drop chance if ((Config.HIGH_RATE_SERVER_DROPS && !drop.isQuestDrop() && (drop.getItemId() != 57))) - { // it's not adena-->check if drop has an epic jewel - - // ant queen,orfen,core,frintezza,baium,antharas,valakas,zaken,stones + { + // it's not adena-->check if drop has an epic jewel ant queen,orfen,core,frintezza,baium,antharas,valakas,zaken,stones if ((drop.getItemId() == 6660) || (drop.getItemId() == 6661) || (drop.getItemId() == 6662) || (drop.getItemId() == 8191) || (drop.getItemId() == 6658) || (drop.getItemId() == 6656) || (drop.getItemId() == 6657) || (drop.getItemId() == 6659) || ((drop.getItemId() >= 6360) && (drop.getItemId() <= 6362)) || ((drop.getItemId() >= 8723) && (drop.getItemId() <= 8762))) { // if epic jewel, seal stones or life stone, continue @@ -1284,15 +1257,14 @@ public class L2Attackable extends L2NpcInstance { return null; } - } float dropChance = 0; switch (drop.getItemId()) { - case 6662: - { // core ring + case 6662: // core ring + { if (Config.CORE_RING_CHANCE > 0) { dropChance = (10000 * Config.CORE_RING_CHANCE); @@ -1301,10 +1273,10 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; - case 6661: - { // orfen earring + } + case 6661: // orfen earring + { if (Config.ORFEN_EARRING_CHANCE > 0) { dropChance = (10000 * Config.ORFEN_EARRING_CHANCE); @@ -1313,10 +1285,10 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; - case 6659: - { // zaken earring + } + case 6659: // zaken earring + { if (Config.ZAKEN_EARRING_CHANCE > 0) { dropChance = (10000 * Config.ZAKEN_EARRING_CHANCE); @@ -1325,10 +1297,10 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; - case 6660: - { // aq ring + } + case 6660: // aq ring + { if (Config.QA_RING_CHANCE > 0) { dropChance = (10000 * Config.QA_RING_CHANCE); @@ -1337,8 +1309,8 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; + } default: { dropChance = drop.getChance(); @@ -1459,10 +1431,6 @@ public class L2Attackable extends L2NpcInstance dropChance = 1; } - // If item is adena, dont drop multiple time - // if (drop.getItemId() == 57 && dropChance > L2DropData.MAX_CHANCE) - // dropChance = L2DropData.MAX_CHANCE; - // Get min and max Item quantity that can be dropped in one time final int minCount = drop.getMinDrop(); final int maxCount = drop.getMaxDrop(); @@ -1558,21 +1526,18 @@ public class L2Attackable extends L2NpcInstance for (L2DropData dd : categoryDrops.getAllDrops()) { - // quest_drop,ant queen,orfen,core,frintezza,baium,antharas,valakas,zaken, seal Stones, life stones if (dd.isQuestDrop() || (dd.getItemId() == 6660) || (dd.getItemId() == 6661) || (dd.getItemId() == 6662) || (dd.getItemId() == 8191) || (dd.getItemId() == 6658) || (dd.getItemId() == 6656) || (dd.getItemId() == 6657) || (dd.getItemId() == 6659) || ((dd.getItemId() >= 6360) && (dd.getItemId() <= 6362)) || ((dd.getItemId() >= 8723) && (dd.getItemId() <= 8762))) { // if epic jewel, return just 1 from raid to_drop = true; } - } if (!to_drop) { return null; } - } // Get default drop chance for the category (that's the sum of chances for all items in the category) @@ -1655,13 +1620,12 @@ public class L2Attackable extends L2NpcInstance // At least 1 item will be dropped for sure. So the chance will be adjusted to 100% // if smaller. - // int dropChance = drop.getChance(); int dropChance = 0; switch (drop.getItemId()) { - case 6662: - { // core ring + case 6662: // core ring + { if (Config.CORE_RING_CHANCE > 0) { dropChance = (10000 * Config.CORE_RING_CHANCE); @@ -1670,10 +1634,10 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; - case 6661: - { // orfen earring + } + case 6661: // orfen earring + { if (Config.ORFEN_EARRING_CHANCE > 0) { dropChance = (10000 * Config.ORFEN_EARRING_CHANCE); @@ -1682,10 +1646,10 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; - case 6659: - { // zaken earring + } + case 6659: // zaken earring + { if (Config.ZAKEN_EARRING_CHANCE > 0) { dropChance = (10000 * Config.ZAKEN_EARRING_CHANCE); @@ -1694,10 +1658,10 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; - case 6660: - { // aq ring + } + case 6660: // aq ring + { if (Config.QA_RING_CHANCE > 0) { dropChance = (10000 * Config.QA_RING_CHANCE); @@ -1706,8 +1670,8 @@ public class L2Attackable extends L2NpcInstance { dropChance = drop.getChance(); } - } break; + } default: { dropChance = drop.getChance(); @@ -1736,7 +1700,6 @@ public class L2Attackable extends L2NpcInstance dropChance *= Config.DONATOR_ADENA_RATE; } } - } else if (this instanceof L2RaidBossInstance) { @@ -1997,7 +1960,6 @@ public class L2Attackable extends L2NpcInstance if (item_templ == null) { LOGGER.info("ERROR: Item id to autoloot " + item.getItemId() + " has not template into items/armor/weapon tables.. It cannot be dropped.."); - // DropItem(player, item); } else if (!player.getInventory().validateCapacity(item_templ) || (!Config.AUTO_LOOT_BOSS && (this instanceof L2RaidBossInstance)) || (!Config.AUTO_LOOT_BOSS && (this instanceof L2GrandBossInstance))) { @@ -2049,7 +2011,6 @@ public class L2Attackable extends L2NpcInstance { player.addItem("ChampionLoot", item.getItemId(), item.getCount(), this, true); } - } else { @@ -2997,7 +2958,6 @@ public class L2Attackable extends L2NpcInstance } crystalQTY = 0; - continue; } @@ -3328,9 +3288,8 @@ public class L2Attackable extends L2NpcInstance /** * Check if the server allows Random Animation.
    - *
    + * This is located here because L2Monster and L2FriendlyMob both extend this class. The other non-pc instances extend either L2NpcInstance or L2MonsterInstance. */ - // This is located here because L2Monster and L2FriendlyMob both extend this class. The other non-pc instances extend either L2NpcInstance or L2MonsterInstance. @Override public boolean hasRandomAnimation() { @@ -3376,9 +3335,6 @@ public class L2Attackable extends L2NpcInstance _monster = monster; } - /** - * @see java.lang.Runnable#run() - */ @Override public void run() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Character.java index f9db8b4cfb..c66867dc4f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -162,156 +162,56 @@ import com.l2jmobius.gameserver.util.Util; */ public abstract class L2Character extends L2Object implements ISkillsHolder { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(L2Character.class.getName()); - // ========================================================= - // Data Field - /** The attack stance. */ private long attackStance; - - /** The _attack by list. */ private List _attackByList; - // private L2Character _attackingChar; - /** The _last skill cast. */ private L2Skill _lastSkillCast; - - /** The _last potion cast. */ private L2Skill _lastPotionCast; - - /** The _is buff protected. */ private boolean _isBuffProtected = false; // Protect From Debuffs - - /** The _is afraid. */ private boolean _isAfraid = false; // Flee in a random direction - - /** The _is confused. */ private boolean _isConfused = false; // Attack anyone randomly - - /** The _is fake death. */ private boolean _isFakeDeath = false; // Fake death - - /** The _is flying. */ private boolean _isFlying = false; // Is flying Wyvern? - - /** The _is fallsdown. */ private boolean _isFallsdown = false; // Falls down - - /** The _is muted. */ private boolean _isMuted = false; // Cannot use magic - - /** The _is psychical muted. */ private boolean _isPsychicalMuted = false; // Cannot use psychical skills - - /** The _is killed already. */ private boolean _isKilledAlready = false; - - /** The _is imobilised. */ private int _isImobilised = 0; - - /** The _is overloaded. */ private boolean _isOverloaded = false; // the char is carrying too much - - /** The _is paralyzed. */ private boolean _isParalyzed = false; - - /** The _is riding. */ private boolean _isRiding = false; // Is Riding strider? - - /** The _is pending revive. */ private boolean _isPendingRevive = false; - - /** The _is rooted. */ private boolean _isRooted = false; // Cannot move until root timed out - - /** The _is running. */ private boolean _isRunning = false; - - /** The _is immobile until attacked. */ private boolean _isImmobileUntilAttacked = false; // Is in immobile until attacked. - - /** The _is sleeping. */ private boolean _isSleeping = false; // Cannot move/attack until sleep timed out or monster is attacked - - /** The _is stunned. */ private boolean _isStunned = false; // Cannot move/attack until stun timed out - - /** The _is betrayed. */ private boolean _isBetrayed = false; // Betrayed by own summon - - /** The _is block buff. */ private boolean _isBlockBuff = false; // Got blocked buff bar - - /** The _is block debuff. */ private boolean _isBlockDebuff = false; // Got blocked debuff bar - - /** The _is teleporting. */ protected boolean _isTeleporting = false; - - /** The _is invul. */ protected boolean _isInvul = false; - - /** The _is killable */ protected boolean _isUnkillable = false; - - /** The attackDisabled */ protected boolean _isAttackDisabled = false; - - /** The _last heal amount. */ private int _lastHealAmount = 0; - - /** The _stat. */ private CharStat _stat; - - /** The _status. */ private CharStatus _status; - - /** The _template. */ private L2CharTemplate _template; // The link on the L2CharTemplate object containing generic and static properties of this L2Character type (ex : Max HP, Speed...) - - /** The _title. */ private String _title; - - /** The _ai class. */ private String _aiClass = "default"; - - /** The _hp update inc check. */ private double _hpUpdateIncCheck = .0; - - /** The _hp update dec check. */ private double _hpUpdateDecCheck = .0; - - /** The _hp update interval. */ private double _hpUpdateInterval = .0; - - /** The _champion. */ private boolean _champion = false; - - /** Table of Calculators containing all used calculator. */ private Calculator[] _calculators; - - /** Map(Integer, L2Skill) containing all skills of the L2Character. */ private final Map _skills; - - /** Map(Integer, L2Skill) containing all triggered skills of the L2PcInstance. */ protected final Map _triggeredSkills; - - /** Map containing the active chance skills on this character. */ protected ChanceSkillList _chanceSkills; - - /** Current force buff this caster is casting to a target. */ protected ForceBuff _forceBuff; - - /** The _blocked. */ private boolean _blocked; - - /** The _meditated. */ private boolean _meditated; - - /** The _current zones. */ private final byte[] _zones = new byte[ZoneId.getZoneCount()]; - - /** Advance Headquarters */ private boolean _advanceFlag = false; private int _advanceMultiplier = 1; @@ -325,10 +225,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return _zones[zone.ordinal()] > 0; } - /** - * @param zone - * @param state - */ public void setInsideZone(ZoneId zone, boolean state) { synchronized (_zones) @@ -361,8 +257,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return false; } - // ========================================================= - // Constructor /** * Constructor of L2Character.
    *
    @@ -385,8 +279,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder * @param objectId Identifier of the object to initialized * @param template The L2CharTemplate to apply to the object */ - // MAKE TO US From DREAM - // int attackcountmax = (int) Math.round(calcStat(Stats.POLE_TARGERT_COUNT, 3, null, null)); public L2Character(int objectId, L2CharTemplate template) { super(objectId); @@ -403,8 +295,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _calculators = NPC_STD_CALCULATOR; // Copy the skills of the L2NPCInstance from its template to the L2Character Instance - // The skills list can be affected by spell effects so it's necessary to make a copy - // to avoid that a spell affecting a L2NPCInstance, affects others L2NPCInstance of the same type too. + // The skills list can be affected by spell effects so it's necessary to make a copy to avoid that a spell affecting a L2NPCInstance, affects others L2NPCInstance of the same type too. _skills = ((L2NpcTemplate) template).getSkills(); for (Map.Entry skill : _skills.entrySet()) @@ -417,8 +308,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder setIsInvul(true); } } - else - // not L2NpcInstance + else // not L2NpcInstance { // Initialize the Map _skills to null _skills = new ConcurrentHashMap<>(); @@ -444,8 +334,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _hpUpdateDecCheck = getStat().getMaxHp() - _hpUpdateInterval; } - // ========================================================= - // Event - Public /** * Remove the L2Character from the world when the decay task is launched.
    *
    @@ -465,10 +353,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder decayMe(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#onSpawn() - */ @Override public void onSpawn() { @@ -476,9 +360,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder revalidateZone(); } - /** - * On teleported. - */ public void onTeleported() { if (!_isTeleporting) @@ -511,8 +392,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - // ========================================================= - // Method - Public /** * Add L2Character instance that is attacking to the attacker list.
    *
    @@ -576,15 +455,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return; } - // if (Config.DEBUG) LOGGER.fine("players to notify:" + knownPlayers.size() + " packet:"+mov.getType()); - for (L2PcInstance player : getKnownList().getKnownPlayers().values()) { if (player != null) { - /* - * TEMP FIX: If player is not visible don't send packets broadcast to all his KnowList. This will avoid GM detection with l2net and olympiad's crash. We can now find old problems with invisible mode. - */ if ((this instanceof L2PcInstance) && !player.isGM() && (((L2PcInstance) this).getAppearance().getInvisible() || ((L2PcInstance) this).inObserverMode())) { return; @@ -602,7 +476,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder player.sendPacket(new RelationChanged((L2PcInstance) this, relation, player.isAutoAttackable(this))); } } - // if(Config.DEVELOPER && !isInsideRadius(player, 3500, false, false)) LOGGER.warning("broadcastPacket: Too far player see event!"); } catch (NullPointerException e) { @@ -629,8 +502,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder sendPacket(mov); } - // if (Config.DEBUG) LOGGER.fine("players to notify:" + knownPlayers.size() + " packet:"+mov.getType()); - for (L2PcInstance player : getKnownList().getKnownPlayers().values()) { try @@ -747,9 +618,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder temp.sendPacket(su); } } - /* - * synchronized (getStatus().getStatusListener()) { for(L2Character temp : getStatus().getStatusListener()) { try { temp.sendPacket(su); } catch(NullPointerException e) { e.printStackTrace(); } } } - */ } /** @@ -866,7 +734,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // Set the x,y,z position of the L2Object and if necessary modify its _worldRegion getPosition().setXYZ(x, y, z); - // if (!(this instanceof L2PcInstance) || (((L2PcInstance)this).isOffline()))/*.getClient() != null && ((L2PcInstance)this).getClient().isDetached()))*/ if (!(this instanceof L2PcInstance)) { onTeleported(); @@ -875,7 +742,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder revalidateZone(true); } - /** The _zone validate counter. */ protected byte _zoneValidateCounter = 4; /** @@ -932,8 +798,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder int y = loc.getY(); int z = loc.getZ(); - if ((this instanceof L2PcInstance) && DimensionalRiftManager.getInstance().checkIfInRiftZone(getX(), getY(), getZ(), true)) - { // true -> ignore waiting room :) + if ((this instanceof L2PcInstance) && DimensionalRiftManager.getInstance().checkIfInRiftZone(getX(), getY(), getZ(), true)) // true -> ignore waiting room :) + { L2PcInstance player = (L2PcInstance) this; player.sendMessage("You have been sent to the waiting room."); @@ -960,8 +826,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder teleToLocation(MapRegionTable.getInstance().getTeleToLocation(this, teleportWhere), true); } - // ========================================================= - // Method - Private /** * Launch a physical attack against a target (Simple, Bow, Pole or Dual).
    *
    @@ -1092,7 +956,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - // thank l2dot if (getObjectId() == target.getObjectId()) { sendPacket(ActionFailed.STATIC_PACKET); @@ -1129,9 +992,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return; } - /* - * TEMPFIX: Check client Z coordinate instead of server z to avoid exploit killing Zaken from others floor - */ if ((target instanceof L2GrandBossInstance) && (((L2GrandBossInstance) target).getNpcId() == 29022)) { if (Math.abs(_clientZ - target.getZ()) > 200) @@ -1321,17 +1181,12 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // Check if hit isn't missed if (!hitted) { - // MAJAX fix sendPacket(new SystemMessage(SystemMessageId.MISSED_TARGET)); // Abort the attack of the L2Character and send Server->Client ActionFailed packet abortAttack(); } else { - /* - * ADDED BY nexus - 2006-08-17 As soon as we know that our hit landed, we must discharge any active soulshots. This must be done so to avoid unwanted soulshot consumption. - */ - // If we didn't miss the hit, discharge the shoulshots, if any if ((this instanceof L2Summon) && !(this instanceof L2PetInstance)) { @@ -1765,11 +1620,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // prevent casting signets to peace zone if ((skill.getSkillType() == SkillType.SIGNET) || (skill.getSkillType() == SkillType.SIGNET_CASTTIME)) { - /* - * for (L2Effect effect : getAllEffects()) { if (effect.getEffectType() == L2Effect.EffectType.SIGNET_EFFECT || effect.getEffectType() == L2Effect.EffectType.SIGNET_GROUND) { SystemMessage sm = SystemMessageId.S1_CANNOT_BE_USED); sm.addSkillName(skill.getId()); sendPacket(sm); return; } - * } - */ - final L2WorldRegion region = getWorldRegion(); if (region == null) { @@ -1798,7 +1648,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } // Recharge AutoSoulShot - final int atkTime = Formulas.getInstance().calcMAtkSpd(activeChar, skill, skill.getHitTime()); if (skill.useSoulShot()) { @@ -1812,12 +1661,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - // else if (skill.useFishShot()) - // { - // if (this instanceof L2PcInstance) - // ((L2PcInstance)this).rechargeAutoSoulShot(true, false, false); - // } - // Get all possible targets of the skill in a table in function of the skill target type final L2Object[] targets = skill.getTargetList(activeChar); // Set the target of the skill in function of Skill Type and Target Type @@ -1835,12 +1678,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder else if (((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == SkillType.MANAHEAL) || (skill.getSkillType() == SkillType.REFLECT) || (skill.getSkillType() == SkillType.SEED) || (skill.getTargetType() == SkillTargetType.TARGET_SELF) || (skill.getTargetType() == SkillTargetType.TARGET_PET) || (skill.getTargetType() == SkillTargetType.TARGET_PARTY) || (skill.getTargetType() == SkillTargetType.TARGET_CLAN) || (skill.getTargetType() == SkillTargetType.TARGET_ALLY)) && !skill.isPotion()) { target = (L2Character) targets[0]; - - /* - * if (this instanceof L2PcInstance && target instanceof L2PcInstance && target.getAI().getIntention() == CtrlIntention.AI_INTENTION_ATTACK) { if(skill.getSkillType() == SkillType.BUFF || skill.getSkillType() == SkillType.HOT || skill.getSkillType() == SkillType.HEAL || - * skill.getSkillType() == SkillType.HEAL_PERCENT || skill.getSkillType() == SkillType.MANAHEAL || skill.getSkillType() == SkillType.MANAHEAL_PERCENT || skill.getSkillType() == SkillType.BALANCE_LIFE) target.setLastBuffer(this); if (((L2PcInstance)this).isInParty() && - * skill.getTargetType() == L2Skill.SkillTargetType.TARGET_PARTY) { for (L2PcInstance member : ((L2PcInstance)this).getParty().getPartyMembers()) member.setLastBuffer(this); } } - */ } else { @@ -1921,26 +1758,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // Only takes 70% of the time to cast a BSpS/SpS cast hitTime = (int) (0.70 * hitTime); coolTime = (int) (0.70 * coolTime); - - // Because the following are magic skills that do not actively 'eat' BSpS/SpS, - // I must 'eat' them here so players don't take advantage of infinite speed increase - /* MANAHEAL, MANARECHARGE, RESURRECT, RECALL */ - // if (skill.getSkillType() == SkillType.MANAHEAL || skill.getSkillType() == SkillType.MANARECHARGE || skill.getSkillType() == SkillType.RESURRECT || skill.getSkillType() == SkillType.RECALL) - // { - // if (checkBss()) - // removeBss(); - // else - // removeSps(); - // } } - /* - * // Calculate altered Cast Speed due to BSpS/SpS L2ItemInstance weaponInst = getActiveWeaponInstance(); if(weaponInst != null && skill.isMagic() && !forceBuff && skill.getTargetType() != SkillTargetType.TARGET_SELF && !skill.isStaticHitTime() && !skill.isPotion()) { - * if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT || weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) { //Only takes 70% of the time to cast a BSpS/SpS cast hitTime = (int) (0.70 * hitTime); coolTime = (int) (0.70 * coolTime); - * //Because the following are magic skills that do not actively 'eat' BSpS/SpS, //I must 'eat' them here so players don't take advantage of infinite speed increase if(skill.getSkillType() == SkillType.BUFF || skill.getSkillType() == SkillType.MANAHEAL || skill.getSkillType() == - * SkillType.RESURRECT || skill.getSkillType() == SkillType.RECALL || skill.getSkillType() == SkillType.DOT) { weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } } } weaponInst = null; - */ - if (skill.isPotion()) { // Set the _castEndTime and _castInterruptTim. +10 ticks for lag situations, will be reseted in onMagicFinalizer @@ -1955,8 +1774,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } // Init the reuse time of the skill - // int reuseDelay = (int)(skill.getReuseDelay() * getStat().getMReuseRate(skill)); - // reuseDelay *= 333.0 / (skill.isMagic() ? getStat().getMAtkSpd() : getStat().getPAtkSpd()); int reuseDelay = skill.getReuseDelay(); if ((activeChar instanceof L2PcInstance) && Formulas.getInstance().calcSkillMastery(activeChar)) @@ -1980,10 +1797,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // To turn local player in target direction setHeading(Util.calculateHeadingFrom(getX(), getY(), target.getX(), target.getY())); - /* - * if(skill.isOffensive() && skill.getTargetType() != SkillTargetType.TARGET_AURA && target.isBehind(this)) { moveToLocation(target.getX(), target.getY(), target.getZ(), 0); stopMove(null); } - */ - // Like L2OFF after a skill the player must stop the movement, also with toggle if (!skill.isPotion() && (this instanceof L2PcInstance)) { @@ -2471,8 +2284,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, skill, target); } - // ========================================================= - // Property - Public /** * Return the L2CharacterAI of the L2Character and if its null create a new one. * @return the aI @@ -3118,10 +2929,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return _template.isUndead; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#getKnownList() - */ @Override public CharKnownList getKnownList() { @@ -3256,7 +3063,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ class EnableSkill implements Runnable { - /** The _skill id. */ L2Skill _skillId; /** @@ -3268,10 +3074,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _skillId = skill; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -3299,22 +3101,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ class HitTask implements Runnable { - /** The _hit target. */ L2Character _hitTarget; - - /** The _damage. */ int _damage; - - /** The _crit. */ boolean _crit; - - /** The _miss. */ boolean _miss; - - /** The _shld. */ boolean _shld; - - /** The _soulshot. */ boolean _soulshot; /** @@ -3336,10 +3127,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _soulshot = soulshot; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -3359,16 +3146,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ class MagicUseTask implements Runnable { - /** The _targets. */ L2Object[] _targets; - - /** The _skill. */ L2Skill _skill; - - /** The _cool time. */ int _coolTime; - - /** The _phase. */ int _phase; /** @@ -3386,10 +3166,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _phase = phase; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -3432,16 +3208,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ class QueuedMagicUseTask implements Runnable { - /** The _curr player. */ L2PcInstance _currPlayer; - - /** The _queued skill. */ L2Skill _queuedSkill; - - /** The _is ctrl pressed. */ boolean _isCtrlPressed; - - /** The _is shift pressed. */ boolean _isShiftPressed; /** @@ -3459,10 +3228,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _isShiftPressed = isShiftPressed; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -3482,7 +3247,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ public class NotifyAITask implements Runnable { - /** The _evt. */ private final CtrlEvent _evt; /** @@ -3494,10 +3258,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _evt = evt; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -3522,24 +3282,15 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ public PvPFlag() { - // null } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { try { - // LOGGER.fine("Checking pvp time: " + getlastPvpAttack()); - // "lastattack: " _lastAttackTime "currenttime: " - // System.currentTimeMillis()); if (System.currentTimeMillis() > _pvpFlagLasts) { - // LOGGER.fine("Stopping PvP"); stopPvPFlag(); } else if (System.currentTimeMillis() > (_pvpFlagLasts - 5000)) @@ -3549,8 +3300,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder else { updatePvPFlag(1); - // Start a new PvP timer check - // checkPvPFlag(); } } catch (Exception e) @@ -3560,11 +3309,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - // ========================================================= - - // ========================================================= - // Abnormal Effect - NEED TO REMOVE ONCE L2CHARABNORMALEFFECT IS COMPLETE - // Data Field /** Map 32 bits (0x0000) containing all abnormal effect in progress. */ private int _AbnormalEffects; @@ -3576,85 +3320,33 @@ public abstract class L2Character extends L2Object implements ISkillsHolder /** The table containing the List of all stacked effect in progress for each Stack group Identifier. */ protected Map> _stackedEffects = new HashMap<>(); - /** The Constant ABNORMAL_EFFECT_BLEEDING. */ public static final int ABNORMAL_EFFECT_BLEEDING = 0x000001; - - /** The Constant ABNORMAL_EFFECT_POISON. */ public static final int ABNORMAL_EFFECT_POISON = 0x000002; - - /** The Constant ABNORMAL_EFFECT_REDCIRCLE. */ public static final int ABNORMAL_EFFECT_REDCIRCLE = 0x000004; - - /** The Constant ABNORMAL_EFFECT_ICE. */ public static final int ABNORMAL_EFFECT_ICE = 0x000008; - - /** The Constant ABNORMAL_EFFECT_WIND. */ public static final int ABNORMAL_EFFECT_WIND = 0x0000010; - - /** The Constant ABNORMAL_EFFECT_FEAR. */ public static final int ABNORMAL_EFFECT_FEAR = 0x0000020; - - /** The Constant ABNORMAL_EFFECT_STUN. */ public static final int ABNORMAL_EFFECT_STUN = 0x000040; - - /** The Constant ABNORMAL_EFFECT_SLEEP. */ public static final int ABNORMAL_EFFECT_SLEEP = 0x000080; - - /** The Constant ABNORMAL_EFFECT_MUTED. */ public static final int ABNORMAL_EFFECT_MUTED = 0x000100; - - /** The Constant ABNORMAL_EFFECT_ROOT. */ public static final int ABNORMAL_EFFECT_ROOT = 0x000200; - - /** The Constant ABNORMAL_EFFECT_HOLD_1. */ public static final int ABNORMAL_EFFECT_HOLD_1 = 0x000400; - - /** The Constant ABNORMAL_EFFECT_HOLD_2. */ public static final int ABNORMAL_EFFECT_HOLD_2 = 0x000800; - - /** The Constant ABNORMAL_EFFECT_UNKNOWN_13. */ public static final int ABNORMAL_EFFECT_UNKNOWN_13 = 0x001000; - - /** The Constant ABNORMAL_EFFECT_BIG_HEAD. */ public static final int ABNORMAL_EFFECT_BIG_HEAD = 0x002000; - - /** The Constant ABNORMAL_EFFECT_FLAME. */ public static final int ABNORMAL_EFFECT_FLAME = 0x004000; - - /** The Constant ABNORMAL_EFFECT_UNKNOWN_16. */ public static final int ABNORMAL_EFFECT_UNKNOWN_16 = 0x008000; - - /** The Constant ABNORMAL_EFFECT_GROW. */ public static final int ABNORMAL_EFFECT_GROW = 0x010000; - - /** The Constant ABNORMAL_EFFECT_FLOATING_ROOT. */ public static final int ABNORMAL_EFFECT_FLOATING_ROOT = 0x020000; - - /** The Constant ABNORMAL_EFFECT_DANCE_STUNNED. */ public static final int ABNORMAL_EFFECT_DANCE_STUNNED = 0x040000; - - /** The Constant ABNORMAL_EFFECT_FIREROOT_STUN. */ public static final int ABNORMAL_EFFECT_FIREROOT_STUN = 0x080000; - - /** The Constant ABNORMAL_EFFECT_STEALTH. */ public static final int ABNORMAL_EFFECT_STEALTH = 0x100000; - - /** The Constant ABNORMAL_EFFECT_IMPRISIONING_1. */ public static final int ABNORMAL_EFFECT_IMPRISIONING_1 = 0x200000; - - /** The Constant ABNORMAL_EFFECT_IMPRISIONING_2. */ public static final int ABNORMAL_EFFECT_IMPRISIONING_2 = 0x400000; - - /** The Constant ABNORMAL_EFFECT_MAGIC_CIRCLE. */ public static final int ABNORMAL_EFFECT_MAGIC_CIRCLE = 0x800000; - - /** The Constant ABNORMAL_EFFECT_CONFUSED. */ public static final int ABNORMAL_EFFECT_CONFUSED = 0x0020; - - /** The Constant ABNORMAL_EFFECT_AFRAID. */ public static final int ABNORMAL_EFFECT_AFRAID = 0x0010; - // Method - Public /** * Launch and add L2Effect (including Stack Group management) to L2Character and update client magic icone.
    *
    @@ -3713,7 +3405,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } else { - // newEffect.exit(false); newEffect.stopEffectTask(); return; } @@ -3871,9 +3562,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // Add the new effect to the Stack list in function of its position in the Stack group stackQueue.add(i, newStackedEffect); - // skill.exit() could be used, if the users don't wish to see "effect - // removed" always when a timer goes off, even if the buff isn't active - // any more (has been replaced). but then check e.g. npc hold and raid petrify. + // skill.exit() could be used, if the users don't wish to see "effect removed" always when a timer goes off, even if the buff isn't active any more (has been replaced). but then check e.g. npc hold and raid petrify. if (Config.EFFECT_CANCELING && !newStackedEffect.isHerbEffect() && (stackQueue.size() > 1)) { synchronized (_effects) @@ -3907,7 +3596,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ public final void removeEffect(L2Effect effect) { - if (effect == null/* || _effects == null */) + if (effect == null) { return; } @@ -4298,7 +3987,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder continue; } - // LOGGER.info("Character Effect Type: "+effects[i].getEffectType()); if (effect.getEffectType() == type) { effect.exit(true); @@ -4626,13 +4314,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return; // nothing to do (should not happen) } - // Add special effects - // Note: Now handled by EtcStatusUpdate packet - // NOTE: CHECK IF THEY WERE EVEN VISIBLE TO OTHERS... - /* - * if (player != null && mi != null) { if (player.getWeightPenalty() > 0) mi.addEffect(4270, player.getWeightPenalty(), -1); if (player.getExpertisePenalty() > 0) mi.addEffect(4267, 1, -1); if (player.getMessageRefusal()) mi.addEffect(4269, 1, -1); } - */ - // Go through all effects if any synchronized (_effects) { @@ -4707,7 +4388,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - // Property - Public /** * Return a map of 16 bits (0x0000) containing all abnormal effect in progress for this L2Character.
    *
    @@ -4960,19 +4640,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return null; } - // ========================================================= - // NEED TO ORGANIZE AND MOVE TO PROPER PLACE /** * This class permit to the L2Character AI to obtain informations and uses L2Character method. */ public class AIAccessor { - /** - * Instantiates a new aI accessor. - */ public AIAccessor() { - // null } /** @@ -5077,101 +4751,39 @@ public abstract class L2Character extends L2Object implements ISkillsHolder public static class MoveData { // when we retrieve x/y/z we use GameTimeControl.getGameTicks() - // if we are moving, but move timestamp==gameticks, we don't need - // to recalculate position - /** The _move start time. */ + // if we are moving, but move timestamp==gameticks, we don't need to recalculate position + public int _moveStartTime; - - /** The _move timestamp. */ public int _moveTimestamp; - - /** The _x destination. */ public int _xDestination; - - /** The _y destination. */ public int _yDestination; - - /** The _z destination. */ public int _zDestination; - - /** The _x accurate. */ public double _xAccurate; - - /** The _y accurate. */ public double _yAccurate; - - /** The _z accurate. */ public double _zAccurate; - - /** The _heading. */ public int _heading; - - /** The disregarding geodata. */ public boolean disregardingGeodata; - - /** The on geodata path index. */ public int onGeodataPathIndex; - - /** The geo path. */ public List geoPath; - - /** The geo path accurate tx. */ public int geoPathAccurateTx; - - /** The geo path accurate ty. */ public int geoPathAccurateTy; - - /** The geo path gtx. */ public int geoPathGtx; - - /** The geo path gty. */ public int geoPathGty; } - /** Table containing all skillId that are disabled. */ protected List _disabledSkills; - - /** The _all skills disabled. */ private boolean _allSkillsDisabled; - - // private int _flyingRunSpeed; - // private int _floatingWalkSpeed; - // private int _flyingWalkSpeed; - // private int _floatingRunSpeed; - - /** Movement data of this L2Character. */ protected MoveData _move; private boolean _cursorKeyMovement = false; - - /** Orientation of the L2Character. */ private int _heading; - - /** L2Charcater targeted by the L2Character. */ private L2Object _target; - - // set by the start of casting, in game ticks - /** The _cast end time. */ private int _castEndTime; - - /** The _cast interrupt time. */ private int _castInterruptTime; - - // set by the start of casting, in game ticks - /** The _cast potion end time. */ private int _castPotionEndTime; - - /** The _cast potion interrupt time. */ @SuppressWarnings("unused") private int _castPotionInterruptTime; - - // set by the start of attack, in game ticks - /** The _attack end time. */ int _attackEndTime; - - /** The _attacking. */ private int _attacking; - - /** The _disable bow attack end time. */ private int _disableBowAttackEndTime; /** Table of calculators containing all standard NPC calculator (ex : ACCURACY_COMBAT, EVASION_RATE. */ @@ -5181,25 +4793,12 @@ public abstract class L2Character extends L2Object implements ISkillsHolder NPC_STD_CALCULATOR = Formulas.getInstance().getStdNPCCalculators(); } - /** The _ai. */ protected L2CharacterAI _ai; - - /** Future Skill Cast. */ protected Future _skillCast; - - /** Future Potion Cast. */ protected Future _potionCast; - - /** Char Coords from Client. */ private int _clientX; - - /** The _client y. */ private int _clientY; - - /** The _client z. */ private int _clientZ; - - /** The _client heading. */ private int _clientHeading; /** List of all QuestState instance that needs to be notified of this character's death. */ @@ -5519,11 +5118,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder su.addAttribute(StatusUpdate.CAST_SPD, getStat().getMAtkSpd()); } - // else if (stat==Stats.MAX_HP) // - // { - // if (su == null) su = new StatusUpdate(getObjectId()); - // su.addAttribute(StatusUpdate.MAX_HP, getStat().getMaxHp()); - // } else if (stat == Stats.MAX_CP) { if (this instanceof L2PcInstance) @@ -5536,11 +5130,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder su.addAttribute(StatusUpdate.MAX_CP, getStat().getMaxCp()); } } - // else if (stat==Stats.MAX_MP) - // { - // if (su == null) su = new StatusUpdate(getObjectId()); - // su.addAttribute(StatusUpdate.MAX_MP, getStat().getMaxMp()); - // } else if (stat == Stats.RUN_SPEED) { broadcastFull = true; @@ -5933,9 +5522,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder broadcastPacket(new MagicSkillCanceld(getObjectId())); // broadcast packet to stop animations client-side sendPacket(ActionFailed.STATIC_PACKET); // send an "action failed" packet to the caster } - /* - * can't abort potion cast if(isCastingPotionNow()){ _castPotionEndTime = 0; _castPotionInterruptTime = 0; if(_potionCast != null) { _potionCast.cancel(true); _potionCast = null; } } - */ } /** @@ -6058,8 +5644,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy) + (dz * dz)); } - // if (Config.DEVELOPER) LOGGER.warning("Move Ticks:" + (gameTicks - m._moveTimestamp) + ", distPassed:" + distPassed + ", distFraction:" + distFraction); - if (distFraction > 1) { // Set the position of the L2Character to the destination @@ -6259,7 +5843,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return _target; } - // called from AIAccessor only /** * Calculate movement data for a move to location action and add the L2Character to movingObjects of GameTimeController (only called by AI Accessor).
    *
    @@ -6672,8 +6255,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000); } - // the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive - // to destination by GameTimeController + // the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController // Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers broadcastPacket(new CharMoveToLocation(this)); @@ -6861,84 +6443,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return ((dx * dx) + (dy * dy)) <= (radius * radius); } - // /** - // * event that is called when the destination coordinates are reached - // */ - // public void onTargetReached() - // { - // L2Character pawn = getPawnTarget(); - // - // if (pawn != null) - // { - // int x = pawn.getX(), y=pawn.getY(),z = pawn.getZ(); - // - // double distance = getDistance(x,y); - // if (getCurrentState() == STATE_FOLLOW) - // { - // calculateMovement(x,y,z,distance); - // return; - // } - // - // // takes care of moving away but distance is 0 so i won't follow problem - // - // - // if (((distance > getAttackRange()) && (getCurrentState() == STATE_ATTACKING)) || (pawn.isMoving() && getCurrentState() != STATE_ATTACKING)) - // { - // calculateMovement(x,y,z,distance); - // return; - // } - // - // } - // // update x,y,z with the current calculated position - // stopMove(); - // - // if (Config.DEBUG) - // LOGGER.fine(this.getName() +":: target reached at: x "+getX()+" y "+getY()+ " z:" + getZ()); - // - // if (getPawnTarget() != null) - // { - // - // setPawnTarget(null); - // setMovingToPawn(false); - // } - // } - // - // public void setTo(int x, int y, int z, int heading) - // { - // setX(x); - // setY(y); - // setZ(z); - // setHeading(heading); - // updateCurrentWorldRegion(); - // if (isMoving()) - // { - // setCurrentState(STATE_IDLE); - // StopMove setto = new StopMove(this); - // broadcastPacket(setto); - // } - // else - // { - // ValidateLocation setto = new ValidateLocation(this); - // broadcastPacket(setto); - // } - // - // FinishRotation fr = new FinishRotation(this); - // broadcastPacket(fr); - // } - - // protected void startCombat() - // { - // if (_currentAttackTask == null )//&& !isInCombat()) - // { - // _currentAttackTask = ThreadPoolManager.scheduleMed(new AttackTask(), 0); - // } - // else - // { - // LOGGER.info("multiple attacks want to start in parallel. prevented."); - // } - // } - // - /** * Return the Weapon Expertise Penalty of the L2Character.
    *
    @@ -7071,9 +6575,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (((this instanceof L2NpcInstance) && target.isAlikeDead()) || target.isDead() || (!getKnownList().knowsObject(target) && !(this instanceof L2DoorInstance))) { - // getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null); getAI().notifyEvent(CtrlEvent.EVT_CANCEL); - sendPacket(ActionFailed.STATIC_PACKET); return; } @@ -7107,10 +6609,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // check on BossZone raid lvl if (!(target instanceof L2Playable) && !(target instanceof L2SummonInstance)) - { // this must work just on mobs/raids - + { + // this must work just on mobs/raids if ((target.isRaid() && (getLevel() > (target.getLevel() + 8))) || (!(target instanceof L2PcInstance) && ((target.getTarget() != null) && (target.getTarget() instanceof L2RaidBossInstance) && (getLevel() > (((L2RaidBossInstance) target.getTarget()).getLevel() + 8)))) || (!(target instanceof L2PcInstance) && ((target.getTarget() != null) && (target.getTarget() instanceof L2GrandBossInstance) && (getLevel() > (((L2GrandBossInstance) target.getTarget()).getLevel() + 8))))) - { to_be_cursed = true; } @@ -7127,8 +6628,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder boss_id = boss_zone.getBossId(); } - // boolean alive = false; - if (boss_id != -1) { boss_template = NpcTable.getInstance().getTemplate(boss_id); @@ -7142,7 +6641,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder final StatsSet actual_boss_stat = RaidBossSpawnManager.getInstance().getStatsSet(boss_id); if (actual_boss_stat != null) { - // alive = actual_boss_stat.getLong("respawnTime") == 0; boss_instance = RaidBossSpawnManager.getInstance().getBoss(boss_id); } } @@ -7151,13 +6649,12 @@ public abstract class L2Character extends L2Object implements ISkillsHolder final StatsSet actual_boss_stat = GrandBossManager.getInstance().getStatsSet(boss_id); if (actual_boss_stat != null) { - // alive = actual_boss_stat.getLong("respawn_time") == 0; boss_instance = GrandBossManager.getInstance().getBoss(boss_id); } } // max allowed rage into take cursed is 3000 - if ((boss_instance != null/* && alive */) && boss_instance.isInsideRadius(this, 3000, false, false)) + if ((boss_instance != null) && boss_instance.isInsideRadius(this, 3000, false, false)) { to_be_cursed = true; } @@ -7267,8 +6764,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (shld) { enemy.sendPacket(SystemMessageId.SHIELD_DEFENCE_SUCCESSFULL); - // else if (!miss && damage < 1) - // enemy.sendMessage("You hit the target's armor."); } } else if (target instanceof L2Summon) @@ -7304,12 +6799,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (absorbDamage > 0) { setCurrentHp(getStatus().getCurrentHp() + absorbDamage); - - // Custom messages - nice but also more network load - /* - * if (this instanceof L2PcInstance) ((L2PcInstance)this).sendMessage("You absorbed " + absorbDamage + " damage."); else if (this instanceof L2Summon) ((L2Summon)this).getOwner().sendMessage("Summon absorbed " + absorbDamage + " damage."); else if (Config.DEBUG) - * LOGGER.info(getName() + " absorbed " + absorbDamage + " damage."); - */ } } @@ -7327,12 +6816,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } getStatus().reduceHp(reflectedDamage, target, true); - - // Custom messages - nice but also more network load - /* - * if (target instanceof L2PcInstance) ((L2PcInstance)target).sendMessage("You reflected " + reflectedDamage + " damage."); else if (target instanceof L2Summon) ((L2Summon)target).getOwner().sendMessage("Summon reflected " + reflectedDamage + " damage."); if (this instanceof - * L2PcInstance) ((L2PcInstance)this).sendMessage("Target reflected to you " + reflectedDamage + " damage."); else if (this instanceof L2Summon) ((L2Summon)this).getOwner().sendMessage("Target reflected to your summon " + reflectedDamage + " damage."); - */ } } @@ -7370,15 +6853,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder activeWeapon.getSkillEffects(this, target, crit); } - /* - * COMMENTED OUT BY nexus - 2006-08-17 We must not discharge the soulshouts at the onHitTimer method, as this can cause unwanted soulshout consumption if the attacker recharges the soulshot right after an attack request but before his hit actually lands on the target. The soulshot - * discharging has been moved to the doAttack method: As soon as we know that we didn't missed the hit there, then we must discharge any charged soulshots. - */ - /* - * L2ItemInstance weapon = getActiveWeaponInstance(); if (!miss) { if (this instanceof L2Summon && !(this instanceof L2PetInstance)) { if (((L2Summon)this).getChargedSoulShot() != L2ItemInstance.CHARGED_NONE) ((L2Summon)this).setChargedSoulShot(L2ItemInstance.CHARGED_NONE); } else { if - * (weapon != null && weapon.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE) weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); } } - */ - if ((this instanceof L2PcInstance) && ((L2PcInstance) this).isMovingTaskDefined()) { final L2ItemInstance rhand = ((L2PcInstance) this).getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); @@ -7453,7 +6927,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ protected void reduceArrowCount() { - // default is to do nothin + // default is to do nothing } /** @@ -7616,7 +7090,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } // Right now only L2PcInstance has up-to-date zone status... - // L2PcInstance src = null; L2PcInstance dst = null; @@ -7676,24 +7149,16 @@ public abstract class L2Character extends L2Object implements ISkillsHolder else if (src.isInStartedVIPEvent() && dst.isInStartedVIPEvent()) { return false; - // else - // different events in same location --> already checked } } } - if ((attacker instanceof L2Character) && ((L2Character) attacker).isInsideZone(ZoneId.PEACE) - // the townzone has to be already peace zone - // || TownManager.getInstance().getTown(attacker.getX(), attacker.getY(), attacker.getZ())!= null - ) + if ((attacker instanceof L2Character) && ((L2Character) attacker).isInsideZone(ZoneId.PEACE)) { return true; } - if ((target instanceof L2Character) && ((L2Character) target).isInsideZone(ZoneId.PEACE) - // the townzone has to be already peace zone - // || TownManager.getInstance().getTown(target.getX(), target.getY(), target.getZ())!= null - ) + if ((target instanceof L2Character) && ((L2Character) target).isInsideZone(ZoneId.PEACE)) { return true; } @@ -7772,7 +7237,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder case DAGGER: { atkSpd = getStat().getPAtkSpd(); - // atkSpd /= 1.15; break; } default: @@ -7810,7 +7274,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return 0; } - // else if (reuse < 10) reuse = 1500; reuse *= getStat().getReuseModifier(target); final double atkSpd = getStat().getPAtkSpd(); @@ -7883,13 +7346,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder removeSkill(oldSkill.getTriggeredId(), true); } removeStatsOwner(oldSkill); - - // final Func[] skill_funcs = oldSkill.getStatFuncs(null, this); - - // // Remove old func if single effect skill is defined - // if(newSkill.is_singleEffect() - // && skill_funcs.length>0) - // removeStatFuncs(skill_funcs); } // Add Func objects of newSkill to the calculator set of the L2Character @@ -7989,7 +7445,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return null; } - // Remove the skill from the L2Character _skills return removeSkill(skill.getId()); } @@ -8135,7 +7590,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } if (((e.getSkill().getSkillType() == SkillType.BUFF) || (e.getSkill().getId() == 1416) || (e.getSkill().getSkillType() == SkillType.REFLECT) || (e.getSkill().getSkillType() == SkillType.HEAL_PERCENT) || (e.getSkill().getSkillType() == SkillType.MANAHEAL_PERCENT)) && ((e.getSkill().getId() <= 4360) || (e.getSkill().getId() >= 4367))) // 7s - // buffs { numBuffs++; } @@ -8431,11 +7885,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } targetList.add((L2Character) targets[i]); } - // else - // { - // if (Config.DEBUG) - // LOGGER.warning("Class cast bad: "+targets[i].getClass().toString()); - // } } if (targetList.isEmpty() && (skill.getTargetType() != SkillTargetType.TARGET_AURA)) { @@ -8475,9 +7924,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _castInterruptTime = 0; return; } - } /* - * else{ if(!isCastingPotionNow()) { _potionCast = null; enableAllSkills(); getAI().notifyEvent(CtrlEvent.EVT_CANCEL); _castPotionEndTime = 0; _castPotionInterruptTime = 0; return; } } - */ + } // Get the display identifier of the skill final int magicId = skill.getDisplayId(); @@ -8505,9 +7952,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - /* - * Runs in the end of skill casting - */ /** * On magic hit timer. * @param targets the targets @@ -8686,9 +8130,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - /* - * Runs after skill hitTime+coolTime - */ /** * On magic finalizer. * @param targets the targets @@ -8712,8 +8153,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // if the skill has changed the character's state to something other than STATE_CASTING // then just leave it that way, otherwise switch back to STATE_IDLE. - // if(isCastingNow()) - // getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null); if ((skill.getId() != 345) && (skill.getId() != 346)) { // Like L2OFF while use a skill and next interntion == null the char stop auto attack @@ -8775,9 +8214,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder notifyQuestEventSkillFinished(skill, _target); - /* - * If character is a player, then wipe their current cast state and check if a skill is queued. If there is a queued skill, launch it and wipe the queue. - */ + // If character is a player, then wipe their current cast state and check if a skill is queued. If there is a queued skill, launch it and wipe the queue. if (this instanceof L2PcInstance) { L2PcInstance currPlayer = (L2PcInstance) this; @@ -8825,7 +8262,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - // Quest event ON_SPELL_FNISHED /** * Notify quest event skill finished. * @param skill the skill @@ -9075,11 +8511,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder } } - /* - * LOGGER.info("--"+skill.getId()); L2Weapon activeWeapon = getActiveWeaponItem(); // Launch weapon Special ability skill effect if available if(activeWeapon != null && !((L2Character) target).isDead()) { if(activeWeapon.getSkillEffects(this, player, skill).length > 0 && this - * instanceof L2PcInstance) { sendPacket(SystemMessage.sendString("Target affected by weapon special ability!")); } } - */ - if (target instanceof L2Character) { final L2Character targ = (L2Character) target; @@ -9105,8 +8536,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder // check on BossZone raid lvl if (!(player.getTarget() instanceof L2Playable) && !(player.getTarget() instanceof L2SummonInstance)) - { // this must work just on mobs/raids - + { + // this must work just on mobs/raids if ((player.isRaid() && (getLevel() > (player.getLevel() + 8))) || (!(player instanceof L2PcInstance) && ((player.getTarget() != null) && (player.getTarget() instanceof L2RaidBossInstance) && (getLevel() > (((L2RaidBossInstance) player.getTarget()).getLevel() + 8)))) || (!(player instanceof L2PcInstance) && ((player.getTarget() != null) && (player.getTarget() instanceof L2GrandBossInstance) && (getLevel() > (((L2GrandBossInstance) player.getTarget()).getLevel() + 8))))) { to_be_cursed = true; @@ -9124,8 +8555,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder boss_id = boss_zone.getBossId(); } - // boolean alive = false; - if (boss_id != -1) { boss_template = NpcTable.getInstance().getTemplate(boss_id); @@ -9139,7 +8568,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder final StatsSet actual_boss_stat = RaidBossSpawnManager.getInstance().getStatsSet(boss_id); if (actual_boss_stat != null) { - // alive = actual_boss_stat.getLong("respawnTime") == 0; boss_instance = RaidBossSpawnManager.getInstance().getBoss(boss_id); } } @@ -9148,7 +8576,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder final StatsSet actual_boss_stat = GrandBossManager.getInstance().getStatsSet(boss_id); if (actual_boss_stat != null) { - // alive = actual_boss_stat.getLong("respawn_time") == 0; boss_instance = GrandBossManager.getInstance().getBoss(boss_id); } } @@ -9302,10 +8729,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder default: { ((L2Character) target).addAttackerToAttackByList(this); - /* - * ((L2Character) target).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this); - Deprecated Notify the AI that is being attacked. It should be notified once the skill is finished in order to avoid AI action previous to skill end. IE: Backstab on monsters, the AI - * rotates previous to skill end so it doesn't make affect. We calculate the hit time to know when the AI should rotate. - */ int hitTime = Formulas.getInstance().calcMAtkSpd(activeChar, skill, skill.getHitTime()); if ((checkBss() || checkSps()) && !skill.isStaticHitTime() && !skill.isPotion() && skill.isMagic()) { @@ -9370,10 +8793,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return; } - } /* - * TODO else { if(this instanceof L2PcInstance || this instanceof L2Summon) { L2PcInstance caster = this instanceof L2PcInstance ? (L2PcInstance) this : ((L2Summon) this).getOwner(); for(L2Object target : targets) { if(target instanceof L2NpcInstance) { if (((L2NpcInstance) - * target).getTemplate().getEventQuests(Quest.QuestEventType.ON_SKILL_USE) != null) { for(Quest quest : ((L2NpcInstance) target).getTemplate().getEventQuests(Quest.QuestEventType.ON_SKILL_USE)) { quest.notifySkillUse((L2NpcInstance) target, caster, skill); } } } } caster = null; } } - */ + } // Check if over-hit is possible if (skill.isOverhit()) @@ -9762,31 +9182,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ public void updatePvPFlag(int value) { - // Overridden in L2PcInstance - // - // if (!(this instanceof L2PcInstance)) - // return; - // L2PcInstance player = (L2PcInstance)this; - // if (player.getPvpFlag() == value) - // return; - // player.setPvpFlag(value); - // - // player.sendPacket(new UserInfo(player)); - // for (L2PcInstance target : getKnownList().getKnownPlayers().values()) - // { - // target.sendPacket(new RelationChanged(player, player.getRelation(player), player.isAutoAttackable(target))); - // } } - // public void checkPvPFlag() - // { - // if (Config.DEBUG) LOGGER.fine("Checking PvpFlag"); - // _PvPRegTask = ThreadPoolManager.scheduleLowAtFixedRate(new PvPFlag(), 1000, 5000); - // _PvPRegActive = true; - // // LOGGER.fine("PvP recheck"); - // } - // - /** * Return a Random Damage in function of the weapon.
    *
    @@ -9805,10 +9202,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return weaponItem.getRandomDamage(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#toString() - */ @Override public String toString() { @@ -9831,11 +9224,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder */ public abstract int getLevel(); - // ========================================================= - - // ========================================================= - // Stat - NEED TO REMOVE ONCE L2CHARSTAT IS COMPLETE - // Property - Public /** * Calc stat. * @param stat the stat @@ -10297,11 +9685,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return getStat().getWIT(); } - // ========================================================= - - // ========================================================= - // Status - NEED TO REMOVE ONCE L2CHARTATUS IS COMPLETE - // Method - Public /** * Adds the status listener. * @param object the object @@ -10415,7 +9798,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder getStatus().stopHpMpRegeneration(); } - // Property - Public /** * Gets the current cp. * @return the current cp @@ -10525,8 +9907,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder getStatus().setCurrentMp(newMp); } - // ========================================================= - /** * Sets the ai class. * @param aiClass the new ai class @@ -10545,10 +9925,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return _aiClass; } - /* - * public L2Character getLastBuffer() { return _lastBuffer; } - */ - /** * Sets the champion. * @param champ the new champion @@ -10576,10 +9952,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder return _lastHealAmount; } - /* - * public void setLastBuffer(L2Character buffer) { _lastBuffer = buffer; } - */ - /** * Sets the last heal amount. * @param hp the new last heal amount @@ -10817,7 +10189,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; - // ponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } } // If there is no weapon equipped, check for an active summon. @@ -10828,7 +10199,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; - // activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } } @@ -10878,7 +10248,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) { ss = true; - // weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } } // If there is no weapon equipped, check for an active summon. @@ -10889,7 +10258,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT) { ss = true; - // activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } } @@ -10939,7 +10307,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (weaponInst.getChargedSoulshot() == L2ItemInstance.CHARGED_SOULSHOT) { ss = true; - // weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } } // If there is no weapon equipped, check for an active summon. @@ -10950,7 +10317,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder if (activeSummon.getChargedSoulShot() == L2ItemInstance.CHARGED_SOULSHOT) { ss = true; - // activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } } @@ -11093,7 +10459,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder _isAttackDisabled = value; } - /* + /** * AI not. Task */ static class notifyAiTaskDelayed implements Runnable diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Playable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Playable.java index d318b7923a..06324a9188 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Playable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Playable.java @@ -34,16 +34,9 @@ import com.l2jmobius.gameserver.templates.chars.L2CharTemplate; */ public abstract class L2Playable extends L2Character { - /** The _is noblesse blessed. */ private boolean _isNoblesseBlessed = false; // for Noblesse Blessing skill, restores buffs after death - - /** The _get charm of luck. */ private boolean _getCharmOfLuck = false; // Charm of Luck - During a Raid/Boss war, decreased chance for death penalty - - /** The _is phoenix blessed. */ private boolean _isPhoenixBlessed = false; // for Soul of The Phoenix or Salvation buffs - - /** The _ protection blessing. */ private boolean _ProtectionBlessing = false; /** @@ -64,10 +57,6 @@ public abstract class L2Playable extends L2Character getStatus(); // init status } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getKnownList() - */ @Override public PlayableKnownList getKnownList() { @@ -78,10 +67,6 @@ public abstract class L2Playable extends L2Character return (PlayableKnownList) super.getKnownList(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getStat() - */ @Override public PlayableStat getStat() { @@ -92,10 +77,6 @@ public abstract class L2Playable extends L2Character return (PlayableStat) super.getStat(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getStatus() - */ @Override public PlayableStatus getStatus() { @@ -106,10 +87,6 @@ public abstract class L2Playable extends L2Character return (PlayableStatus) super.getStatus(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#doDie(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean doDie(L2Character killer) { @@ -205,13 +182,8 @@ public abstract class L2Playable extends L2Character } return true; - /* - * Even at war, there should be PvP flag if( player.getClan() == null || targetPlayer.getClan() == null || ( !targetPlayer.getClan().isAtWarWith(player.getClanId()) && targetPlayer.getWantsPeace() == 0 && player.getWantsPeace() == 0 ) ) { return true; } return false; - */ } - // ==================================== DONT EVEN THINK!! ====================================// - /** * Return True.
    *
    @@ -225,8 +197,7 @@ public abstract class L2Playable extends L2Character private L2Effect _lastNoblessEffect = null; - // Support for Noblesse Blessing skill, where buffs are retained - // after resurrect + // Support for Noblesse Blessing skill, where buffs are retained after resurrect /** * Checks if is noblesse blessed. * @return true, if is noblesse blessed diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index 3c7fd682ff..662ada642a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -54,8 +54,6 @@ import com.l2jmobius.gameserver.templates.item.L2Weapon; public abstract class L2Summon extends L2Playable { - // private static Logger LOGGER = Logger.getLogger(L2Summon.class); - protected int _pkKills; private L2PcInstance _owner; private int _attackRange = 36; // Melee range @@ -66,8 +64,7 @@ public abstract class L2Summon extends L2Playable private int _chargedSoulShot; private int _chargedSpiritShot; - // TODO: currently, all servitors use 1 shot. However, this value - // should vary depending on the servitor template (id and level)! + // TODO: currently, all servitors use 1 shot. However, this value should vary depending on the servitor template (id and level)! private final int _soulShotsPerHit = 1; private final int _spiritShotsPerHit = 1; protected boolean _showSummonAnimation; @@ -76,7 +73,6 @@ public abstract class L2Summon extends L2Playable { protected AIAccessor() { - // null } public L2Summon getSummon() @@ -212,7 +208,7 @@ public abstract class L2Summon extends L2Playable MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()); player.sendPacket(my); - // update status hp&mp + // update status hp and mp StatusUpdate su = new StatusUpdate(getObjectId()); su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp()); su.addAttribute(StatusUpdate.MAX_HP, getMaxHp()); @@ -429,11 +425,6 @@ public abstract class L2Summon extends L2Playable public synchronized void unSummon(L2PcInstance owner) { - /* - * if(isVisible() && !isDead()) { getAI().stopFollow(); owner.sendPacket(new PetDelete(getObjectId(), 2)); if(getWorldRegion() != null) { getWorldRegion().removeFromZones(this); } store(); giveAllToOwner(); decayMe(); getKnownList().removeAllKnownObjects(); owner.setPet(null); - * setTarget(null); } - */ - if (isVisible() && !isDead()) { stopAllEffects(); @@ -623,8 +614,6 @@ public abstract class L2Summon extends L2Playable return; } - // ************************************* Check Casting in Progress ******************************************* - // If a skill is currently being used if (isCastingNow()) { @@ -634,8 +623,6 @@ public abstract class L2Summon extends L2Playable // Set current pet skill _owner.setCurrentPetSkill(skill, forceUse, dontMove); - // ************************************* Check Target ******************************************* - // Get the target for the skill L2Object target = null; @@ -673,8 +660,6 @@ public abstract class L2Summon extends L2Playable return; } - // ************************************* Check skill availability ******************************************* - // Check if this skill is enabled (ex : reuse time) if (isSkillDisabled(skill) && (_owner != null) && _owner.getAccessLevel().allowPeaceAttack()) { @@ -690,8 +675,6 @@ public abstract class L2Summon extends L2Playable return; } - // ************************************* Check Consumables ******************************************* - // Check if the summon has enough MP if (getCurrentMp() < (getStat().getMpConsume(skill) + getStat().getMpInitialConsume(skill))) { @@ -716,8 +699,6 @@ public abstract class L2Summon extends L2Playable return; } - // ************************************* Check Summon State ******************************************* - // Check if this is offensive magic skill if (skill.isOffensive()) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/appearance/PcAppearance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/appearance/PcAppearance.java index 78d1f15d89..f33fe4071a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/appearance/PcAppearance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/appearance/PcAppearance.java @@ -18,21 +18,16 @@ package com.l2jmobius.gameserver.model.actor.appearance; public class PcAppearance { - // ========================================================= - // Data Field private byte _face; private byte _hairColor; private byte _hairStyle; private boolean _sex; // Female true(1) - /** true if the player is invisible */ private boolean _invisible = false; /** The hexadecimal Color of players name (white is 0xFFFFFF) */ private int _nameColor = 0xFFFFFF; /** The hexadecimal Color of players name (white is 0xFFFFFF) */ private int _titleColor = 0xFFFF77; - // ========================================================= - // Constructor public PcAppearance(byte Face, byte HColor, byte HStyle, boolean Sex) { _face = Face; @@ -41,22 +36,11 @@ public class PcAppearance _sex = Sex; } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public public final byte getFace() { return _face; } - /** - * @param value - */ public final void setFace(int value) { _face = (byte) value; @@ -67,9 +51,6 @@ public class PcAppearance return _hairColor; } - /** - * @param value - */ public final void setHairColor(int value) { _hairColor = (byte) value; @@ -80,9 +61,6 @@ public class PcAppearance return _hairStyle; } - /** - * @param value - */ public final void setHairStyle(int value) { _hairStyle = (byte) value; @@ -93,9 +71,6 @@ public class PcAppearance return _sex; } - /** - * @param isfemale - */ public final void setSex(boolean isfemale) { _sex = isfemale; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AdventurerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AdventurerInstance.java index 308fbafde3..6db6b02681 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AdventurerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AdventurerInstance.java @@ -29,8 +29,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2AdventurerInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2AdventurerInstance.class); - public L2AdventurerInstance(int objectId, L2NpcTemplate template) { super(objectId, template); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ArtefactInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ArtefactInstance.java index 7ea401e3b8..60f3def70d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ArtefactInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ArtefactInstance.java @@ -97,8 +97,8 @@ public final class L2ArtefactInstance extends L2NpcInstance // Send a Server->Client packet ValidateLocation to correct the L2ArtefactInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); - } else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + } + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AuctioneerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AuctioneerInstance.java index 20f6acae0b..f75cd9f911 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AuctioneerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2AuctioneerInstance.java @@ -73,8 +73,7 @@ public final class L2AuctioneerInstance extends L2FolkInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BabyPetInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BabyPetInstance.java index 76e6451741..2fa3b9014f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BabyPetInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BabyPetInstance.java @@ -70,8 +70,7 @@ public final class L2BabyPetInstance extends L2PetInstance _weakHeal = skill1; _strongHeal = skill1; } - else // arrange the weak and strong skills appropriately - if (skill1.getPower() > skill2.getPower()) + else if (skill1.getPower() > skill2.getPower()) // arrange the weak and strong skills appropriately { _weakHeal = skill2; _strongHeal = skill1; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoatInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoatInstance.java index 384ece001a..8cdff7b556 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoatInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoatInstance.java @@ -110,12 +110,8 @@ public class L2BoatInstance extends L2Character loadBoatPath(); } - /** - * @param line - */ public void parseLine(String line) { - // L2BoatPath bp = new L2BoatPath(); _path = new HashMap<>(); StringTokenizer st = new StringTokenizer(line, ";"); Integer.parseInt(st.nextToken()); @@ -213,11 +209,6 @@ public class L2BoatInstance extends L2Character } } - /** - * @param state - * @param _boat - * @return - */ public int state(int state, L2BoatInstance _boat) { if (state < max) @@ -232,7 +223,6 @@ public class L2BoatInstance extends L2Character _boat.getPosition().setHeading((int) (Math.atan2(-sin, -cos) * 10430.378350470452724949566316381) + 32768); _boat._vd = new VehicleDeparture(_boat, bp.speed1, bp.speed2, bp.x, bp.y, bp.z); - // _boat.getTemplate().baseRunSpd = bp.speed1; boatSpeed = bp.speed1; _boat.moveToLocation(bp.x, bp.y, bp.z, (float) bp.speed1); Collection knownPlayers = _boat.getKnownList().getKnownPlayers().values(); @@ -269,17 +259,10 @@ public class L2BoatInstance extends L2Character _name = name; } - /** - * @param x - * @param y - * @param z - * @param speed - */ public void moveToLocation(int x, int y, int z, float speed) { final int curX = getX(); final int curY = getY(); - // final int curZ = getZ(); // Calculate distance (dx,dy) between current position and destination final int dx = x - curX; @@ -301,9 +284,6 @@ public class L2BoatInstance extends L2Character // Create and Init a MoveData object MoveData m = new MoveData(); - // Caclulate the Nb of ticks between the current position and the destination - // int ticksToMove = (int) (GameTimeController.TICKS_PER_SECOND * distance / speed); - // Calculate and set the heading of the L2Character getPosition().setHeading((int) (Math.atan2(-sin, -cos) * 10430.378350470452724949566316381) + 32768); @@ -327,13 +307,9 @@ public class L2BoatInstance extends L2Character private final int _state; private final L2BoatInstance _boat; - /** - * @param i - * @param instance - */ - public BoatCaptain(int i, L2BoatInstance instance) + public BoatCaptain(int state, L2BoatInstance instance) { - _state = i; + _state = state; _boat = instance; } @@ -379,13 +355,9 @@ public class L2BoatInstance extends L2Character private int _state; private final L2BoatInstance _boat; - /** - * @param i - * @param instance - */ - public Boatrun(int i, L2BoatInstance instance) + public Boatrun(int state, L2BoatInstance instance) { - _state = i; + _state = state; _boat = instance; } @@ -450,16 +422,12 @@ public class L2BoatInstance extends L2Character { if (_runstate != 0) { - // _runstate++; Boatrun bc = new Boatrun(_runstate, this); ThreadPool.schedule(bc, 10); _runstate = 0; } } - /** - * @param activeChar - */ public void sendVehicleDeparture(L2PcInstance activeChar) { if (_vd != null) @@ -508,7 +476,6 @@ public class L2BoatInstance extends L2Character { if (player.getBoat() == this) { - // player.getKnownList().addKnownObject(this); player.getPosition().setXYZ(x, y, z); player.revalidateZone(false); } @@ -600,15 +567,12 @@ public class L2BoatInstance extends L2Character } } - /** - * @param i - */ - public void say(int i) + public void say(int id) { Collection knownPlayers = getKnownList().getKnownPlayers().values(); CreatureSay sm; PlaySound ps; - switch (i) + switch (id) { case 10: { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoxInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoxInstance.java index 92c06619f9..8498b93f8e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoxInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2BoxInstance.java @@ -66,20 +66,14 @@ public class L2BoxInstance extends L2NpcInstance public int itemid; public int id; public int count; - // public int enchant; public String name; - // public L2BoxItem() - // { - // // - // } public L2BoxItem(int _itemid, int _count, String _name, int _id/* , int _enchant */) { itemid = _itemid; count = _count; name = _name; id = _id; - // enchant = _enchant; } @Override @@ -100,7 +94,6 @@ public class L2BoxInstance extends L2NpcInstance } } - // private static Logger LOGGER = Logger.getLogger(L2BoxInstance.class); private static final int MAX_ITEMS_PER_PAGE = 25; private static final String INSERT_GRANT = "INSERT INTO boxaccess (charname,spawn) VALUES(?,?)"; private static final String DELETE_GRANT = "DELETE FROM boxaccess WHERE charname=? AND spawn=?"; @@ -149,7 +142,6 @@ public class L2BoxInstance extends L2NpcInstance else { super.onBypassFeedback(player, command); - // else LOGGER.info("onBypassFeedback unknown command "+command); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CabaleBufferInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CabaleBufferInstance.java index 70384ab3d4..0047f19af0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CabaleBufferInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CabaleBufferInstance.java @@ -59,8 +59,7 @@ public class L2CabaleBufferInstance extends L2NpcInstance // Send a Server->Client packet ValidateLocation to correct the L2ArtefactInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleBlacksmithInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleBlacksmithInstance.java index a1dde93a7c..22fc6446fd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleBlacksmithInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleBlacksmithInstance.java @@ -59,8 +59,7 @@ public class L2CastleBlacksmithInstance extends L2FolkInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleChamberlainInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleChamberlainInstance.java index a6f0209517..c7a27aeb8a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleChamberlainInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleChamberlainInstance.java @@ -49,8 +49,6 @@ import com.l2jmobius.gameserver.util.Util; */ public class L2CastleChamberlainInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2CastleChamberlainInstance.class); - protected static final int COND_ALL_FALSE = 0; protected static final int COND_BUSY_BECAUSE_OF_SIEGE = 1; protected static final int COND_OWNER = 2; @@ -83,8 +81,7 @@ public class L2CastleChamberlainInstance extends L2FolkInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -437,8 +434,7 @@ public class L2CastleChamberlainInstance extends L2FolkInstance return; } else if (command.startsWith("manor_menu_select")) - {// input string format: - // manor_menu_select?ask=X&state=Y&time=X + { if ((player.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) == L2Clan.CP_CS_MANOR_ADMIN) { if (CastleManorManager.getInstance().isUnderMaintenance()) @@ -466,7 +462,7 @@ public class L2CastleChamberlainInstance extends L2FolkInstance } switch (ask) - { // Main action + { case 3: // Current seeds (Manor info) { if ((time == 1) && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved()) @@ -632,10 +628,6 @@ public class L2CastleChamberlainInstance extends L2FolkInstance player.sendPacket(html); } - /* - * private void showVaultWindowDeposit(L2PcInstance player) { player.sendPacket(ActionFailed.STATIC_PACKET); player.setActiveWarehouse(player.getClan().getWarehouse()); player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.CLAN)); //Or Castle ?? } private void - * showVaultWindowWithdraw(L2PcInstance player) { player.sendPacket(ActionFailed.STATIC_PACKET); player.setActiveWarehouse(player.getClan().getWarehouse()); player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN)); //Or Castle ?? } - */ protected int validateCondition(L2PcInstance player) { if ((getCastle() != null) && (getCastle().getCastleId() > 0)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleMagicianInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleMagicianInstance.java index 25c147349c..ea8c41b675 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleMagicianInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleMagicianInstance.java @@ -29,13 +29,8 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2CastleMagicianInstance extends L2NpcInstance { - /** The Constant COND_ALL_FALSE. */ protected static final int COND_ALL_FALSE = 0; - - /** The Constant COND_BUSY_BECAUSE_OF_SIEGE. */ protected static final int COND_BUSY_BECAUSE_OF_SIEGE = 1; - - /** The Constant COND_OWNER. */ protected static final int COND_OWNER = 2; /** @@ -48,10 +43,6 @@ public class L2CastleMagicianInstance extends L2NpcInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#showChatWindow(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, int) - */ @Override public void showChatWindow(L2PcInstance player, int val) { @@ -84,10 +75,6 @@ public class L2CastleMagicianInstance extends L2NpcInstance player.sendPacket(html); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleTeleporterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleTeleporterInstance.java index 49d9b498e6..486b40ed62 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleTeleporterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleTeleporterInstance.java @@ -29,10 +29,8 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2CastleTeleporterInstance extends L2NpcInstance { - /** The Constant LOGGER. */ public static final Logger LOGGER = Logger.getLogger(L2CastleTeleporterInstance.class.getName()); - /** The _current task. */ private boolean _currentTask = false; /** @@ -45,10 +43,6 @@ public final class L2CastleTeleporterInstance extends L2NpcInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -82,10 +76,6 @@ public final class L2CastleTeleporterInstance extends L2NpcInstance super.onBypassFeedback(player, command); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#showChatWindow(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void showChatWindow(L2PcInstance player) { @@ -112,32 +102,18 @@ public final class L2CastleTeleporterInstance extends L2NpcInstance player.sendPacket(html); } - /** - * Oust all players. - */ void oustAllPlayers() { getCastle().oustAllPlayers(); } - /** - * The Class oustAllPlayers. - */ class oustAllPlayers implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { try { - /* - * CreatureSay cs = new CreatureSay(getObjectId(), 1, getName(), 1000443); // The defenders of $s1 castle will be teleported to the inner castle. cs.addStringParameter(getCastle().getName()); int region = MapRegionTable.getInstance().getMapRegion(getX(), getY()); - * Collection pls = L2World.getInstance().getAllPlayers(); //synchronized (L2World.getInstance().getAllPlayers()) { for (L2PcInstance player : pls) { if (region == MapRegionTable.getInstance().getMapRegion(player.getX(),player.getY())) player.sendPacket(cs); } } - */ oustAllPlayers(); setTask(false); } @@ -148,22 +124,13 @@ public final class L2CastleTeleporterInstance extends L2NpcInstance } } - /** - * Gets the task. - * @return the task - */ public boolean getTask() { return _currentTask; } - /** - * Sets the task. - * @param state the new task - */ public void setTask(boolean state) { _currentTask = state; } - } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleWarehouseInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleWarehouseInstance.java index 2cf955f680..a65c1e12e4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleWarehouseInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CastleWarehouseInstance.java @@ -30,13 +30,8 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2CastleWarehouseInstance extends L2FolkInstance { - /** The Constant COND_ALL_FALSE. */ protected static final int COND_ALL_FALSE = 0; - - /** The Constant COND_BUSY_BECAUSE_OF_SIEGE. */ protected static final int COND_BUSY_BECAUSE_OF_SIEGE = 1; - - /** The Constant COND_OWNER. */ protected static final int COND_OWNER = 2; /** @@ -131,10 +126,6 @@ public class L2CastleWarehouseInstance extends L2FolkInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -179,10 +170,6 @@ public class L2CastleWarehouseInstance extends L2FolkInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#showChatWindow(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, int) - */ @Override public void showChatWindow(L2PcInstance player, int val) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ChestInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ChestInstance.java index ae632ffc89..9f11a32391 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ChestInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ChestInstance.java @@ -119,78 +119,76 @@ public final class L2ChestInstance extends L2MonsterInstance { if (rnd >= 90) { - trapSkillId = 4139;// explosion + trapSkillId = 4139; // explosion } else if (rnd >= 50) { - trapSkillId = 4118;// area paralysys + trapSkillId = 4118; // area paralysys } else if (rnd >= 20) { - trapSkillId = 1167;// poison cloud + trapSkillId = 1167; // poison cloud } else { - trapSkillId = 223;// sting + trapSkillId = 223; // sting } } else if (getTemplate().level >= 41) { if (rnd >= 90) { - trapSkillId = 4139;// explosion + trapSkillId = 4139; // explosion } else if (rnd >= 60) { - trapSkillId = 96;// bleed + trapSkillId = 96; // bleed } else if (rnd >= 20) { - trapSkillId = 1167;// poison cloud + trapSkillId = 1167; // poison cloud } else { - trapSkillId = 4118;// area paralysys + trapSkillId = 4118; // area paralysys } } else if (getTemplate().level >= 21) { if (rnd >= 80) { - trapSkillId = 4139;// explosion + trapSkillId = 4139; // explosion } else if (rnd >= 50) { - trapSkillId = 96;// bleed + trapSkillId = 96; // bleed } else if (rnd >= 20) { - trapSkillId = 1167;// poison cloud + trapSkillId = 1167; // poison cloud } else { - trapSkillId = 129;// poison + trapSkillId = 129; // poison } - } else if (rnd >= 80) + } + else if (rnd >= 80) { - trapSkillId = 4139;// explosion + trapSkillId = 4139; // explosion } else if (rnd >= 50) { - trapSkillId = 96;// bleed + trapSkillId = 96; // bleed } else { - trapSkillId = 129;// poison + trapSkillId = 129; // poison } player.sendPacket(SystemMessage.sendString("There was a trap!")); handleCast(player, trapSkillId); } - // <-- - // cast casse - // <-- private boolean handleCast(L2Character player, int skillId) { int skillLevel = 1; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallManagerInstance.java index a7c06ba706..b480dc8648 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallManagerInstance.java @@ -47,19 +47,10 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2ClanHallManagerInstance extends L2FolkInstance { - /** The Constant COND_OWNER_FALSE. */ protected static final int COND_OWNER_FALSE = 0; - - /** The Constant COND_ALL_FALSE. */ protected static final int COND_ALL_FALSE = 1; - - /** The Constant COND_BUSY_BECAUSE_OF_SIEGE. */ protected static final int COND_BUSY_BECAUSE_OF_SIEGE = 2; - - /** The Constant COND_OWNER. */ protected static final int COND_OWNER = 3; - - /** The _clan hall id. */ private int _clanHallId = -1; /** @@ -72,10 +63,6 @@ public class L2ClanHallManagerInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -1008,7 +995,7 @@ public class L2ClanHallManagerInstance extends L2FolkInstance final int condition = validateCondition(player); if (condition == COND_OWNER) { - filename = "data/html/clanHallManager/chamberlain.htm";// Owner message window + filename = "data/html/clanHallManager/chamberlain.htm"; // Owner message window } if (condition == COND_OWNER_FALSE) { @@ -1033,7 +1020,6 @@ public class L2ClanHallManagerInstance extends L2FolkInstance { return COND_ALL_FALSE; } - // if (player.isGM()) return COND_OWNER; if (player.getClan() != null) { if (getClanHall().getOwnerId() == player.getClanId()) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallSiegeInfInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallSiegeInfInstance.java index f58e8beec9..d8bee4d142 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallSiegeInfInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClanHallSiegeInfInstance.java @@ -34,7 +34,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; /** * @author MHard L2EmuRT */ - public class L2ClanHallSiegeInfInstance extends L2NpcInstance { public L2ClanHallSiegeInfInstance(int objectId, L2NpcTemplate template) @@ -57,17 +56,13 @@ public class L2ClanHallSiegeInfInstance extends L2NpcInstance player.setTarget(this); // Send a Server->Client packet MyTargetSelected to the L2PcInstance - // player final MyTargetSelected my = new MyTargetSelected(getObjectId(), 0); player.sendPacket(my); - // Send a Server->Client packet ValidateLocation to correct the - // L2NpcInstance position and heading on the client + // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the - // L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -76,8 +71,7 @@ public class L2ClanHallSiegeInfInstance extends L2NpcInstance { showMessageWindow(player, 0); } - // Send a Server->Client ActionFailed to the L2PcInstance in order to - // avoid that the client wait another packet + // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(ActionFailed.STATIC_PACKET); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClassMasterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClassMasterInstance.java index 9aa09cb788..50ffe79acd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClassMasterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ClassMasterInstance.java @@ -31,13 +31,8 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision: 1.4.2.1.2.7 $ $Date: 2005/03/27 15:29:32 $ - */ public final class L2ClassMasterInstance extends L2FolkInstance { - /** The _instance. */ private static L2ClassMasterInstance _instance; /** @@ -60,10 +55,6 @@ public final class L2ClassMasterInstance extends L2FolkInstance return _instance; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onAction(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onAction(L2PcInstance player) { @@ -87,8 +78,7 @@ public final class L2ClassMasterInstance extends L2FolkInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player) && !Config.ALLOW_REMOTE_CLASS_MASTERS) + else if (!canInteract(player) && !Config.ALLOW_REMOTE_CLASS_MASTERS) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -215,10 +205,6 @@ public final class L2ClassMasterInstance extends L2FolkInstance player.sendPacket(ActionFailed.STATIC_PACKET); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -716,14 +702,12 @@ public final class L2ClassMasterInstance extends L2FolkInstance if (classId.getParent() != null) { while (classId.level() == 0) - { // go to root - classId = classId.getParent(); + { + classId = classId.getParent(); // go to root } } player.setBaseClass(classId); - - // player.setBaseClass(player.getActiveClass()); } player.broadcastUserInfo(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CommanderInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CommanderInstance.java index 6004adb2fa..81c8750514 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CommanderInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CommanderInstance.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; /** * @author programmos */ - public class L2CommanderInstance extends L2Attackable { private int _homeX; @@ -137,5 +136,4 @@ public class L2CommanderInstance extends L2Attackable } } } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControlTowerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControlTowerInstance.java index d797a7e703..2e76834c5e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControlTowerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControlTowerInstance.java @@ -112,7 +112,6 @@ public class L2ControlTowerInstance extends L2NpcInstance continue; } spawn.stopRespawn(); - // spawn.getLastSpawn().doDie(spawn.getLastSpawn()); } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControllableMobInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControllableMobInstance.java index ae2040401c..5e4173d43f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControllableMobInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ControllableMobInstance.java @@ -114,8 +114,7 @@ public class L2ControllableMobInstance extends L2MonsterInstance if (isDead()) { - // first die (and calculate rewards), if currentHp < 0, - // then overhit may be calculated + // first die (and calculate rewards), if currentHp < 0, then overhit may be calculated if (Config.DEBUG) { LOGGER.info("char is dead."); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CubicInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CubicInstance.java index 7c5c2dc794..2c7271d4d3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CubicInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CubicInstance.java @@ -49,95 +49,36 @@ import com.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager; */ public class L2CubicInstance { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(L2CubicInstance.class.getName()); - // Type of Cubics - /** The Constant STORM_CUBIC. */ public static final int STORM_CUBIC = 1; - - /** The Constant VAMPIRIC_CUBIC. */ public static final int VAMPIRIC_CUBIC = 2; - - /** The Constant LIFE_CUBIC. */ public static final int LIFE_CUBIC = 3; - - /** The Constant VIPER_CUBIC. */ public static final int VIPER_CUBIC = 4; - - /** The Constant POLTERGEIST_CUBIC. */ public static final int POLTERGEIST_CUBIC = 5; - - /** The Constant BINDING_CUBIC. */ public static final int BINDING_CUBIC = 6; - - /** The Constant AQUA_CUBIC. */ public static final int AQUA_CUBIC = 7; - - /** The Constant SPARK_CUBIC. */ public static final int SPARK_CUBIC = 8; - - /** The Constant ATTRACT_CUBIC. */ public static final int ATTRACT_CUBIC = 9; - - /** The Constant SMART_CUBIC_EVATEMPLAR. */ public static final int SMART_CUBIC_EVATEMPLAR = 10; - - /** The Constant SMART_CUBIC_SHILLIENTEMPLAR. */ public static final int SMART_CUBIC_SHILLIENTEMPLAR = 11; - - /** The Constant SMART_CUBIC_ARCANALORD. */ public static final int SMART_CUBIC_ARCANALORD = 12; - - /** The Constant SMART_CUBIC_ELEMENTALMASTER. */ public static final int SMART_CUBIC_ELEMENTALMASTER = 13; - - /** The Constant SMART_CUBIC_SPECTRALMASTER. */ public static final int SMART_CUBIC_SPECTRALMASTER = 14; - - // Max range of cubic skills - // TODO: Check/fix the max range - /** The Constant MAX_MAGIC_RANGE. */ public static final int MAX_MAGIC_RANGE = 900; - - // Cubic skills - /** The Constant SKILL_CUBIC_HEAL. */ public static final int SKILL_CUBIC_HEAL = 4051; - - /** The Constant SKILL_CUBIC_CURE. */ public static final int SKILL_CUBIC_CURE = 5579; - /** The _owner. */ protected L2PcInstance _owner; - - /** The _target. */ protected L2Character _target; - - /** The _id. */ protected int _id; - - /** The _matk. */ protected int _matk; - - /** The _activationtime. */ protected int _activationtime; - - /** The _activationchance. */ protected int _activationchance; - - /** The _active. */ protected boolean _active; - - /** The _given by other. */ private final boolean _givenByOther; - - /** The _skills. */ protected List _skills = new ArrayList<>(); - - /** The _disappear task. */ private Future _disappearTask; - - /** The _action task. */ private Future _actionTask; /** @@ -226,8 +167,7 @@ public class L2CubicInstance // _skills.add(SkillTable.getInstance().getInfo(4166,9)); no animation // _skills.add(SkillTable.getInstance().getInfo(5115,4)); no animation // _skills.add(SkillTable.getInstance().getInfo(5116,4)); no animation - // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the - // cubic skills list + // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the cubic skills list break; } case SMART_CUBIC_ELEMENTALMASTER: @@ -244,8 +184,7 @@ public class L2CubicInstance _skills.add(SkillTable.getInstance().getInfo(4166, 9)); // have animation // _skills.add(SkillTable.getInstance().getInfo(5115,4)); no animation // _skills.add(SkillTable.getInstance().getInfo(5116,4)); no animation - // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the - // cubic skills list + // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the cubic skills list break; } case SMART_CUBIC_SPECTRALMASTER: @@ -262,8 +201,7 @@ public class L2CubicInstance // _skills.add(SkillTable.getInstance().getInfo(4166,9)); no animation // _skills.add(SkillTable.getInstance().getInfo(5115,4)); no animation // _skills.add(SkillTable.getInstance().getInfo(5116,4)); no animation - // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the - // cubic skills list + // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the cubic skills list break; } case SMART_CUBIC_EVATEMPLAR: @@ -280,8 +218,7 @@ public class L2CubicInstance // _skills.add(SkillTable.getInstance().getInfo(4166,9)); no animation // _skills.add(SkillTable.getInstance().getInfo(5115,4)); no animation // _skills.add(SkillTable.getInstance().getInfo(5116,4)); no animation - // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the - // cubic skills list + // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the cubic skills list break; } case SMART_CUBIC_SHILLIENTEMPLAR: @@ -298,8 +235,7 @@ public class L2CubicInstance // _skills.add(SkillTable.getInstance().getInfo(4166,9)); no animation _skills.add(SkillTable.getInstance().getInfo(5115, 4)); // have animation // _skills.add(SkillTable.getInstance().getInfo(5116,4)); no animation - // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the - // cubic skills list + // _skills.add(SkillTable.getInstance().getInfo(5579,4)); no need to add to the cubic skills list break; } } @@ -628,12 +564,8 @@ public class L2CubicInstance } } - /** - * The Class Action. - */ private class Action implements Runnable { - /** The _chance. */ private final int _chance; /** @@ -643,7 +575,6 @@ public class L2CubicInstance Action(int chance) { _chance = chance; - // run task } @Override @@ -825,9 +756,7 @@ public class L2CubicInstance } } - // if this is a debuff let the duel manager know about it - // so the debuff can be removed after the duel - // (player & target must be in the same duel) + // if this is a debuff let the duel manager know about it so the debuff can be removed after the duel (player & target must be in the same duel) if ((target instanceof L2PcInstance) && ((L2PcInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())) { final DuelManager dm = DuelManager.getInstance(); @@ -938,9 +867,7 @@ public class L2CubicInstance { if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill)) { - // if this is a debuff let the duel manager know about it - // so the debuff can be removed after the duel - // (player & target must be in the same duel) + // if this is a debuff let the duel manager know about it so the debuff can be removed after the duel (player & target must be in the same duel) if ((target instanceof L2PcInstance) && ((L2PcInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())) { final DuelManager dm = DuelManager.getInstance(); @@ -971,9 +898,7 @@ public class L2CubicInstance { if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill)) { - // if this is a debuff let the duel manager know about it - // so the debuff can be removed after the duel - // (player & target must be in the same duel) + // if this is a debuff let the duel manager know about it so the debuff can be removed after the duel (player & target must be in the same duel) if ((target instanceof L2PcInstance) && ((L2PcInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())) { final DuelManager dm = DuelManager.getInstance(); @@ -1030,9 +955,7 @@ public class L2CubicInstance { if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill)) { - // if this is a debuff let the duel manager know about it - // so the debuff can be removed after the duel - // (player & target must be in the same duel) + // if this is a debuff let the duel manager know about it so the debuff can be removed after the duel (player & target must be in the same duel) if ((target instanceof L2PcInstance) && ((L2PcInstance) target).isInDuel() && (skill.getSkillType() == SkillType.DEBUFF) && (activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())) { final DuelManager dm = DuelManager.getInstance(); @@ -1118,8 +1041,7 @@ public class L2CubicInstance double percentleft = 100.0; L2Party party = _owner.getParty(); - // if owner is in a duel but not in a party duel, then it is the same as he does not have a - // party + // if owner is in a duel but not in a party duel, then it is the same as he does not have a party if (_owner.isInDuel()) { if (!DuelManager.getInstance().getDuel(_owner.getDuelId()).isPartyDuel()) @@ -1140,8 +1062,7 @@ public class L2CubicInstance // if party member not dead, check if he is in castrange of heal cubic if (isInCubicRange(_owner, partyMember)) { - // member is in cubic casting range, check if he need heal and if he have - // the lowest HP + // member is in cubic casting range, check if he need heal and if he have the lowest HP if (partyMember.getCurrentHp() < partyMember.getMaxHp()) { if (percentleft > (partyMember.getCurrentHp() / partyMember.getMaxHp())) @@ -1165,8 +1086,7 @@ public class L2CubicInstance continue; } - // member's pet is in cubic casting range, check if he need heal and if he have - // the lowest HP + // member's pet is in cubic casting range, check if he need heal and if he have the lowest HP if (partyMember.getPet().getCurrentHp() < partyMember.getPet().getMaxHp()) { if (percentleft > (partyMember.getPet().getCurrentHp() / partyMember.getPet().getMaxHp())) @@ -1206,23 +1126,12 @@ public class L2CubicInstance return _givenByOther; } - /** - * The Class Heal. - */ private class Heal implements Runnable { - /** - * Instantiates a new heal. - */ Heal() { - // run task } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -1281,23 +1190,12 @@ public class L2CubicInstance } } - /** - * The Class Disappear. - */ private class Disappear implements Runnable { - /** - * Instantiates a new disappear. - */ Disappear() { - // run task } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CustomNpcInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CustomNpcInstance.java index 101c4c3cf3..c6602b49a5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CustomNpcInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2CustomNpcInstance.java @@ -72,8 +72,7 @@ public final class L2CustomNpcInstance // HairStyle=19, HairColor=20, Face=21 // NameColor=22, TitleColor=23 - _boolean = new boolean[4]; - // pvp=0 , noble=1, hero=2, isFemaleSex=3 + _boolean = new boolean[4]; // pvp=0 , noble=1, hero=2, isFemaleSex=3 // load the Pc Morph Data CustomNpcInstanceManager.customInfo ci = CustomNpcInstanceManager.getInstance().getCustomData(_NpcInstance.getSpawn().getId(), _NpcInstance.getNpcId()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DecoInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DecoInstance.java index 2113be3142..f9bdb42361 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DecoInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DecoInstance.java @@ -21,10 +21,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public class L2DecoInstance extends L2NpcInstance { - /** - * @param objectId - * @param template - */ public L2DecoInstance(int objectId, L2NpcTemplate template) { super(objectId, template); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoorInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoorInstance.java index fe7e0cc4b6..8ebc3029f7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoorInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoorInstance.java @@ -54,77 +54,30 @@ import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; import com.l2jmobius.gameserver.templates.chars.L2CharTemplate; import com.l2jmobius.gameserver.templates.item.L2Weapon; -/** - * This class ... - * @version $Revision: 1.3.2.2.2.5 $ $Date: 2005/03/27 15:29:32 $ - */ public class L2DoorInstance extends L2Character { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(L2DoorInstance.class.getName()); - /** The castle index in the array of L2Castle this L2NpcInstance belongs to. */ private int _castleIndex = -2; - - /** The _map region. */ private int _mapRegion = -1; - - /** fort index in array L2Fort -> L2NpcInstance. */ private int _fortIndex = -2; - - // when door is closed, the dimensions are - /** The _range x min. */ private int _rangeXMin = 0; - - /** The _range y min. */ private int _rangeYMin = 0; - - /** The _range z min. */ private int _rangeZMin = 0; - - /** The _range x max. */ private int _rangeXMax = 0; - - /** The _range y max. */ private int _rangeYMax = 0; - - /** The _range z max. */ private int _rangeZMax = 0; - - /** The _ a. */ private int _A = 0; - - /** The _ b. */ private int _B = 0; - - /** The _ c. */ private int _C = 0; - - /** The _ d. */ private int _D = 0; - - /** The _door id. */ protected final int _doorId; - - /** The _name. */ protected final String _name; - - /** The _open. */ boolean _open; - - /** The _unlockable. */ private final boolean _unlockable; - - /** The _clan hall. */ private ClanHall _clanHall; - - /** The _auto action delay. */ protected int _autoActionDelay = -1; - - /** The _auto action task. */ private ScheduledFuture _autoActionTask; - - /** The pos. */ public final L2Territory pos; /** @@ -132,68 +85,39 @@ public class L2DoorInstance extends L2Character */ public class AIAccessor extends L2Character.AIAccessor { - /** - * Instantiates a new aI accessor. - */ protected AIAccessor() { - // null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#getActor() - */ @Override public L2DoorInstance getActor() { return L2DoorInstance.this; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#moveTo(int, int, int, int) - */ @Override public void moveTo(int x, int y, int z, int offset) { - // null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#moveTo(int, int, int) - */ @Override public void moveTo(int x, int y, int z) { - // null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#stopMove(com.l2jmobius.gameserver.model.actor.position.Location) - */ @Override public void stopMove(Location pos) { - // null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#doAttack(com.l2jmobius.gameserver.model.L2Character) - */ @Override public void doAttack(L2Character target) { - // null; } @Override public void doCast(L2Skill skill) { - // null; } } @@ -213,25 +137,14 @@ public class L2DoorInstance extends L2Character return _ai; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#hasAI() - */ @Override public boolean hasAI() { return _ai != null; } - /** - * The Class CloseTask. - */ class CloseTask implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -251,10 +164,6 @@ public class L2DoorInstance extends L2Character */ class AutoOpenClose implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -302,13 +211,9 @@ public class L2DoorInstance extends L2Character _doorId = doorId; _name = name; _unlockable = unlockable; - pos = new L2Territory(/* "door_" + doorId */); + pos = new L2Territory(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getKnownList() - */ @Override public final DoorKnownList getKnownList() { @@ -320,10 +225,6 @@ public class L2DoorInstance extends L2Character return (DoorKnownList) super.getKnownList(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getStat() - */ @Override public final DoorStat getStat() { @@ -335,10 +236,6 @@ public class L2DoorInstance extends L2Character return (DoorStat) super.getStat(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getStatus() - */ @Override public final DoorStatus getStatus() { @@ -359,10 +256,6 @@ public class L2DoorInstance extends L2Character return _unlockable; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getLevel() - */ @Override public final int getLevel() { @@ -505,10 +398,6 @@ public class L2DoorInstance extends L2Character return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#isAutoAttackable(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean isAutoAttackable(L2Character attacker) { @@ -517,14 +406,13 @@ public class L2DoorInstance extends L2Character return true; } - // Doors can`t be attacked by NPCs + // Doors can't be attacked by NPCs if ((attacker == null) || !(attacker instanceof L2Playable)) { return false; } // Attackable during siege by attacker only - L2PcInstance player = null; if (attacker instanceof L2PcInstance) { @@ -574,10 +462,6 @@ public class L2DoorInstance extends L2Character return isAutoAttackable(attacker); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#updateAbnormalEffect() - */ @Override public void updateAbnormalEffect() { @@ -629,40 +513,24 @@ public class L2DoorInstance extends L2Character return null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getActiveWeaponItem() - */ @Override public L2Weapon getActiveWeaponItem() { return null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getSecondaryWeaponInstance() - */ @Override public L2ItemInstance getSecondaryWeaponInstance() { return null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getSecondaryWeaponItem() - */ @Override public L2Weapon getSecondaryWeaponItem() { return null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#onAction(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onAction(L2PcInstance player) { @@ -703,18 +571,13 @@ public class L2DoorInstance extends L2Character MyTargetSelected my = new MyTargetSelected(getObjectId(), 0); player.sendPacket(my); - // if (isAutoAttackable(player)) - // { DoorStatusUpdate su = new DoorStatusUpdate(this); player.sendPacket(su); - // } // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel()); - // player.sendPacket(my); - if (isAutoAttackable(player)) + else if (isAutoAttackable(player)) { if (Math.abs(player.getZ() - getZ()) < 400) // this max heigth difference might need some tweaking { @@ -745,10 +608,6 @@ public class L2DoorInstance extends L2Character player.sendPacket(ActionFailed.STATIC_PACKET); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#onActionShift(com.l2jmobius.gameserver.network.L2GameClient) - */ @Override public void onActionShift(L2GameClient client) { @@ -815,8 +674,6 @@ public class L2DoorInstance extends L2Character html.setHtml(html1.toString()); player.sendPacket(html); - - // openMe(); } else { @@ -843,10 +700,6 @@ public class L2DoorInstance extends L2Character player.sendPacket(ActionFailed.STATIC_PACKET); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#broadcastStatusUpdate() - */ @Override public void broadcastStatusUpdate() { @@ -865,25 +718,16 @@ public class L2DoorInstance extends L2Character } } - /** - * On open. - */ public void onOpen() { ThreadPool.schedule(new CloseTask(), 60000); } - /** - * On close. - */ public void onClose() { closeMe(); } - /** - * Close me. - */ public final void closeMe() { synchronized (this) @@ -899,9 +743,6 @@ public class L2DoorInstance extends L2Character broadcastStatusUpdate(); } - /** - * Open me. - */ public final void openMe() { synchronized (this) @@ -916,10 +757,6 @@ public class L2DoorInstance extends L2Character broadcastStatusUpdate(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#toString() - */ @Override public String toString() { @@ -1096,7 +933,6 @@ public class L2DoorInstance extends L2Character final List result = new ArrayList<>(); final Collection objs = getKnownList().getKnownObjects().values(); - // synchronized (getKnownList().getKnownObjects()) { for (L2Object obj : objs) { @@ -1109,10 +945,6 @@ public class L2DoorInstance extends L2Character return result; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#reduceCurrentHp(double, com.l2jmobius.gameserver.model.L2Character, boolean) - */ @Override public void reduceCurrentHp(double damage, L2Character attacker, boolean awake) { @@ -1126,10 +958,6 @@ public class L2DoorInstance extends L2Character } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#doDie(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean doDie(L2Character killer) { @@ -1143,7 +971,7 @@ public class L2DoorInstance extends L2Character if (isFort || isCastle) { - broadcastPacket(SystemMessage.sendString("The castle gate has been broken down")); + broadcastPacket(SystemMessage.sendString("The castle gate has been broken down.")); } return true; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoormenInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoormenInstance.java index 1425fd193a..00211af19a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoormenInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2DoormenInstance.java @@ -33,60 +33,29 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision$ $Date$ - */ public class L2DoormenInstance extends L2FolkInstance { - /** The _clan hall. */ private ClanHall _clanHall; - - /** The CON d_ al l_ false. */ private static int COND_ALL_FALSE = 0; - - /** The CON d_ bus y_ becaus e_ o f_ siege. */ private static int COND_BUSY_BECAUSE_OF_SIEGE = 1; - - /** The CON d_ castl e_ owner. */ private static int COND_CASTLE_OWNER = 2; - - /** The CON d_ hal l_ owner. */ private static int COND_HALL_OWNER = 3; - - /** The CON d_ for t_ owner. */ private static int COND_FORT_OWNER = 4; - /** - * Instantiates a new l2 doormen instance. - * @param objectID the object id - * @param template the template - */ public L2DoormenInstance(int objectID, L2NpcTemplate template) { super(objectID, template); } - /** - * Gets the clan hall. - * @return the clan hall - */ public final ClanHall getClanHall() { - // LOGGER.warning(this.getName()+" searching ch"); if (_clanHall == null) { _clanHall = ClanHallManager.getInstance().getNearbyClanHall(getX(), getY(), 500); } - // if (_ClanHall != null) - // LOGGER.warning(this.getName()+" found ch "+_ClanHall.getName()); return _clanHall; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -115,7 +84,6 @@ public class L2DoormenInstance extends L2FolkInstance } else if (condition == COND_CASTLE_OWNER) { - // DoorTable doorTable = DoorTable.getInstance(); StringTokenizer st = new StringTokenizer(command.substring(10), ", "); st.nextToken(); // Bypass first value since its castleid/hallid @@ -216,10 +184,8 @@ public class L2DoormenInstance extends L2FolkInstance } else if (condition == COND_CASTLE_OWNER) { - // DoorTable doorTable = DoorTable.getInstance(); StringTokenizer st = new StringTokenizer(command.substring(11), ", "); st.nextToken(); // Bypass first value since its castleid/hallid - // L2Clan playersClan = player.getClan(); while (st.hasMoreTokens()) { @@ -271,8 +237,7 @@ public class L2DoormenInstance extends L2FolkInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FeedableBeastInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FeedableBeastInstance.java index e2ade81b3a..ce5e512513 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FeedableBeastInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FeedableBeastInstance.java @@ -19,11 +19,8 @@ package com.l2jmobius.gameserver.model.actor.instance; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; // This class is here mostly for convinience and for avoidance of hardcoded IDs. -// It refers to Beast (mobs) that can be attacked but can also be fed -// For example, the Beast Farm's Alpen Buffalo. -// This class is only trully used by the handlers in order to check the correctness -// of the target. However, no additional tasks are needed, since they are all -// handled by scripted AI. +// It refers to Beast (mobs) that can be attacked but can also be fed. For example, the Beast Farm's Alpen Buffalo. +// This class is only trully used by the handlers in order to check the correctness of the target. However, no additional tasks are needed, since they are all handled by scripted AI. public class L2FeedableBeastInstance extends L2MonsterInstance { public L2FeedableBeastInstance(int objectId, L2NpcTemplate template) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalGuideInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalGuideInstance.java index 1a071562da..f04e5c8549 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalGuideInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalGuideInstance.java @@ -36,19 +36,10 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2FestivalGuideInstance extends L2FolkInstance { - /** The _festival type. */ protected int _festivalType; - - /** The _festival oracle. */ protected int _festivalOracle; - - /** The _blue stones needed. */ protected int _blueStonesNeeded; - - /** The _green stones needed. */ protected int _greenStonesNeeded; - - /** The _red stones needed. */ protected int _redStonesNeeded; /** @@ -165,10 +156,6 @@ public final class L2FestivalGuideInstance extends L2FolkInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -223,10 +210,7 @@ public final class L2FestivalGuideInstance extends L2FolkInstance showChatWindow(player, 2, "d", false); return; } - // TODO: Check if the player has delevelled by comparing their skill levels. - /* - * Check to see if the player has already signed up, if they are then update the participant list providing all the required criteria has been met. - */ + if (player.isFestivalParticipant()) { SevenSignsFestival.getInstance().setParticipants(_festivalOracle, _festivalType, playerParty); @@ -415,9 +399,7 @@ public final class L2FestivalGuideInstance extends L2FolkInstance { return; } - /** - * If the player is the party leader, remove all participants from the festival (i.e. set the party to null, when updating the participant list) otherwise just remove this player from the "arena", and also remove them from the party. - */ + // If the player is the party leader, remove all participants from the festival (i.e. set the party to null, when updating the participant list) otherwise just remove this player from the "arena", and also remove them from the party. final boolean isLeader = playerParty.isLeader(player); if (isLeader) { @@ -455,8 +437,7 @@ public final class L2FestivalGuideInstance extends L2FolkInstance } else { - // this class dont know any other commands, let forward - // the command to the parent class + // this class dont know any other commands, let forward the command to the parent class super.onBypassFeedback(player, command); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalMonsterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalMonsterInstance.java index 76792bc3dd..20f307de1a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalMonsterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FestivalMonsterInstance.java @@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2FestivalMonsterInstance extends L2MonsterInstance { - /** The _bonus multiplier. */ protected int _bonusMultiplier = 1; /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FishermanInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FishermanInstance.java index 8742bec47f..4737046cdd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FishermanInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FishermanInstance.java @@ -37,10 +37,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public class L2FishermanInstance extends L2FolkInstance { - /** - * @param objectId - * @param template - */ public L2FishermanInstance(int objectId, L2NpcTemplate template) { super(objectId, template); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FolkInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FolkInstance.java index 0644d48d83..a6498f03b6 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FolkInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FolkInstance.java @@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2FolkInstance extends L2NpcInstance { - /** The _classes to teach. */ private final ClassId[] _classesToTeach; /** @@ -50,10 +49,6 @@ public class L2FolkInstance extends L2NpcInstance _classesToTeach = template.getTeachInfo(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onAction(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onAction(L2PcInstance player) { @@ -247,10 +242,6 @@ public class L2FolkInstance extends L2NpcInstance player.sendPacket(ActionFailed.STATIC_PACKET); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -335,9 +326,7 @@ public class L2FolkInstance extends L2NpcInstance } else { - // this class dont know any other commands, let forward - // the command to the parent class - + // this class dont know any other commands, let forward the command to the parent class super.onBypassFeedback(player, command); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortManagerInstance.java index 9b7b450f2e..8b83b9b168 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortManagerInstance.java @@ -67,8 +67,8 @@ public class L2FortManagerInstance extends L2MerchantInstance { // Set the target of the L2PcInstance player player.setTarget(this); - } else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + } + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -164,8 +164,7 @@ public class L2FortManagerInstance extends L2MerchantInstance } return; } - else if (actualCommand.equalsIgnoreCase("operate_door")) // Door - // Control + else if (actualCommand.equalsIgnoreCase("operate_door")) // Door Control { if ((player.getClanPrivileges() & L2Clan.CP_CS_OPEN_DOOR) == L2Clan.CP_CS_OPEN_DOOR) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortMerchantInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortMerchantInstance.java index e6f2454be5..0a534417ba 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortMerchantInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortMerchantInstance.java @@ -56,8 +56,7 @@ public class L2FortMerchantInstance extends L2NpcWalkerInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -82,9 +81,6 @@ public class L2FortMerchantInstance extends L2NpcWalkerInstance par = st.nextToken(); } - // LOGGER.info("actualCommand : " + actualCommand); - // LOGGER.info("par : " + par); - if (actualCommand.equalsIgnoreCase("Chat")) { int val = 0; @@ -174,5 +170,4 @@ public class L2FortMerchantInstance extends L2NpcWalkerInstance } return true; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortWyvernManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortWyvernManagerInstance.java index 5ee2d73a72..fc8abc9632 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortWyvernManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2FortWyvernManagerInstance.java @@ -143,8 +143,8 @@ public class L2FortWyvernManagerInstance extends L2NpcInstance { // Set the target of the L2PcInstance player player.setTarget(this); - } else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + } + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GourdInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GourdInstance.java index 035a8a0089..edea74c5a7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GourdInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GourdInstance.java @@ -22,8 +22,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public final class L2GourdInstance extends L2MonsterInstance { - // private static Logger LOGGER = Logger.getLogger(L2GourdInstance.class); - private String _name; private byte _nectar = 0; private byte _good = 0; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardInstance.java index 7f0d33e70b..140fa651e8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardInstance.java @@ -42,30 +42,15 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2GuardInstance extends L2Attackable { - /** The LOGGER. */ private static Logger LOGGER = Logger.getLogger(L2GuardInstance.class.getName()); - /** The _home x. */ + private static final int RETURN_INTERVAL = 60000; private int _homeX; - - /** The _home y. */ private int _homeY; - - /** The _home z. */ private int _homeZ; - /** The Constant RETURN_INTERVAL. */ - private static final int RETURN_INTERVAL = 60000; - - /** - * The Class ReturnTask. - */ public class ReturnTask implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -96,10 +81,6 @@ public final class L2GuardInstance extends L2Attackable ThreadPool.scheduleAtFixedRate(new ReturnTask(), RETURN_INTERVAL, RETURN_INTERVAL + Rnd.get(60000)); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Attackable#getKnownList() - */ @Override public final GuardKnownList getKnownList() { @@ -269,8 +250,7 @@ public final class L2GuardInstance extends L2Attackable // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Check if the L2PcInstance is in the _aggroList of the L2GuardInstance - if (containsTarget(player)) + else if (containsTarget(player)) // Check if the L2PcInstance is in the _aggroList of the L2GuardInstance { if (Config.DEBUG) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardNoHTMLInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardNoHTMLInstance.java index 6494fb8a69..0bdfd19f66 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardNoHTMLInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2GuardNoHTMLInstance.java @@ -41,30 +41,15 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2GuardNoHTMLInstance extends L2Attackable { - /** The LOGGER. */ private static Logger LOGGER = Logger.getLogger(L2GuardNoHTMLInstance.class.getName()); - /** The _home x. */ + private static final int RETURN_INTERVAL = 60000; private int _homeX; - - /** The _home y. */ private int _homeY; - - /** The _home z. */ private int _homeZ; - /** The Constant RETURN_INTERVAL. */ - private static final int RETURN_INTERVAL = 60000; - - /** - * The Class ReturnTask. - */ public class ReturnTask implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -94,10 +79,6 @@ public final class L2GuardNoHTMLInstance extends L2Attackable ThreadPool.scheduleAtFixedRate(new ReturnTask(), RETURN_INTERVAL, RETURN_INTERVAL + Rnd.get(60000)); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Attackable#getKnownList() - */ @Override public final GuardNoHTMLKnownList getKnownList() { @@ -229,8 +210,7 @@ public final class L2GuardNoHTMLInstance extends L2Attackable // L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Check if the L2PcInstance is in the _aggroList of the L2GuardInstance - if (containsTarget(player)) + else if (containsTarget(player)) // Check if the L2PcInstance is in the _aggroList of the L2GuardInstance { if (Config.DEBUG) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2HennaInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2HennaInstance.java index 91829c7a6e..032fc3082f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2HennaInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2HennaInstance.java @@ -20,13 +20,10 @@ import com.l2jmobius.gameserver.templates.item.L2Henna; /** * This class represents a Non-Player-Character in the world. it can be a monster or a friendly character. it also uses a template to fetch some static values. the templates are hardcoded in the client, so we can rely on them. - * @version $Revision$ $Date$ */ public class L2HennaInstance { - // private static Logger LOGGER = Logger.getLogger(L2HennaInstance.class); - private final L2Henna _template; private int _symbolId; private int _itemIdDye; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ItemInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ItemInstance.java index 955503fe72..09315e86e4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ItemInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ItemInstance.java @@ -54,17 +54,12 @@ import com.l2jmobius.gameserver.util.Util; /** * This class manages items. - * @version $Revision: 1.4.2.1.2.11 $ $Date: 2005/03/31 16:07:50 $ */ public final class L2ItemInstance extends L2Object { - /** The Constant LOGGER. */ private static final Logger LOGGER = Logger.getLogger(L2ItemInstance.class.getName()); - - /** The Constant _logItems. */ private static final Logger _logItems = Logger.getLogger("item"); - /** The _drop protection. */ private final DropProtection _dropProtection = new DropProtection(); /** @@ -72,143 +67,53 @@ public final class L2ItemInstance extends L2Object */ public enum ItemLocation { - /** The VOID. */ VOID, - - /** The INVENTORY. */ INVENTORY, - - /** The PAPERDOLL. */ PAPERDOLL, - - /** The WAREHOUSE. */ WAREHOUSE, - - /** The CLANWH. */ CLANWH, - - /** The PET. */ PET, - - /** The PE t_ equip. */ PET_EQUIP, - - /** The LEASE. */ LEASE, - - /** The FREIGHT. */ FREIGHT } - /** ID of the owner. */ private int _ownerId; - - /** Quantity of the item. */ private int _count; - - /** Initial Quantity of the item. */ private int _initCount; - - /** Time after restore Item count (in Hours). */ private int _time; - - /** Quantity of the item can decrease. */ private boolean _decrease = false; - - /** ID of the item. */ private final int _itemId; - - /** Object L2Item associated to the item. */ private final L2Item _item; - - /** Location of the item : Inventory, PaperDoll, WareHouse. */ private ItemLocation _loc; - - /** Slot where item is stored. */ private int _locData; - - /** Level of enchantment of the item. */ private int _enchantLevel; - - /** Price of the item for selling. */ private int _priceSell; - - /** Price of the item for buying. */ private int _priceBuy; - - /** Wear Item. */ private boolean _wear; - - /** Augmented Item. */ private L2Augmentation _augmentation = null; - - /** Shadow item. */ private int _mana = -1; - - /** The _consuming mana. */ private boolean _consumingMana = false; - - /** The Constant MANA_CONSUMPTION_RATE. */ private static final int MANA_CONSUMPTION_RATE = 60000; - - /** Custom item types (used loto, race tickets). */ private int _type1; - - /** The _type2. */ private int _type2; - - /** The _drop time. */ private long _dropTime; - - /** The Constant CHARGED_NONE. */ public static final int CHARGED_NONE = 0; - - /** The Constant CHARGED_SOULSHOT. */ public static final int CHARGED_SOULSHOT = 1; - - /** The Constant CHARGED_SPIRITSHOT. */ public static final int CHARGED_SPIRITSHOT = 1; - - /** The Constant CHARGED_BLESSED_SOULSHOT. */ - public static final int CHARGED_BLESSED_SOULSHOT = 2; // It's a realy exists? ;-) - - /** The Constant CHARGED_BLESSED_SPIRITSHOT. */ + public static final int CHARGED_BLESSED_SOULSHOT = 2; // Does it real;y exist? ;-) public static final int CHARGED_BLESSED_SPIRITSHOT = 2; - - /** Item charged with SoulShot (type of SoulShot). */ private int _chargedSoulshot = CHARGED_NONE; - - /** Item charged with SpiritShot (type of SpiritShot). */ private int _chargedSpiritshot = CHARGED_NONE; - - /** The _charged fishtshot. */ private boolean _chargedFishtshot = false; - - /** The _protected. */ private boolean _protected; - - /** The Constant UNCHANGED. */ public static final int UNCHANGED = 0; - - /** The Constant ADDED. */ public static final int ADDED = 1; - - /** The Constant REMOVED. */ public static final int REMOVED = 3; - - /** The Constant MODIFIED. */ public static final int MODIFIED = 2; - - /** The _last change. */ private int _lastChange = 2; // 1 ??, 2 modified, 3 removed - - /** The _exists in db. */ private boolean _existsInDb; // if a record exists in DB. - - /** The _stored in db. */ private boolean _storedInDb; // if DB data is up-to-date. - - /** The item loot shedule. */ private ScheduledFuture itemLootShedule = null; /** @@ -258,9 +163,6 @@ public final class L2ItemInstance extends L2Object final int oldOwner = _ownerId; setOwnerId(owner_id); - /* - * if(Config.LOG_ITEMS) { LogRecord record = new LogRecord(Level.INFO, "CHANGE:" + process); record.setLoggerName("item"); record.setParameters(new Object[] { this, creator, reference }); _logItems.LOGGER(record); record = null; } - */ fireEvent(EventType.SETOWNER.name, new Object[] { process, @@ -530,7 +432,6 @@ public final class L2ItemInstance extends L2Object return _dropTime; } - // Cupid's bow /** * Checks if is cupid bow. * @return true, if is cupid bow @@ -626,25 +527,6 @@ public final class L2ItemInstance extends L2Object _storedInDb = false; } - /** - * Returns the price of the item for buying. - * @return int - */ - // public int getPriceToBuy() - // { - // return isConsumable() ? (int) (_priceBuy * Config.RATE_CONSUMABLE_COST) : _priceBuy; - // } - - /** - * Sets the price of the item for buying Remark : If loc and loc_data different from database, say datas not up-to-date. - * @param price : int - */ - // public void setPriceToBuy(int price) - // { - // _priceBuy = price; - // _storedInDb = false; - // } - /** * Returns the last change of the item. * @return int @@ -722,10 +604,6 @@ public final class L2ItemInstance extends L2Object && (player.getActiveEnchantItem() != this) && (allowAdena || (_itemId != 57)) && ((player.getCurrentSkill() == null) || (player.getCurrentSkill().getSkill().getItemConsumeId() != _itemId)) && isTradeable(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#onAction(com.l2jmobius.gameserver.model.L2PcInstance) also check constraints: only soloing castle owners may pick up mercenary tickets of their castle - */ @Override public void onAction(L2PcInstance player) { @@ -823,7 +701,7 @@ public final class L2ItemInstance extends L2Object */ public boolean setAugmentation(L2Augmentation augmentation) { - // there shall be no previous augmentation.. + // there shall be no previous augmentation. if (_augmentation != null) { return false; @@ -850,7 +728,6 @@ public final class L2ItemInstance extends L2Object */ public class ScheduleConsumeManaTask implements Runnable { - /** The _shadow item. */ private final L2ItemInstance _shadowItem; /** @@ -862,10 +739,6 @@ public final class L2ItemInstance extends L2Object _shadowItem = item; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -1335,8 +1208,7 @@ public final class L2ItemInstance extends L2Object setDropTime(System.currentTimeMillis()); - // this can synchronize on others instancies, so it's out of - // synchronized, to avoid deadlocks + // this can synchronize on others instancies, so it's out of synchronized, to avoid deadlocks // Add the L2ItemInstance dropped in the world as a visible object L2World.getInstance().addVisibleObject(this, getPosition().getWorldRegion(), dropper); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ManorManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ManorManagerInstance.java index 969390df08..9144425f6d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ManorManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ManorManagerInstance.java @@ -42,8 +42,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public class L2ManorManagerInstance extends L2MerchantInstance { - // private static Logger LOGGER = Logger.getLogger(L2ManorManagerInstance.class); - public L2ManorManagerInstance(int objectId, L2NpcTemplate template) { super(objectId, template); @@ -71,8 +69,7 @@ public class L2ManorManagerInstance extends L2MerchantInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -136,9 +133,6 @@ public class L2ManorManagerInstance extends L2MerchantInstance if (command.startsWith("manor_menu_select")) { - // input string format: - // manor_menu_select?ask=X&state=Y&time=X - if (CastleManorManager.getInstance().isUnderMaintenance()) { player.sendPacket(ActionFailed.STATIC_PACKET); @@ -164,7 +158,7 @@ public class L2ManorManagerInstance extends L2MerchantInstance } switch (ask) - { // Main action + { case 1: // Seed purchase { if (castleId != getCastle().getCastleId()) @@ -263,9 +257,7 @@ public class L2ManorManagerInstance extends L2MerchantInstance @Override public String getHtmlPath(int npcId, int val) { - return "data/html/manormanager/manager.htm"; // Used only in parent method - // to return from "Territory status" - // to initial screen. + return "data/html/manormanager/manager.htm"; // Used only in parent method to return from "Territory status" to initial screen. } private void showMessageWindow(L2PcInstance player, String filename) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MercManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MercManagerInstance.java index 9f6840bc26..30df27a9d4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MercManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MercManagerInstance.java @@ -32,8 +32,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public final class L2MercManagerInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2MercManagerInstance.class); - private static final int COND_ALL_FALSE = 0; private static final int COND_BUSY_BECAUSE_OF_SIEGE = 1; private static final int COND_OWNER = 2; @@ -64,8 +62,8 @@ public final class L2MercManagerInstance extends L2FolkInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); - } else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + } + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MerchantInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MerchantInstance.java index 67043b1512..4f970d738b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MerchantInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MerchantInstance.java @@ -33,14 +33,8 @@ import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate; import com.l2jmobius.gameserver.network.serverpackets.WearList; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision: 1.10.4.9 $ $Date: 2005/04/11 10:06:08 $ - */ public class L2MerchantInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2MerchantInstance.class); - /** * Instantiates a new l2 merchant instance. * @param objectId the object id @@ -51,10 +45,6 @@ public class L2MerchantInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#getHtmlPath(int, int) - */ @Override public String getHtmlPath(int npcId, int val) { @@ -158,10 +148,6 @@ public class L2MerchantInstance extends L2FolkInstance player.sendPacket(ActionFailed.STATIC_PACKET); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -229,9 +215,7 @@ public class L2MerchantInstance extends L2FolkInstance } else { - // this class dont know any other commands, let forward - // the command to the parent class - + // this class dont know any other commands, let forward the command to the parent class super.onBypassFeedback(player, command); } } @@ -325,10 +309,6 @@ public class L2MerchantInstance extends L2FolkInstance player.startRentPet(time); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onActionShift(com.l2jmobius.gameserver.network.L2GameClient) - */ @Override public void onActionShift(L2GameClient client) { @@ -370,7 +350,6 @@ public class L2MerchantInstance extends L2FolkInstance html1.append("Class: " + getClass().getName() + ""); html1.append("
    "); - // changed by terry 2005-02-22 21:45 html1.append(""); html1.append(""); html1.append(""); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MinionInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MinionInstance.java index f4707cd226..12c52de7dd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MinionInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MinionInstance.java @@ -28,9 +28,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2MinionInstance extends L2MonsterInstance { - // private static Logger LOGGER = Logger.getLogger(L2RaidMinionInstance.class); - - /** The master L2Character whose depends this L2MinionInstance on. */ private L2MonsterInstance _master; /** @@ -70,10 +67,6 @@ public final class L2MinionInstance extends L2MonsterInstance return _master; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance#onSpawn() - */ @Override public void onSpawn() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index 5bd31d7991..10a8b3ebec 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -41,16 +41,9 @@ import com.l2jmobius.gameserver.util.MinionList; */ public class L2MonsterInstance extends L2Attackable { - // private static Logger LOGGER = Logger.getLogger(L2MonsterInstance.class); - - /** The _minion list. */ - protected final MinionList _minionList; - - /** The _minion maintain task. */ - protected ScheduledFuture _minionMaintainTask = null; - - /** The Constant MONSTER_MAINTENANCE_INTERVAL. */ private static final int MONSTER_MAINTENANCE_INTERVAL = 1000; + protected final MinionList _minionList; + protected ScheduledFuture _minionMaintainTask = null; /** * Constructor of L2MonsterInstance (use L2Character and L2NpcInstance constructor).
    @@ -71,10 +64,6 @@ public class L2MonsterInstance extends L2Attackable _minionList = new MinionList(this); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Attackable#getKnownList() - */ @Override public final MonsterKnownList getKnownList() { @@ -85,9 +74,6 @@ public class L2MonsterInstance extends L2Attackable return (MonsterKnownList) super.getKnownList(); } - /** - * Return home. - */ public void returnHome() { ThreadPool.schedule(() -> @@ -128,10 +114,6 @@ public class L2MonsterInstance extends L2Attackable return (getTemplate().aggroRange > 0) && !isEventMob; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Attackable#onSpawn() - */ @Override public void onSpawn() { @@ -186,9 +168,6 @@ public class L2MonsterInstance extends L2Attackable _minionMaintainTask = ThreadPool.schedule(() -> _minionList.spawnMinions(), getMaintenanceInterval()); } - /** - * Call minions. - */ public void callMinions() { if (_minionList.hasMinions()) @@ -256,10 +235,6 @@ public class L2MonsterInstance extends L2Attackable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Attackable#doDie(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean doDie(L2Character killer) { @@ -334,10 +309,6 @@ public class L2MonsterInstance extends L2Attackable return _minionList.hasMinions(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Attackable#addDamageHate(com.l2jmobius.gameserver.model.L2Character, int, int) - */ @Override public void addDamageHate(L2Character attacker, int damage, int aggro) { @@ -347,10 +318,6 @@ public class L2MonsterInstance extends L2Attackable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#deleteMe() - */ @Override public void deleteMe() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcInstance.java index 8ecc088889..f5d330787c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcInstance.java @@ -109,36 +109,15 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType; */ public class L2NpcInstance extends L2Character { - // private static Logger LOGGER = Logger.getLogger(L2NpcInstance.class); - - /** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method). */ public static final int INTERACTION_DISTANCE = 150; - - /** The Polymorph object that manage this L2NpcInstance's morph to a PcInstance... I wrote this line too =P Darki699 */ private L2CustomNpcInstance _customNpcInstance; - - /** The L2Spawn object that manage this L2NpcInstance. */ private L2Spawn _spawn; - - /** The flag to specify if this L2NpcInstance is busy. */ private boolean _isBusy = false; - - /** The busy message for this L2NpcInstance. */ private String _busyMessage = ""; - - /** True if endDecayTask has already been called. */ volatile boolean _isDecayed = false; - - /** True if a Dwarf has used Spoil on this L2NpcInstance. */ private boolean _isSpoil = false; - - /** The castle index in the array of L2Castle this L2NpcInstance belongs to. */ private int _castleIndex = -2; - - /** The fortress index in the array of L2Fort this L2NpcInstance belongs to. */ private int _fortIndex = -2; - - /** Ctf. */ public boolean isEventMob = false; public boolean _isEventMobTvT = false; public boolean _isEventVIPNPC = false; @@ -147,35 +126,16 @@ public class L2NpcInstance extends L2Character public boolean _isEventMobCTF = false; public boolean _isCTF_throneSpawn = false; public boolean _isCTF_Flag = false; - - /** The _is in town. */ private boolean _isInTown = false; - - /** The ctf flag team name. */ public String _CTF_FlagTeamName; - - /** The _is spoiled by. */ private int _isSpoiledBy = 0; - - /** Time of last social packet broadcast */ private long _lastSocialBroadcast = 0; - /** Minimum interval between social packets */ private static final int MINIMUM_SOCIAL_INTERVAL = 6000; - /** The _r ani task. */ protected RandomAnimationTask _rAniTask; - - /** The _current l hand id. */ private int _currentLHandId; // normally this shouldn't change from the template, but there exist exceptions - - /** The _current r hand id. */ private int _currentRHandId; // normally this shouldn't change from the template, but there exist exceptions - - /** The _current collision height. */ private int _currentCollisionHeight; // used for npc grow effect skills - - /** The _current collision radius. */ private int _currentCollisionRadius; // used for npc grow effect skills - private int _scriptValue = 0; public class RandomAnimationTask implements Runnable @@ -306,27 +266,15 @@ public class L2NpcInstance extends L2Character return Config.MAX_NPC_ANIMATION > 0; } - /** - * The Class destroyTemporalNPC. - */ public class destroyTemporalNPC implements Runnable { - /** The _old spawn. */ private final L2Spawn _oldSpawn; - /** - * Instantiates a new destroy temporal npc. - * @param spawn the spawn - */ public destroyTemporalNPC(L2Spawn spawn) { _oldSpawn = spawn; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -343,32 +291,17 @@ public class L2NpcInstance extends L2Character } } - /** - * The Class destroyTemporalSummon. - */ public class destroyTemporalSummon implements Runnable { - /** The _summon. */ L2Summon _summon; - - /** The _player. */ L2PcInstance _player; - /** - * Instantiates a new destroy temporal summon. - * @param summon the summon - * @param player the player - */ public destroyTemporalSummon(L2Summon summon, L2PcInstance player) { _summon = summon; _player = player; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -390,8 +323,7 @@ public class L2NpcInstance extends L2Character */ public L2NpcInstance(int objectId, L2NpcTemplate template) { - // Call the L2Character constructor to set the _template of the L2Character, copy skills from template to object - // and link _calculators to NPC_STD_CALCULATOR + // Call the L2Character constructor to set the _template of the L2Character, copy skills from template to object and link _calculators to NPC_STD_CALCULATOR super(objectId, template); getKnownList(); // init knownlist getStat(); // init stats @@ -424,10 +356,6 @@ public class L2NpcInstance extends L2Character return _scriptValue == val; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getKnownList() - */ @Override public NpcKnownList getKnownList() { @@ -439,10 +367,6 @@ public class L2NpcInstance extends L2Character return (NpcKnownList) super.getKnownList(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getStat() - */ @Override public NpcStat getStat() { @@ -454,10 +378,6 @@ public class L2NpcInstance extends L2Character return (NpcStat) super.getStat(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getStatus() - */ @Override public NpcStatus getStatus() { @@ -489,10 +409,6 @@ public class L2NpcInstance extends L2Character return getTemplate().npcId; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#isAttackable() - */ @Override public boolean isAttackable() { @@ -577,9 +493,6 @@ public class L2NpcInstance extends L2Character @Override public void updateAbnormalEffect() { - // NpcInfo info = new NpcInfo(this); - // broadcastPacket(info); - // Send a Server->Client packet NpcInfo with state of abnormal effect to all L2PcInstance in the _KnownPlayers of the L2NpcInstance for (L2PcInstance player : getKnownList().getKnownPlayers().values()) { @@ -790,9 +703,6 @@ public class L2NpcInstance extends L2Character { // TODO: NPC busy check etc... - // if (!canTarget(player)) - // return false; - if (!isInsideRadius(player, INTERACTION_DISTANCE, false, false)) { return false; @@ -952,11 +862,6 @@ public class L2NpcInstance extends L2Character } else { - // Open a chat window on client with the text of the L2NpcInstance - /* - * Quest[] qlsa = getTemplate().getEventQuests(Quest.QuestEventType.QUEST_START); if ( (qlsa != null) && qlsa.length > 0) player.setLastQuestNpcObject(getObjectId()); - */ - final Quest[] qlst = getTemplate().getEventQuests(Quest.QuestEventType.NPC_FIRST_TALK); if (qlst.length == 1) { @@ -1163,8 +1068,7 @@ public class L2NpcInstance extends L2Character html.setHtml(html1.toString()); player.sendPacket(html); } - else - // Like L2OFF set the target of the L2PcInstance player + else // Like L2OFF set the target of the L2PcInstance player { // Check if the L2PcInstance already target the L2NpcInstance if (this != player.getTarget()) @@ -1289,11 +1193,6 @@ public class L2NpcInstance extends L2Character } else { - // Open a chat window on client with the text of the L2NpcInstance - /* - * Quest[] qlsa = getTemplate().getEventQuests(Quest.QuestEventType.QUEST_START); if ( (qlsa != null) && qlsa.length > 0) player.setLastQuestNpcObject(getObjectId()); - */ - final Quest[] qlst = getTemplate().getEventQuests(Quest.QuestEventType.NPC_FIRST_TALK); if (qlst.length == 1) { @@ -1405,8 +1304,6 @@ public class L2NpcInstance extends L2Character */ public void onBypassFeedback(L2PcInstance player, String command) { - // if (canInteract(player)) - // { if (_isBusy && (_busyMessage.length() > 0)) { player.sendPacket(ActionFailed.STATIC_PACKET); @@ -1815,7 +1712,7 @@ public class L2NpcInstance extends L2Character @Override public L2ItemInstance getActiveWeaponInstance() { - // regular NPCs dont have weapons instancies + // regular NPCs dont have weapons return null; } @@ -1886,7 +1783,7 @@ public class L2NpcInstance extends L2Character @Override public L2ItemInstance getSecondaryWeaponInstance() { - // regular NPCs dont have weapons instancies + // regular NPCs dont have weapons return null; } @@ -2618,17 +2515,6 @@ public class L2NpcInstance extends L2Character return false; } - /* - * Returns true if html exists - * @param player - * @param type - * @return boolean - */ - /* - * private boolean showFlagDenyChatWindow(L2PcInstance player, String type) { String html = HtmCache.getInstance().getHtm("data/html/" + type + "/" + getNpcId() + "-f.htm"); if (html != null) { NpcHtmlMessage pkDenyMsg = new NpcHtmlMessage(getObjectId()); pkDenyMsg.setHtml(html); - * player.sendPacket(pkDenyMsg); player.sendPacket(ActionFailed.STATIC_PACKET); html = null; return true; } return false; } - */ - /** * Open a chat window on client with the text of the L2NpcInstance.
    *
    @@ -3151,8 +3037,6 @@ public class L2NpcInstance extends L2Character NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(filename); - // String word = "npc-"+npcId+(val>0 ? "-"+val : "" )+"-dialog-append"; - if (this instanceof L2MerchantInstance) { if (Config.LIST_PET_RENT_NPC.contains(npcId)) @@ -3240,8 +3124,7 @@ public class L2NpcInstance extends L2Character return false; } - // normally this wouldn't really be needed, but for those few exceptions, - // we do need to reset the weapons back to the initial templated weapon. + // Normally this wouldn't really be needed, but for those few exceptions, we do need to reset the weapons back to the initial templated weapon. _currentLHandId = getTemplate().lhand; _currentRHandId = getTemplate().rhand; _currentCollisionHeight = getTemplate().collisionHeight; @@ -3359,10 +3242,6 @@ public class L2NpcInstance extends L2Character return _spawn; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#toString() - */ @Override public String toString() { @@ -3399,8 +3278,6 @@ public class L2NpcInstance extends L2Character } } - // Two functions to change the appearance of the equipped weapons on the NPC - // This is only useful for a few NPCs and is most likely going to be called from AI /** * Sets the l hand id. * @param newWeaponId the new l hand id diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcWalkerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcWalkerInstance.java index 450f2517ff..61cbee566d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcWalkerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2NpcWalkerInstance.java @@ -59,10 +59,6 @@ public class L2NpcWalkerInstance extends L2NpcInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onSpawn() - */ @Override public void onSpawn() { @@ -124,10 +120,6 @@ public class L2NpcWalkerInstance extends L2NpcInstance return false; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getAI() - */ @Override public L2CharacterAI getAI() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ObservationInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ObservationInstance.java index 2c1267a66c..5c56229eed 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ObservationInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2ObservationInstance.java @@ -32,8 +32,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2ObservationInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2TeleporterInstance.class); - /** * Instantiates a new l2 observation instance. * @param objectId the object id @@ -44,10 +42,6 @@ public final class L2ObservationInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -112,10 +106,6 @@ public final class L2ObservationInstance extends L2FolkInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#getHtmlPath(int, int) - */ @Override public String getHtmlPath(int npcId, int val) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2OlympiadManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2OlympiadManagerInstance.java index 24a125e792..f2abef89dc 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2OlympiadManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2OlympiadManagerInstance.java @@ -34,7 +34,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; * Olympiad NPCs Instance * @author godson */ - public class L2OlympiadManagerInstance extends L2FolkInstance { private static Logger LOGGER = Logger.getLogger(L2OlympiadManagerInstance.class.getName()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index afb36b0475..5b1969f822 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -268,887 +268,290 @@ public final class L2PcInstance extends L2Playable private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC"; private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?"; - /** The _is the vip. */ public boolean _isVIP = false; - /** - * The _is the vip. - */ public boolean _inEventVIP = false; - /** - * The _is the vip. - */ public boolean _isNotVIP = false; - /** - * The _is the vip. - */ public boolean _isTheVIP = false; - - /** The _original karma vip. */ public int _originalNameColourVIP; - /** - * The _original karma vip. - */ public int _originalKarmaVIP; - - /** The _vote timestamp. */ private long _voteTimestamp = 0; - - /** The _posticipate sit. */ private boolean _posticipateSit; - - /** The sitting task launched. */ protected boolean sittingTaskLaunched; - - /** The saved_status. */ private PlayerStatus saved_status = null; - - /** The _instance login time. */ private final long _instanceLoginTime; - - /** The _last teleport action. */ private long _lastTeleportAction = 0; - - /** The TOGGLE_USE time. */ protected long TOGGLE_USE = 0; - - /** The _active_boxes. */ public int _active_boxes = -1; - - /** The active_boxes_characters. */ public List active_boxes_characters = new ArrayList<>(); - - /** The Constant REQUEST_TIMEOUT. */ public static final int REQUEST_TIMEOUT = 15; - - /** The Constant STORE_PRIVATE_NONE. */ public static final int STORE_PRIVATE_NONE = 0; - - /** The Constant STORE_PRIVATE_SELL. */ public static final int STORE_PRIVATE_SELL = 1; - - /** The Constant STORE_PRIVATE_BUY. */ public static final int STORE_PRIVATE_BUY = 3; - - /** The Constant STORE_PRIVATE_MANUFACTURE. */ public static final int STORE_PRIVATE_MANUFACTURE = 5; - - /** The Constant STORE_PRIVATE_PACKAGE_SELL. */ public static final int STORE_PRIVATE_PACKAGE_SELL = 8; - - /** The _client. */ private L2GameClient _client; - - /** The _account name. */ private String _accountName; - - /** The _delete timer. */ private long _deleteTimer; - - /** The _is online. */ private boolean _isOnline = false; - - /** The _online time. */ private long _onlineTime; - - /** The _online begin time. */ private long _onlineBeginTime; - - /** The _last access. */ private long _lastAccess; - - /** The _uptime. */ private long _uptime; - - /** The _base class. */ protected int _baseClass; - - /** The _active class. */ protected int _activeClass; - - /** The _class index. */ protected int _classIndex = 0; - - /** Fireworks on first login. */ private boolean _first_log; - - /** PC BANG POINT. */ private int pcBangPoint = 0; - - /** The list of sub-classes this character has. */ private Map _subClasses; - - /** The _appearance. */ private PcAppearance _appearance; - - /** The Identifier of the L2PcInstance. */ private int _charId = 0x00030b7a; - - /** The Experience of the L2PcInstance before the last Death Penalty. */ private long _expBeforeDeath; - - /** The Karma of the L2PcInstance (if higher than 0, the name of the L2PcInstance appears in red). */ private int _karma; - - /** The number of player killed during a PvP (the player killed was PvP Flagged). */ private int _pvpKills; - - /** The PK counter of the L2PcInstance (= Number of non PvP Flagged player killed). */ private int _pkKills; - - /** The _last kill. */ private int _lastKill = 0; - - /** The count. */ private int count = 0; - - /** The PvP Flag state of the L2PcInstance (0=White, 1=Purple). */ private byte _pvpFlag; - - /** The Siege state of the L2PcInstance. */ private byte _siegeState = 0; - - /** The _cur weight penalty. */ private int _curWeightPenalty = 0; - - /** The _last compass zone. */ private int _lastCompassZone; // the last compass zone update send to the client - - /** The _zone validate counter. */ private byte _zoneValidateCounter = 4; - - /** The _is in7s dungeon. */ private boolean _isIn7sDungeon = false; - - // private boolean _inJail = false; - // private long _jailTimer = 0; - // private ScheduledFuture _jailTask; - - /** Special hero aura values. */ private int heroConsecutiveKillCount = 0; - - /** The is pvp hero. */ private boolean isPVPHero = false; - - /** character away mode *. */ private boolean _awaying = false; - - /** The _is away. */ private boolean _isAway = false; - - /** The _original title color away. */ public int _originalTitleColorAway; - - /** The _original title away. */ public String _originalTitleAway; - - /** The _is aio. */ private boolean _isAio = false; - - /** The _aio_end time. */ private long _aio_endTime = 0; - - /** Event parameters. */ public int eventX; - - /** The event y. */ public int eventY; - - /** The event z. */ public int eventZ; - - /** The event karma. */ public int eventKarma; - - /** The event pvp kills. */ public int eventPvpKills; - - /** The event pk kills. */ public int eventPkKills; - - /** The event title. */ public String eventTitle; - - /** The kills. */ public List kills = new LinkedList<>(); - - /** The event sit forced. */ public boolean eventSitForced = false; - - /** The at event. */ public boolean atEvent = false; - - /** TvT Engine parameters. */ public String _teamNameTvT; - /** - * TvT Engine parameters. - */ public String _originalTitleTvT; - - /** The _original karma tv t. */ public int _originalNameColorTvT = 0; - /** - * The _original karma tv t. - */ public int _countTvTkills; - /** - * The _original karma tv t. - */ public int _countTvTdies; - /** - * The _original karma tv t. - */ public int _originalKarmaTvT; - - /** The _in event tv t. */ public boolean _inEventTvT = false; - - /** CTF Engine parameters. */ public String _teamNameCTF; - /** - * CTF Engine parameters. - */ public String _teamNameHaveFlagCTF; - /** - * CTF Engine parameters. - */ public String _originalTitleCTF; - - /** The _count ct fflags. */ public int _originalNameColorCTF = 0; - /** - * The _count ct fflags. - */ public int _originalKarmaCTF; - /** - * The _count ct fflags. - */ public int _countCTFflags; - - /** The _have flag ctf. */ public boolean _inEventCTF = false; - /** - * The _have flag ctf. - */ public boolean _haveFlagCTF = false; - - /** The _pos checker ctf. */ public Future _posCheckerCTF = null; - - /** DM Engine parameters. */ public String _originalTitleDM; - - /** The _original karma dm. */ public int _originalNameColorDM = 0; - /** - * The _original karma dm. - */ public int _countDMkills; - /** - * The _original karma dm. - */ public int _originalKarmaDM; - - /** The _in event dm. */ public boolean _inEventDM = false; - - /** Event Engine parameters. */ public int _originalNameColor; - /** - * Event Engine parameters. - */ public int _countKills; - /** - * Event Engine parameters. - */ public int _originalKarma; - /** - * Event Engine parameters. - */ public int _eventKills; - - /** The _in event. */ public boolean _inEvent = false; - - /** Olympiad. */ private boolean _inOlympiadMode = false; - - /** The _ olympiad start. */ private boolean _OlympiadStart = false; - - /** The _ olympiad position. */ private int[] _OlympiadPosition; - - /** The _olympiad game id. */ private int _olympiadGameId = -1; - - /** The _olympiad side. */ private int _olympiadSide = -1; - - /** The dmg dealt. */ - // public int dmgDealt = 0; - - /** Duel. */ private boolean _isInDuel = false; - - /** The _duel state. */ private int _duelState = Duel.DUELSTATE_NODUEL; - - /** The _duel id. */ private int _duelId = 0; - - /** The _no duel reason. */ private SystemMessageId _noDuelReason = SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL; - - /** Boat. */ private boolean _inBoat; - - /** The _boat. */ private L2BoatInstance _boat; - - /** The _in boat position. */ private Point3D _inBoatPosition; - - /** The _mount type. */ private int _mountType; - - /** Store object used to summon the strider you are mounting *. */ private int _mountObjectID = 0; - - /** The _telemode. */ public int _telemode = 0; - - /** The _is silent moving. */ private int _isSilentMoving = 0; - - /** The _in crystallize. */ private boolean _inCrystallize; - - /** The _in craft mode. */ private boolean _isCrafting; - - /** The table containing all L2RecipeList of the L2PcInstance. */ private final Map _dwarvenRecipeBook = new HashMap<>(); - - /** The _common recipe book. */ private final Map _commonRecipeBook = new HashMap<>(); - - /** True if the L2PcInstance is sitting. */ private boolean _waitTypeSitting; - - /** True if the L2PcInstance is using the relax skill. */ private boolean _relax; - - /** Location before entering Observer Mode. */ private int _obsX; - - /** The _obs y. */ private int _obsY; - - /** The _obs z. */ private int _obsZ; - - /** The _observer mode. */ private boolean _observerMode = false; - - /** Stored from last ValidatePosition *. */ private Location _lastClientPosition = new Location(0, 0, 0); - - /** The _last server position. */ private Location _lastServerPosition = new Location(0, 0, 0); - - /** The number of recommandation obtained by the L2PcInstance. */ private int _recomHave; // how much I was recommended by others - - /** The number of recommandation that the L2PcInstance can give. */ private int _recomLeft; // how many recomendations I can give to others - - /** Date when recom points were updated last time. */ private long _lastRecomUpdate; - - /** List with the recomendations that I've give. */ private final List _recomChars = new ArrayList<>(); - - /** The random number of the L2PcInstance. */ - // private static final Random _rnd = new Random(); - private final PcInventory _inventory = new PcInventory(this); - - /** The _warehouse. */ private PcWarehouse _warehouse; - - /** The _freight. */ private final PcFreight _freight = new PcFreight(this); - - /** The Private Store type of the L2PcInstance (STORE_PRIVATE_NONE=0, STORE_PRIVATE_SELL=1, sellmanage=2, STORE_PRIVATE_BUY=3, buymanage=4, STORE_PRIVATE_MANUFACTURE=5). */ private int _privatestore; - - /** The _active trade list. */ private TradeList _activeTradeList; - - /** The _active warehouse. */ private ItemContainer _activeWarehouse; - - /** The _create list. */ private L2ManufactureList _createList; - - /** The _sell list. */ private TradeList _sellList; - - /** The _buy list. */ private TradeList _buyList; - - /** True if the L2PcInstance is newbie. */ private boolean _newbie; - - /** The _noble. */ private boolean _noble = false; - - /** The _hero. */ private boolean _hero = false; - - /** The _donator. */ private boolean _donator = false; - - /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */ private L2FolkInstance _lastFolkNpc = null; - - /** Last NPC Id talked on a quest. */ private int _questNpcObject = 0; - private int _party_find = 0; - - // summon friend - /** The _summon request. */ private final SummonRequest _summonRequest = new SummonRequest(); - - /** The table containing all Quests began by the L2PcInstance. */ private final Map _quests = new HashMap<>(); - - /** The list containing all shortCuts of this L2PcInstance. */ private final ShortCuts _shortCuts = new ShortCuts(this); - - /** The list containing all macroses of this L2PcInstance. */ private final MacroList _macroses = new MacroList(this); - - /** The _snoop listener. */ private final List _snoopListener = new ArrayList<>(); - - /** The _snooped player. */ private final List _snoopedPlayer = new ArrayList<>(); - - /** The _skill learning class id. */ private ClassId _skillLearningClassId; - - // hennas - /** The _henna. */ private final L2HennaInstance[] _henna = new L2HennaInstance[3]; - - /** The _henna str. */ private int _hennaSTR; - - /** The _henna int. */ private int _hennaINT; - - /** The _henna dex. */ private int _hennaDEX; - - /** The _henna men. */ private int _hennaMEN; - - /** The _henna wit. */ private int _hennaWIT; - - /** The _henna con. */ private int _hennaCON; - - /** The L2Summon of the L2PcInstance. */ private L2Summon _summon = null; - // apparently, a L2PcInstance CAN have both a summon AND a tamed beast at the same time!! - /** The _tamed beast. */ private L2TamedBeastInstance _tamedBeast = null; - - // client radar - /** The _radar. */ private L2Radar _radar; - - // Clan related attributes - /** The Clan Identifier of the L2PcInstance. */ private int _clanId = 0; - - /** The Clan object of the L2PcInstance. */ private L2Clan _clan; - - /** Apprentice and Sponsor IDs. */ private int _apprentice = 0; - - /** The _sponsor. */ private int _sponsor = 0; - - /** The _clan join expiry time. */ private long _clanJoinExpiryTime; - - /** The _clan create expiry time. */ private long _clanCreateExpiryTime; - - /** The _power grade. */ private int _powerGrade = 0; - - /** The _clan privileges. */ private int _clanPrivileges = 0; - - /** L2PcInstance's pledge class (knight, Baron, etc.) */ private int _pledgeClass = 0; - - /** The _pledge type. */ private int _pledgeType = 0; - - /** Level at which the player joined the clan as an academy member. */ private int _lvlJoinedAcademy = 0; - - /** The _wants peace. */ private int _wantsPeace = 0; - - // Death Penalty Buff Level - /** The _death penalty buff level. */ private int _deathPenaltyBuffLevel = 0; - - // private int _ChatFilterCount = 0; - - // GM related variables - // private boolean _isGm; - /** The _access level. */ private AccessLevel _accessLevel; - - // private boolean _chatBanned = false; // Chat Banned - // private ScheduledFuture _chatUnbanTask = null; - /** The _message refusal. */ private boolean _messageRefusal = false; // message refusal mode - - /** The _diet mode. */ private boolean _dietMode = false; // ignore weight penalty - - /** The _exchange refusal. */ private boolean _exchangeRefusal = false; // Exchange refusal - - /** The _party. */ private L2Party _party; - private long _lastAttackPacket = 0; - - // this is needed to find the inviting player for Party response - // there can only be one active party request at once - /** The _active requester. */ private L2PcInstance _activeRequester; - - /** The _request expire time. */ private long _requestExpireTime = 0; - - /** The _request. */ private final L2Request _request = new L2Request(this); - - /** The _arrow item. */ private L2ItemInstance _arrowItem; - - // Used for protection after teleport - /** The _protect end time. */ private long _protectEndTime = 0; - private long _teleportProtectEndTime = 0; - - // protects a char from agro mobs when getting up from fake death - /** The _recent fake death end time. */ private long _recentFakeDeathEndTime = 0; - - /** The fists L2Weapon of the L2PcInstance (used when no weapon is equiped). */ private L2Weapon _fistsWeaponItem; - - /** The _chars. */ private final Map _chars = new HashMap<>(); - - // private byte _updateKnownCounter = 0; - - /** The current higher Expertise of the L2PcInstance (None=0, D=1, C=2, B=3, A=4, S=5). */ private int _expertiseIndex; // index in EXPERTISE_LEVELS - - /** The _expertise penalty. */ private int _expertisePenalty = 0; - - /** The _heavy_mastery. */ private boolean _heavy_mastery = false; - - /** The _light_mastery. */ private boolean _light_mastery = false; - - /** The _robe_mastery. */ private boolean _robe_mastery = false; - - /** The _mastery penalty. */ private int _masteryPenalty = 0; - - /** The _active enchant item. */ private L2ItemInstance _activeEnchantItem = null; - - /** The _inventory disable. */ protected boolean _inventoryDisable = false; - - /** The _cubics. */ protected Map _cubics = new HashMap<>(); - - /** Active shots. A FastSet variable would actually suffice but this was changed to fix threading stability... */ protected Map _activeSoulShots = new ConcurrentHashMap<>(); - - /** The soul shot lock. */ public final ReentrantLock soulShotLock = new ReentrantLock(); - - /** The dialog. */ public Quest dialog = null; - - /** new loto ticket *. */ private final int _loto[] = new int[5]; - // public static int _loto_nums[] = {0,1,2,3,4,5,6,7,8,9,}; - /** new race ticket *. */ private final int _race[] = new int[2]; - - /** The _block list. */ private final BlockList _blockList = new BlockList(this); - - /** The _team. */ private int _team = 0; - - /** lvl of alliance with ketra orcs or varka silenos, used in quests and aggro checks [-5,-1] varka, 0 neutral, [1,5] ketra. */ private int _alliedVarkaKetra = 0; - - /** ********************************************************************* Adventurers' coupon (0-no 1-NG 2-D 3-NG & D) 0 = No coupon 1 = coupon for No Grade 2 = coupon for D Grade 3 = coupon for No & D Grade ********************************************************************. */ private int _hasCoupon = 0; - - /** The _fish combat. */ private L2Fishing _fishCombat; - - /** The _fishing. */ private boolean _fishing = false; - - /** The _fishx. */ private int _fishx = 0; - - /** The _fishy. */ private int _fishy = 0; - - /** The _fishz. */ private int _fishz = 0; - - /** The _task rent pet. */ private ScheduledFuture _taskRentPet; - - /** The _task water. */ private ScheduledFuture _taskWater; - - /** Bypass validations. */ private final List _validBypass = new ArrayList<>(); - - /** The _valid bypass2. */ private final List _validBypass2 = new ArrayList<>(); - - /** The _valid link. */ private final List _validLink = new ArrayList<>(); - - /** The _forum mail. */ private Forum _forumMail; - - /** The _forum memo. */ private Forum _forumMemo; - - /** Current skill in use. */ private SkillDat _currentSkill; private SkillDat _currentPetSkill; - - /** Skills queued because a skill is already in progress. */ private SkillDat _queuedSkill; - - /* Flag to disable equipment/skills while wearing formal wear * */ - /** The _ is wearing formal wear. */ private boolean _IsWearingFormalWear = false; - - /** The _current skill world position. */ private Point3D _currentSkillWorldPosition; - - /** The _cursed weapon equiped id. */ private int _cursedWeaponEquipedId = 0; - // private boolean _combatFlagEquippedId = false; - - /** The _revive requested. */ private int _reviveRequested = 0; - - /** The _revive power. */ private double _revivePower = 0; - - /** The _revive pet. */ private boolean _revivePet = false; - - /** The _cp update inc check. */ private double _cpUpdateIncCheck = .0; - - /** The _cp update dec check. */ private double _cpUpdateDecCheck = .0; - - /** The _cp update interval. */ private double _cpUpdateInterval = .0; - - /** The _mp update inc check. */ private double _mpUpdateIncCheck = .0; - - /** The _mp update dec check. */ private double _mpUpdateDecCheck = .0; - - /** The _mp update interval. */ private double _mpUpdateInterval = .0; - private long timerToAttack; - - /** The _is offline. */ private boolean _isInOfflineMode = false; - - /** The _is trade off. */ private boolean _isTradeOff = false; - - /** The _offline shop start. */ private long _offlineShopStart = 0; - - /** The _original name color offline. */ public int _originalNameColorOffline = 0xFFFFFF; - - /** Herbs Task Time *. */ private int _herbstask = 0; - - // L2JMOD Wedding - /** The _married. */ private boolean _married = false; - - /** The _married type. */ private int _marriedType = 0; - - /** The _partner id. */ private int _partnerId = 0; - - /** The _couple id. */ private int _coupleId = 0; - - /** The _engagerequest. */ private boolean _engagerequest = false; - - /** The _engageid. */ private int _engageid = 0; - - /** The _marryrequest. */ private boolean _marryrequest = false; - - /** The _marryaccepted. */ private boolean _marryaccepted = false; - - /** Quake System. */ private int quakeSystem = 0; - - /** The _is locked. */ private boolean _isLocked = false; - - /** The _is stored. */ private boolean _isStored = false; - - /** The _blunt_mastery. */ private boolean _blunt_mastery = false; - - /** The _pole_mastery. */ private boolean _pole_mastery = false; - - /** The _dagger_mastery. */ private boolean _dagger_mastery = false; - - /** The _sword_mastery. */ private boolean _sword_mastery = false; - - /** The _bow_mastery. */ private boolean _bow_mastery = false; - - /** The _fist_mastery. */ private boolean _fist_mastery = false; - - /** The _dual_mastery. */ private boolean _dual_mastery = false; - - /** The _2hands_mastery. */ private boolean _2hands_mastery = false; - - /** The _mastery weap penalty. */ private int _masteryWeapPenalty = 0; - - // MOVING on attack TASK, L2OFF FIX - /** The launched moving task. */ protected MoveOnAttack launchedMovingTask = null; - - /** The _moving task defined. */ protected Boolean _movingTaskDefined = false; - private boolean _learningSkill = false; - - /** The _task warn user take break. */ private ScheduledFuture _taskWarnUserTakeBreak; - - /** The _was invisible. */ private boolean _wasInvisible = false; - - /** ShortBuff clearing Task */ private ScheduledFuture _shortBuffTask = null; - - /** list of character friends. */ private final List _friendList = new ArrayList<>(); private final List _selectedFriendList = new ArrayList<>(); // Related to CB. private final List _selectedBlocksList = new ArrayList<>(); // Related to CB. - private int _mailPosition; - - /** The _fish. */ private FishData _fish; - - /** The Reuse time stamps. */ private final Map ReuseTimeStamps = new ConcurrentHashMap<>(); - - /** The _gm status. */ - boolean _gmStatus = true; // true by default sincce this is used by GMS - - /** The _saymode. */ + boolean _gmStatus = true; // true by default since this is used by GMS public L2Object _saymode = null; - - /** The Dropzor. */ String Dropzor = "Coin of Luck"; - - /** The isintwtown. */ private boolean isintwtown = false; - - // during fall validations will be disabled for 1000 ms. private static final int FALLING_VALIDATION_DELAY = 1000; private long _fallingTimestamp = 0; private volatile int _fallingDamage = 0; private Future _fallingDamageTask = null; - - /** Previous coordinate sent to party in ValidatePosition *. */ private final Point3D _lastPartyPosition = new Point3D(0, 0, 0); - - /** The _punish level. */ private PunishLevel _punishLevel = PunishLevel.NONE; - - /** The _punish timer. */ private long _punishTimer = 0; - - /** The _punish task. */ private ScheduledFuture _punishTask; - private final GatesRequest _gatesRequest = new GatesRequest(); - private final HashMap confirmDlgRequests = new HashMap<>(); - - /** The _current multi sell id. */ private int _currentMultiSellId = -1; - - /** The _partyroom. */ private int _partyroom = 0; /** The table containing all minimum level needed for each Expertise (None, D, C, B, A, S). */ @@ -1278,10 +681,6 @@ public final class L2PcInstance extends L2Playable L2PcInstance.this.doInteract(target); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#doAttack(com.l2jmobius.gameserver.model.L2Character) - */ @Override public void doAttack(L2Character target) { @@ -1323,10 +722,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character.AIAccessor#doCast(com.l2jmobius.gameserver.model.L2Skill) - */ @Override public void doCast(L2Skill skill) { @@ -1588,10 +983,6 @@ public final class L2PcInstance extends L2Playable _sendMessage = sendMessage; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override @SuppressWarnings("synthetic-access") public void run() @@ -1841,10 +1232,6 @@ public final class L2PcInstance extends L2Playable _instanceLoginTime = System.currentTimeMillis(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2PlayableInstance#getKnownList() - */ @Override public final PcKnownList getKnownList() { @@ -1855,10 +1242,6 @@ public final class L2PcInstance extends L2Playable return (PcKnownList) super.getKnownList(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2PlayableInstance#getStat() - */ @Override public final PcStat getStat() { @@ -1869,10 +1252,6 @@ public final class L2PcInstance extends L2Playable return (PcStat) super.getStat(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2PlayableInstance#getStatus() - */ @Override public final PcStatus getStatus() { @@ -2481,7 +1860,7 @@ public final class L2PcInstance extends L2Playable private void showQuestWindow(String questId, String stateId) { String path = "data/scripts/quests/" + questId + "/" + stateId + ".htm"; - String content = HtmCache.getInstance().getHtm(path); // TODO path for quests html + String content = HtmCache.getInstance().getHtm(path); if (content != null) { @@ -2614,10 +1993,6 @@ public final class L2PcInstance extends L2Playable return _pvpFlag; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#updatePvPFlag(int) - */ @Override public void updatePvPFlag(int value) { @@ -2650,10 +2025,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#revalidateZone(boolean) - */ @Override public void revalidateZone(boolean force) { @@ -3105,8 +2476,6 @@ public final class L2PcInstance extends L2Playable final int maxLoad = getMaxLoad(); if (maxLoad > 0) { - // setIsOverloaded(getCurrentLoad() > maxLoad); - // int weightproc = getCurrentLoad() * 1000 / maxLoad; final long weightproc = (long) (((getCurrentLoad() - calcStat(Stats.WEIGHT_PENALTY, 1, this, null)) * 1000) / maxLoad); int newWeightPenalty; @@ -3350,7 +2719,8 @@ public final class L2PcInstance extends L2Playable int newMasteryPenalty = 0; if (!_bow_mastery && !_blunt_mastery && !_dagger_mastery && !_fist_mastery && !_dual_mastery && !_pole_mastery && !_sword_mastery && !_2hands_mastery) - { // not completed 1st class transfer or not acquired yet the mastery skills + { + // not completed 1st class transfer or not acquired yet the mastery skills newMasteryPenalty = 0; } else @@ -3576,7 +2946,6 @@ public final class L2PcInstance extends L2Playable } if ((unequipped.getItem().getType2() == L2Item.TYPE2_WEAPON) && (equipped == null ? true : equipped.getItem().getCrystalType() != unequipped.getItem().getCrystalType())) - // && getInventory().getItem() != null - must be fixed. { for (L2ItemInstance ss : getInventory().getItems()) { @@ -3847,7 +3216,6 @@ public final class L2PcInstance extends L2Playable } // Active skill dwarven craft - if ((getSkillLevel(1321) < 1) && (getRace() == Race.dwarf)) { L2Skill skill = SkillTable.getInstance().getInfo(1321, 1); @@ -3896,9 +3264,7 @@ public final class L2PcInstance extends L2Playable } /** - * Regive all skills which aren't saved to database, like Noble, Hero, Clan Skills
    - *
    - * . + * Regive all skills which aren't saved to database, like Noble, Hero, Clan Skills. */ private synchronized void regiveTemporarySkills() { @@ -3916,10 +3282,6 @@ public final class L2PcInstance extends L2Playable setHero(true); } - /* - * // Add clan leader skills if clanleader if(isClanLeader()) { setClanLeader(true); } - */ - // Add clan skills if ((getClan() != null) && (getClan().getReputationScore() >= 0)) { @@ -3943,26 +3305,11 @@ public final class L2PcInstance extends L2Playable */ public void giveAvailableSkills() { - // int unLearnable = 0; int skillCounter = 0; - // Get available skills - // L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(this, getClassId()); - // while(skills.length > unLearnable) - // { - // unLearnable = 0; - // for(L2SkillLearn s : skills) Collection skills = SkillTreeTable.getInstance().getAllAvailableSkills(this, getClassId()); for (L2Skill sk : skills) { - // { - // L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel()); - // if(sk == null || (sk.getId() == L2Skill.SKILL_DIVINE_INSPIRATION && !Config.AUTO_LEARN_DIVINE_INSPIRATION)) - // { - // unLearnable++; - // continue; - // } - if (getSkillLevel(sk.getId()) == 0) { skillCounter++; @@ -3989,10 +3336,6 @@ public final class L2PcInstance extends L2Playable addSkill(sk, true); } - // // Get new available skills - // skills = SkillTreeTable.getInstance().getAvailableSkills(this, getClassId()); - // } - sendMessage("You have learned " + skillCounter + " new skills."); } @@ -4180,33 +3523,17 @@ public final class L2PcInstance extends L2Playable _shortCuts.deleteShortCutByObjectId(objectId); } - /** - * MoveOnAttack Task. - */ public class MoveOnAttack implements Runnable { - /** The _player. */ final L2PcInstance _player; - - /** The _pos. */ Location _pos; - /** - * Instantiates a new move on attack. - * @param player the player - * @param pos the pos - */ public MoveOnAttack(L2PcInstance player, Location pos) { _player = player; _pos = pos; - // launchedMovingTask = this; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -4245,7 +3572,6 @@ public final class L2PcInstance extends L2Playable public boolean isMovingTaskDefined() { return _movingTaskDefined; - // return launchedMovingTask != null; } public final void setMovingTaskDefined(boolean value) @@ -4364,8 +3690,7 @@ public final class L2PcInstance extends L2Playable stopFakeDeath(null); } - if (isMoving()) // since you are moving and want sit down - // the posticipate sitdown task will be always true + if (isMoving()) // since you are moving and want sit down the posticipate sitdown task will be always true { setPosticipateSit(true); return; @@ -4397,32 +3722,15 @@ public final class L2PcInstance extends L2Playable } } - /** - * Sit down Task. - */ class SitDownTask implements Runnable { - - /** The _player. */ L2PcInstance _player; - /** The this$0. */ - final L2PcInstance this$0; - - /** - * Instantiates a new sit down task. - * @param player the player - */ SitDownTask(L2PcInstance player) { - this$0 = L2PcInstance.this; _player = player; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -4433,28 +3741,15 @@ public final class L2PcInstance extends L2Playable } } - /** - * Stand up Task. - */ class StandUpTask implements Runnable { - - /** The _player. */ L2PcInstance _player; - /** - * Instantiates a new stand up task. - * @param player the player - */ StandUpTask(L2PcInstance player) { _player = player; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -4465,9 +3760,7 @@ public final class L2PcInstance extends L2Playable } /** - * Stand up the L2PcInstance, set the AI Intention to AI_INTENTION_IDLE and send a Server->Client ChangeWaitType packet (broadcast)
    - *
    - * . + * Stand up the L2PcInstance, set the AI Intention to AI_INTENTION_IDLE and send a Server->Client ChangeWaitType packet (broadcast). */ public void standUp() { @@ -5441,9 +4734,8 @@ public final class L2PcInstance extends L2Playable if (Config.DESTROY_DROPPED_PLAYER_ITEM && !Config.LIST_PROTECTED_ITEMS.contains(item.getItemId())) { - if (Config.AUTODESTROY_ITEM_AFTER > 0) - { // autodestroy enabled - + if (Config.AUTODESTROY_ITEM_AFTER > 0) // autodestroy enabled + { if ((item.isEquipable() && Config.DESTROY_EQUIPABLE_PLAYER_ITEM) || !item.isEquipable()) { ItemsAutoDestroy.getInstance().addItem(item); @@ -5824,7 +5116,6 @@ public final class L2PcInstance extends L2Playable @Override public void onAction(L2PcInstance player) { - // if ((TvT._started && !Config.TVT_ALLOW_INTERFERENCE) || (CTF._started && !Config.CTF_ALLOW_INTERFERENCE) || (DM._started && !Config.DM_ALLOW_INTERFERENCE)) // no Interaction with not participant to events if (((TvT.is_started() || TvT.is_teleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.is_started() || CTF.is_teleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.is_started() || DM.is_teleport()) && !Config.DM_ALLOW_INTERFERENCE)) { @@ -5885,13 +5176,7 @@ public final class L2PcInstance extends L2Playable player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, this); } } - else /* - * //during teleport phase, players cant do any attack if((TvT.is_teleport() && _inEventTvT) || (CTF.is_teleport() && _inEventCTF) || (DM.is_teleport() && _inEventDM)){ player.sendPacket(ActionFailed.STATIC_PACKET); return; } if (TvT.is_started()) { if ((_inEventTvT && - * player._teamNameTvT.equals(_teamNameTvT))) { player.sendPacket(ActionFailed.STATIC_PACKET); return; } } if(CTF.is_started()){ if ((_inEventCTF && player._teamNameCTF.equals(_teamNameCTF))) { player.sendPacket(ActionFailed.STATIC_PACKET); return; } } - */ - // Check if this L2PcInstance is autoAttackable - // if (isAutoAttackable(player) || (player._inEventTvT && TvT._started) || (player._inEventCTF && CTF._started) || (player._inEventDM && DM._started) || (player._inEventVIP && VIP._started)) - if (isAutoAttackable(player)) + else if (isAutoAttackable(player)) { if (Config.ALLOW_CHAR_KILL_PROTECT) @@ -5996,10 +5281,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#onActionShift(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onActionShift(L2PcInstance player) { @@ -6021,8 +5302,7 @@ public final class L2PcInstance extends L2Playable AdminEditChar.gatherCharacterInfo(player, this, "charinfo.htm"); } } - else - // Like L2OFF set the target of the L2PcInstance player + else // Like L2OFF set the target of the L2PcInstance player { if (((TvT.is_started() || TvT.is_teleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.is_started() || CTF.is_teleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.is_started() || DM.is_teleport()) && !Config.DM_ALLOW_INTERFERENCE)) { @@ -6042,6 +5322,7 @@ public final class L2PcInstance extends L2Playable return; } } + // Check if the L2PcInstance is confused if (player.isOutOfControl()) { @@ -6083,9 +5364,7 @@ public final class L2PcInstance extends L2Playable player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, this); } } - else // Check if this L2PcInstance is autoAttackable - // if (isAutoAttackable(player) || (player._inEventTvT && TvT._started) || (player._inEventCTF && CTF._started) || (player._inEventDM && DM._started) || (player._inEventVIP && VIP._started)) - if (isAutoAttackable(player)) + else if (isAutoAttackable(player)) { if (Config.ALLOW_CHAR_KILL_PROTECT) @@ -6184,8 +5463,7 @@ public final class L2PcInstance extends L2Playable } } } - else // Calculate the distance between the L2PcInstance - // Only archer can hit from long + else // Calculate the distance between the L2PcInstance. Only archer can hit from long. if ((currentWeapon != null) && (currentWeapon.getItemType() == L2WeaponType.BOW)) { player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this); @@ -6205,8 +5483,7 @@ public final class L2PcInstance extends L2Playable { if (GeoData.getInstance().canSeeTarget(player, this)) { - // Calculate the distance between the L2PcInstance - // Only archer can hit from long + // Calculate the distance between the L2PcInstance. Only archer can hit from long. if ((currentWeapon != null) && (currentWeapon.getItemType() == L2WeaponType.BOW)) { player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, this); @@ -6222,9 +5499,7 @@ public final class L2PcInstance extends L2Playable } } - else // Calculate the distance between the L2PcInstance - // Only archer can hit from long - if ((currentWeapon != null) && (currentWeapon.getItemType() == L2WeaponType.BOW)) + else if ((currentWeapon != null) && (currentWeapon.getItemType() == L2WeaponType.BOW)) // Calculate the distance between the L2PcInstance. Only archer can hit from long. { player.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, this); } @@ -6240,10 +5515,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2PlayableInstance#isInFunEvent() - */ @Override public boolean isInFunEvent() { @@ -6395,7 +5666,7 @@ public final class L2PcInstance extends L2Playable @Override public void broadcastStatusUpdate() { - // We mustn't send these informations to other players + // We must not send these informations to other players // Send the Server->Client packet StatusUpdate with current HP and MP to all L2PcInstance that must be informed of HP/MP updates of this L2PcInstance // super.broadcastStatusUpdate(); @@ -6460,7 +5731,6 @@ public final class L2PcInstance extends L2Playable } } - // Custom PVP Color System - Start /** * Update pvp color. * @param pvpKillAmount the pvp kill amount @@ -6504,9 +5774,6 @@ public final class L2PcInstance extends L2Playable } } - // Custom PVP Color System - End - - // Custom Pk Color System - Start /** * Update pk color. * @param pkKillAmount the pk kill amount @@ -6544,8 +5811,6 @@ public final class L2PcInstance extends L2Playable } } - // Custom Pk Color System - End - /** * Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers.
    *
    @@ -6654,8 +5919,7 @@ public final class L2PcInstance extends L2Playable sendPacket(new RecipeShopSellList(this, temp)); } } - else // _interactTarget=null should never happen but one never knows ^^; - if (target != null) + else if (target != null) // _interactTarget=null should never happen but one never knows ^^; { target.onAction(this); } @@ -6848,9 +6112,6 @@ public final class L2PcInstance extends L2Playable // Cursed Weapons are not distributed else if (CursedWeaponsManager.getInstance().isCursed(target.getItemId())) { - /* - * Lineage2.com: When a player that controls Akamanah acquires Zariche, the newly-acquired Zariche automatically disappeared, and the equipped Akamanah's level increases by 1. The same rules also apply in the opposite instance. - */ addItem("Pickup", target, null, true); } else if (FortSiegeManager.getInstance().isCombat(target.getItemId())) @@ -7583,7 +6844,6 @@ public final class L2PcInstance extends L2Playable } else if ((pk == null) || !pk.isCursedWeaponEquiped()) { - // if (getKarma() > 0) onDieDropItem(killer); // Check if any item should be dropped if ((!isInsideZone(ZoneId.PVP) || isInsideZone(ZoneId.SIEGE))) @@ -7698,7 +6958,6 @@ public final class L2PcInstance extends L2Playable if ((getKarma() <= 0) && (killer instanceof L2PcInstance) && (((L2PcInstance) killer).getClan() != null) && (getClan() != null) && ((L2PcInstance) killer).getClan().isAtWarWith(getClanId())) { - // || this.getClan().isAtWarWith(((L2PcInstance)killer).getClanId())) return; } @@ -8032,10 +7291,9 @@ public final class L2PcInstance extends L2Playable return false; } - // Anti FARM same Ip + // Anti FARM same IP if (Config.ANTI_FARM_IP_ENABLED) { - if ((_client != null) && (targetPlayer.getClient() != null)) { final String ip1 = _client.getConnection().getInetAddress().getHostAddress(); @@ -8086,8 +7344,7 @@ public final class L2PcInstance extends L2Playable sendPacket(iu); } } - else - // target is not pk and not in pvp ---> PK KILL + else // target is not pk and not in pvp ---> PK KILL { if (Config.PK_REWARD_ENABLED) { @@ -8186,9 +7443,6 @@ public final class L2PcInstance extends L2Playable sendPacket(new UserInfo(this)); } - /** - * Quake system. - */ public void QuakeSystem() { quakeSystem++; @@ -8521,16 +7775,10 @@ public final class L2PcInstance extends L2Playable setPkKills(getPkKills() + 1); - /* - * if(!Config.TW_ALLOW_KARMA && Town != null && isinTownWar()) { //nothing } else - */ if ((Town == null) || (isinTownWar() && Config.TW_ALLOW_KARMA)) { setKarma(getKarma() + newKarma); } - /* - * else if() { setKarma(getKarma() + newKarma); } - */ if ((Town != null) && isinTownWar()) { @@ -9347,7 +8595,7 @@ public final class L2PcInstance extends L2Playable // Remove augementation boni on unequip if (wpn.isAugmented()) { - wpn.getAugmentation().removeBoni(this); + wpn.getAugmentation().removeBonus(this); } L2ItemInstance[] unequiped = getInventory().unEquipItemInBodySlotAndRecord(wpn.getItem().getBodyPart()); @@ -9534,8 +8782,7 @@ public final class L2PcInstance extends L2Playable if (party.getMemberCount() < 9) { - // First set the party otherwise this wouldn't be considered - // as in a party into the L2Character.updateEffectIcons() call. + // First set the party otherwise this wouldn't be considered as in a party into the L2Character.updateEffectIcons() call. _party = party; party.addPartyMember(this); } @@ -9701,7 +8948,6 @@ public final class L2PcInstance extends L2Playable if (_accessLevel != AccessLevels.getInstance()._userAccessLevel) { - // L2EMU_EDIT if (getAccessLevel().useNameColor()) { getAppearance().setNameColor(_accessLevel.getNameColor()); @@ -9710,7 +8956,6 @@ public final class L2PcInstance extends L2Playable { getAppearance().setTitleColor(_accessLevel.getTitleColor()); } - // L2EMU_EDIT broadcastUserInfo(); } } @@ -9742,10 +8987,6 @@ public final class L2PcInstance extends L2Playable return _accessLevel; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getLevelMod() - */ @Override public double getLevelMod() { @@ -10080,7 +9321,6 @@ public final class L2PcInstance extends L2Playable player.setPowerGrade((int) rset.getLong("power_grade")); player.setPledgeType(rset.getInt("subpledge")); player.setLastRecomUpdate(rset.getLong("last_recom_date")); - // player.setApprentice(rset.getInt("apprentice")); if (clanId > 0) { @@ -10119,10 +9359,6 @@ public final class L2PcInstance extends L2Playable curCp = rset.getDouble("curCp"); curMp = rset.getDouble("curMp"); - /* - * player.setCurrentHp(rset.getDouble("curHp")); player.setCurrentCp(rset.getDouble("curCp")); player.setCurrentMp(rset.getDouble("curMp")); - */ - // Check recs player.checkRecom(rset.getInt("rec_have"), rset.getInt("rec_left")); @@ -10152,8 +9388,7 @@ public final class L2PcInstance extends L2Playable } if ((player.getClassIndex() == 0) && (activeClassId != player.getBaseClass())) { - // Subclass in use but doesn't exist in DB - - // a possible restart-while-modifysubclass cheat has been attempted. + // Subclass in use but doesn't exist in DB - a possible restart-while-modifysubclass cheat has been attempted. // Switching to use base class player.setClassId(player.getBaseClass()); LOGGER.warning("Player " + player.getName() + " reverted to base class. Possibly has tried a relogin exploit while subclassing."); @@ -10176,9 +9411,6 @@ public final class L2PcInstance extends L2Playable else { player.setPunishTimer(0); - /* - * player.setInJail(rset.getInt("in_jail") == 1 ? true : false); if(player.isInJail()) { player.setJailTimer(rset.getLong("jail_timer")); } else { player.setJailTimer(0); } player.setChatBanTimer(rset.getLong("banchat_time")); player.updateChatBanState(); - */ } try @@ -10198,8 +9430,6 @@ public final class L2PcInstance extends L2Playable player.setDeathPenaltyBuffLevel(rset.getInt("death_penalty_level")); player.setAio(rset.getInt("aio") == 1 ? true : false); player.setAioEndTime(rset.getLong("aio_end")); - // Add the L2PcInstance object in _allObjects - // L2World.getInstance().storeObject(player); // Set the x,y,z position of the L2PcInstance and make it invisible final int x = rset.getInt("x"); @@ -10235,8 +9465,7 @@ public final class L2PcInstance extends L2Playable return null; } - // Retrieve from the database all secondary data of this L2PcInstance - // and reward expertise/lucky skills if necessary. + // Retrieve from the database all secondary data of this L2PcInstance and reward expertise/lucky skills if necessary. // Note that Clan, Noblesse and Hero skills are given separately and not here. player.restoreCharData(); // reward skill restore mode in order to avoid duplicate storage of already stored skills @@ -10277,8 +9506,6 @@ public final class L2PcInstance extends L2Playable player.setCurrentHpDirect(curHp); player.setCurrentCpDirect(curCp); player.setCurrentMpDirect(curMp); - // player.setCurrentCp(curCp); - // player.setCurrentMp(curMp); } return player; } @@ -10677,8 +9904,8 @@ public final class L2PcInstance extends L2Playable statement.setString(34, getTitle()); statement.setInt(35, getAccessLevel().getLevel()); - if (_isInOfflineMode || (isOnline() == 1)) - { // in offline mode or online + if (_isInOfflineMode || (isOnline() == 1)) // in offline mode or online + { statement.setInt(36, 1); } else @@ -10686,7 +9913,6 @@ public final class L2PcInstance extends L2Playable statement.setInt(36, isOnline()); } - // statement.setInt(36, _isOffline ? 0 : isOnline()); statement.setInt(37, isIn7sDungeon() ? 1 : 0); statement.setInt(38, getClanPrivileges()); statement.setInt(39, getWantsPeace()); @@ -10700,8 +9926,6 @@ public final class L2PcInstance extends L2Playable } statement.setLong(41, totalOnlineTime); - // statement.setInt(42, isInJail() ? 1 : 0); - // statement.setLong(43, getJailTimer()); statement.setInt(42, getPunishLevel().value()); statement.setLong(43, getPunishTimer()); statement.setInt(44, isNewbie() ? 1 : 0); @@ -10722,10 +9946,6 @@ public final class L2PcInstance extends L2Playable statement.setString(58, StringToHex(Integer.toHexString(_originalNameColorOffline).toUpperCase())); statement.setString(59, StringToHex(Integer.toHexString(getAppearance().getTitleColor()).toUpperCase())); - // TODO allow different colors support to players store - // statement.setString(58, StringToHex(Integer.toHexString(getAppearance().getNameColor()).toUpperCase())); - // statement.setString(59, StringToHex(Integer.toHexString(getAppearance().getTitleColor()).toUpperCase())); - statement.setInt(60, isAio() ? 1 : 0); statement.setLong(61, getAioEndTime()); @@ -10792,8 +10012,7 @@ public final class L2PcInstance extends L2Playable statement.execute(); statement.close(); - // Store all effect data along with calulated remaining - // reuse delays for matching skills. 'restore_type'= 0. + // Store all effect data along with calulated remaining reuse delays for matching skills. 'restore_type'= 0. final L2Effect[] effects = getAllEffects(); statement = con.prepareStatement(ADD_SKILL_SAVE); @@ -10835,8 +10054,7 @@ public final class L2PcInstance extends L2Playable statement.execute(); } } - // Store the reuse delays of remaining skills which - // lost effect but still under reuse delay. 'restore_type' 1. + // Store the reuse delays of remaining skills which lost effect but still under reuse delay. 'restore_type' 1. for (TimeStamp t : ReuseTimeStamps.values()) { if (t.hasNotPassed()) @@ -11035,10 +10253,6 @@ public final class L2PcInstance extends L2Playable statement.execute(); statement.close(); } - // else - // { - // LOGGER.warning("could not store new skill. its NULL"); - // } } catch (Exception e) { @@ -11157,7 +10371,6 @@ public final class L2PcInstance extends L2Playable if (Config.DEBUG) { - // sendMessage("Skill " + skill.getName() + " removed and gm informed!"); LOGGER.warning("Character " + getName() + " of Account " + getAccountName() + " got skill " + skill.getName() + ".. Removed!"/* + IllegalPlayerAction.PUNISH_KICK */); } @@ -11256,9 +10469,7 @@ public final class L2PcInstance extends L2Playable PreparedStatement statement; ResultSet rset; - /** - * Restore Type 0 These skill were still in effect on the character upon logout. Some of which were self casted and might still have had a long reuse delay which also is restored. - */ + // Restore Type 0 These skill were still in effect on the character upon logout. Some of which were self casted and might still have had a long reuse delay which also is restored. statement = con.prepareStatement(RESTORE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); @@ -11313,9 +10524,7 @@ public final class L2PcInstance extends L2Playable rset.close(); statement.close(); - /** - * Restore Type 1 The remaning skills lost effect upon logout but were still under a high reuse delay. - */ + // Restore Type 1 The remaning skills lost effect upon logout but were still under a high reuse delay. statement = con.prepareStatement(RESTORE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); @@ -11950,9 +11159,6 @@ public final class L2PcInstance extends L2Playable curr_skill_id = current.getSkillId(); } - /* - * if (isWearingFormalWear() && !skill.isPotion()) { sendPacket(SystemMessageId.CANNOT_USE_ITEMS_SKILLS_WITH_FORMALWEAR)); sendPacket(ActionFailed.STATIC_PACKET); abortCast(); return; } - */ if (inObserverMode()) { sendPacket(SystemMessageId.OBSERVERS_CANNOT_PARTICIPATE); @@ -12197,18 +11403,6 @@ public final class L2PcInstance extends L2Playable // ************************************* Check skill availability ******************************************* - // Check if this skill is enabled (ex : reuse time) - // if(isSkillDisabled(skill_id) /* && !getAccessLevel().allowPeaceAttack() */) - // { - // SystemMessage sm = SystemMessageId.SKILL_NOT_AVAILABLE); - // sm.addString(skill.getName()); - // sendPacket(sm); - // - // Send a Server->Client packet ActionFailed to the L2PcInstance - // sendPacket(ActionFailed.STATIC_PACKET); - // return; - // } - // Check if all skills are disabled if (isAllSkillsDisabled() && !getAccessLevel().allowPeaceAttack()) { @@ -12228,6 +11422,7 @@ public final class L2PcInstance extends L2Playable return; } } + // ************************************* Check Consumables ******************************************* // Check if the caster has enough MP @@ -12315,6 +11510,7 @@ public final class L2PcInstance extends L2Playable effect.exit(false); } } + // ************************************* Check Casting Conditions ******************************************* // Check if the caster own the weapon needed @@ -12380,13 +11576,7 @@ public final class L2PcInstance extends L2Playable return; } - /* - * // Check if the target is attackable if(target instanceof L2PcInstance && !target.isAttackable() && !getAccessLevel().allowPeaceAttack() && (!(_inEventTvT && TvT.is_started()) || !(_inEventCTF && CTF.is_started()) || !(_inEventDM && DM.is_started()) || !(_inEventVIP && VIP._started))) - * { if(!isInFunEvent() || !((L2PcInstance)target).isInFunEvent()) { // If target is not attackable, send a Server->Client packet ActionFailed sendPacket(ActionFailed.STATIC_PACKET); return; } } - */ - // Check if a Forced ATTACK is in progress on non-attackable target - // if (!target.isAutoAttackable(this) && !forceUse && !(_inEventTvT && TvT._started) && !(_inEventDM && DM._started) && !(_inEventCTF && CTF._started) && !(_inEventVIP && VIP._started) if (!target.isAutoAttackable(this) && (!forceUse && ((skill.getId() != 3261) && (skill.getId() != 3260) && (skill.getId() != 3262))) && (!_inEventTvT || !TvT.is_started()) && (!_inEventDM || !DM.is_started()) && (!_inEventCTF || !CTF.is_started()) && (!_inEventVIP || !VIP._started) && (sklTargetType != SkillTargetType.TARGET_AURA) && (sklTargetType != SkillTargetType.TARGET_CLAN) && (sklTargetType != SkillTargetType.TARGET_ALLY) && (sklTargetType != SkillTargetType.TARGET_PARTY) && (sklTargetType != SkillTargetType.TARGET_SELF) && (sklTargetType != SkillTargetType.TARGET_GROUND)) { @@ -12555,9 +11745,7 @@ public final class L2PcInstance extends L2Playable return; } - /* - * TEMPFIX: Check client Z coordinate instead of server z to avoid exploit killing Zaken from others floor - */ + // TEMPFIX: Check client Z coordinate instead of server z to avoid exploit killing Zaken from others floor if ((target instanceof L2GrandBossInstance) && (((L2GrandBossInstance) target).getNpcId() == 29022)) { if (Math.abs(getClientZ() - target.getZ()) > 200) @@ -12672,8 +11860,7 @@ public final class L2PcInstance extends L2Playable return false; } } - else if (((skilldat != null) && !skilldat.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) - /* || (skilldatpet != null && !skilldatpet.isCtrlPressed() && skill.isOffensive() && srcIsSummon) */) + else if ((skilldat != null) && !skilldat.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) { if ((getClan() != null) && (((L2PcInstance) target).getClan() != null)) { @@ -12741,8 +11928,7 @@ public final class L2PcInstance extends L2Playable return true; } else - // if this is a castle that is currently being sieged, and the rider is NOT a castle owner - // he cannot land. + // if this is a castle that is currently being sieged, and the rider is NOT a castle owner he cannot land. // castle owner is the leader of the clan that owns the castle where the pc is if (isInsideZone(ZoneId.SIEGE) && ((getClan() == null) || (CastleManager.getInstance().getCastle(this) != CastleManager.getInstance().getCastleByOwner(getClan())) || (this != getClan().getLeader().getPlayerInstance()))) { @@ -12752,7 +11938,6 @@ public final class L2PcInstance extends L2Playable return false; } - // returns false if the change of mount type fails. /** * Sets the mount type. * @param mountType the mount type @@ -12850,16 +12035,8 @@ public final class L2PcInstance extends L2Playable return _inventoryDisable; } - /** - * The Class InventoryEnable. - */ class InventoryEnable implements Runnable { - - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -12908,10 +12085,6 @@ public final class L2PcInstance extends L2Playable * @param totalLifetime the total lifetime * @param givenByOther the given by other */ - /* - * public void addCubic(int id, int level, double d) { L2CubicInstance cubic = new L2CubicInstance(this, id, level,d); _cubics.put(id, cubic); cubic = null; } - */ - public void addCubic(int id, int level, double matk, int activationtime, int activationchance, int totalLifetime, boolean givenByOther) { if (Config.DEBUG) @@ -12972,10 +12145,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#toString() - */ @Override public String toString() { @@ -13174,9 +12343,6 @@ public final class L2PcInstance extends L2Playable ThreadPool.schedule(() -> rechargeAutoSoulShot(physical, magic, summon), atkTime); } - /** - * The Class WarnUserTakeBreak. - */ class WarnUserTakeBreak implements Runnable { @Override @@ -13194,9 +12360,6 @@ public final class L2PcInstance extends L2Playable } } - /** - * The Class RentPetTask. - */ class RentPetTask implements Runnable { @Override @@ -13206,12 +12369,8 @@ public final class L2PcInstance extends L2Playable } } - /** The _taskforfish. */ public ScheduledFuture _taskforfish; - /** - * The Class WaterTask. - */ class WaterTask implements Runnable { @Override @@ -13232,33 +12391,13 @@ public final class L2PcInstance extends L2Playable } } - /** - * The Class LookingForFishTask. - */ class LookingForFishTask implements Runnable { - /** The _is upper grade. */ boolean _isNoob; - - /** - * The _is upper grade. - */ boolean _isUpperGrade; - - /** The _guts check time. */ int _fishType; - - /** - * The _guts check time. - */ int _fishGutsCheck; - - /** - * The _guts check time. - */ int _gutsCheckTime; - - /** The _end task time. */ long _endTaskTime; /** @@ -13317,7 +12456,6 @@ public final class L2PcInstance extends L2Playable _clanPrivileges = n; } - // baron etc /** * Sets the pledge class. * @param classId the new pledge class @@ -13580,7 +12718,7 @@ public final class L2PcInstance extends L2Playable /** * Update gm name title color. */ - public void updateGmNameTitleColor()// KidZor: needs to be finished when Acces levels system is complite + public void updateGmNameTitleColor() { // if this is a GM but has disabled his gM status, so we clear name / title if (isGM() && !hasGmStatusActive()) @@ -14219,16 +13357,10 @@ public final class L2PcInstance extends L2Playable if (val) { SiegeManager.getInstance().addSiegeSkills(this); - /* - * for(L2Skill s : ClanLeaderSkillTable.getInstance().GetClanLeaderSkills()) { addSkill(s, false); //Dont Save Noble skills to Sql } - */ } else { SiegeManager.getInstance().removeSiegeSkills(this); - /* - * for(L2Skill s : ClanLeaderSkillTable.getInstance().GetClanLeaderSkills()) { super.removeSkill(s); //Just Remove skills without deleting from Sql } - */ } sendSkillList(); } @@ -14712,15 +13844,12 @@ public final class L2PcInstance extends L2Playable } // Delete a force buff upon class change. - // thank l2j-arhid if (_forceBuff != null) { abortCast(); } - /** - * 1. Call store() before modifying _classIndex to avoid skill effects rollover. 2. Register the correct _classId against applied 'classIndex'. - */ + // 1. Call store() before modifying _classIndex to avoid skill effects rollover. 2. Register the correct _classId against applied 'classIndex'. store(); if (classIndex == 0) @@ -14746,12 +13875,6 @@ public final class L2PcInstance extends L2Playable getParty().recalculatePartyLevel(); } - /* - * Update the character's change in class status. 1. Remove any active cubics from the player. 2. Renovate the characters table in the database with the new class info, storing also buff/effect data. 3. Remove all existing skills. 4. Restore all the learned skills for the current class from - * the database. 5. Restore effect/buff data for the new class. 6. Restore henna data for the class, applying the new stat modifiers while removing existing ones. 7. Reset HP/MP/CP stats and send Server->Client character status packet to reflect changes. 8. Restore shortcut data related to - * this class. 9. Resend a class change animation effect to broadcast to all nearby players. 10.Unsummon any active servitor from the player. - */ - if ((getPet() != null) && (getPet() instanceof L2SummonInstance)) { getPet().unSummon(this); @@ -14759,10 +13882,6 @@ public final class L2PcInstance extends L2Playable unsummonAllCubics(); - /* - * for(L2Character character : getKnownList().getKnownCharacters()) { if(character.getForceBuff() != null && character.getForceBuff().getTarget() == this) { character.abortCast(); } } - */ - synchronized (getAllSkills()) { @@ -14773,7 +13892,7 @@ public final class L2PcInstance extends L2Playable } - // Yesod: Rebind CursedWeapon passive. + // Rebind CursedWeapon passive. if (isCursedWeaponEquiped()) { CursedWeaponsManager.getInstance().givePassive(_cursedWeaponEquipedId); @@ -14817,6 +13936,7 @@ public final class L2PcInstance extends L2Playable sendPacket(iu); } } + // Remove Item CHEST if (Config.REMOVE_CHEST_SUBCLASS) { @@ -14918,8 +14038,6 @@ public final class L2PcInstance extends L2Playable if (getClan() != null) { getClan().broadcastToOnlineMembers(new PledgeShowMemberListUpdate(this)); - // decayMe(); - // spawnMe(getX(), getY(), getZ()); } return true; @@ -15225,10 +14343,6 @@ public final class L2PcInstance extends L2Playable _lastRecomUpdate = update.getTimeInMillis(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#doRevive() - */ @Override public void doRevive() { @@ -15254,15 +14368,10 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#doRevive(double) - */ @Override public void doRevive(double revivePower) { - // Restore the player's lost experience, - // depending on the % return of the skill used (based on its power). + // Restore the player's lost experience, depending on the % return of the skill used (based on its power). restoreExp(revivePower); doRevive(); } @@ -15426,10 +14535,6 @@ public final class L2PcInstance extends L2Playable return _expertiseIndex; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#onTeleported() - */ @Override public final void onTeleported() { @@ -15449,8 +14554,7 @@ public final class L2PcInstance extends L2Playable checkWaterState(); } - // Modify the position of the tamed beast if necessary (normal pets are handled by super...though - // L2PcInstance is the only class that actually has pets!!! ) + // Modify the position of the tamed beast if necessary (normal pets are handled by super...though L2PcInstance is the only class that actually has pets!!!) if (getTrainedBeast() != null) { getTrainedBeast().getAI().stopFollow(); @@ -15465,10 +14569,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#updatePosition(int) - */ @Override public final boolean updatePosition(int gameTicks) { @@ -15509,7 +14609,6 @@ public final class L2PcInstance extends L2Playable final double dz = m._zDestination - getZ(); final int distPassed = ((int) getStat().getMoveSpeed() * (gameTicks - m._moveTimestamp)) / GameTimeController.TICKS_PER_SECOND; final double distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy) + (dz * dz)); - // if (Config.DEVELOPER) LOGGER.info("Move Ticks:" + (gameTicks - m._moveTimestamp) + ", distPassed:" + distPassed + ", distFraction:" + distFraction); if (distFraction > 1) { @@ -15631,10 +14730,6 @@ public final class L2PcInstance extends L2Playable return (int) Math.sqrt((dx * dx) + (dy * dy) + (dz * dz)); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#addExpAndSp(long, int) - */ @Override public void addExpAndSp(long addToExp, int addToSp) { @@ -15651,10 +14746,6 @@ public final class L2PcInstance extends L2Playable getStat().removeExpAndSp(removeExp, removeSp); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#reduceCurrentHp(double, com.l2jmobius.gameserver.model.L2Character) - */ @Override public void reduceCurrentHp(double i, L2Character attacker) { @@ -15667,9 +14758,6 @@ public final class L2PcInstance extends L2Playable } } - /* - * Function for skill summon friend or Gate Chant. - */ /** * Request Teleport *. * @param requester the requester @@ -15838,10 +14926,6 @@ public final class L2PcInstance extends L2Playable return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#reduceCurrentHp(double, com.l2jmobius.gameserver.model.L2Character, boolean) - */ @Override public void reduceCurrentHp(double value, L2Character attacker, boolean awake) { @@ -15907,7 +14991,6 @@ public final class L2PcInstance extends L2Playable return; } _validBypass.add(bypass); - // LOGGER.warning("[BypassAdd]"+getName()+" '"+bypass+"'"); } /** @@ -15921,7 +15004,6 @@ public final class L2PcInstance extends L2Playable return; } _validBypass2.add(bypass); - // LOGGER.warning("[BypassAdd]"+getName()+" '"+bypass+"'"); } /** @@ -15943,7 +15025,6 @@ public final class L2PcInstance extends L2Playable continue; } - // LOGGER.warning("[BypassValidation]"+getName()+" '"+bp+"'"); if (bp.equals(cmd)) { return true; @@ -15957,7 +15038,6 @@ public final class L2PcInstance extends L2Playable continue; } - // LOGGER.warning("[BypassValidation]"+getName()+" '"+bp+"'"); if (cmd.startsWith(bp)) { return true; @@ -16224,7 +15304,6 @@ public final class L2PcInstance extends L2Playable } catch (InterruptedException e) { - // TODO Auto-generated catch block e.printStackTrace(); } onTeleported(); @@ -16270,7 +15349,7 @@ public final class L2PcInstance extends L2Playable LOGGER.warning("deleteMe()" + t); } - // Cancel Attak or Cast + // Cancel Attack or Cast try { abortAttack(); @@ -16354,7 +15433,7 @@ public final class L2PcInstance extends L2Playable catch (Throwable t) { LOGGER.warning("deleteMe()" + t); - } // returns pet to control item + } } if ((getClanId() != 0) && (getClan() != null)) @@ -16446,13 +15525,9 @@ public final class L2PcInstance extends L2Playable // Close the connection with the client closeNetConnection(); - // remove from flood protector - // FloodProtector.getInstance().removePlayer(getObjectId()); - if (getClanId() > 0) { getClan().broadcastToOtherOnlineMembers(new PledgeShowMemberListUpdate(this), this); - // ClanTable.getInstance().getClan(getClanId()).broadcastToOnlineMembers(new PledgeShowMemberListAdd(this)); } for (L2PcInstance player : _snoopedPlayer) @@ -16666,7 +15741,6 @@ public final class L2PcInstance extends L2Playable _fish.setType(-1); } - // sendMessage("Hook x,y: " + _x + "," + _y + " - Water Z, Player Z:" + _z + ", " + getZ()); //debug line, uncoment to show coordinates used in fishing. efs = new ExFishingStart(this, _fish.getType(), _x, _y, _z, _lure.isNightLure()); broadcastPacket(efs); StartLookingForFishTask(); @@ -16761,6 +15835,7 @@ public final class L2PcInstance extends L2Playable switch (_lure.getItemId()) { case 7807: // green lure, preferred by fast-moving (nimble) fish (type 5) + { if (check <= 54) { type = 5; @@ -16774,7 +15849,9 @@ public final class L2PcInstance extends L2Playable type = 6; } break; + } case 7808: // purple lure, preferred by fat fish (type 4) + { if (check <= 54) { type = 4; @@ -16788,7 +15865,9 @@ public final class L2PcInstance extends L2Playable type = 5; } break; + } case 7809: // yellow lure, preferred by ugly fish (type 6) + { if (check <= 54) { type = 6; @@ -16802,7 +15881,9 @@ public final class L2PcInstance extends L2Playable type = 4; } break; + } case 8486: // prize-winning fishing lure for beginners + { if (check <= 33) { type = 4; @@ -16816,6 +15897,7 @@ public final class L2PcInstance extends L2Playable type = 6; } break; + } } break; case 1: // normal fish @@ -16825,13 +15907,16 @@ public final class L2PcInstance extends L2Playable case 7611: case 7612: case 7613: + { type = 3; break; + } case 6519: // all theese lures (green) are prefered by fast-moving (nimble) fish (type 1) case 8505: case 6520: case 6521: case 8507: + { if (check <= 54) { type = 1; @@ -16849,11 +15934,13 @@ public final class L2PcInstance extends L2Playable type = 3; } break; + } case 6522: // all theese lures (purple) are prefered by fat fish (type 0) case 8508: case 6523: case 6524: case 8510: + { if (check <= 54) { type = 0; @@ -16871,11 +15958,13 @@ public final class L2PcInstance extends L2Playable type = 3; } break; + } case 6525: // all theese lures (yellow) are prefered by ugly fish (type 2) case 8511: case 6526: case 6527: case 8513: + { if (check <= 55) { type = 2; @@ -16893,7 +15982,9 @@ public final class L2PcInstance extends L2Playable type = 3; } break; + } case 8484: // prize-winning fishing lure + { if (check <= 33) { type = 0; @@ -16907,12 +15998,14 @@ public final class L2PcInstance extends L2Playable type = 2; } break; + } } break; case 2: // upper grade fish, luminous lure switch (_lure.getItemId()) { case 8506: // green lure, preferred by fast-moving (nimble) fish (type 8) + { if (check <= 54) { type = 8; @@ -16926,7 +16019,9 @@ public final class L2PcInstance extends L2Playable type = 9; } break; + } case 8509: // purple lure, preferred by fat fish (type 7) + { if (check <= 54) { type = 7; @@ -16940,7 +16035,9 @@ public final class L2PcInstance extends L2Playable type = 8; } break; + } case 8512: // yellow lure, preferred by ugly fish (type 9) + { if (check <= 54) { type = 9; @@ -16954,7 +16051,9 @@ public final class L2PcInstance extends L2Playable type = 7; } break; + } case 8485: // prize-winning fishing lure + { if (check <= 33) { type = 7; @@ -16968,6 +16067,7 @@ public final class L2PcInstance extends L2Playable type = 9; } break; + } } } return type; @@ -17676,10 +16776,6 @@ public final class L2PcInstance extends L2Playable sendPacket(new SkillCoolTime(this)); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#sendDamageMessage(com.l2jmobius.gameserver.model.L2Character, int, boolean, boolean, boolean) - */ @Override public final void sendDamageMessage(L2Character target, int damage, boolean mcrit, boolean pcrit, boolean miss) { @@ -17917,24 +17013,30 @@ public final class L2PcInstance extends L2Playable switch (color.length()) { case 1: + { color = new StringBuilder().append("00000").append(color).toString(); break; - + } case 2: + { color = new StringBuilder().append("0000").append(color).toString(); break; - + } case 3: + { color = new StringBuilder().append("000").append(color).toString(); break; - + } case 4: + { color = new StringBuilder().append("00").append(color).toString(); break; - + } case 5: + { color = new StringBuilder().append('0').append(color).toString(); break; + } } return color; } @@ -18283,7 +17385,7 @@ public final class L2PcInstance extends L2Playable boolean output = true; - int boxes_number = 0; // this one + int boxes_number = 0; final List active_boxes = new ArrayList<>(); if ((_client != null) && (_client.getConnection() != null) && !_client.getConnection().isClosed() && (_client.getConnection().getInetAddress() != null)) @@ -18309,8 +17411,8 @@ public final class L2PcInstance extends L2Playable } - if ((boxes_number + 1) > Config.ALLOWED_BOXES) - { // actual count+actual player one + if ((boxes_number + 1) > Config.ALLOWED_BOXES) // actual count + actual player one + { output = false; break; } @@ -18333,9 +17435,7 @@ public final class L2PcInstance extends L2Playable } refreshOtherBoxes(); } - /* - * LOGGER.info("Player "+getName()+" has this boxes"); for(String name:active_boxes_characters){ LOGGER.info("*** "+name+" ***"); } - */ + return output; } @@ -18670,31 +17770,15 @@ public final class L2PcInstance extends L2Playable _isStored = a; } - /** - * The Enum PunishLevel. - */ public enum PunishLevel { - - /** The NONE. */ NONE(0, ""), - - /** The CHAT. */ CHAT(1, "chat banned"), - - /** The JAIL. */ JAIL(2, "jailed"), - - /** The CHAR. */ CHAR(3, "banned"), - - /** The ACC. */ ACC(4, "banned"); - /** The pun value. */ private final int punValue; - - /** The pun string. */ private final String punString; /** @@ -18708,19 +17792,11 @@ public final class L2PcInstance extends L2Playable punString = string; } - /** - * Value. - * @return the int - */ public int value() { return punValue; } - /** - * String. - * @return the string - */ public String string() { return punString; @@ -19059,17 +18135,10 @@ public final class L2PcInstance extends L2Playable } } - /** - * The Class PunishTask. - */ private class PunishTask implements Runnable { - - /** The _player. */ L2PcInstance _player; - // protected long _startedAt; - /** * Instantiates a new punish task. * @param player the player @@ -19077,13 +18146,8 @@ public final class L2PcInstance extends L2Playable protected PunishTask(L2PcInstance player) { _player = player; - // _startedAt = System.currentTimeMillis(); } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -19288,7 +18352,7 @@ public final class L2PcInstance extends L2Playable { if (equippedItem.isAugmented()) { - equippedItem.getAugmentation().removeBoni(this); + equippedItem.getAugmentation().removeBonus(this); } final L2ItemInstance[] items = getInventory().unEquipItemInSlotAndRecord(i); if (equippedItem.isWear()) @@ -19339,7 +18403,6 @@ public final class L2PcInstance extends L2Playable setTarget(null); setIsInvul(true); getAppearance().setInvisible(); - // sendPacket(new GMHide(1)); teleToLocation(x, y, z, true); sendPacket(new ExOlympiadMode(3, this)); _observerMode = true; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PenaltyMonsterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PenaltyMonsterInstance.java index b09e5524ed..5f0052ea7a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PenaltyMonsterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PenaltyMonsterInstance.java @@ -37,7 +37,7 @@ public class L2PenaltyMonsterInstance extends L2MonsterInstance @Override public L2Character getMostHated() { - return _ptk; // zawsze attakuje tylko 1 osobe chodzby nie wiem co xD + return _ptk; } @Deprecated diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PetInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PetInstance.java index 5ec9a1c11d..021b2b418e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PetInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2PetInstance.java @@ -57,48 +57,21 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; import com.l2jmobius.gameserver.templates.item.L2Item; import com.l2jmobius.gameserver.templates.item.L2Weapon; -/** - * This class ... - * @version $Revision: 1.15.2.10.2.16 $ $Date: 2009/04/13 09:18:40 $ - */ public class L2PetInstance extends L2Summon { - /** The Constant _logPet. */ protected static final Logger LOGGER = Logger.getLogger(L2PetInstance.class.getName()); - // private byte _pvpFlag; - /** The _cur fed. */ - int _curFed; - - /** The _inventory. */ - final PetInventory _inventory; - - /** The _control item id. */ - private final int _controlItemId; - - /** The _respawned. */ - private boolean _respawned; - - /** The _mountable. */ - private final boolean _mountable; - - /** The _feed task. */ - private Future _feedTask; - - /** The _feed time. */ - private int _feedTime; - - /** The _feed mode. */ - protected boolean _feedMode; - - /** The _data. */ - private L2PetData _data; - - /** The Experience before the last Death Penalty. */ - private long _expBeforeDeath = 0; - - /** The Constant FOOD_ITEM_CONSUME_COUNT. */ private static final int FOOD_ITEM_CONSUME_COUNT = 5; + int _curFed; + final PetInventory _inventory; + private final int _controlItemId; + private boolean _respawned; + private final boolean _mountable; + private Future _feedTask; + private int _feedTime; + protected boolean _feedMode; + private L2PetData _data; + private long _expBeforeDeath = 0; /** * Gets the pet data. @@ -135,10 +108,6 @@ public class L2PetInstance extends L2Summon class FeedTask implements Runnable { - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -270,10 +239,6 @@ public class L2PetInstance extends L2Summon _mountable = L2PetDataTable.isMountable(npcId); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getStat() - */ @Override public PetStat getStat() { @@ -284,10 +249,6 @@ public class L2PetInstance extends L2Summon return (PetStat) super.getStat(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getLevelMod() - */ @Override public double getLevelMod() { @@ -303,20 +264,12 @@ public class L2PetInstance extends L2Summon return _respawned; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getSummonType() - */ @Override public int getSummonType() { return 2; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#onAction(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onAction(L2PcInstance player) { @@ -346,10 +299,6 @@ public class L2PetInstance extends L2Summon } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getControlItemId() - */ @Override public int getControlItemId() { @@ -383,12 +332,6 @@ public class L2PetInstance extends L2Summon _curFed = num > getStat().getMaxFeed() ? getStat().getMaxFeed() : num; } - // public void setPvpFlag(byte pvpFlag) { _pvpFlag = pvpFlag; } - - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#setPkKills(int) - */ @Override public void setPkKills(int pkKills) { @@ -430,32 +373,18 @@ public class L2PetInstance extends L2Summon return (L2Weapon) weapon.getItem(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getSecondaryWeaponInstance() - */ @Override public L2ItemInstance getSecondaryWeaponInstance() { - // temporary? unavailable return null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getSecondaryWeaponItem() - */ @Override public L2Weapon getSecondaryWeaponItem() { - // temporary? unavailable return null; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getInventory() - */ @Override public PetInventory getInventory() { @@ -541,10 +470,6 @@ public class L2PetInstance extends L2Summon return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#doPickupItem(com.l2jmobius.gameserver.model.L2Object) - */ @Override protected void doPickupItem(L2Object object) { @@ -654,10 +579,6 @@ public class L2PetInstance extends L2Summon } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#deleteMe(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void deleteMe(L2PcInstance owner) { @@ -665,10 +586,6 @@ public class L2PetInstance extends L2Summon destroyControlItem(owner); // this should also delete the pet from the db } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#doDie(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean doDie(L2Character killer) { @@ -682,10 +599,6 @@ public class L2PetInstance extends L2Summon return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#doRevive() - */ @Override public void doRevive() { @@ -703,15 +616,10 @@ public class L2PetInstance extends L2Summon startFeed(false); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#doRevive(double) - */ @Override public void doRevive(double revivePower) { - // Restore the pet's lost experience, - // depending on the % return of the skill used (based on its power). + // Restore the pet's lost experience, depending on the % return of the skill used (based on its power). restoreExp(revivePower); doRevive(); } @@ -785,10 +693,6 @@ public class L2PetInstance extends L2Summon return newItem; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#giveAllToOwner() - */ @Override public void giveAllToOwner() { @@ -933,29 +837,6 @@ public class L2PetInstance extends L2Summon } } - // public void startAttack(L2Character target) - // { - // if (!knownsObject(target)) - // { - // target.addKnownObject(this); - // this.addKnownObject(target); - // } - // if (!target.knownsObject(this)) - // { - // target.addKnownObject(this); - // this.addKnownObject(target); - // } - // - // if (!isRunning()) - // { - // setRunning(true); - // ChangeMoveType move = new ChangeMoveType(this, ChangeMoveType.RUN); - // broadcastPacket(move); - // } - // - // super.startAttack(target); - // } - // /** * Checks if is mountable. * @return Returns the mountable. @@ -1025,10 +906,6 @@ public class L2PetInstance extends L2Summon return pet; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#store() - */ @Override public void store() { @@ -1125,10 +1002,6 @@ public class L2PetInstance extends L2Summon } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#unSummon(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public synchronized void unSummon(L2PcInstance owner) { @@ -1163,7 +1036,6 @@ public class L2PetInstance extends L2Summon private void deathPenalty() { // TODO Need Correct Penalty - final int lvl = getStat().getLevel(); final double percentLost = (-0.07 * lvl) + 6.5; @@ -1177,10 +1049,6 @@ public class L2PetInstance extends L2Summon getStat().addExp(-lostExp); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#addExpAndSp(long, int) - */ @Override public void addExpAndSp(long addToExp, int addToSp) { @@ -1194,30 +1062,18 @@ public class L2PetInstance extends L2Summon } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getExpForThisLevel() - */ @Override public long getExpForThisLevel() { return getStat().getExpForLevel(getStat().getLevel()); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Summon#getExpForNextLevel() - */ @Override public long getExpForNextLevel() { return getStat().getExpForLevel(getStat().getLevel() + 1); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getLevel() - */ @Override public final int getLevel() { @@ -1233,110 +1089,66 @@ public class L2PetInstance extends L2Summon return getStat().getMaxFeed(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getAccuracy() - */ @Override public int getAccuracy() { return getStat().getAccuracy(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getCriticalHit(com.l2jmobius.gameserver.model.L2Character, com.l2jmobius.gameserver.model.L2Skill) - */ @Override public int getCriticalHit(L2Character target, L2Skill skill) { return getStat().getCriticalHit(target, skill); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getEvasionRate(com.l2jmobius.gameserver.model.L2Character) - */ @Override public int getEvasionRate(L2Character target) { return getStat().getEvasionRate(target); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getRunSpeed() - */ @Override public int getRunSpeed() { return getStat().getRunSpeed(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getPAtkSpd() - */ @Override public int getPAtkSpd() { return getStat().getPAtkSpd(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getMAtkSpd() - */ @Override public int getMAtkSpd() { return getStat().getMAtkSpd(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getMAtk(com.l2jmobius.gameserver.model.L2Character, com.l2jmobius.gameserver.model.L2Skill) - */ @Override public int getMAtk(L2Character target, L2Skill skill) { return getStat().getMAtk(target, skill); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getMDef(com.l2jmobius.gameserver.model.L2Character, com.l2jmobius.gameserver.model.L2Skill) - */ @Override public int getMDef(L2Character target, L2Skill skill) { return getStat().getMDef(target, skill); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getPAtk(com.l2jmobius.gameserver.model.L2Character) - */ @Override public int getPAtk(L2Character target) { return getStat().getPAtk(target); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getPDef(com.l2jmobius.gameserver.model.L2Character) - */ @Override public int getPDef(L2Character target) { return getStat().getPDef(target); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#getSkillLevel(int) - */ @Override public final int getSkillLevel(int skillId) { @@ -1361,10 +1173,6 @@ public class L2PetInstance extends L2Summon L2World.getInstance().addPet(oldOwnerId, this); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#sendDamageMessage(com.l2jmobius.gameserver.model.L2Character, int, boolean, boolean, boolean) - */ @Override public final void sendDamageMessage(L2Character target, int damage, boolean mcrit, boolean pcrit, boolean miss) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaceManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaceManagerInstance.java index 29520feb30..d922b84713 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaceManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaceManagerInstance.java @@ -40,7 +40,6 @@ public class L2RaceManagerInstance extends L2NpcInstance public static final int LANES = 8; public static final int WINDOW_START = 0; - // private static List _history; private static List _managers; protected static int _raceNumber = 4; @@ -93,7 +92,6 @@ public class L2RaceManagerInstance extends L2NpcInstance if (_notInitialized) { _notInitialized = false; - // _history = new ArrayList(); _managers = new ArrayList<>(); ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_AVAILABLE_FOR_S1_RACE), 0, 10 * MINUTE); @@ -155,10 +153,10 @@ public class L2RaceManagerInstance extends L2NpcInstance case 817: // SystemMessageId.MONSRACE_TICKETS_NOW_AVAILABLE_FOR_S1_RACE { if (_state != ACCEPTING_BETS) - {// LOGGER.info("Race Initializing"); + { _state = ACCEPTING_BETS; startRace(); - } // else{LOGGER.info("Race open");} + } sm.addNumber(_raceNumber); break; } @@ -173,7 +171,6 @@ public class L2RaceManagerInstance extends L2NpcInstance } case 819: // SystemMessageId.MONSRACE_TICKET_SALES_CLOSED { - // LOGGER.info("Sales closed"); sm.addNumber(_raceNumber); _state = WAITING; _minutes = 2; @@ -188,21 +185,16 @@ public class L2RaceManagerInstance extends L2NpcInstance } case 826: // SystemMessageId.MONSRACE_FIRST_PLACE_S1_SECOND_S2 { - // LOGGER.info("Placing"); _state = RACE_END; sm.addNumber(MonsterRace.getInstance().getFirstPlace()); sm.addNumber(MonsterRace.getInstance().getSecondPlace()); break; } } - // LOGGER.info("Counter: "+minutes); - // LOGGER.info("State: "+state); broadcast(sm); - // LOGGER.info("Player's known: "+getKnownPlayers().size()); if (type == SystemMessageId.MONSRACE_RACE_START) { - // LOGGER.info("Starting race"); _state = STARTING_RACE; startRace(); _minutes = 5; @@ -230,7 +222,6 @@ public class L2RaceManagerInstance extends L2NpcInstance MonsterRace race = MonsterRace.getInstance(); if (_state == STARTING_RACE) { - // state++; PlaySound SRace = new PlaySound(1, "S_Race", 0, 0, 0, 0, 0); broadcast(SRace); PlaySound SRace2 = new PlaySound(0, "ItemSound2.race_start", 1, 121209259, 12125, 182487, -3559); @@ -242,7 +233,6 @@ public class L2RaceManagerInstance extends L2NpcInstance } else { - // state++; race.newRace(); race.newSpeeds(); _packet = new MonRaceInfo(_codes[0][0], _codes[0][1], race.getMonsters(), race.getSpeeds()); @@ -296,7 +286,6 @@ public class L2RaceManagerInstance extends L2NpcInstance } else { - // getKnownList().removeKnownObject(player); super.onBypassFeedback(player, command); } } @@ -538,5 +527,4 @@ public class L2RaceManagerInstance extends L2NpcInstance } } } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossInstance.java index 1ed6174c1e..f7d917dce4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossInstance.java @@ -34,10 +34,7 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2RaidBossInstance extends L2MonsterInstance { - /** The Constant RAIDBOSS_MAINTENANCE_INTERVAL. */ private static final int RAIDBOSS_MAINTENANCE_INTERVAL = 20000; // 20 sec - - /** The _raid status. */ private RaidBossSpawnManager.StatusEnum _raidStatus; /** @@ -57,30 +54,18 @@ public final class L2RaidBossInstance extends L2MonsterInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Character#isRaid() - */ @Override public boolean isRaid() { return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance#getMaintenanceInterval() - */ @Override protected int getMaintenanceInterval() { return RAIDBOSS_MAINTENANCE_INTERVAL; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance#doDie(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean doDie(L2Character killer) { @@ -148,9 +133,7 @@ public final class L2RaidBossInstance extends L2MonsterInstance teleToLocation(bossSpawn.getX(), bossSpawn.getY(), bossSpawn.getZ(), true); // healFull(); // Prevents minor exploiting with it } - /* - * if(!isInsideRadius(bossSpawn.getX(), bossSpawn.getY(), bossSpawn.getZ(), 5000, true, false)) { teleToLocation(bossSpawn.getX(), bossSpawn.getY(), bossSpawn.getZ(), true); healFull(); // prevents minor exploiting with it } - */ + _minionList.maintainMinions(); }, 60000, getMaintenanceInterval()); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossManagerInstance.java index 8dcaa15cc9..b890f4f3a4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RaidBossManagerInstance.java @@ -54,8 +54,7 @@ public class L2RaidBossManagerInstance extends L2NpcInstance // Send a Server->Client packet ValidateLocation to correct the L2Npc position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2Npc - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2Npc { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RecipeInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RecipeInstance.java index 4093fbb398..5b55fc6849 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RecipeInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RecipeInstance.java @@ -21,10 +21,7 @@ package com.l2jmobius.gameserver.model.actor.instance; */ public class L2RecipeInstance { - /** The Identifier of the item needed in the L2RecipeInstance. */ private final int _itemId; - - /** The item quantity needed in the L2RecipeInstance. */ private final int _quantity; /** @@ -58,5 +55,4 @@ public class L2RecipeInstance { return _quantity; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RiftInvaderInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RiftInvaderInstance.java index 692c9c4393..dad98e125d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RiftInvaderInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2RiftInvaderInstance.java @@ -20,7 +20,7 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; public class L2RiftInvaderInstance extends L2MonsterInstance { - // Not longer needed since rift monster targeting control now is handled by the room zones for any mob + // No longer needed since rift monster targeting control now is handled by the room zones for any monster. public L2RiftInvaderInstance(int objectId, L2NpcTemplate template) { super(objectId, template); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherMonsterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherMonsterInstance.java index 0b94f86921..335799a474 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherMonsterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherMonsterInstance.java @@ -42,14 +42,12 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance public L2SepulcherMonsterInstance(int objectId, L2NpcTemplate template) { super(objectId, template); - // setShowSummonAnimation(true); } @Override public void onSpawn() { super.onSpawn(); - // setShowSummonAnimation(false); switch (getNpcId()) { case 18150: diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherNpcInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherNpcInstance.java index e445d441e9..0ad4efae65 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherNpcInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SepulcherNpcInstance.java @@ -56,7 +56,6 @@ public class L2SepulcherNpcInstance extends L2NpcInstance public L2SepulcherNpcInstance(int objectID, L2NpcTemplate template) { super(objectID, template); - // setShowSummonAnimation(true); if (_closeTask != null) { @@ -118,15 +117,12 @@ public class L2SepulcherNpcInstance extends L2NpcInstance // Check if the player is attackable (without a forced attack) if (isAutoAttackable(player)) { - // Send a Server->Client packet MyTargetSelected to the - // L2PcInstance player - // The player.getLevel() - getLevel() permit to display the - // correct color in the select window + // Send a Server->Client packet MyTargetSelected to the L2PcInstance player + // The player.getLevel() - getLevel() permit to display the correct color in the select window final MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()); player.sendPacket(my); - // Send a Server->Client packet StatusUpdate of the - // L2NpcInstance to the L2PcInstance to update its HP bar + // Send a Server->Client packet StatusUpdate of the L2NpcInstance to the L2PcInstance to update its HP bar final StatusUpdate su = new StatusUpdate(getObjectId()); su.addAttribute(StatusUpdate.CUR_HP, (int) getStatus().getCurrentHp()); su.addAttribute(StatusUpdate.MAX_HP, getMaxHp()); @@ -134,42 +130,35 @@ public class L2SepulcherNpcInstance extends L2NpcInstance } else { - // Send a Server->Client packet MyTargetSelected to the - // L2PcInstance player + // Send a Server->Client packet MyTargetSelected to the L2PcInstance player final MyTargetSelected my = new MyTargetSelected(getObjectId(), 0); player.sendPacket(my); } - // Send a Server->Client packet ValidateLocation to correct the - // L2NpcInstance position and heading on the client + // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } else { - // Check if the player is attackable (without a forced attack) and - // isn't dead + // Check if the player is attackable (without a forced attack) and isn't dead if (isAutoAttackable(player) && !isAlikeDead()) { // Check the height difference - if (Math.abs(player.getZ() - getZ()) < 400) // this max heigth - // difference might - // need some tweaking + if (Math.abs(player.getZ() - getZ()) < 400) // this max heigth difference might need some tweaking { // Set the L2PcInstance Intention to AI_INTENTION_ATTACK player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this); } else { - // Send a Server->Client packet ActionFailed (target is out - // of attack range) to the L2PcInstance player + // Send a Server->Client packet ActionFailed (target is out of attack range) to the L2PcInstance player player.sendPacket(ActionFailed.STATIC_PACKET); } } if (!isAutoAttackable(player)) { - // Calculate the distance between the L2PcInstance and the - // L2NpcInstance + // Calculate the distance between the L2PcInstance and the L2NpcInstance if (!canInteract(player)) { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT @@ -177,18 +166,14 @@ public class L2SepulcherNpcInstance extends L2NpcInstance } else { - // Send a Server->Client packet SocialAction to the all - // L2PcInstance on the _knownPlayer of the L2NpcInstance - // to display a social action of the L2NpcInstance on their - // client + // Send a Server->Client packet SocialAction to the all L2PcInstance on the _knownPlayer of the L2NpcInstance to display a social action of the L2NpcInstance on their client final SocialAction sa = new SocialAction(getObjectId(), Rnd.get(8)); broadcastPacket(sa); doAction(player); } } - // Send a Server->Client ActionFailed to the L2PcInstance in order - // to avoid that the client wait another packet + // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(ActionFailed.STATIC_PACKET); } } @@ -453,7 +438,7 @@ public class L2SepulcherNpcInstance extends L2NpcInstance { if ((msg == null) || msg.isEmpty()) { - return;// wrong usage + return; // wrong usage } final Collection knownPlayers = L2World.getInstance().getAllPlayers(); if ((knownPlayers == null) || knownPlayers.isEmpty()) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeFlagInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeFlagInstance.java index c3108d0ad1..9b3ce4dc90 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeFlagInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeFlagInstance.java @@ -118,7 +118,8 @@ public class L2SiegeFlagInstance extends L2NpcInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); - } else if (isAutoAttackable(player) && (Math.abs(player.getZ() - getZ()) < 100)) + } + else if (isAutoAttackable(player) && (Math.abs(player.getZ() - getZ()) < 100)) { player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeNpcInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeNpcInstance.java index 3861222057..fe81a2f5bb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeNpcInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SiegeNpcInstance.java @@ -23,14 +23,8 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision$ $Date$ - */ public class L2SiegeNpcInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2SiegeNpcInstance.class); - public L2SiegeNpcInstance(int objectID, L2NpcTemplate template) { super(objectID, template); @@ -59,8 +53,8 @@ public class L2SiegeNpcInstance extends L2FolkInstance player.sendPacket(my); player.sendPacket(new ValidateLocation(this)); - } else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + } + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SignsPriestInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SignsPriestInstance.java index f77b96e020..108d70b5fa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SignsPriestInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SignsPriestInstance.java @@ -36,8 +36,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public class L2SignsPriestInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2SignsPriestInstance.class); - public L2SignsPriestInstance(int objectId, L2NpcTemplate template) { super(objectId, template); @@ -82,9 +80,6 @@ public class L2SignsPriestInstance extends L2FolkInstance } catch (Exception e2) { - // if (Config.ENABLE_ALL_EXCEPTIONS) - // e2.printStackTrace(); - try { StringTokenizer st = new StringTokenizer(command.trim()); @@ -108,7 +103,7 @@ public class L2SignsPriestInstance extends L2FolkInstance player.sendPacket(SystemMessageId.INVENTORY_VOLUME); break; } - // L2ItemInstance adenaItem = player.getInventory().getAdenaInstance(); ??? + if (!player.reduceAdena("SevenSigns", SevenSigns.RECORD_SEVEN_SIGNS_COST, this, false)) { final String filename = "data/html/seven_signs/noadena.htm"; @@ -158,7 +153,7 @@ public class L2SignsPriestInstance extends L2FolkInstance return; } } - // TODO + if (!getPlayerAllyHasCastle(player)) { if (cabal == SevenSigns.CABAL_DAWN) @@ -167,10 +162,7 @@ public class L2SignsPriestInstance extends L2FolkInstance return; } } - else /* - * If the player is trying to join the Lords of Dawn, check if they are carrying a Lord's certificate. If not then try to take the required amount of adena instead. - */ - if (cabal == SevenSigns.CABAL_DAWN) + else if (cabal == SevenSigns.CABAL_DAWN) { boolean allowJoinDawn = false; if (player.destroyItemByItemId("SevenSigns", SevenSigns.CERTIFICATE_OF_APPROVAL_ID, 1, this, false)) @@ -602,8 +594,7 @@ public class L2SignsPriestInstance extends L2FolkInstance return false; } - // If castle ownage check is clan-based rather than ally-based, - // check if the player's clan has a castle and return the result. + // If castle ownage check is clan-based rather than ally-based, check if the player's clan has a castle and return the result. if (!Config.ALT_GAME_REQUIRE_CLAN_CASTLE) { final int allyId = playerClan.getAllyId(); @@ -611,8 +602,7 @@ public class L2SignsPriestInstance extends L2FolkInstance // The player's clan is not in an alliance, so return false. if (allyId != 0) { - // Check if another clan in the same alliance owns a castle, - // by traversing the list of clans and act accordingly. + // Check if another clan in the same alliance owns a castle, by traversing the list of clans and act accordingly. L2Clan[] clanList = ClanTable.getInstance().getClans(); for (L2Clan clan : clanList) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2StaticObjectInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2StaticObjectInstance.java index 7e6b637559..7c8be30744 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2StaticObjectInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2StaticObjectInstance.java @@ -29,29 +29,17 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ShowTownMap; /** - * GODSON ROX!. + * @author GODSON */ public class L2StaticObjectInstance extends L2Object { - /** The LOGGER. */ private static Logger LOGGER = Logger.getLogger(L2StaticObjectInstance.class.getName()); - /** The interaction distance of the L2StaticObjectInstance. */ public static final int INTERACTION_DISTANCE = 150; - - /** The _static object id. */ private int _staticObjectId; - - /** The _type. */ private int _type = -1; // 0 - map signs, 1 - throne , 2 - arena signs - - /** The _x. */ private int _x; - - /** The _y. */ private int _y; - - /** The _texture. */ private String _texture; /** @@ -194,10 +182,6 @@ public class L2StaticObjectInstance extends L2Object } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#isAttackable() - */ @Override public boolean isAutoAttackable(L2Character attacker) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SummonInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SummonInstance.java index 8fa2c1c9f5..0d04266c69 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SummonInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SummonInstance.java @@ -226,11 +226,6 @@ public class L2SummonInstance extends L2Summon return true; } - /* - * protected void displayHitMessage(int damage, boolean crit, boolean miss) { if (crit) { getOwner().sendPacket(new SystemMessage(SystemMessage.SUMMON_CRITICAL_HIT)); } if (miss) { getOwner().sendPacket(new SystemMessage(SystemMessage.MISSED_TARGET)); } else { SystemMessage sm = new - * SystemMessage(SystemMessage.SUMMON_GAVE_DAMAGE_OF_S1); sm.addNumber(damage); getOwner().sendPacket(sm); } } - */ - static class SummonLifetime implements Runnable { private final L2PcInstance _activeChar; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SymbolMakerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SymbolMakerInstance.java index 7b75154066..85aadea32b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SymbolMakerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2SymbolMakerInstance.java @@ -22,14 +22,8 @@ import com.l2jmobius.gameserver.network.serverpackets.HennaEquipList; import com.l2jmobius.gameserver.network.serverpackets.ItemList; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision$ $Date$ - */ public class L2SymbolMakerInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2SymbolMakerInstance.class); - @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -99,10 +93,6 @@ public class L2SymbolMakerInstance extends L2FolkInstance return "data/html/symbolmaker/SymbolMaker.htm"; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#isAttackable() - */ @Override public boolean isAutoAttackable(L2Character attacker) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index bbc03712da..de0cd6f5ba 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -32,52 +32,26 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcInfo; import com.l2jmobius.gameserver.network.serverpackets.StopMove; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -// While a tamed beast behaves a lot like a pet (ingame) and does have -// an owner, in all other aspects, it acts like a mob. -// In addition, it can be fed in order to increase its duration. -// This class handles the running tasks, AI, and feed of the mob. -// The (mostly optional) AI on feeding the spawn is handled by the datapack ai script /** - * The Class L2TamedBeastInstance. + * While a tamed beast behaves a lot like a pet (ingame) and does have an owner, in all other aspects, it acts like a mob. In addition, it can be fed in order to increase its duration.
    + * This class handles the running tasks, AI, and feed of the mob. The (mostly optional) AI on feeding the spawn is handled by the datapack ai script */ public final class L2TamedBeastInstance extends L2FeedableBeastInstance { - /** The _food skill id. */ - private int _foodSkillId; - /** The Constant MAX_DISTANCE_FROM_HOME. */ private static final int MAX_DISTANCE_FROM_HOME = 30000; - - /** The Constant MAX_DISTANCE_FROM_OWNER. */ private static final int MAX_DISTANCE_FROM_OWNER = 2000; - - /** The Constant MAX_DURATION. */ private static final int MAX_DURATION = 1200000; // 20 minutes - - /** The Constant DURATION_CHECK_INTERVAL. */ private static final int DURATION_CHECK_INTERVAL = 60000; // 1 minute - - /** The Constant DURATION_INCREASE_INTERVAL. */ private static final int DURATION_INCREASE_INTERVAL = 20000; // 20 secs (gained upon feeding) - - /** The Constant BUFF_INTERVAL. */ private static final int BUFF_INTERVAL = 5000; // 5 seconds - - /** The _remaining time. */ + private int _foodSkillId; private int _remainingTime = MAX_DURATION; - - /** The _home. */ private int _homeX; private int _homeY; private int _homeZ; - - /** The _owner. */ private L2PcInstance _owner; - - /** The _buff task. */ private Future _buffTask = null; - - /** The _duration check task. */ private Future _durationCheckTask = null; /** @@ -205,10 +179,6 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance#doDie(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean doDie(L2Character killer) { @@ -430,10 +400,6 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance _tamedBeast = tamedBeast; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -469,17 +435,12 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance // this also causes a call to the AI tasks handling feeding, which may call onReceiveFood as required. owner.callSkill(SkillTable.getInstance().getInfo(foodTypeSkillId, 1), targets); owner.setTarget(oldTarget); - } else // if the owner has no food, the beast immediately despawns, except when it was only - // newly spawned. Newly spawned beasts can last up to 5 minutes - if (_tamedBeast.getRemainingTime() < (MAX_DURATION - 300000)) + } + else if (_tamedBeast.getRemainingTime() < (MAX_DURATION - 300000)) // if the owner has no food, the beast immediately despawns, except when it was only newly spawned. Newly spawned beasts can last up to 5 minutes { _tamedBeast.setRemainingTime(-1); } - /* - * There are too many conflicting reports about whether distance from home should be taken into consideration. Disabled for now. if (_tamedBeast.isTooFarFromHome()) _tamedBeast.setRemainingTime(-1); - */ - if (_tamedBeast.getRemainingTime() <= 0) { _tamedBeast.doDespawn(); @@ -487,32 +448,17 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance } } - /** - * The Class CheckOwnerBuffs. - */ private class CheckOwnerBuffs implements Runnable { - /** The _tamed beast. */ private final L2TamedBeastInstance _tamedBeast; - - /** The _num buffs. */ private final int _numBuffs; - /** - * Instantiates a new check owner buffs. - * @param tamedBeast the tamed beast - * @param numBuffs the num buffs - */ CheckOwnerBuffs(L2TamedBeastInstance tamedBeast, int numBuffs) { _tamedBeast = tamedBeast; _numBuffs = numBuffs; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java index 36a75e8a9a..6177a0f3c3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java @@ -40,18 +40,9 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; */ public final class L2TeleporterInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2TeleporterInstance.class); - - /** The Constant COND_ALL_FALSE. */ private static final int COND_ALL_FALSE = 0; - - /** The Constant COND_BUSY_BECAUSE_OF_SIEGE. */ private static final int COND_BUSY_BECAUSE_OF_SIEGE = 1; - - /** The Constant COND_OWNER. */ private static final int COND_OWNER = 2; - - /** The Constant COND_REGULAR. */ private static final int COND_REGULAR = 3; /** @@ -64,10 +55,6 @@ public final class L2TeleporterInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -109,10 +96,10 @@ public final class L2TeleporterInstance extends L2FolkInstance case 31116: // Enter Catacombs case 31117: // case 31118: // - case 31119: // + case 31119: // { player.setIsIn7sDungeon(true); - break; + break; } case 31103: // case 31104: // @@ -127,10 +114,10 @@ public final class L2TeleporterInstance extends L2FolkInstance case 31122: // Exit Catacombs case 31123: // case 31124: // - case 31125: // + case 31125: // { player.setIsIn7sDungeon(false); - break; + break; } } @@ -169,10 +156,6 @@ public final class L2TeleporterInstance extends L2FolkInstance super.onBypassFeedback(player, command); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#getHtmlPath(int, int) - */ @Override public String getHtmlPath(int npcId, int val) { @@ -189,10 +172,6 @@ public final class L2TeleporterInstance extends L2FolkInstance return "data/html/teleporter/" + pom + ".htm"; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#showChatWindow(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void showChatWindow(L2PcInstance player) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TownPetInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TownPetInstance.java index b670982569..e7acb91e74 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TownPetInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TownPetInstance.java @@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; /** * @author Kerberos */ - public class L2TownPetInstance extends L2NpcInstance { int randomX; @@ -64,8 +63,7 @@ public class L2TownPetInstance extends L2NpcInstance // Send a Server->Client packet ValidateLocation to correct the L2ArtefactInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TrainerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TrainerInstance.java index 2f091cfcf9..3e0fdff60a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TrainerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TrainerInstance.java @@ -18,10 +18,6 @@ package com.l2jmobius.gameserver.model.actor.instance; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision: 1.5.4.8 $ $Date: 2005/04/02 15:57:52 $ - */ public final class L2TrainerInstance extends L2FolkInstance { /** @@ -34,10 +30,6 @@ public final class L2TrainerInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#getHtmlPath(int, int) - */ @Override public String getHtmlPath(int npcId, int val) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2VillageMasterInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2VillageMasterInstance.java index 48f99346b4..24feca2f59 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2VillageMasterInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2VillageMasterInstance.java @@ -50,14 +50,8 @@ import com.l2jmobius.gameserver.network.serverpackets.UserInfo; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; import com.l2jmobius.gameserver.util.Util; -/** - * This class ... - * @version $Revision: 1.4.2.3.2.8 $ $Date: 2005/03/29 23:15:15 $ - */ public final class L2VillageMasterInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2VillageMasterInstance.class); - /** * Instantiates a new l2 village master instance. * @param objectId the object id @@ -68,10 +62,6 @@ public final class L2VillageMasterInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -335,9 +325,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance } case 4: // Add Subclass - Action (Subclass 4 x[x]) { - /* - * If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice. - */ + // If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice. // Fix exploit stuck subclass and skills if (player.isLearningSkill() || player.isLocked()) { @@ -388,10 +376,8 @@ public final class L2VillageMasterInstance extends L2FolkInstance } } } - /* - * If quest checking is enabled, verify if the character has completed the Mimir's Elixir (Path to Subclass) and Fate's Whisper (A Grade Weapon) quests by checking for instances of their unique reward items. If they both exist, remove both unique items and continue with adding - * the sub-class. - */ + // If quest checking is enabled, verify if the character has completed the Mimir's Elixir (Path to Subclass) and Fate's Whisper (A Grade Weapon) quests by checking for instances of their unique reward items. + // If they both exist, remove both unique items and continue with adding the sub-class. if (!Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS) { QuestState qs = player.getQuestState("235_MimirsElixir"); @@ -436,9 +422,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance } case 5: // Change Class - Action { - /* - * If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice. Note: paramOne = classIndex - */ + // If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice. Note: paramOne = classIndex // Fix exploit stuck subclass and skills if (player.isLearningSkill() || player.isLocked()) { @@ -494,9 +478,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance } case 7: // Cancel/Change Subclass - Action { - /* - * Warning: the information about this subclass will be removed from the subclass list even if false! - */ + // Warning: the information about this subclass will be removed from the subclass list even if false! // Fix exploit stuck subclass and skills if (player.isLearningSkill() || player.isLocked()) { @@ -534,9 +516,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance } else { - /* - * This isn't good! modifySubClass() removed subclass from memory we must update _classIndex! Else IndexOutOfBoundsException can turn up some place down the line along with other seemingly unrelated problems. - */ + // This isn't good! modifySubClass() removed subclass from memory we must update _classIndex! Else IndexOutOfBoundsException can turn up some place down the line along with other seemingly unrelated problems. player.setActiveClass(0); // Also updates _classIndex plus switching _classid to baseclass. // Check player skills if (Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN) @@ -553,8 +533,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance } content.append(""); - // If the content is greater than for a basic blank page, - // then assume no external HTML file was assigned. + // If the content is greater than for a basic blank page, then assume no external HTML file was assigned. if (content.length() > 26) { html.setHtml(content.toString()); @@ -564,16 +543,11 @@ public final class L2VillageMasterInstance extends L2FolkInstance } else { - // this class dont know any other commands, let forward - // the command to the parent class + // this class dont know any other commands, let forward the command to the parent class super.onBypassFeedback(player, command); } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#getHtmlPath(int, int) - */ @Override public String getHtmlPath(int npcId, int val) { @@ -591,7 +565,6 @@ public final class L2VillageMasterInstance extends L2FolkInstance return "data/html/villagemaster/" + pom + ".htm"; } - // Private stuff /** * Dissolve clan. * @param player the player @@ -761,7 +734,6 @@ public final class L2VillageMasterInstance extends L2FolkInstance } } - // clan.setNewLeader(member); clan.setNewLeader(member, player); } @@ -1053,9 +1025,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance if ((npcRace == PlayerRace.Human) || (npcRace == PlayerRace.LightElf)) { - // If the master is human or light elf, ensure that fighter-type - // masters only teach fighter classes, and priest-type masters - // only teach priest classes etc. + // If the master is human or light elf, ensure that fighter-type masters only teach fighter classes, and priest-type masters only teach priest classes etc. if (!availSub.isOfType(npcTeachType)) { availSubs.remove(availSub); @@ -1065,9 +1035,7 @@ public final class L2VillageMasterInstance extends L2FolkInstance availSubs.remove(availSub); } } - else // If the master is not human and not light elf, - // then remove any classes not of the same race as the master. - if ((npcRace != PlayerRace.Human) && (npcRace != PlayerRace.LightElf) && !availSub.isOfRace(npcRace)) + else if ((npcRace != PlayerRace.Human) && (npcRace != PlayerRace.LightElf) && !availSub.isOfRace(npcRace)) // If the master is not human and not light elf, then remove any classes not of the same race as the master. { availSubs.remove(availSub); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WarehouseInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WarehouseInstance.java index c90e1ef4bd..d1fe969687 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WarehouseInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WarehouseInstance.java @@ -29,14 +29,8 @@ import com.l2jmobius.gameserver.network.serverpackets.WareHouseDepositList; import com.l2jmobius.gameserver.network.serverpackets.WareHouseWithdrawalList; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * This class ... - * @version $Revision: 1.3.4.10 $ $Date: 2005/04/06 16:13:41 $ - */ public final class L2WarehouseInstance extends L2FolkInstance { - // private static Logger LOGGER = Logger.getLogger(L2WarehouseInstance.class); - /** * Instantiates a new l2 warehouse instance. * @param objectId the object id @@ -47,10 +41,6 @@ public final class L2WarehouseInstance extends L2FolkInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#getHtmlPath(int, int) - */ @Override public String getHtmlPath(int npcId, int val) { @@ -194,7 +184,8 @@ public final class L2WarehouseInstance extends L2FolkInstance { player.sendPacket(SystemMessageId.NO_ITEM_DEPOSITED_IN_WH); } - } else if (Config.DEBUG) + } + else if (Config.DEBUG) { LOGGER.info("no items freightened"); } @@ -211,8 +202,7 @@ public final class L2WarehouseInstance extends L2FolkInstance { player.sendPacket(SystemMessageId.CHARACTER_DOES_NOT_EXIST); } - // One or more chars other than this player for this account - else + else // One or more chars other than this player for this account { Map chars = player.getAccountChars(); @@ -271,10 +261,6 @@ public final class L2WarehouseInstance extends L2FolkInstance player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.FREIGHT)); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2FolkInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -325,9 +311,7 @@ public final class L2WarehouseInstance extends L2FolkInstance } else { - // this class dont know any other commands, let forward - // the command to the parent class - + // this class dont know any other commands, let forward the command to the parent class super.onBypassFeedback(player, command); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WeddingManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WeddingManagerInstance.java index fe8e811b82..f9aababae7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WeddingManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WeddingManagerInstance.java @@ -32,9 +32,6 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * The Class L2WeddingManagerInstance. - */ public class L2WeddingManagerInstance extends L2NpcInstance { /** @@ -48,10 +45,6 @@ public class L2WeddingManagerInstance extends L2NpcInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onAction(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onAction(L2PcInstance player) { @@ -71,8 +64,8 @@ public class L2WeddingManagerInstance extends L2NpcInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); - } else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + } + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -102,10 +95,6 @@ public class L2WeddingManagerInstance extends L2NpcInstance player.sendPacket(html); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WyvernManagerInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WyvernManagerInstance.java index 77773c526d..8c26275917 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WyvernManagerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2WyvernManagerInstance.java @@ -30,16 +30,9 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.network.serverpackets.ValidateLocation; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * The Class L2WyvernManagerInstance. - */ public class L2WyvernManagerInstance extends L2CastleChamberlainInstance { - - /** The Constant COND_CLAN_OWNER. */ protected static final int COND_CLAN_OWNER = 3; - - /** The _clan hall id. */ private int _clanHallId = -1; /** @@ -52,10 +45,6 @@ public class L2WyvernManagerInstance extends L2CastleChamberlainInstance super(objectId, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2CastleChamberlainInstance#onBypassFeedback(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance, java.lang.String) - */ @Override public void onBypassFeedback(L2PcInstance player, String command) { @@ -131,10 +120,6 @@ public class L2WyvernManagerInstance extends L2CastleChamberlainInstance } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2CastleChamberlainInstance#onAction(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override public void onAction(L2PcInstance player) { @@ -156,8 +141,7 @@ public class L2WyvernManagerInstance extends L2CastleChamberlainInstance // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client player.sendPacket(new ValidateLocation(this)); } - else // Calculate the distance between the L2PcInstance and the L2NpcInstance - if (!canInteract(player)) + else if (!canInteract(player)) // Calculate the distance between the L2PcInstance and the L2NpcInstance { // Notify the L2PcInstance AI with AI_INTENTION_INTERACT player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); @@ -223,10 +207,6 @@ public class L2WyvernManagerInstance extends L2CastleChamberlainInstance return ClanHallManager.getInstance().getClanHallById(_clanHallId); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.instance.L2CastleChamberlainInstance#validateCondition(com.l2jmobius.gameserver.model.actor.instance.L2PcInstance) - */ @Override protected int validateCondition(L2PcInstance player) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2XmassTreeInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2XmassTreeInstance.java index ccf0cde3c0..efe28780df 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2XmassTreeInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2XmassTreeInstance.java @@ -94,14 +94,9 @@ public class L2XmassTreeInstance extends L2NpcInstance return 900; } - /** - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#isAttackable() - */ @Override public boolean isAutoAttackable(L2Character attacker) { return false; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/AttackableKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/AttackableKnownList.java index 95987d0e80..61a64f0dfa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/AttackableKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/AttackableKnownList.java @@ -29,18 +29,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class AttackableKnownList extends NpcKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public AttackableKnownList(L2Attackable activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean removeKnownObject(L2Object object) { @@ -68,11 +61,6 @@ public class AttackableKnownList extends NpcKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2Attackable getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/BoatKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/BoatKnownList.java index 8cb5fcd295..c828ccc77e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/BoatKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/BoatKnownList.java @@ -25,9 +25,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class BoatKnownList extends CharKnownList { - /** - * @param activeChar - */ public BoatKnownList(L2Character activeChar) { super(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CharKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CharKnownList.java index 4148da653e..718e8d8029 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CharKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CharKnownList.java @@ -31,20 +31,14 @@ import com.l2jmobius.gameserver.util.Util; public class CharKnownList extends ObjectKnownList { - // ========================================================= - // Data Field private Map _knownPlayers; private Map _knownRelations; - // ========================================================= - // Constructor public CharKnownList(L2Character activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -119,11 +113,6 @@ public class CharKnownList extends ObjectKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public public L2Character getActiveChar() { return (L2Character) super.getActiveObject(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CommanderKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CommanderKnownList.java index c5ee70dbd8..582386ca8a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CommanderKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/CommanderKnownList.java @@ -28,18 +28,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; */ public class CommanderKnownList extends AttackableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public CommanderKnownList(L2CommanderInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -76,10 +69,9 @@ public class CommanderKnownList extends AttackableKnownList // Check if player is not the defender if ((player != null) && ((player.getClan() == null) || (getActiveChar().getFort().getSiege().getAttackerClan(player.getClan()) != null))) { - // LOGGER.info(getActiveChar().getName()+": PK "+player.getObjectId()+" entered scan range"); if (getActiveChar().getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) { - getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null);// (L2Character)object); + getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null); } } } @@ -87,11 +79,6 @@ public class CommanderKnownList extends AttackableKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2CommanderInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/DoorKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/DoorKnownList.java index 401274b2f0..42c596cf33 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/DoorKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/DoorKnownList.java @@ -24,24 +24,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2SiegeGuardInstance; public class DoorKnownList extends CharKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public DoorKnownList(L2DoorInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2DoorInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FortSiegeGuardKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FortSiegeGuardKnownList.java index a3e961d9a5..29d94336d5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FortSiegeGuardKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FortSiegeGuardKnownList.java @@ -25,18 +25,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class FortSiegeGuardKnownList extends AttackableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public FortSiegeGuardKnownList(L2FortSiegeGuardInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -77,8 +70,6 @@ public class FortSiegeGuardKnownList extends AttackableKnownList return true; } - // ========================================================= - // Property - Public @Override public final L2FortSiegeGuardInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FriendlyMobKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FriendlyMobKnownList.java index 9b0b02247e..13d8d1f79a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FriendlyMobKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/FriendlyMobKnownList.java @@ -25,18 +25,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class FriendlyMobKnownList extends AttackableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public FriendlyMobKnownList(L2FriendlyMobInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -86,7 +79,6 @@ public class FriendlyMobKnownList extends AttackableKnownList if (getActiveChar().isVisible() && getKnownPlayers().isEmpty()) { getActiveChar().clearAggroList(); - // removeAllKnownObjects(); if (getActiveChar().hasAI()) { getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null); @@ -96,11 +88,6 @@ public class FriendlyMobKnownList extends AttackableKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2FriendlyMobInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardKnownList.java index ccfd8f855e..a2e2a0851a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardKnownList.java @@ -31,18 +31,11 @@ public class GuardKnownList extends AttackableKnownList { private static Logger LOGGER = Logger.getLogger(GuardKnownList.class.getName()); - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public GuardKnownList(L2GuardInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -116,8 +109,6 @@ public class GuardKnownList extends AttackableKnownList // Check if the _aggroList of the L2GuardInstance is Empty if (getActiveChar().noTarget()) { - // removeAllKnownObjects(); - // Set the L2GuardInstance to AI_INTENTION_IDLE L2CharacterAI ai = getActiveChar().getAI(); if (ai != null) @@ -129,11 +120,6 @@ public class GuardKnownList extends AttackableKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2GuardInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardNoHTMLKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardNoHTMLKnownList.java index 63fdcd7d06..e850061247 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardNoHTMLKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/GuardNoHTMLKnownList.java @@ -31,18 +31,11 @@ public class GuardNoHTMLKnownList extends AttackableKnownList { private static Logger LOGGER = Logger.getLogger(GuardKnownList.class.getName()); - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public GuardNoHTMLKnownList(L2GuardNoHTMLInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -116,7 +109,6 @@ public class GuardNoHTMLKnownList extends AttackableKnownList // Check if the _aggroList of the L2GuardInstance is Empty if (getActiveChar().noTarget()) { - // removeAllKnownObjects(); // Set the L2GuardInstance to AI_INTENTION_IDLE final L2CharacterAI ai = getActiveChar().getAI(); if (ai != null) @@ -128,10 +120,6 @@ public class GuardNoHTMLKnownList extends AttackableKnownList return true; } - // ========================================================= - // Method - Private - // ========================================================= - // Property - Public @Override public final L2GuardNoHTMLInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/MonsterKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/MonsterKnownList.java index 1dd8c626ed..0918e4b1a3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/MonsterKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/MonsterKnownList.java @@ -25,18 +25,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class MonsterKnownList extends AttackableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public MonsterKnownList(L2MonsterInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -77,37 +70,17 @@ public class MonsterKnownList extends AttackableKnownList { // Notify the L2MonsterInstance AI with EVT_FORGET_OBJECT getActiveChar().getAI().notifyEvent(CtrlEvent.EVT_FORGET_OBJECT, object); - - // TODO Remove this function because it's already done in L2Character.removeKnownObject - // Set the current target to null if the forgotten L2Object was the targeted L2Object - // L2Character temp = (L2Character)object; - - // if (getTarget() == temp) - // setTarget(null); } if (getActiveChar().isVisible() && getKnownPlayers().isEmpty()) { // Clear the _aggroList of the L2MonsterInstance getActiveChar().clearAggroList(); - - // Remove all L2Object from _knownObjects and _knownPlayer of the L2MonsterInstance then cancel Attak or Cast and notify AI - // removeAllKnownObjects(); - - // TODO Remove this function because it's already done in L2Attackable.removeKnownObject - // Set the L2MonsterInstance AI to AI_INTENTION_IDLE - // if (hasAI()) - // getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null); } return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2MonsterInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NpcKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NpcKnownList.java index c63fb120c1..359ffd21be 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NpcKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NpcKnownList.java @@ -27,11 +27,6 @@ import com.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation; public class NpcKnownList extends CharKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public NpcKnownList(L2NpcInstance activeChar) { super(activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NullKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NullKnownList.java index 71c5b0cc35..bf9504c250 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NullKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/NullKnownList.java @@ -21,79 +21,46 @@ import com.l2jmobius.gameserver.model.actor.L2Character; public class NullKnownList extends ObjectKnownList { - /** - * @param activeObject - */ public NullKnownList(L2Object activeObject) { super(activeObject); - // TODO Auto-generated constructor stub } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#addKnownObject(com.l2jmobius.gameserver.model.L2Object, com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean addKnownObject(L2Object object, L2Character dropper) { return false; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#addKnownObject(com.l2jmobius.gameserver.model.L2Object) - */ @Override public boolean addKnownObject(L2Object object) { return false; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#getActiveObject() - */ @Override public L2Object getActiveObject() { return super.getActiveObject(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#getDistanceToForgetObject(com.l2jmobius.gameserver.model.L2Object) - */ @Override public int getDistanceToForgetObject(L2Object object) { return 0; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#getDistanceToWatchObject(com.l2jmobius.gameserver.model.L2Object) - */ @Override public int getDistanceToWatchObject(L2Object object) { return 0; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#removeAllKnownObjects() no-op - */ @Override public void removeAllKnownObjects() { - // null } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.actor.knownlist.ObjectKnownList#removeKnownObject(com.l2jmobius.gameserver.model.L2Object) - */ @Override public boolean removeKnownObject(L2Object object) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/ObjectKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/ObjectKnownList.java index be6395788f..4b760b2ae7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/ObjectKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/ObjectKnownList.java @@ -30,20 +30,14 @@ import com.l2jmobius.gameserver.util.Util; public class ObjectKnownList { - // ========================================================= - // Data Field private final L2Object _activeObject; private Map _knownObjects; - // ========================================================= - // Constructor public ObjectKnownList(L2Object activeObject) { _activeObject = activeObject; } - // ========================================================= - // Method - Public public boolean addKnownObject(L2Object object) { return addKnownObject(object, null); @@ -121,8 +115,6 @@ public class ObjectKnownList } } - // ========================================================= - // Method - Private private final void findCloseObjects() { final boolean isActiveObjectPlayable = _activeObject instanceof L2Playable; @@ -174,8 +166,7 @@ public class ObjectKnownList } // Try to add object to active object's known objects - // L2Character only needs to see visible L2PcInstance and L2PlayableInstance, - // when moving. Other l2characters are currently only known from initial spawn area. + // L2Character only needs to see visible L2PcInstance and L2PlayableInstance, when moving. Other l2characters are currently only known from initial spawn area. // Possibly look into getDistanceToForgetObject values before modifying this approach... addKnownObject(playable); } @@ -233,8 +224,6 @@ public class ObjectKnownList } } - // ========================================================= - // Property - Public public L2Object getActiveObject() { return _activeObject; @@ -272,10 +261,6 @@ public class ObjectKnownList _obj = obj; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PcKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PcKnownList.java index 4a15f7f6d0..27512fe6b3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PcKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PcKnownList.java @@ -49,18 +49,11 @@ import com.l2jmobius.gameserver.network.serverpackets.VehicleInfo; public class PcKnownList extends PlayableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public PcKnownList(L2PcInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public /** * Add a visible L2Object to L2PcInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packets needed to inform the L2PcInstance of its state and actions in progress.
    *
    @@ -113,10 +106,7 @@ public class PcKnownList extends PlayableKnownList if (object.getPoly().isMorphed() && object.getPoly().getPolyType().equals("item")) { - // if (object.getPolytype().equals("item")) active_char.sendPacket(new SpawnItemPoly(object)); - // else if (object.getPolytype().equals("npc")) - // sendPacket(new NpcInfoPoly(object, this)); } else { @@ -266,9 +256,7 @@ public class PcKnownList extends PlayableKnownList object_char = (L2PcInstance) object; } - /* - * TEMP FIX: If player is not visible don't send packets broadcast to all his KnowList. This will avoid GM detection with l2net and olympiad's crash. We can now find old problems with invisible mode. - */ + // TEMP FIX: If player is not visible don't send packets broadcast to all his KnowList. This will avoid GM detection with l2net and olympiad's crash. We can now find old problems with invisible mode. if ((object_char != null) && !active_char.isGM()) { // GM has to receive remove however because he can see any invisible or inobservermode player @@ -283,8 +271,8 @@ public class PcKnownList extends PlayableKnownList active_char.sendPacket(new DeleteObject(object)); } } - else - { // All other objects has to be removed + else // All other objects has to be removed + { // Send Server-Client Packet DeleteObject to the L2PcInstance active_char.sendPacket(new DeleteObject(object)); @@ -298,11 +286,6 @@ public class PcKnownList extends PlayableKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2PcInstance getActiveChar() { @@ -312,9 +295,7 @@ public class PcKnownList extends PlayableKnownList @Override public int getDistanceToForgetObject(L2Object object) { - // when knownlist grows, the distance to forget should be at least - // the same as the previous watch range, or it becomes possible that - // extra charinfo packets are being sent (watch-forget-watch-forget) + // When knownlist grows, the distance to forget should be at least the same as the previous watch range, or it becomes possible that extra charinfo packets are being sent (watch-forget-watch-forget). final int knownlistSize = getKnownObjects().size(); if (knownlistSize <= 25) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PlayableKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PlayableKnownList.java index 839ad5ba8b..26e76c8702 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PlayableKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/PlayableKnownList.java @@ -20,24 +20,11 @@ import com.l2jmobius.gameserver.model.actor.L2Playable; public class PlayableKnownList extends CharKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public PlayableKnownList(L2Playable activeChar) { super(activeChar); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2Playable getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/RaceManagerKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/RaceManagerKnownList.java index 4359b2fae0..e5cc79cfd5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/RaceManagerKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/RaceManagerKnownList.java @@ -25,18 +25,11 @@ import com.l2jmobius.gameserver.network.serverpackets.DeleteObject; public class RaceManagerKnownList extends NpcKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public RaceManagerKnownList(L2RaceManagerInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -51,10 +44,6 @@ public class RaceManagerKnownList extends NpcKnownList return false; } - /* - * DONT KNOW WHY WE NEED THIS WHEN RACE MANAGER HAS A METHOD THAT BROADCAST TO ITS KNOW PLAYERS if (object instanceof L2PcInstance) { if (packet != null) ((L2PcInstance) object).sendPacket(packet); } - */ - return true; } @@ -68,7 +57,6 @@ public class RaceManagerKnownList extends NpcKnownList if (object instanceof L2PcInstance) { - // LOGGER.info("Sending delete monsrac info."); DeleteObject obj = null; for (int i = 0; i < 8; i++) { @@ -80,11 +68,6 @@ public class RaceManagerKnownList extends NpcKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2RaceManagerInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SiegeGuardKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SiegeGuardKnownList.java index 85904cd1c6..9219643c9b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SiegeGuardKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SiegeGuardKnownList.java @@ -25,18 +25,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2SiegeGuardInstance; public class SiegeGuardKnownList extends AttackableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public SiegeGuardKnownList(L2SiegeGuardInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public boolean addKnownObject(L2Object object) { @@ -73,10 +66,9 @@ public class SiegeGuardKnownList extends AttackableKnownList // Check if player is not the defender if ((player != null) && ((player.getClan() == null) || (getActiveChar().getCastle().getSiege().getAttackerClan(player.getClan()) != null))) { - // if (Config.DEBUG) LOGGER.fine(getObjectId()+": PK "+player.getObjectId()+" entered scan range"); if (getActiveChar().getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) { - getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null);// (L2Character)object); + getActiveChar().getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null); } } } @@ -84,11 +76,6 @@ public class SiegeGuardKnownList extends AttackableKnownList return true; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2SiegeGuardInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SummonKnownList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SummonKnownList.java index be5d1b81f8..402d089c06 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SummonKnownList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/knownlist/SummonKnownList.java @@ -21,24 +21,11 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; public class SummonKnownList extends PlayableKnownList { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public SummonKnownList(L2Summon activeChar) { super(activeChar); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public final L2Summon getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/poly/ObjectPoly.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/poly/ObjectPoly.java index 846eac9f71..32f94719bb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/poly/ObjectPoly.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/poly/ObjectPoly.java @@ -20,32 +20,21 @@ import com.l2jmobius.gameserver.model.L2Object; public class ObjectPoly { - // ========================================================= - // Data Field private final L2Object _activeObject; private int _polyId; private String _polyType; - // ========================================================= - // Constructor public ObjectPoly(L2Object activeObject) { _activeObject = activeObject; } - // ========================================================= - // Method - Public public void setPolyInfo(String polyType, String polyId) { setPolyId(Integer.parseInt(polyId)); setPolyType(polyType); } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public public final L2Object getActiveObject() { return _activeObject; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/position/ObjectPosition.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/position/ObjectPosition.java index f8d2402af1..f7cd1aa7b4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/position/ObjectPosition.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/position/ObjectPosition.java @@ -26,34 +26,16 @@ import com.l2jmobius.gameserver.model.L2WorldRegion; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * The Class ObjectPosition. - */ public class ObjectPosition { - - /** The Constant LOGGER. */ private static final Logger LOGGER = Logger.getLogger(ObjectPosition.class.getName()); - // ========================================================= - // Data Field - /** The _active object. */ private final L2Object _activeObject; - - /** The _heading. */ private int _heading = 0; - - /** The _world position. */ private Point3D _worldPosition; - - /** The _world region. */ private L2WorldRegion _worldRegion; // Object localization : Used for items/chars that are seen in the world - - /** The _changing region. */ private Boolean _changingRegion = false; - // ========================================================= - // Constructor /** * Instantiates a new object position. * @param activeObject the active object @@ -64,8 +46,6 @@ public class ObjectPosition setWorldRegion(L2World.getInstance().getRegion(getWorldPosition())); } - // ========================================================= - // Method - Public /** * Set the x,y,z position of the L2Object and if necessary modify its _worldRegion.
    *
    @@ -102,7 +82,6 @@ public class ObjectPosition if (_activeObject instanceof L2PcInstance) { - // ((L2PcInstance)obj).deleteMe(); ((L2PcInstance) _activeObject).teleToLocation(0, 0, 0, false); ((L2PcInstance) _activeObject).sendMessage("Error with your coords, Please ask a GM for help!"); @@ -185,11 +164,6 @@ public class ObjectPosition } } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public /** * Gets the active object. * @return the active object diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java index bfa06f0061..83676292ad 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/CharStat.java @@ -27,31 +27,17 @@ import com.l2jmobius.gameserver.skills.Calculator; import com.l2jmobius.gameserver.skills.Env; import com.l2jmobius.gameserver.skills.Stats; -/** - * The Class CharStat. - */ public class CharStat { private final Logger LOGGER = Logger.getLogger(CharStat.class.getName()); - // ========================================================= - // Data Field - /** The _active char. */ + private final L2Character _activeChar; - - /** The _exp. */ private long _exp = 0; - - /** The _sp. */ private int _sp = 0; - - /** The _level. */ private int _level = 1; - /** Speed multiplier set by admin gmspeed command */ private float _gmSpeedMultiplier = 1; - // ========================================================= - // Constructor /** * Instantiates a new char stat. * @param activeChar the active char @@ -61,8 +47,6 @@ public class CharStat _activeChar = activeChar; } - // ========================================================= - // Method - Public /** * Calculate the new value of the state with modifiers that will be applied on the targeted L2Character.
    *
    @@ -108,8 +92,7 @@ public class CharStat // Launch the calculation c.calc(env); - // avoid some troubles with negative stats (some stats should never be - // negative) + // avoid some troubles with negative stats (some stats should never be negative) if (env.value <= 0) { switch (stat) @@ -140,11 +123,6 @@ public class CharStat return env.value; } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public /** * Return the Accuracy (base+modifier) of the L2Character in function of the Weapon Expertise Penalty. * @return the accuracy @@ -401,8 +379,7 @@ public class CharStat double attack = _activeChar.getTemplate().baseMAtk * bonusAtk; - // Get the skill type to calculate its effect in function of base stats - // of the L2Character target + // Get the skill type to calculate its effect in function of base stats of the L2Character target. Stats stat = skill == null ? null : skill.getStat(); if (stat != null) @@ -916,8 +893,7 @@ public class CharStat return 1; } - // err we should be adding TO the persons run speed - // not making it a constant + // err we should be adding TO the persons run speed not making it a constant int val = (int) calcStat(Stats.RUN_SPEED, _activeChar.getTemplate().baseRunSpd, null, null) + Config.RUN_SPD_BOOST; if (_activeChar.isInsideZone(ZoneId.WATER)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/DoorStat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/DoorStat.java index 63ed95f238..54cc22002c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/DoorStat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/DoorStat.java @@ -20,11 +20,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance; public class DoorStat extends CharStat { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public DoorStat(L2DoorInstance activeChar) { super(activeChar); @@ -32,14 +27,6 @@ public class DoorStat extends CharStat setLevel((byte) 1); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2DoorInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/NpcStat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/NpcStat.java index 990ff6ba37..78852bb3fa 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/NpcStat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/NpcStat.java @@ -21,11 +21,6 @@ import com.l2jmobius.gameserver.skills.Stats; public class NpcStat extends CharStat { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public NpcStat(L2NpcInstance activeChar) { super(activeChar); @@ -33,14 +28,6 @@ public class NpcStat extends CharStat setLevel(getActiveChar().getTemplate().level); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2NpcInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java index c25ad846bf..103e0d5b44 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java @@ -54,7 +54,7 @@ public class PcStat extends PlayableStat { L2PcInstance activeChar = getActiveChar(); - // Player is Gm and access level is below or equal to canGainExp and is in party, don't give Xp + // Player is Gm and access level is below or equal to canGainExp and is in party, don't give XP if (!getActiveChar().getAccessLevel().canGainExp() && getActiveChar().isInParty()) { return false; @@ -76,11 +76,7 @@ public class PcStat extends PlayableStat } } - /* - * Micht : Use of UserInfo for C5 StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.EXP, getExp()); activeChar.sendPacket(su); - */ activeChar.sendPacket(new UserInfo(activeChar)); - return true; } @@ -172,7 +168,6 @@ public class PcStat extends PlayableStat @Override public final boolean addLevel(byte value) { - // getActiveChar().setLocked(true); if ((getLevel() + value) > (ExperienceData.getInstance().getMaxLevel() - 1)) { return false; @@ -204,9 +199,7 @@ public class PcStat extends PlayableStat } else { - LOGGER.info("Attention: Remote ClassMaster is Enabled, but not inserted into DataBase. Remember to install 31288 Custom_Npc..."); - } } @@ -334,8 +327,6 @@ public class PcStat extends PlayableStat { player_subclass.setExp(value); } - - // getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).setExp(value); } else { @@ -349,7 +340,6 @@ public class PcStat extends PlayableStat try { final L2PcInstance player = getActiveChar(); - if (player.isSubClassActive()) { final int class_index = player.getClassIndex(); @@ -359,13 +349,7 @@ public class PcStat extends PlayableStat { return player_subclass.getLevel(); } - - // getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).setExp(value); } - - // if (getActiveChar().isSubClassActive()) - // return getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).getLevel(); - // return super.getLevel(); } catch (NullPointerException e) @@ -393,10 +377,6 @@ public class PcStat extends PlayableStat { player_subclass.setLevel(value); } - - // if(getActiveChar().isSubClassActive()) - // { - // getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).setLevel(value); } else { @@ -471,7 +451,6 @@ public class PcStat extends PlayableStat public final int getSp() { final L2PcInstance player = getActiveChar(); - if (player.isSubClassActive()) { final int class_index = player.getClassIndex(); @@ -482,9 +461,6 @@ public class PcStat extends PlayableStat return player_subclass.getSp(); } } - // if(getActiveChar().isSubClassActive()) - // return getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).getSp(); - return super.getSp(); } @@ -504,11 +480,6 @@ public class PcStat extends PlayableStat player_subclass.setSp(value); } } - - // if(getActiveChar().isSubClassActive()) - // { - // getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).setSp(value); - // } else { super.setSp(value); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PetStat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PetStat.java index bd3147d5b3..3590cd3503 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PetStat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/PetStat.java @@ -41,11 +41,8 @@ public class PetStat extends SummonStat return false; } - /* - * Micht : Use of PetInfo for C5 StatusUpdate su = new StatusUpdate(getActiveChar().getObjectId()); su.addAttribute(StatusUpdate.EXP, getExp()); getActiveChar().broadcastPacket(su); - */ getActiveChar().broadcastPacket(new PetInfo(getActiveChar())); - // The PetInfo packet wipes the PartySpelled (list of active spells' icons). Re-add them + // The PetInfo packet wipes the PartySpelled (list of active spells' icons). Re-add them. getActiveChar().updateEffectIcons(true); return true; @@ -171,75 +168,75 @@ public class PetStat extends SummonStat { switch (stat) { - case AGGRESSION: + case AGGRESSION: { attack += getActiveChar().getTemplate().baseAggression; - break; + break; } - case BLEED: + case BLEED: { attack += getActiveChar().getTemplate().baseBleed; - break; + break; } - case POISON: + case POISON: { attack += getActiveChar().getTemplate().basePoison; - break; + break; } - case STUN: + case STUN: { attack += getActiveChar().getTemplate().baseStun; - break; + break; } - case ROOT: + case ROOT: { attack += getActiveChar().getTemplate().baseRoot; - break; + break; } - case MOVEMENT: + case MOVEMENT: { attack += getActiveChar().getTemplate().baseMovement; - break; + break; } - case CONFUSION: + case CONFUSION: { attack += getActiveChar().getTemplate().baseConfusion; - break; + break; } - case SLEEP: + case SLEEP: { attack += getActiveChar().getTemplate().baseSleep; - break; + break; } - case FIRE: + case FIRE: { attack += getActiveChar().getTemplate().baseFire; - break; + break; } - case WIND: + case WIND: { attack += getActiveChar().getTemplate().baseWind; - break; + break; } - case WATER: + case WATER: { attack += getActiveChar().getTemplate().baseWater; - break; + break; } - case EARTH: + case EARTH: { attack += getActiveChar().getTemplate().baseEarth; - break; + break; } - case HOLY: + case HOLY: { attack += getActiveChar().getTemplate().baseHoly; - break; + break; } - case DARK: + case DARK: { attack += getActiveChar().getTemplate().baseDark; - break; + break; } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/SummonStat.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/SummonStat.java index f49933da9a..76d9fa4b5e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/SummonStat.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/stat/SummonStat.java @@ -20,24 +20,11 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; public class SummonStat extends PlayableStat { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public SummonStat(L2Summon activeChar) { super(activeChar); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2Summon getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/CharStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/CharStatus.java index 54f537ac7b..6925de70e0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/CharStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/CharStatus.java @@ -36,49 +36,21 @@ import com.l2jmobius.gameserver.model.entity.Duel; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.skills.Formulas; -/** - * The Class CharStatus. - */ public class CharStatus { - - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(CharStatus.class.getName()); - // ========================================================= - // Data Field - /** The _active char. */ final L2Character _activeChar; - - /** The _current cp. */ double _currentCp = 0; // Current CP of the L2Character - - /** The _current hp. */ double _currentHp = 0; // Current HP of the L2Character - - /** The _current mp. */ double _currentMp = 0; // Current MP of the L2Character - - /** Array containing all clients that need to be notified about hp/mp updates of the L2Character. */ private Set _StatusListener; - - /** The _reg task. */ private Future _regTask; - - /** The _flags regen active. */ private byte _flagsRegenActive = 0; - - /** The Constant REGEN_FLAG_CP. */ private static final byte REGEN_FLAG_CP = 4; - - /** The Constant REGEN_FLAG_HP. */ private static final byte REGEN_FLAG_HP = 1; - - /** The Constant REGEN_FLAG_MP. */ private static final byte REGEN_FLAG_MP = 2; - // ========================================================= - // Constructor /** * Instantiates a new char status. * @param activeChar the active char @@ -258,8 +230,7 @@ public class CharStatus } setCurrentHp(value); // Set Hp } - else // If we're dealing with an L2Attackable Instance and the attacker's hit didn't kill the mob, clear the over-hit flag - if (_activeChar instanceof L2Attackable) + else if (_activeChar instanceof L2Attackable) // If we're dealing with an L2Attackable Instance and the attacker's hit didn't kill the mob, clear the over-hit flag. { ((L2Attackable) _activeChar).overhitEnabled(false); } @@ -278,8 +249,7 @@ public class CharStatus } } - // first die (and calculate rewards), if currentHp < 0, - // then overhit may be calculated + // first die (and calculate rewards), if currentHp < 0, then overhit may be calculated if (Config.DEBUG) { LOGGER.info("char is dead."); @@ -389,11 +359,6 @@ public class CharStatus } } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public /** * Gets the active char. * @return the active char @@ -686,8 +651,6 @@ public class CharStatus return _StatusListener; } - // ========================================================= - // Runnable /** * Task of HP/MP/CP regeneration. */ diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/DoorStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/DoorStatus.java index a95f5bd122..52339e0788 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/DoorStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/DoorStatus.java @@ -20,24 +20,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance; public class DoorStatus extends CharStatus { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public DoorStatus(L2DoorInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2DoorInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/NpcStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/NpcStatus.java index e68e7ab4b3..befa056f79 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/NpcStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/NpcStatus.java @@ -21,18 +21,11 @@ import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance; public class NpcStatus extends CharStatus { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public NpcStatus(L2NpcInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public final void reduceHp(double value, L2Character attacker) { @@ -56,11 +49,6 @@ public class NpcStatus extends CharStatus super.reduceHp(value, attacker, awake); } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2NpcInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PcStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PcStatus.java index bb3c0a946b..c570b855b9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PcStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PcStatus.java @@ -31,18 +31,11 @@ import com.l2jmobius.gameserver.util.Util; public class PcStatus extends PlayableStatus { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public PcStatus(L2PcInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public final void reduceHp(double value, L2Character attacker) { @@ -123,7 +116,7 @@ public class PcStatus extends PlayableStatus } } - if (attacker instanceof L2Playable/* || attacker instanceof L2SiegeGuardInstance */) + if (attacker instanceof L2Playable) { if (getCurrentCp() >= value) { @@ -193,11 +186,6 @@ public class PcStatus extends PlayableStatus } } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2PcInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PetStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PetStatus.java index 544b16bd1e..ec3ff929d9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PetStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PetStatus.java @@ -25,19 +25,13 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class PetStatus extends SummonStatus { - // ========================================================= - // Data Field private int _currentFed = 0; // Current Fed of the L2PetInstance - // ========================================================= - // Constructor public PetStatus(L2PetInstance activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public final void reduceHp(double value, L2Character attacker) { @@ -74,11 +68,6 @@ public class PetStatus extends SummonStatus } } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2PetInstance getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PlayableStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PlayableStatus.java index 822904ff9f..e913012bef 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PlayableStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/PlayableStatus.java @@ -21,18 +21,11 @@ import com.l2jmobius.gameserver.model.actor.L2Playable; public class PlayableStatus extends CharStatus { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public PlayableStatus(L2Playable activeChar) { super(activeChar); } - // ========================================================= - // Method - Public @Override public void reduceHp(double value, L2Character attacker) { @@ -48,17 +41,8 @@ public class PlayableStatus extends CharStatus } super.reduceHp(value, attacker, awake); - /* - * if (attacker != null && attacker != getActiveChar()) { // Flag the attacker if it's a L2PcInstance outside a PvP area L2PcInstance player = null; if (attacker instanceof L2PcInstance) player = (L2PcInstance)attacker; else if (attacker instanceof L2Summon) player = - * ((L2Summon)attacker).getOwner(); if (player != null) player.updatePvPStatus(getActiveChar()); } - */ } - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2Playable getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/SummonStatus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/SummonStatus.java index 4fc62e9085..bcbc61d464 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/SummonStatus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/status/SummonStatus.java @@ -20,24 +20,11 @@ import com.l2jmobius.gameserver.model.actor.L2Summon; public class SummonStatus extends PlayableStatus { - // ========================================================= - // Data Field - - // ========================================================= - // Constructor public SummonStatus(L2Summon activeChar) { super(activeChar); } - // ========================================================= - // Method - Public - - // ========================================================= - // Method - Private - - // ========================================================= - // Property - Public @Override public L2Summon getActiveChar() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassId.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassId.java index 385c154dfc..d870b0a4d2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassId.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassId.java @@ -30,382 +30,129 @@ package com.l2jmobius.gameserver.model.base; */ public enum ClassId { - /** The fighter. */ fighter(0x00, false, Race.human, null), - - /** The warrior. */ warrior(0x01, false, Race.human, fighter), - - /** The gladiator. */ gladiator(0x02, false, Race.human, warrior), - - /** The warlord. */ warlord(0x03, false, Race.human, warrior), - - /** The knight. */ knight(0x04, false, Race.human, fighter), - - /** The paladin. */ paladin(0x05, false, Race.human, knight), - - /** The dark avenger. */ darkAvenger(0x06, false, Race.human, knight), - - /** The rogue. */ rogue(0x07, false, Race.human, fighter), - - /** The treasure hunter. */ treasureHunter(0x08, false, Race.human, rogue), - - /** The hawkeye. */ hawkeye(0x09, false, Race.human, rogue), - - /** The mage. */ mage(0x0a, true, Race.human, null), - - /** The wizard. */ wizard(0x0b, true, Race.human, mage), - - /** The sorceror. */ sorceror(0x0c, true, Race.human, wizard), - - /** The necromancer. */ necromancer(0x0d, true, Race.human, wizard), - - /** The warlock. */ warlock(0x0e, true, Race.human, wizard), - - /** The cleric. */ cleric(0x0f, true, Race.human, mage), - - /** The bishop. */ bishop(0x10, true, Race.human, cleric), - - /** The prophet. */ prophet(0x11, true, Race.human, cleric), - - /** The elven fighter. */ elvenFighter(0x12, false, Race.elf, null), - - /** The elven knight. */ elvenKnight(0x13, false, Race.elf, elvenFighter), - - /** The temple knight. */ templeKnight(0x14, false, Race.elf, elvenKnight), - - /** The sword singer. */ swordSinger(0x15, false, Race.elf, elvenKnight), - - /** The elven scout. */ elvenScout(0x16, false, Race.elf, elvenFighter), - - /** The plains walker. */ plainsWalker(0x17, false, Race.elf, elvenScout), - - /** The silver ranger. */ silverRanger(0x18, false, Race.elf, elvenScout), - - /** The elven mage. */ elvenMage(0x19, true, Race.elf, null), - - /** The elven wizard. */ elvenWizard(0x1a, true, Race.elf, elvenMage), - - /** The spellsinger. */ spellsinger(0x1b, true, Race.elf, elvenWizard), - - /** The elemental summoner. */ elementalSummoner(0x1c, true, Race.elf, elvenWizard), - - /** The oracle. */ oracle(0x1d, true, Race.elf, elvenMage), - - /** The elder. */ elder(0x1e, true, Race.elf, oracle), - - /** The dark fighter. */ darkFighter(0x1f, false, Race.darkelf, null), - - /** The palus knight. */ palusKnight(0x20, false, Race.darkelf, darkFighter), - - /** The shillien knight. */ shillienKnight(0x21, false, Race.darkelf, palusKnight), - - /** The bladedancer. */ bladedancer(0x22, false, Race.darkelf, palusKnight), - - /** The assassin. */ assassin(0x23, false, Race.darkelf, darkFighter), - - /** The abyss walker. */ abyssWalker(0x24, false, Race.darkelf, assassin), - - /** The phantom ranger. */ phantomRanger(0x25, false, Race.darkelf, assassin), - - /** The dark mage. */ darkMage(0x26, true, Race.darkelf, null), - - /** The dark wizard. */ darkWizard(0x27, true, Race.darkelf, darkMage), - - /** The spellhowler. */ spellhowler(0x28, true, Race.darkelf, darkWizard), - - /** The phantom summoner. */ phantomSummoner(0x29, true, Race.darkelf, darkWizard), - - /** The shillien oracle. */ shillienOracle(0x2a, true, Race.darkelf, darkMage), - - /** The shillen elder. */ shillenElder(0x2b, true, Race.darkelf, shillienOracle), - - /** The orc fighter. */ orcFighter(0x2c, false, Race.orc, null), - - /** The orc raider. */ orcRaider(0x2d, false, Race.orc, orcFighter), - - /** The destroyer. */ destroyer(0x2e, false, Race.orc, orcRaider), - - /** The orc monk. */ orcMonk(0x2f, false, Race.orc, orcFighter), - - /** The tyrant. */ tyrant(0x30, false, Race.orc, orcMonk), - - /** The orc mage. */ orcMage(0x31, false, Race.orc, null), - - /** The orc shaman. */ orcShaman(0x32, true, Race.orc, orcMage), - - /** The overlord. */ overlord(0x33, true, Race.orc, orcShaman), - - /** The warcryer. */ warcryer(0x34, true, Race.orc, orcShaman), - - /** The dwarven fighter. */ dwarvenFighter(0x35, false, Race.dwarf, null), - - /** The scavenger. */ scavenger(0x36, false, Race.dwarf, dwarvenFighter), - - /** The bounty hunter. */ bountyHunter(0x37, false, Race.dwarf, scavenger), - - /** The artisan. */ artisan(0x38, false, Race.dwarf, dwarvenFighter), - - /** The warsmith. */ warsmith(0x39, false, Race.dwarf, artisan), - - /* - * Dummy Entries (id's already in decimal format) btw FU NCSoft for the amount of work you put me through to do this!! - */ - /** The dummy entry1. */ dummyEntry1(58, false, null, null), - - /** The dummy entry2. */ dummyEntry2(59, false, null, null), - - /** The dummy entry3. */ dummyEntry3(60, false, null, null), - - /** The dummy entry4. */ dummyEntry4(61, false, null, null), - - /** The dummy entry5. */ dummyEntry5(62, false, null, null), - - /** The dummy entry6. */ dummyEntry6(63, false, null, null), - - /** The dummy entry7. */ dummyEntry7(64, false, null, null), - - /** The dummy entry8. */ dummyEntry8(65, false, null, null), - - /** The dummy entry9. */ dummyEntry9(66, false, null, null), - - /** The dummy entry10. */ dummyEntry10(67, false, null, null), - - /** The dummy entry11. */ dummyEntry11(68, false, null, null), - - /** The dummy entry12. */ dummyEntry12(69, false, null, null), - - /** The dummy entry13. */ dummyEntry13(70, false, null, null), - - /** The dummy entry14. */ dummyEntry14(71, false, null, null), - - /** The dummy entry15. */ dummyEntry15(72, false, null, null), - - /** The dummy entry16. */ dummyEntry16(73, false, null, null), - - /** The dummy entry17. */ dummyEntry17(74, false, null, null), - - /** The dummy entry18. */ dummyEntry18(75, false, null, null), - - /** The dummy entry19. */ dummyEntry19(76, false, null, null), - - /** The dummy entry20. */ dummyEntry20(77, false, null, null), - - /** The dummy entry21. */ dummyEntry21(78, false, null, null), - - /** The dummy entry22. */ dummyEntry22(79, false, null, null), - - /** The dummy entry23. */ dummyEntry23(80, false, null, null), - - /** The dummy entry24. */ dummyEntry24(81, false, null, null), - - /** The dummy entry25. */ dummyEntry25(82, false, null, null), - - /** The dummy entry26. */ dummyEntry26(83, false, null, null), - - /** The dummy entry27. */ dummyEntry27(84, false, null, null), - - /** The dummy entry28. */ dummyEntry28(85, false, null, null), - - /** The dummy entry29. */ dummyEntry29(86, false, null, null), - - /** The dummy entry30. */ dummyEntry30(87, false, null, null), - /* - * Of Dummy entries - */ - - /* - * Now the bad boys! new class ids :)) (3rd classes) - */ - /** The duelist. */ duelist(0x58, false, Race.human, gladiator), - - /** The dreadnought. */ dreadnought(0x59, false, Race.human, warlord), - - /** The phoenix knight. */ phoenixKnight(0x5a, false, Race.human, paladin), - - /** The hell knight. */ hellKnight(0x5b, false, Race.human, darkAvenger), - - /** The sagittarius. */ sagittarius(0x5c, false, Race.human, hawkeye), - - /** The adventurer. */ adventurer(0x5d, false, Race.human, treasureHunter), - - /** The archmage. */ archmage(0x5e, true, Race.human, sorceror), - - /** The soultaker. */ soultaker(0x5f, true, Race.human, necromancer), - - /** The arcana lord. */ arcanaLord(0x60, true, Race.human, warlock), - - /** The cardinal. */ cardinal(0x61, true, Race.human, bishop), - - /** The hierophant. */ hierophant(0x62, true, Race.human, prophet), - - /** The eva templar. */ evaTemplar(0x63, false, Race.elf, templeKnight), - - /** The sword muse. */ swordMuse(0x64, false, Race.elf, swordSinger), - - /** The wind rider. */ windRider(0x65, false, Race.elf, plainsWalker), - - /** The moonlight sentinel. */ moonlightSentinel(0x66, false, Race.elf, silverRanger), - - /** The mystic muse. */ mysticMuse(0x67, true, Race.elf, spellsinger), - - /** The elemental master. */ elementalMaster(0x68, true, Race.elf, elementalSummoner), - - /** The eva saint. */ evaSaint(0x69, true, Race.elf, elder), - - /** The shillien templar. */ shillienTemplar(0x6a, false, Race.darkelf, shillienKnight), - - /** The spectral dancer. */ spectralDancer(0x6b, false, Race.darkelf, bladedancer), - - /** The ghost hunter. */ ghostHunter(0x6c, false, Race.darkelf, abyssWalker), - - /** The ghost sentinel. */ ghostSentinel(0x6d, false, Race.darkelf, phantomRanger), - - /** The storm screamer. */ stormScreamer(0x6e, true, Race.darkelf, spellhowler), - - /** The spectral master. */ spectralMaster(0x6f, true, Race.darkelf, phantomSummoner), - - /** The shillien saint. */ shillienSaint(0x70, true, Race.darkelf, shillenElder), - - /** The titan. */ titan(0x71, false, Race.orc, destroyer), - - /** The grand khauatari. */ grandKhauatari(0x72, false, Race.orc, tyrant), - - /** The dominator. */ dominator(0x73, true, Race.orc, overlord), - - /** The doomcryer. */ doomcryer(0x74, true, Race.orc, warcryer), - - /** The fortune seeker. */ fortuneSeeker(0x75, false, Race.dwarf, bountyHunter), - - /** The maestro. */ maestro(0x76, false, Race.dwarf, warsmith); - /** The Identifier of the Class. */ private final int _id; - - /** True if the class is a mage class. */ private final boolean _isMage; - - /** The Race object of the class. */ private final Race _race; - - /** The parent ClassId or null if this class is a root. */ private final ClassId _parent; /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassLevel.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassLevel.java index 6b7481f766..1aef6d497f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassLevel.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassLevel.java @@ -16,11 +16,6 @@ */ package com.l2jmobius.gameserver.model.base; -/** - * This class ... - * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $ - */ - public enum ClassLevel { First, diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassType.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassType.java index cb670ee312..ed8010c23a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassType.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/ClassType.java @@ -20,7 +20,6 @@ package com.l2jmobius.gameserver.model.base; * ClassType Enum * @author Tempy */ - public enum ClassType { Fighter, diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/PlayerClass.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/PlayerClass.java index 0f50b1ecd9..0f19631093 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/PlayerClass.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/PlayerClass.java @@ -35,10 +35,6 @@ import java.util.Set; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * This class ... - * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $ - */ public enum PlayerClass { HumanFighter(Human, Fighter, First), @@ -135,9 +131,6 @@ public enum PlayerClass dummyEntry29(null, null, null), dummyEntry30(null, null, null), - /* - * (3rd classes) - */ duelist(Human, Fighter, Fourth), dreadnought(Human, Fighter, Fourth), phoenixKnight(Human, Fighter, Fourth), @@ -238,15 +231,15 @@ public enum PlayerClass switch (player.getRace()) { - case elf: + case elf: { subclasses.removeAll(getSet(DarkElf, Third)); - break; + break; } - case darkelf: + case darkelf: { subclasses.removeAll(getSet(LightElf, Third)); - break; + break; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Race.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Race.java index eb09cb4dca..4d23bbaa3a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Race.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Race.java @@ -16,12 +16,6 @@ */ package com.l2jmobius.gameserver.model.base; -/** - * This class defines all races (human, elf, darkelf, orc, dwarf) that a player can chose.
    - *
    - * @version $Revision: 1.2.4.2 $ $Date: 2005/03/27 15:29:32 $ - */ - public enum Race { human, diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Sex.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Sex.java index 15c489ecc8..ae06e9dcbd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Sex.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/Sex.java @@ -16,10 +16,6 @@ */ package com.l2jmobius.gameserver.model.base; -/** - * This class ... - * @version $Revision: 1.2.4.1 $ $Date: 2005/03/27 15:29:32 $ - */ public class Sex { public static final int MALE = 0; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SoulCrystal.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SoulCrystal.java index 70494acf44..19a7c64dd2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SoulCrystal.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SoulCrystal.java @@ -126,5 +126,4 @@ public class SoulCrystal public static final int RED_NEW_CRYSTAL = 4629; public static final int GRN_NEW_CYRSTAL = 4640; public static final int BLU_NEW_CRYSTAL = 4651; - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SubClass.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SubClass.java index 063b0fba92..12754bc62c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SubClass.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/base/SubClass.java @@ -50,8 +50,7 @@ public final class SubClass public SubClass() { - // Used for specifying ALL attributes of a sub class directly, - // using the preset default values. + // Used for specifying ALL attributes of a sub class directly, using the preset default values. } public PlayerClass getClassDefinition() diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Announcements.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Announcements.java index a5bb64716f..ea5a4039cf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Announcements.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Announcements.java @@ -273,7 +273,7 @@ public class Announcements } } - // Method fo handling announcements from admin + // Method for handling announcements from admin public void handleAnnounce(String command, int lengthToTrim) { try diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Auction.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Auction.java index 191e9d4833..4976fbdf68 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Auction.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Auction.java @@ -34,98 +34,44 @@ import com.l2jmobius.gameserver.model.L2Clan; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -/** - * The Class Auction. - */ public class Auction { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(Auction.class.getName()); - /** The _id. */ - private int _id = 0; - - /** The _adena id. */ - private final int _adenaId = 57; - - /** The _end date. */ - private long _endDate; - - /** The _highest bidder id. */ - private int _highestBidderId = 0; - - /** The _highest bidder name. */ - private String _highestBidderName = ""; - - /** The _highest bidder max bid. */ - private int _highestBidderMaxBid = 0; - - /** The _item id. */ - private int _itemId = 0; - - /** The _item name. */ - private String _itemName = ""; - - /** The _item object id. */ - private int _itemObjectId = 0; - - /** The _item quantity. */ - private final int _itemQuantity = 0; - - /** The _item type. */ - private String _itemType = ""; - - /** The _seller id. */ - private int _sellerId = 0; - - /** The _seller clan name. */ - private String _sellerClanName = ""; - - /** The _seller name. */ - private String _sellerName = ""; - - /** The _current bid. */ - private int _currentBid = 0; - - /** The _starting bid. */ - private int _startingBid = 0; - - /** The Constant MAX_ADENA. */ public static final long MAX_ADENA = 99900000000L; - - /** The _bidders. */ + private int _id = 0; + private final int _adenaId = 57; + private long _endDate; + private int _highestBidderId = 0; + private String _highestBidderName = ""; + private int _highestBidderMaxBid = 0; + private int _itemId = 0; + private String _itemName = ""; + private int _itemObjectId = 0; + private final int _itemQuantity = 0; + private String _itemType = ""; + private int _sellerId = 0; + private String _sellerClanName = ""; + private String _sellerName = ""; + private int _currentBid = 0; + private int _startingBid = 0; private final Map _bidders = new HashMap<>(); - /** The Constant ItemTypeName. */ private static final String[] ItemTypeName = { "ClanHall" }; - /** - * The Enum ItemTypeEnum. - */ public enum ItemTypeEnum { - /** The Clan hall. */ ClanHall } - /** - * The Class Bidder. - */ public class Bidder { - /** The _name. */ private final String _name; - - /** The _clan name. */ private final String _clanName; - - /** The _bid. */ private int _bid; - - /** The _time bid. */ private final Calendar _timeBid; /** @@ -199,22 +145,13 @@ public class Auction } } - /** - * Task Sheduler for endAuction. - */ public class AutoEndTask implements Runnable { - /** - * Instantiates a new auto end task. - */ + public AutoEndTask() { } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -228,11 +165,6 @@ public class Auction } } - /** - * Constructor. - * @param auctionId the auction id - */ - public Auction(int auctionId) { _id = auctionId; @@ -299,9 +231,6 @@ public class Auction } } - /** - * Load bidders *. - */ private void loadBid() { _highestBidderId = 0; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/ClanHall.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/ClanHall.java index 16c68e0140..cb97beaa3e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/ClanHall.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/ClanHall.java @@ -40,110 +40,43 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.PledgeShowInfoUpdate; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * The Class ClanHall. - */ public class ClanHall { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(ClanHall.class.getName()); - /** The _clan hall id. */ + public static final int FUNC_TELEPORT = 1; + public static final int FUNC_ITEM_CREATE = 2; + public static final int FUNC_RESTORE_HP = 3; + public static final int FUNC_RESTORE_MP = 4; + public static final int FUNC_RESTORE_EXP = 5; + public static final int FUNC_SUPPORT = 6; + public static final int FUNC_DECO_FRONTPLATEFORM = 7; + public static final int FUNC_DECO_CURTAINS = 8; final int _clanHallId; - - /** The _doors. */ private final List _doors = new ArrayList<>(); - - /** The _door default. */ private final List _doorDefault = new ArrayList<>(); - - /** The _name. */ final String _name; - - /** The _owner id. */ private int _ownerId; - - /** The _owner clan. */ private L2Clan _ownerClan; - - /** The _lease. */ private final int _lease; - - /** The _desc. */ private final String _desc; - - /** The _location. */ private final String _location; - - /** The _paid until. */ protected long _paidUntil; - - /** The _zone. */ private L2ClanHallZone _zone; - - /** The _grade. */ private final int _grade; - - /** The _ch rate. */ protected final int _chRate = 604800000; - - /** The _is free. */ protected boolean _isFree = true; - - /** The _functions. */ private final Map _functions; - - /** The _paid. */ protected boolean _paid; - /** Clan Hall Functions. */ - public static final int FUNC_TELEPORT = 1; - - /** The Constant FUNC_ITEM_CREATE. */ - public static final int FUNC_ITEM_CREATE = 2; - - /** The Constant FUNC_RESTORE_HP. */ - public static final int FUNC_RESTORE_HP = 3; - - /** The Constant FUNC_RESTORE_MP. */ - public static final int FUNC_RESTORE_MP = 4; - - /** The Constant FUNC_RESTORE_EXP. */ - public static final int FUNC_RESTORE_EXP = 5; - - /** The Constant FUNC_SUPPORT. */ - public static final int FUNC_SUPPORT = 6; - - /** The Constant FUNC_DECO_FRONTPLATEFORM. */ - public static final int FUNC_DECO_FRONTPLATEFORM = 7; - - /** The Constant FUNC_DECO_CURTAINS. */ - public static final int FUNC_DECO_CURTAINS = 8; - - /** - * The Class ClanHallFunction. - */ public class ClanHallFunction { - /** The _type. */ final int _type; - - /** The _lvl. */ private int _lvl; - - /** The _fee. */ protected int _fee; - - /** The _temp fee. */ protected int _tempFee; - - /** The _rate. */ final long _rate; - - /** The _end date. */ long _endDate; - - /** The _in debt. */ protected boolean _inDebt; /** @@ -260,22 +193,12 @@ public class ClanHall } } - /** - * The Class FunctionTask. - */ private class FunctionTask implements Runnable { - /** - * Instantiates a new function task. - */ public FunctionTask() { } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -493,8 +416,6 @@ public class ClanHall */ public final List getDoors() { - // if (_doors == null) - // _doors = new ArrayList(); return _doors; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/DimensionalRift.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/DimensionalRift.java index df50ec4920..f8222a26ca 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/DimensionalRift.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/DimensionalRift.java @@ -262,8 +262,8 @@ public class DimensionalRift protected void teleportToNextRoom(L2PcInstance player) { - if (_choosenRoom == -1) - { // Do not tp in the same room a second time and do not tp in the busy room + if (_choosenRoom == -1) // Do not tp in the same room a second time and do not tp in the busy room + { do { _choosenRoom = (byte) Rnd.get(1, 9); @@ -380,10 +380,6 @@ public class DimensionalRift if ((_party.getMemberCount() - revivedInWaitingRoom.size()) < Config.RIFT_MIN_PARTY_SIZE) { - // int pcm = _party.getMemberCount(); - // int rev = revivedInWaitingRoom.size(); - // int min = Config.RIFT_MIN_PARTY_SIZE; - for (L2PcInstance p : _party.getPartyMembers()) { if (!revivedInWaitingRoom.contains(p)) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Duel.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Duel.java index 30b8ba72d2..2ac6c13c2f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Duel.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Duel.java @@ -43,87 +43,37 @@ import com.l2jmobius.gameserver.network.serverpackets.PlaySound; import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -/** - * The Class Duel. - */ public class Duel { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(Duel.class.getName()); - /** The Constant DUELSTATE_NODUEL. */ public static final int DUELSTATE_NODUEL = 0; - - /** The Constant DUELSTATE_DUELLING. */ public static final int DUELSTATE_DUELLING = 1; - - /** The Constant DUELSTATE_DEAD. */ public static final int DUELSTATE_DEAD = 2; - - /** The Constant DUELSTATE_WINNER. */ public static final int DUELSTATE_WINNER = 3; - - /** The Constant DUELSTATE_INTERRUPTED. */ public static final int DUELSTATE_INTERRUPTED = 4; - // ========================================================= - // Data Field - /** The _duel id. */ private final int _duelId; - - /** The _player a. */ private L2PcInstance _playerA; - - /** The _player b. */ private L2PcInstance _playerB; - - /** The _party duel. */ protected boolean _partyDuel; - - /** The _duel end time. */ private final Calendar _duelEndTime; - - /** The _surrender request. */ private int _surrenderRequest = 0; - - /** The _countdown. */ private int _countdown = 4; - - /** The _finished. */ private boolean _finished = false; - - /** The _player conditions. */ private Map _playerConditions; - /** - * The Enum DuelResultEnum. - */ public enum DuelResultEnum { - /** The Continue. */ Continue, - - /** The Team1 win. */ Team1Win, - - /** The Team2 win. */ Team2Win, - - /** The Team1 surrender. */ Team1Surrender, - - /** The Team2 surrender. */ Team2Surrender, - - /** The Canceled. */ Canceled, - - /** The Timeout. */ Timeout } - // ========================================================= - // Constructor /** * Instantiates a new duel. * @param playerA the player a @@ -166,43 +116,19 @@ public class Duel ThreadPool.schedule(new ScheduleStartDuelTask(this), 3000); } - // =============================================================== - // Nested Class - /** * The Class PlayerCondition. */ public class PlayerCondition { - /** The _player. */ private L2PcInstance _player; - - /** The _hp. */ private double _hp; - - /** The _mp. */ private double _mp; - - /** The _cp. */ private double _cp; - - /** The _pa duel. */ private boolean _paDuel; - - /** The _z. */ private int _x; - - /** - * The _z. - */ private int _y; - - /** - * The _z. - */ private int _z; - - /** The _debuffs. */ private List _debuffs; /** @@ -311,8 +237,6 @@ public class Duel } } - // =============================================================== - // Schedule task /** * The Class ScheduleDuelTask. */ @@ -330,10 +254,6 @@ public class Duel _duel = duel; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -365,12 +285,8 @@ public class Duel } } - /** - * The Class ScheduleStartDuelTask. - */ public class ScheduleStartDuelTask implements Runnable { - /** The _duel. */ private final Duel _duel; /** @@ -382,10 +298,6 @@ public class Duel _duel = duel; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -403,11 +315,9 @@ public class Duel if (count == 4) { // players need to be teleportet first - // TODO: stadia manager needs a function to return an unused stadium for duels + // TODO: stadium manager needs a function to return an unused stadium for duels - // currently if oly in competition period - // and defined location is into a stadium - // just use Gludin Arena as location + // currently if oly in competition period and defined location is into a stadium just use Gludin Arena as location if (Olympiad.getInstance().inCompPeriod() && (OlympiadStadiaManager.getInstance().getStadiumByLoc(Config.DUEL_SPAWN_X, Config.DUEL_SPAWN_Y, Config.DUEL_SPAWN_Z) != null)) { _duel.teleportPlayers(-87912, 142221, -3645); @@ -436,15 +346,9 @@ public class Duel } } - /** - * The Class ScheduleEndDuelTask. - */ public static class ScheduleEndDuelTask implements Runnable { - /** The _duel. */ private final Duel _duel; - - /** The _result. */ private final DuelResultEnum _result; /** @@ -458,10 +362,6 @@ public class Duel _result = result; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -476,9 +376,6 @@ public class Duel } } - // ======================================================== - // Method - Private - /** * Stops all players from attacking. Used for duel timeout / interrupt. */ @@ -516,9 +413,6 @@ public class Duel } } - // ======================================================== - // Method - Public - /** * Check if a player engaged in pvp combat (only for 1on1 duels). * @param sendMessage the send message @@ -546,14 +440,8 @@ public class Duel return false; } - /** - * Starts the duel. - */ public void startDuel() { - // Save player Conditions - // savePlayerConditions(); - if ((_playerA == null) || (_playerB == null) || _playerA.isInDuel() || _playerB.isInDuel() || Olympiad.getInstance().isRegisteredInComp(_playerA) || Olympiad.getInstance().isRegisteredInComp(_playerB) || Olympiad.getInstance().isRegistered(_playerA) || Olympiad.getInstance().isRegistered(_playerB)) { // clean up @@ -701,7 +589,6 @@ public class Duel } // restore player conditions - // for (FastList.Node e = _playerConditions.head(), end = _playerConditions.tail(); (e = e.getNext()) != end;) for (Integer playerObjId : _playerConditions.keySet()) { final PlayerCondition e = _playerConditions.get(playerObjId); @@ -1273,8 +1160,7 @@ public class Duel _playerB = null; } } - else - // teleport the player back & delete his PlayerCondition record + else // teleport the player back & delete his PlayerCondition record { final PlayerCondition e = _playerConditions.remove(player.getObjectId()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Hero.java index 0c59e23e80..bee0f2d7c0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -223,7 +223,6 @@ public class Hero } catch (Exception e) { - /* */ } } @@ -321,7 +320,6 @@ public class Hero } catch (NullPointerException e) { - /**/ } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/L2Rebirth.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/L2Rebirth.java index b132ee580e..6e0825b825 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/L2Rebirth.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/L2Rebirth.java @@ -47,15 +47,9 @@ public class L2Rebirth { private static Logger LOGGER = Logger.getLogger(BitSetIDFactory.class.getName()); - /** The current instance - static repeller. */ private static L2Rebirth _instance = null; - - /** Basically, this will act as a cache so it doesnt have to read DB information on relog. */ private final HashMap _playersRebirthInfo = new HashMap<>(); - /** - * Creates a new NON-STATIC instance. - */ private L2Rebirth() { // Do Nothing ^_- @@ -393,8 +387,7 @@ public class L2Rebirth loopBirth++; } } - // Player is a Fighter. - else + else // Player is a Fighter. { int loopBirth = 0; for (String readSkill : Config.REBIRTH_FIGHTER_SKILL) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/MonsterRace.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/MonsterRace.java index b58c0d4c65..aff3cbf0e2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/MonsterRace.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/MonsterRace.java @@ -82,7 +82,6 @@ public class MonsterRace { e.printStackTrace(); } - // LOGGER.info("Monster "+i+" is id: "+(id+random)); } newSpeeds(); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Wedding.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Wedding.java index f963ca2a0f..829870ffa8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Wedding.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/Wedding.java @@ -33,8 +33,6 @@ public class Wedding { protected static final Logger LOGGER = Logger.getLogger(Wedding.class.getName()); - // ========================================================= - // Data Field private int _Id = 0; private int _player1Id = 0; private int _player2Id = 0; @@ -43,8 +41,6 @@ public class Wedding private Calendar _weddingDate; private int _type = 0; - // ========================================================= - // Constructor public Wedding(int coupleId) { _Id = coupleId; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/CTF.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/CTF.java index 1ab1aec343..47ee6358d1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/CTF.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/CTF.java @@ -58,234 +58,61 @@ import com.l2jmobius.gameserver.network.serverpackets.Ride; import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * The Class CTF. - */ public class CTF implements EventTask { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(CTF.class.getName()); - /** The _joining location name. */ protected static String _eventName = new String(); - - /** - * The _joining location name. - */ protected static String _eventDesc = new String(); - - /** - * The _joining location name. - */ protected static String _joiningLocationName = new String(); - - /** The _npc spawn. */ private static L2Spawn _npcSpawn; - - /** The _in progress. */ protected static boolean _joining = false; - - /** - * The _in progress. - */ protected static boolean _teleport = false; - - /** - * The _in progress. - */ protected static boolean _started = false; - - /** - * The _in progress. - */ protected static boolean _aborted = false; - - /** - * The _in progress. - */ protected static boolean _sitForced = false; - - /** - * The _in progress. - */ protected static boolean _inProgress = false; - - /** The _max players. */ protected static int _npcId = 0; - - /** - * The _max players. - */ protected static int _npcX = 0; - - /** - * The _max players. - */ protected static int _npcY = 0; - - /** - * The _max players. - */ protected static int _npcZ = 0; - - /** - * The _max players. - */ protected static int _npcHeading = 0; - - /** - * The _max players. - */ protected static int _rewardId = 0; - - /** - * The _max players. - */ protected static int _rewardAmount = 0; - - /** - * The _max players. - */ protected static int _minlvl = 0; - - /** - * The _max players. - */ protected static int _maxlvl = 0; - - /** - * The _max players. - */ protected static int _joinTime = 0; - - /** - * The _max players. - */ protected static int _eventTime = 0; - - /** - * The _max players. - */ protected static int _minPlayers = 0; - - /** - * The _max players. - */ protected static int _maxPlayers = 0; - - /** The _interval between matches. */ protected static long _intervalBetweenMatches = 0; - - /** The start event time. */ private String startEventTime; - - /** The _team event. */ protected static boolean _teamEvent = true; // TODO to be integrated - - /** The _players. */ public static Vector _players = new Vector<>(); - - /** The _top team. */ private static String _topTeam = new String(); - - /** The _players shuffle. */ public static Vector _playersShuffle = new Vector<>(); - - /** The _save player teams. */ public static Vector _teams = new Vector<>(); - - /** - * The _save player teams. - */ public static Vector _savePlayers = new Vector<>(); - - /** - * The _save player teams. - */ public static Vector _savePlayerTeams = new Vector<>(); - - /** The _teams z. */ public static Vector _teamPlayersCount = new Vector<>(); - - /** - * The _teams z. - */ public static Vector _teamColors = new Vector<>(); - - /** - * The _teams z. - */ public static Vector _teamsX = new Vector<>(); - - /** - * The _teams z. - */ public static Vector _teamsY = new Vector<>(); - - /** - * The _teams z. - */ public static Vector _teamsZ = new Vector<>(); - - /** The _team points count. */ public static Vector _teamPointsCount = new Vector<>(); - - /** The _top score. */ public static int _topScore = 0; - - /** The _event offset. */ public static int _eventCenterX = 0; - - /** - * The _event offset. - */ public static int _eventCenterY = 0; - - /** - * The _event offset. - */ public static int _eventCenterZ = 0; - - /** - * The _event offset. - */ public static int _eventOffset = 0; - - /** The _ fla g_ i n_ han d_ ite m_ id. */ private static int _FlagNPC = 35062; - - /** - * The _ fla g_ i n_ han d_ ite m_ id. - */ private static int _FLAG_IN_HAND_ITEM_ID = 6718; - - /** The _flags z. */ public static Vector _flagIds = new Vector<>(); - - /** - * The _flags z. - */ public static Vector _flagsX = new Vector<>(); - - /** - * The _flags z. - */ public static Vector _flagsY = new Vector<>(); - - /** - * The _flags z. - */ public static Vector _flagsZ = new Vector<>(); - - /** The _throne spawns. */ public static Vector _flagSpawns = new Vector<>(); - - /** - * The _throne spawns. - */ public static Vector _throneSpawns = new Vector<>(); - - /** The _flags taken. */ public static Vector _flagsTaken = new Vector<>(); /** @@ -1068,10 +895,6 @@ public class CTF implements EventTask final int offset = Config.CTF_SPAWN_OFFSET; player.teleToLocation(_teamsX.get(_teams.indexOf(player._teamNameCTF)) + Rnd.get(offset), _teamsY.get(_teams.indexOf(player._teamNameCTF)) + Rnd.get(offset), _teamsZ.get(_teams.indexOf(player._teamNameCTF))); } - else - { - // player.teleToLocation(_playerX, _playerY, _playerZ); - } } } } @@ -1485,7 +1308,6 @@ public class CTF implements EventTask case 120: // 2 minutes left case 60: // 1 minute left { - // removeOfflinePlayers(); if (_joining) { Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!"); @@ -1714,10 +1536,6 @@ public class CTF implements EventTask } } } - - /* - * eventPlayer.sendMessage("Dual Box not allowed in Events"); return false; - */ } synchronized (_players) @@ -2554,7 +2372,6 @@ public class CTF implements EventTask } } - // Show loosers and winners animations /** * Play kneel animation. * @param teamName the team name @@ -2610,7 +2427,7 @@ public class CTF implements EventTask player.sendPacket(ActionFailed.STATIC_PACKET); } else if (teamName == null) - { // TIE + { int minus_reward = 0; if (_topScore != 0) @@ -2641,12 +2458,6 @@ public class CTF implements EventTask } } } - - /* - * for(L2PcInstance player : _players) { if(player != null && (player.isOnline() != 0) && (player._inEventCTF == true) && (player._teamNameCTF.equals(teamName))) { player.addItem(_eventName+" Event: " + _eventName, _rewardId, _rewardAmount, player, true); NpcHtmlMessage nhm = new - * NpcHtmlMessage(5); StringBuilder replyMSG = new StringBuilder(""); replyMSG.append(""); replyMSG.append("Your team wins the event. Look in your inventory for the reward."); replyMSG.append(""); nhm.setHtml(replyMSG.toString()); - * player.sendPacket(nhm); // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket( ActionFailed.STATIC_PACKET ); } } - */ } /** @@ -3659,5 +3470,4 @@ public class CTF implements EventTask } return false; } - } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/DM.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/DM.java index 6459fe18f3..ce04dbc689 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/DM.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/DM.java @@ -52,162 +52,43 @@ import com.l2jmobius.gameserver.network.serverpackets.Ride; import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * The Class DM. - */ public class DM implements EventTask { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(DM.class.getName()); - /** The _joining location name. */ private static String _eventName = new String(); - - /** - * The _joining location name. - */ private static String _eventDesc = new String(); - - /** - * The _joining location name. - */ private static String _joiningLocationName = new String(); - - /** The _npc spawn. */ private static L2Spawn _npcSpawn; - - /** The _in progress. */ private static boolean _joining = false; - - /** - * The _in progress. - */ private static boolean _teleport = false; - - /** - * The _in progress. - */ private static boolean _started = false; - - /** - * The _in progress. - */ private static boolean _aborted = false; - - /** - * The _in progress. - */ private static boolean _sitForced = false; - - /** - * The _in progress. - */ private static boolean _inProgress = false; - - /** The _player z. */ protected static int _npcId = 0; - - /** - * The _player z. - */ protected static int _npcX = 0; - - /** - * The _player z. - */ protected static int _npcY = 0; - - /** - * The _player z. - */ protected static int _npcZ = 0; - - /** - * The _player z. - */ protected static int _npcHeading = 0; - - /** - * The _player z. - */ protected static int _rewardId = 0; - - /** - * The _player z. - */ protected static int _rewardAmount = 0; - - /** - * The _player z. - */ protected static int _minlvl = 0; - - /** - * The _player z. - */ protected static int _maxlvl = 0; - - /** - * The _player z. - */ protected static int _joinTime = 0; - - /** - * The _player z. - */ protected static int _eventTime = 0; - - /** - * The _player z. - */ protected static int _minPlayers = 0; - - /** - * The _player z. - */ protected static int _maxPlayers = 0; - - /** - * The _player z. - */ protected static int _topKills = 0; - - /** - * The _player z. - */ protected static int _playerColors = 0; - - /** - * The _player z. - */ protected static int _playerX = 0; - - /** - * The _player z. - */ protected static int _playerY = 0; - - /** - * The _player z. - */ protected static int _playerZ = 0; - - /** The _interval between matchs. */ private static long _intervalBetweenMatchs = 0; - - /** The start event time. */ private String startEventTime; - - /** The _team event. */ protected static boolean _teamEvent = false; // TODO to be integrated - - /** The _players. */ public static Vector _players = new Vector<>(); - - /** The _top players. */ public static List _topPlayers = new ArrayList<>(); - - /** The _save players. */ public static Vector _savePlayers = new Vector<>(); /** @@ -896,7 +777,6 @@ public class DM implements EventTask } else { - // final int size = getPlayers().size(); synchronized (_players) { final int size = _players.size(); @@ -922,7 +802,6 @@ public class DM implements EventTask sit(); afterTeleportOperations(); - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -956,14 +835,7 @@ public class DM implements EventTask party.removePartyMember(player); } - // player._originalTitleDM = player.getTitle(); - // player.setTitle("Kills: " + player._countDMkills); - - if (_teamEvent) - { - // player.teleToLocation(_teamsX.get(_teams.indexOf(player._teamNameCTF)), _teamsY.get(_teams.indexOf(player._teamNameCTF)), _teamsZ.get(_teams.indexOf(player._teamNameCTF))); - } - else + if (!_teamEvent) { final int offset = Config.DM_SPAWN_OFFSET; player.teleToLocation(_playerX + Rnd.get(offset), _playerY + Rnd.get(offset), _playerZ); @@ -1016,7 +888,6 @@ public class DM implements EventTask */ private static void removeParties() { - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -1185,7 +1056,6 @@ public class DM implements EventTask removeUserData(); ThreadPool.schedule(() -> { - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -1252,14 +1122,14 @@ public class DM implements EventTask finishEvent(); LOGGER.info(_eventName + ": waiting... delay for final messages "); - waiter(60000);// just a give a delay delay for final messages + waiter(60000); // just a give a delay delay for final messages sendFinalMessages(); - if (!_started && !_aborted) - { // if is not already started and it's not aborted + if (!_started && !_aborted) // if is not already started and it's not aborted + { LOGGER.info(_eventName + ": waiting.....delay for restart event " + _intervalBetweenMatchs + " minutes."); - waiter(60000);// just a give a delay to next restart + waiter(60000); // just a give a delay to next restart try { @@ -1284,7 +1154,6 @@ public class DM implements EventTask } } - // start without restart /** * Event once start. */ @@ -1357,7 +1226,6 @@ public class DM implements EventTask case 120: // 2 minutes left case 60: // 1 minute left { - // removeOfflinePlayers(); if (_joining) { Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!"); @@ -1426,7 +1294,6 @@ public class DM implements EventTask _sitForced = true; } - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -1460,7 +1327,6 @@ public class DM implements EventTask { try { - // final Vector players = getPlayers(); synchronized (_players) { if ((_players == null) || _players.isEmpty()) @@ -1495,7 +1361,6 @@ public class DM implements EventTask player._inEventDM = false; toBeRemoved.add(player); - // _players.remove(player); player.sendMessage("Your participation in the DeathMatch event has been removed."); } @@ -1584,10 +1449,6 @@ public class DM implements EventTask } } } - - /* - * eventPlayer.sendMessage("Dual Box not allowed in Events"); return false; - */ } if (!Config.DM_ALLOW_HEALER_CLASSES && ((eventPlayer.getClassId() == ClassId.cardinal) || (eventPlayer.getClassId() == ClassId.evaSaint) || (eventPlayer.getClassId() == ClassId.shillienSaint))) @@ -1596,7 +1457,6 @@ public class DM implements EventTask return false; } - // final Vector players = getPlayers(); synchronized (_players) { if (_players.contains(eventPlayer)) @@ -1628,8 +1488,6 @@ public class DM implements EventTask */ public static void setUserData() { - // final Vector players = getPlayers(); - synchronized (_players) { for (L2PcInstance player : _players) @@ -1704,7 +1562,6 @@ public class DM implements EventTask LOGGER.info("# _players(Vector) #"); LOGGER.info("##################################"); - // final Vector players = getPlayers(); synchronized (_players) { LOGGER.info("Total Players : " + _players.size()); @@ -1887,7 +1744,6 @@ public class DM implements EventTask replyMSG.append("
    Description: " + _eventDesc + "


    "); replyMSG.append("
    Event Type:  Full Buff Event!!!


    "); - // final Vector players = getPlayers(); synchronized (_players) { if (!_started && !_joining) @@ -2015,7 +1871,6 @@ public class DM implements EventTask */ public static void cleanDM() { - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -2041,9 +1896,6 @@ public class DM implements EventTask player._originalKarmaDM = 0; player._countDMkills = 0; player._inEventDM = false; - - // _players.remove(player); - player.sendMessage("Your participation in the DeathMatch event has been removed."); } @@ -2086,18 +1938,12 @@ public class DM implements EventTask // nothing } - /* - * public static void cleanDM() { synchronized (_players){ for(L2PcInstance player : _players) { removePlayer(player); } _savePlayers = new Vector(); _topPlayer = null; _npcSpawn = null; _joining = false; _teleport = false; _started = false; _inProgress = false; _sitForced = false; - * _topKills = 0; _players = new Vector(); } } - */ - /** * Adds the disconnected player. * @param player the player */ public static void addDisconnectedPlayer(L2PcInstance player) { - // final Vector players = getPlayers(); synchronized (_players) { if (!_players.contains(player) && _savePlayers.contains(player.getName())) @@ -2184,7 +2030,6 @@ public class DM implements EventTask */ private static void processTopPlayer() { - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -2224,14 +2069,6 @@ public class DM implements EventTask return npc_loc; } - /** - * Gets the players. - * @return the players - */ - /* - * protected synchronized static Vector getPlayers() { return _players; } - */ - /** * Sets the players pos. * @param activeChar the new players pos @@ -2248,7 +2085,6 @@ public class DM implements EventTask */ public static void removeUserData() { - // final Vector players = getPlayers(); synchronized (_players) { for (L2PcInstance player : _players) @@ -2297,20 +2133,12 @@ public class DM implements EventTask startEventTime = newTime; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.entity.event.manager.EventTask#getEventIdentifier() - */ @Override public String getEventIdentifier() { return _eventName; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -2318,10 +2146,6 @@ public class DM implements EventTask eventOnceStart(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.entity.event.manager.EventTask#getEventStartTime() - */ @Override public String getEventStartTime() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/EventPoint.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/EventPoint.java index 957255775b..eaf0c0f436 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/EventPoint.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/EventPoint.java @@ -97,7 +97,7 @@ public class EventPoint public void removePoints(Integer points) { - // Don't know , do the calc or return. it's up to you + // Don not know, do the calc or return. It's up to you. if ((_points - points) < 0) { return; @@ -110,5 +110,4 @@ public class EventPoint { return (_points - value) >= 0; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/L2Event.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/L2Event.java index 0319cbb918..4875705987 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/L2Event.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/L2Event.java @@ -38,10 +38,6 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; import com.l2jmobius.gameserver.util.EventData; -/** - * This class ... - * @version $Revision: 1.3.4.1 $ $Date: 2005/03/27 15:29:32 $ - */ public class L2Event { protected static final Logger LOGGER = Logger.getLogger(L2Event.class.getName()); @@ -255,8 +251,6 @@ public class L2Event try { - // L2MonsterInstance mob = new L2MonsterInstance(template1); - L2Spawn spawn = new L2Spawn(template1); spawn.setX(target.getX() + 50); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/Lottery.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/Lottery.java index 751b4cdde0..c0715a3421 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/Lottery.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/Lottery.java @@ -34,12 +34,11 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Lottery { + protected static final Logger LOGGER = Logger.getLogger(Lottery.class.getName()); + public static final long SECOND = 1000; public static final long MINUTE = 60000; - private static Lottery _instance; - protected static final Logger LOGGER = Logger.getLogger(Lottery.class.getName()); - private static final String INSERT_LOTTERY = "INSERT INTO games(id, idnr, enddate, prize, newprize) VALUES (?, ?, ?, ?, ?)"; private static final String UPDATE_PRICE = "UPDATE games SET prize=?, newprize=? WHERE id = 1 AND idnr = ?"; private static final String UPDATE_LOTTERY = "UPDATE games SET finished=1, prize=?, newprize=?, number1=?, number2=?, prize1=?, prize2=?, prize3=? WHERE id=1 AND idnr=?"; @@ -53,6 +52,8 @@ public class Lottery protected boolean _isStarted; protected long _enddate; + private static Lottery _instance; + private Lottery() { _number = 1; @@ -125,7 +126,6 @@ public class Lottery { protected startLottery() { - // Do nothing } @Override @@ -237,7 +237,6 @@ public class Lottery { protected stopSellingTickets() { - // Do nothing } @Override @@ -258,7 +257,6 @@ public class Lottery { protected finishLottery() { - // Do nothing } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/TvT.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/TvT.java index a5a7fbd214..0c50d9f90b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/TvT.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/TvT.java @@ -51,12 +51,8 @@ import com.l2jmobius.gameserver.network.serverpackets.Ride; import com.l2jmobius.gameserver.network.serverpackets.SocialAction; import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate; -/** - * The Class TvT. - */ public class TvT implements EventTask { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(TvT.class.getName()); protected static String _eventName = new String(); @@ -1137,14 +1133,14 @@ public class TvT implements EventTask finishEvent(); LOGGER.info(_eventName + ": waiting... delay for final messages "); - waiter(60000);// just a give a delay delay for final messages + waiter(60000); // just a give a delay delay for final messages sendFinalMessages(); - if (!_started && !_aborted) - { // if is not already started and it's not aborted + if (!_started && !_aborted) // if is not already started and it's not aborted + { LOGGER.info(_eventName + ": waiting.....delay for restart event " + _intervalBetweenMatchs + " minutes."); - waiter(60000);// just a give a delay to next restart + waiter(60000); // just a give a delay to next restart try { @@ -1178,7 +1174,6 @@ public class TvT implements EventTask ThreadPool.execute(new AutoEventTask()); } - // start without restart /** * Event once start. */ @@ -1251,7 +1246,6 @@ public class TvT implements EventTask case 120: // 2 minutes left case 60: // 1 minute left { - // removeOfflinePlayers(); if (_joining) { Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!"); @@ -1480,10 +1474,6 @@ public class TvT implements EventTask } } } - - /* - * eventPlayer.sendMessage("Dual Box not allowed in Events"); return false; - */ } synchronized (_players) @@ -2092,7 +2082,7 @@ public class TvT implements EventTask } /** - * Clean tv t. + * Clean tvt. */ public static void cleanTvT() { @@ -2264,7 +2254,6 @@ public class TvT implements EventTask } } - // Show loosers and winners animations /** * Play kneel animation. * @param teamName the team name @@ -2327,7 +2316,7 @@ public class TvT implements EventTask player.sendPacket(ActionFailed.STATIC_PACKET); } else if (teamName == null) - { // TIE + { int minus_reward = 0; if (_topKills != 0) @@ -2365,7 +2354,7 @@ public class TvT implements EventTask */ private static void processTopPlayer() { - // + // nothing } /** @@ -2657,10 +2646,6 @@ public class TvT implements EventTask return _eventName; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.entity.event.manager.EventTask#getEventStartTime() - */ @Override public String getEventStartTime() { @@ -2749,7 +2734,6 @@ public class TvT implements EventTask if (_started || _teleport) { _playersShuffle.remove(playerToKick); - // playerToKick._inEventTvT = false; removePlayer(playerToKick); if (playerToKick.isOnline() != 0) { @@ -2820,7 +2804,7 @@ public class TvT implements EventTask private String name = null; /** - * Instantiates a new tv t team. + * Instantiates a new tvt team. * @param name the name * @param killCount the kill count */ diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventManager.java index 4e42d3b166..3e6dd024f4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventManager.java @@ -71,8 +71,6 @@ public class EventManager is = new FileInputStream(new File(EVENT_MANAGER_CONFIGURATION_FILE)); eventSettings.load(is); - // ============================================================ - TVT_EVENT_ENABLED = Boolean.parseBoolean(eventSettings.getProperty("TVTEventEnabled", "false")); TVT_TIMES_LIST = new ArrayList<>(); @@ -150,13 +148,11 @@ public class EventManager LOGGER.warning("registerTvT: TvT Event is not setted Properly"); } - // clear all tvt EventsGlobalTask.getInstance().clearEventTasksByEventName(TvT.get_eventName()); for (String time : TVT_TIMES_LIST) { final TvT newInstance = TvT.getNewInstance(); - // LOGGER.info("registerTvT: reg.time: "+time); newInstance.setEventStartTime(time); EventsGlobalTask.getInstance().registerNewEventTask(newInstance); } @@ -170,13 +166,11 @@ public class EventManager LOGGER.warning("registerCTF: CTF Event is not setted Properly"); } - // clear all tvt EventsGlobalTask.getInstance().clearEventTasksByEventName(CTF.get_eventName()); for (String time : CTF_TIMES_LIST) { final CTF newInstance = CTF.getNewInstance(); - // LOGGER.info("registerCTF: reg.time: "+time); newInstance.setEventStartTime(time); EventsGlobalTask.getInstance().registerNewEventTask(newInstance); } @@ -190,16 +184,13 @@ public class EventManager LOGGER.warning("registerDM: DM Event is not setted Properly"); } - // clear all tvt EventsGlobalTask.getInstance().clearEventTasksByEventName(DM.get_eventName()); for (String time : DM_TIMES_LIST) { final DM newInstance = DM.getNewInstance(); - // LOGGER.info("registerDM: reg.time: "+time); newInstance.setEventStartTime(time); EventsGlobalTask.getInstance().registerNewEventTask(newInstance); } } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventTask.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventTask.java index 967afc91f4..c8ce225b28 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventTask.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventTask.java @@ -24,7 +24,4 @@ public interface EventTask extends Runnable String getEventIdentifier(); String getEventStartTime(); // hh:mm (es. 01:05) - - // public void notifyEventStart(); - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventsGlobalTask.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventsGlobalTask.java index 49cf6c3c37..fee56951ed 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventsGlobalTask.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/event/manager/EventsGlobalTask.java @@ -102,11 +102,8 @@ public class EventsGlobalTask implements Runnable // check Info for (String time : time_to_tasks.keySet()) { - // LOGGER.info("--Time: "+time); final ArrayList tasks = time_to_tasks.get(time); - final Iterator taskIt = tasks.iterator(); - while (taskIt.hasNext()) { final EventTask actual_event = taskIt.next(); @@ -118,9 +115,7 @@ public class EventsGlobalTask implements Runnable { LOGGER.info("--Event: " + event_id); final ArrayList times = eventid_to_tasks.get(event_id); - final Iterator timesIt = times.iterator(); - while (timesIt.hasNext()) { final EventTask actual_time = timesIt.next(); @@ -230,10 +225,7 @@ public class EventsGlobalTask implements Runnable } final String currentTime = hourStr + ":" + minStr; - - // LOGGER.info("Current Time: "+currentTime); final ArrayList registeredEventsAtCurrentTime = time_to_tasks.get(currentTime); - if (registeredEventsAtCurrentTime != null) { for (EventTask actualEvent : registeredEventsAtCurrentTime) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/Olympiad.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/Olympiad.java index 90ef1d73f8..91f3831a71 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/Olympiad.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/Olympiad.java @@ -200,8 +200,6 @@ public class Olympiad catch (Exception e) { LOGGER.warning(OLYMPIAD_DATA_FILE + " cannot be loaded... It will be created on next save or server shutdown.."); - // LOGGER.warning( "Olympiad System: Error loading olympiad properties: ", e); - // return; } finally { @@ -458,10 +456,6 @@ public class Olympiad { SystemMessage sm; - /* - * if (_compStarted) { noble.sendMessage("Cant Register whilst competition is under way"); return false; } - */ - if (!_inCompPeriod) { sm = new SystemMessage(SystemMessageId.THE_OLYMPIAD_GAME_IS_NOT_CURRENTLY_IN_PROGRESS); @@ -698,9 +692,6 @@ public class Olympiad public boolean unRegisterNoble(L2PcInstance noble) { SystemMessage sm; - /* - * if (_compStarted) { noble.sendMessage("Cant Unregister whilst competition is under way"); return false; } - */ if (!_inCompPeriod) { @@ -788,8 +779,6 @@ public class Olympiad private void updateCompStatus() { - // _compStarted = false; - synchronized (this) { final long milliToStart = getMillisToCompBegin(); @@ -858,9 +847,7 @@ public class Olympiad private long getMillisToOlympiadEnd() { - // if (_olympiadEnd > Calendar.getInstance().getTimeInMillis()) return (_olympiadEnd - Calendar.getInstance().getTimeInMillis()); - // return 10; } public void manualSelectHeroes() @@ -979,9 +966,7 @@ public class Olympiad protected long getMillisToCompEnd() { - // if (_compEnd > Calendar.getInstance().getTimeInMillis()) return (_compEnd - Calendar.getInstance().getTimeInMillis()); - // return 10; } private long getMillisToWeekChange() @@ -1261,13 +1246,11 @@ public class Olympiad gc.setTimeInMillis(_nextWeeklyChange); OlympiadProperties.setProperty("NextWeeklyChange_DateFormat", DateFormat.getDateTimeInstance().format(gc.getTime())); - // LOGGER.info("NextPoints: "+DateFormat.getInstance().format(gc.getTime())); gc.clear(); gc.setTimeInMillis(_olympiadEnd); OlympiadProperties.setProperty("OlympiadEnd_DateFormat", DateFormat.getDateTimeInstance().format(gc.getTime())); - // LOGGER.info("NextOlyDate: "+DateFormat.getInstance().format(gc.getTime())); OlympiadProperties.store(fos, "Olympiad Properties"); } @@ -1370,8 +1353,6 @@ public class Olympiad public List getClassLeaderBoard(int classId) { - // if (_period != 1) return; - final List names = new ArrayList<>(); PreparedStatement statement = null; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadGame.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadGame.java index f1ea38127f..ee18bee946 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadGame.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadGame.java @@ -1355,8 +1355,7 @@ class OlympiadGameTask implements Runnable { } - // If game haveWinner then stop waiting battle_period - // and validate winner + // If game haveWinner then stop waiting battle_period and validate winner if (_game.haveWinner()) { break; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadManager.java index ae60d44c4a..01a0633c5a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadManager.java @@ -90,14 +90,12 @@ class OlympiadManager implements Runnable } catch (InterruptedException ex) { - // return; } continue; } int _gamesQueueSize = 0; - // _compStarted = true; final List readyClasses = Olympiad.hasEnoughRegisteredClassed(); final boolean readyNonClassed = Olympiad.hasEnoughRegisteredNonClassed(); if ((readyClasses != null) || readyNonClassed) @@ -280,10 +278,6 @@ class OlympiadManager implements Runnable } } - /* - * try { wait(30000); } catch (InterruptedException e) { } - */ - // Start games _gamesQueueSize = _gamesQueue.size(); for (int i = 0; i < _gamesQueueSize; i++) @@ -302,7 +296,6 @@ class OlympiadManager implements Runnable } catch (InterruptedException e) { - // return; } } } @@ -314,12 +307,10 @@ class OlympiadManager implements Runnable } catch (InterruptedException e) { - // return; } } - // when comp time finish wait for all games terminated before execute - // the cleanup code + // when comp time finish wait for all games terminated before execute the cleanup code boolean allGamesTerminated = false; // wait for all games terminated while (!allGamesTerminated) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadPeriod.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadPeriod.java index 74cc14adfd..0e0a5c1b54 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadPeriod.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/olympiad/OlympiadPeriod.java @@ -24,5 +24,4 @@ public enum OlympiadPeriod MONTH, WEEK, DAY - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSigns.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSigns.java index c02fb06da2..fe9f67ac58 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSigns.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSigns.java @@ -46,216 +46,75 @@ import com.l2jmobius.gameserver.templates.StatsSet; */ public class SevenSigns { - - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(SevenSigns.class.getName()); - /** The _instance. */ private static SevenSigns _instance; - - // Basic Seven Signs Constants \\ - /** The Constant SEVEN_SIGNS_DATA_FILE. */ public static final String SEVEN_SIGNS_DATA_FILE = "config/main/sevensigns.ini"; - - /** The Constant SEVEN_SIGNS_HTML_PATH. */ public static final String SEVEN_SIGNS_HTML_PATH = "data/html/seven_signs/"; - - /** The Constant CABAL_NULL. */ public static final int CABAL_NULL = 0; - - /** The Constant CABAL_DUSK. */ public static final int CABAL_DUSK = 1; - - /** The Constant CABAL_DAWN. */ public static final int CABAL_DAWN = 2; - - /** The Constant SEAL_NULL. */ public static final int SEAL_NULL = 0; - - /** The Constant SEAL_AVARICE. */ public static final int SEAL_AVARICE = 1; - - /** The Constant SEAL_GNOSIS. */ public static final int SEAL_GNOSIS = 2; - - /** The Constant SEAL_STRIFE. */ public static final int SEAL_STRIFE = 3; - - /** The Constant PERIOD_COMP_RECRUITING. */ public static final int PERIOD_COMP_RECRUITING = 0; - - /** The Constant PERIOD_COMPETITION. */ public static final int PERIOD_COMPETITION = 1; - - /** The Constant PERIOD_COMP_RESULTS. */ public static final int PERIOD_COMP_RESULTS = 2; - - /** The Constant PERIOD_SEAL_VALIDATION. */ public static final int PERIOD_SEAL_VALIDATION = 3; - - /** The Constant PERIOD_START_HOUR. */ public static final int PERIOD_START_HOUR = 18; - - /** The Constant PERIOD_START_MINS. */ public static final int PERIOD_START_MINS = 00; - - /** The Constant PERIOD_START_DAY. */ public static final int PERIOD_START_DAY = Calendar.MONDAY; - - // The quest event and seal validation periods last for approximately one week - // with a 15 minutes "interval" period sandwiched between them. - /** The Constant PERIOD_MINOR_LENGTH. */ public static final int PERIOD_MINOR_LENGTH = 900000; - - /** The Constant PERIOD_MAJOR_LENGTH. */ public static final int PERIOD_MAJOR_LENGTH = 604800000 - PERIOD_MINOR_LENGTH; - - /** The Constant ANCIENT_ADENA_ID. */ public static final int ANCIENT_ADENA_ID = 5575; - - /** The Constant RECORD_SEVEN_SIGNS_ID. */ public static final int RECORD_SEVEN_SIGNS_ID = 5707; - - /** The Constant CERTIFICATE_OF_APPROVAL_ID. */ public static final int CERTIFICATE_OF_APPROVAL_ID = 6388; - - /** The Constant RECORD_SEVEN_SIGNS_COST. */ public static final int RECORD_SEVEN_SIGNS_COST = 500; - - /** The Constant ADENA_JOIN_DAWN_COST. */ public static final int ADENA_JOIN_DAWN_COST = 50000; - - // NPC Related Constants \\ - /** The Constant ORATOR_NPC_ID. */ public static final int ORATOR_NPC_ID = 31094; - - /** The Constant PREACHER_NPC_ID. */ public static final int PREACHER_NPC_ID = 31093; - - /** The Constant MAMMON_MERCHANT_ID. */ public static final int MAMMON_MERCHANT_ID = 31113; - - /** The Constant MAMMON_BLACKSMITH_ID. */ public static final int MAMMON_BLACKSMITH_ID = 31126; - - /** The Constant MAMMON_MARKETEER_ID. */ public static final int MAMMON_MARKETEER_ID = 31092; - - /** The Constant SPIRIT_IN_ID. */ public static final int SPIRIT_IN_ID = 31111; - - /** The Constant SPIRIT_OUT_ID. */ public static final int SPIRIT_OUT_ID = 31112; - - /** The Constant LILITH_NPC_ID. */ public static final int LILITH_NPC_ID = 25283; - - /** The Constant ANAKIM_NPC_ID. */ public static final int ANAKIM_NPC_ID = 25286; - - /** The Constant CREST_OF_DAWN_ID. */ public static final int CREST_OF_DAWN_ID = 31170; - - /** The Constant CREST_OF_DUSK_ID. */ public static final int CREST_OF_DUSK_ID = 31171; - // Seal Stone Related Constants \\ - /** The Constant SEAL_STONE_BLUE_ID. */ public static final int SEAL_STONE_BLUE_ID = 6360; - - /** The Constant SEAL_STONE_GREEN_ID. */ public static final int SEAL_STONE_GREEN_ID = 6361; - - /** The Constant SEAL_STONE_RED_ID. */ public static final int SEAL_STONE_RED_ID = 6362; - - /** The Constant SEAL_STONE_BLUE_VALUE. */ public static final int SEAL_STONE_BLUE_VALUE = 3; - - /** The Constant SEAL_STONE_GREEN_VALUE. */ public static final int SEAL_STONE_GREEN_VALUE = 5; - - /** The Constant SEAL_STONE_RED_VALUE. */ public static final int SEAL_STONE_RED_VALUE = 10; - - /** The Constant BLUE_CONTRIB_POINTS. */ public static final int BLUE_CONTRIB_POINTS = 3; - - /** The Constant GREEN_CONTRIB_POINTS. */ public static final int GREEN_CONTRIB_POINTS = 5; - - /** The Constant RED_CONTRIB_POINTS. */ public static final int RED_CONTRIB_POINTS = 10; - - /** The _calendar. */ private final Calendar _calendar = Calendar.getInstance(); - - /** The _active period. */ protected int _activePeriod; - - /** The _current cycle. */ protected int _currentCycle; - - /** The _dawn stone score. */ protected double _dawnStoneScore; - - /** The _dusk stone score. */ protected double _duskStoneScore; - - /** The _dawn festival score. */ protected int _dawnFestivalScore; - - /** The _dusk festival score. */ protected int _duskFestivalScore; - - /** The _comp winner. */ protected int _compWinner; - - /** The _previous winner. */ protected int _previousWinner; - - /** The _signs player data. */ private final Map _signsPlayerData; - - /** The _signs seal owners. */ private final Map _signsSealOwners; - - /** The _signs dusk seal totals. */ private final Map _signsDuskSealTotals; - - /** The _signs dawn seal totals. */ private final Map _signsDawnSealTotals; - - /** The _merchant spawn. */ private static AutoSpawnInstance _merchantSpawn; - - /** The _blacksmith spawn. */ private static AutoSpawnInstance _blacksmithSpawn; - - /** The _spirit in spawn. */ private static AutoSpawnInstance _spiritInSpawn; - - /** The _spirit out spawn. */ private static AutoSpawnInstance _spiritOutSpawn; - - /** The _lilith spawn. */ private static AutoSpawnInstance _lilithSpawn; - - /** The _anakim spawn. */ private static AutoSpawnInstance _anakimSpawn; - - /** The _crestofdawnspawn. */ private static AutoSpawnInstance _crestofdawnspawn; - - /** The _crestofduskspawn. */ private static AutoSpawnInstance _crestofduskspawn; - - /** The _orator spawns. */ private static Map _oratorSpawns; - - /** The _preacher spawns. */ private static Map _preacherSpawns; - - /** The _marketeer spawns. */ private static Map _marketeerSpawns; /** @@ -308,7 +167,6 @@ public class SevenSigns SevenSignsPeriodChange sspc = new SevenSignsPeriodChange(); ThreadPool.schedule(sspc, milliToChange); - // Thanks to http://rainbow.arch.scriptmania.com/scripts/timezone_countdown.html for help with this. final double numSecs = (milliToChange / 1000) % 60; double countDown = ((milliToChange / 1000) - numSecs) / 60; final int numMins = (int) Math.floor(countDown % 60); @@ -1248,8 +1106,7 @@ public class SevenSigns if (currPlayerData != null) { - // If the seal validation period has passed, - // cabal information was removed and so "re-register" player + // If the seal validation period has passed, cabal information was removed and so "re-register" player. currPlayerData.set("cabal", getCabalShortName(chosenCabal)); currPlayerData.set("seal", chosenSeal); @@ -1530,10 +1387,8 @@ public class SevenSigns final int totalDuskMembers = getTotalMembers(CABAL_DUSK) == 0 ? 1 : getTotalMembers(CABAL_DUSK); final int duskPercent = Math.round(((float) duskProportion / totalDuskMembers) * 100); - /* - * - If a Seal was already closed or owned by the opponent and the new winner wants to assume ownership of the Seal, 35% or more of the members of the Cabal must have chosen the Seal. If they chose less than 35%, they cannot own the Seal. - If the Seal was owned by the winner in the - * previous Seven Signs, they can retain that seal if 10% or more members have chosen it. If they want to possess a new Seal, at least 35% of the members of the Cabal must have chosen the new Seal. - */ + // If a Seal was already closed or owned by the opponent and the new winner wants to assume ownership of the Seal, 35% or more of the members of the Cabal must have chosen the Seal. If they chose less than 35%, they cannot own the Seal. + // If the Seal was owned by the winner in the previous Seven Signs, they can retain that seal if 10% or more members have chosen it. If they want to possess a new Seal, at least 35% of the members of the Cabal must have chosen the new Seal. switch (prevSealOwner) { case CABAL_NULL: @@ -1746,21 +1601,13 @@ public class SevenSigns /** * The primary controller of period change of the Seven Signs system. This runs all related tasks depending on the period that is about to begin. - * @author Tempy */ protected class SevenSignsPeriodChange implements Runnable { - - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { - /* - * Remember the period check here refers to the period just ENDED! - */ + // Remember the period check here refers to the period just ENDED! final int periodEnded = _activePeriod; _activePeriod++; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSignsFestival.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSignsFestival.java index 90b374e89a..0683cdc4ed 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSignsFestival.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/sevensigns/SevenSignsFestival.java @@ -62,52 +62,20 @@ import com.l2jmobius.gameserver.util.Util; */ public class SevenSignsFestival implements SpawnListener { - - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(SevenSignsFestival.class.getName()); - /** The _instance. */ private static SevenSignsFestival _instance; - - /** The Constant GET_CLAN_NAME. */ private static final String GET_CLAN_NAME = "SELECT clan_name FROM clan_data WHERE clan_id = (SELECT clanid FROM characters WHERE char_name = ?)"; - - /** - * These length settings are important! :) All times are relative to the ELAPSED time (in ms) since a festival begins. Festival manager start is the time after the server starts to begin the first festival cycle. The cycle length should ideally be at least 2x longer than the festival length. - * This allows ample time for players to sign-up to participate in the festival. The intermission is the time between the festival participants being moved to the "arenas" and the spawning of the first set of mobs. The monster swarm time is the time before the monsters swarm to the center of the - * arena, after they are spawned. The chest spawn time is for when the bonus festival chests spawn, usually towards the end of the festival. - */ public static final long FESTIVAL_SIGNUP_TIME = Config.ALT_FESTIVAL_CYCLE_LENGTH - Config.ALT_FESTIVAL_LENGTH - 60000; - - // Key Constants \\ - /** The Constant FESTIVAL_MAX_OFFSET_X. */ private static final int FESTIVAL_MAX_OFFSET_X = 230; - - /** The Constant FESTIVAL_MAX_OFFSET_Y. */ private static final int FESTIVAL_MAX_OFFSET_Y = 230; - - /** The Constant FESTIVAL_DEFAULT_RESPAWN. */ private static final int FESTIVAL_DEFAULT_RESPAWN = 60; // Specify in seconds! - - /** The Constant FESTIVAL_COUNT. */ public static final int FESTIVAL_COUNT = 5; - - /** The Constant FESTIVAL_LEVEL_MAX_FOR_31. */ public static final int FESTIVAL_LEVEL_MAX_FOR_31 = 0; - - /** The Constant FESTIVAL_LEVEL_MAX_FOR_42. */ public static final int FESTIVAL_LEVEL_MAX_FOR_42 = 1; - - /** The Constant FESTIVAL_LEVEL_MAX_FOR_53. */ public static final int FESTIVAL_LEVEL_MAX_FOR_53 = 2; - - /** The Constant FESTIVAL_LEVEL_MAX_FOR_64. */ public static final int FESTIVAL_LEVEL_MAX_FOR_64 = 3; - - /** The Constant FESTIVAL_LEVEL_MAX_FOR_NONE. */ public static final int FESTIVAL_LEVEL_MAX_FOR_NONE = 4; - - /** The Constant FESTIVAL_LEVEL_SCORES. */ public static final int[] FESTIVAL_LEVEL_SCORES = { 60, @@ -116,18 +84,8 @@ public class SevenSignsFestival implements SpawnListener 120, 150 }; // 500 maximum possible score - - /** The Constant FESTIVAL_OFFERING_ID. */ public static final int FESTIVAL_OFFERING_ID = 5901; - - /** The Constant FESTIVAL_OFFERING_VALUE. */ public static final int FESTIVAL_OFFERING_VALUE = 5; - - // ////////////////////// \\\\\\\\\\\\\\\\\\\\\\\\\\ - /* - * The following contains all the necessary spawn data for: - Player Start Locations - Witches - Monsters - Chests All data is given by: X, Y, Z (coords), Heading, NPC ID (if necessary) This may be moved externally in time, but the data should not change. - */ - /** The Constant FESTIVAL_DAWN_PLAYER_SPAWNS. */ public static final int[][] FESTIVAL_DAWN_PLAYER_SPAWNS = { { @@ -162,8 +120,6 @@ public class SevenSignsFestival implements SpawnListener } // No level limit }; - - /** The Constant FESTIVAL_DUSK_PLAYER_SPAWNS. */ public static final int[][] FESTIVAL_DUSK_PLAYER_SPAWNS = { { @@ -198,8 +154,6 @@ public class SevenSignsFestival implements SpawnListener } // No level limit }; - - /** The Constant FESTIVAL_DAWN_WITCH_SPAWNS. */ protected static final int[][] FESTIVAL_DAWN_WITCH_SPAWNS = { { @@ -239,8 +193,6 @@ public class SevenSignsFestival implements SpawnListener } // No level limit }; - - /** The Constant FESTIVAL_DUSK_WITCH_SPAWNS. */ protected static final int[][] FESTIVAL_DUSK_WITCH_SPAWNS = { { @@ -280,8 +232,6 @@ public class SevenSignsFestival implements SpawnListener } // No level limit }; - - /** The Constant FESTIVAL_DAWN_PRIMARY_SPAWNS. */ protected static final int[][][] FESTIVAL_DAWN_PRIMARY_SPAWNS = { { @@ -3170,64 +3120,23 @@ public class SevenSignsFestival implements SpawnListener }, } }; - - // ////////////////////// \\\\\\\\\\\\\\\\\\\\\\\\\\ - - /** The _manager instance. */ protected FestivalManager _managerInstance; - - /** The _manager scheduled task. */ protected ScheduledFuture _managerScheduledTask; - - /** The _signs cycle. */ protected int _signsCycle = SevenSigns.getInstance().getCurrentCycle(); - - /** The _festival cycle. */ protected int _festivalCycle; - - /** The _next festival cycle start. */ protected long _nextFestivalCycleStart; - - /** The _next festival start. */ protected long _nextFestivalStart; - - /** The _festival initialized. */ protected boolean _festivalInitialized; - - /** The _festival in progress. */ protected boolean _festivalInProgress; - - /** The _accumulated bonuses. */ protected List _accumulatedBonuses; // The total bonus available (in Ancient Adena) - - /** The _dawn chat guide. */ private L2NpcInstance _dawnChatGuide; - - /** The _dusk chat guide. */ private L2NpcInstance _duskChatGuide; - - /** The _dawn festival participants. */ protected Map> _dawnFestivalParticipants; - - /** The _dusk festival participants. */ protected Map> _duskFestivalParticipants; - - /** The _dawn previous participants. */ protected Map> _dawnPreviousParticipants; - - /** The _dusk previous participants. */ protected Map> _duskPreviousParticipants; - - /** The _dawn festival scores. */ private Map _dawnFestivalScores; - - /** The _dusk festival scores. */ private Map _duskFestivalScores; - - /** - * _festivalData is essentially an instance of the seven_signs_festival table and should be treated as such. Data is initially accessed by the related Seven Signs cycle, with _signsCycle representing data for the current round of Festivals. The actual table data is stored as a series of StatsSet - * constructs. These are accessed by the use of an offset based on the number of festivals, thus: offset = FESTIVAL_COUNT + festivalId (Data for Dawn is always accessed by offset > FESTIVAL_COUNT) - */ private Map> _festivalData; /** @@ -3396,8 +3305,7 @@ public class SevenSignsFestival implements SpawnListener */ protected void startFestivalManager() { - // Start the Festival Manager for the first time after the server has started - // at the specified time, then invoke it automatically after every cycle. + // Start the Festival Manager for the first time after the server has started at the specified time, then invoke it automatically after every cycle. FestivalManager fm = new FestivalManager(); setNextFestivalStart(Config.ALT_FESTIVAL_MANAGER_START + FESTIVAL_SIGNUP_TIME); _managerScheduledTask = ThreadPool.scheduleAtFixedRate(fm, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH); @@ -3529,8 +3437,7 @@ public class SevenSignsFestival implements SpawnListener statement.setString(5, cabal); statement.setInt(6, festivalId); - // If there was no record to update, assume it doesn't exist and add a new one, - // otherwise continue with the next record to store. + // If there was no record to update, assume it doesn't exist and add a new one, otherwise continue with the next record to store. if (statement.executeUpdate() > 0) { if (Config.DEBUG) @@ -3739,8 +3646,7 @@ public class SevenSignsFestival implements SpawnListener newData.put(i, tempStats); } - // Add the newly created cycle data to the existing festival data, and - // subsequently save it to the database. + // Add the newly created cycle data to the existing festival data, and subsequently save it to the database. _festivalData.put(_signsCycle, newData); saveFestivalData(updateSettings); @@ -4076,8 +3982,7 @@ public class SevenSignsFestival implements SpawnListener offsetId += 5; } - // Attempt to retrieve existing score data (if found), otherwise create a - // new blank data set and display a console warning. + // Attempt to retrieve existing score data (if found), otherwise create a new blank data set and display a console warning. StatsSet currData = null; if ((_festivalData != null) && (_festivalData.get(_signsCycle) != null)) @@ -4170,8 +4075,7 @@ public class SevenSignsFestival implements SpawnListener // Check if this is the highest score for this level range so far for the player's cabal. if (offeringScore > thisCabalHighScore) { - // If the current score is greater than that for the other cabal, - // then they already have the points from this festival. + // If the current score is greater than that for the other cabal, then they already have the points from this festival. if (thisCabalHighScore > otherCabalHighScore) { return false; @@ -4210,7 +4114,6 @@ public class SevenSignsFestival implements SpawnListener // Give this cabal the festival points, while deducting them from the other. SevenSigns.getInstance().addFestivalScore(oracle, contribPoints); - // if (Config.DEBUG) LOGGER.info("SevenSignsFestival: This is the highest score overall so far for the " + getFestivalName(festivalId) + " festival!"); } @@ -4348,20 +4251,12 @@ public class SevenSignsFestival implements SpawnListener return festivalInst.increaseChallenge(); } - /** - * The Class RestoreStatus. - */ protected class RestoreStatus implements Runnable { - - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { - + // nothing? } } @@ -4427,10 +4322,6 @@ public class SevenSignsFestival implements SpawnListener setNextFestivalStart(Config.ALT_FESTIVAL_CYCLE_LENGTH - FESTIVAL_SIGNUP_TIME); } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public synchronized void run() { @@ -4440,8 +4331,7 @@ public class SevenSignsFestival implements SpawnListener return; } - // If the next period is due to start before the end of this - // festival cycle, then don't run it. + // If the next period is due to start before the end of this festival cycle, then don't run it. if (SevenSigns.getInstance().getMilliToPeriodChange() < Config.ALT_FESTIVAL_CYCLE_LENGTH) { return; @@ -4477,8 +4367,7 @@ public class SevenSignsFestival implements SpawnListener // Set the festival timer to 0, as it is just beginning. long elapsedTime = 0; - // Create the instances for the festivals in both Oracles, - // but only if they have participants signed up for them. + // Create the instances for the festivals in both Oracles, but only if they have participants signed up for them. for (int i = 0; i < FESTIVAL_COUNT; i++) { if (_duskFestivalParticipants.get(i) != null) @@ -4555,8 +4444,7 @@ public class SevenSignsFestival implements SpawnListener { } - // Spawn an extra set of monsters (archers) on the free platforms with - // a faster respawn when killed. + // Spawn an extra set of monsters (archers) on the free platforms with a faster respawn when killed. for (L2DarknessFestival festivalInst : _festivalInstances.values()) { festivalInst.spawnFestivalMonsters(FESTIVAL_DEFAULT_RESPAWN / 2, 2); @@ -4590,8 +4478,7 @@ public class SevenSignsFestival implements SpawnListener { } - // Spawn the festival chests, which enable the team to gain greater rewards - // for each chest they kill. + // Spawn the festival chests, which enable the team to gain greater rewards for each chest they kill. for (L2DarknessFestival festivalInst : _festivalInstances.values()) { festivalInst.spawnFestivalMonsters(FESTIVAL_DEFAULT_RESPAWN, 3); @@ -4648,10 +4535,7 @@ public class SevenSignsFestival implements SpawnListener return null; } - /* - * Compute the offset if a Dusk instance is required. ID: 0 1 2 3 4 Dusk 1: 10 11 12 13 14 Dawn 2: 20 21 22 23 24 - */ - + // Compute the offset if a Dusk instance is required. ID: 0 1 2 3 4 Dusk 1: 10 11 12 13 14 Dawn 2: 20 21 22 23 24 festivalId += oracle == SevenSigns.CABAL_DUSK ? 10 : 20; return _festivalInstances.get(festivalId); } @@ -4659,36 +4543,17 @@ public class SevenSignsFestival implements SpawnListener /** * Each running festival is represented by an L2DarknessFestival class. It contains all the spawn information and data for the running festival. All festivals are managed by the FestivalManager class, which must be initialized first. - * @author Tempy */ private class L2DarknessFestival { - - /** The _cabal. */ protected final int _cabal; - - /** The _level range. */ protected final int _levelRange; - - /** The _challenge increased. */ protected boolean _challengeIncreased; - - /** The _start location. */ private FestivalSpawn _startLocation; - - /** The _witch spawn. */ private FestivalSpawn _witchSpawn; - - /** The _witch inst. */ private L2NpcInstance _witchInst; - - /** The _npc insts. */ private final List _npcInsts; - - /** The _participants. */ private List _participants; - - /** The _original locations. */ private final Map _originalLocations; /** @@ -4862,9 +4727,7 @@ public class SevenSignsFestival implements SpawnListener int x = _startLocation._x; int y = _startLocation._y; - /* - * Random X and Y coords around the player start location, up to half of the maximum allowed offset are generated to prevent the mobs from all moving to the exact same place. - */ + // Random X and Y coords around the player start location, up to half of the maximum allowed offset are generated to prevent the mobs from all moving to the exact same place. if (Rnd.nextBoolean()) { x += Rnd.get(FESTIVAL_MAX_OFFSET_X); @@ -4883,11 +4746,6 @@ public class SevenSignsFestival implements SpawnListener } } - /* - * public void setSpawnRate(int respawnDelay) { if (Config.DEBUG) LOGGER.info("SevenSignsFestival: Modifying spawn rate of festival mobs to " + respawnDelay + " ms for festival " + SevenSigns.getCabalShortName(_cabal) + " (" + getFestivalName(_levelRange) + ")"); for - * (L2FestivalMonsterInstance monsterInst : _npcInsts) monsterInst.getSpawn().setRespawnDelay(respawnDelay); } - */ - /** * Used to spawn monsters unique to the festival.
    * Valid SpawnTypes:
    @@ -5123,25 +4981,12 @@ public class SevenSignsFestival implements SpawnListener } } - /** - * The Class FestivalSpawn. - */ private class FestivalSpawn { - - /** The _x. */ protected final int _x; - - /** The _y. */ protected final int _y; - - /** The _z. */ protected final int _z; - - /** The _heading. */ protected final int _heading; - - /** The _npc id. */ protected final int _npcId; /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Castle.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Castle.java index 704c88d38e..c1c3531457 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Castle.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Castle.java @@ -54,8 +54,6 @@ public class Castle { protected static Logger LOGGER = Logger.getLogger(Castle.class.getName()); - // ========================================================= - // Data Field private List _procure = new ArrayList<>(); private List _production = new ArrayList<>(); private List _procureNext = new ArrayList<>(); @@ -63,19 +61,12 @@ public class Castle private boolean _isNextPeriodApproved = false; private static final String CASTLE_MANOR_DELETE_PRODUCTION = "DELETE FROM castle_manor_production WHERE castle_id=?;"; - private static final String CASTLE_MANOR_DELETE_PRODUCTION_PERIOD = "DELETE FROM castle_manor_production WHERE castle_id=? AND period=?;"; - private static final String CASTLE_MANOR_DELETE_PROCURE = "DELETE FROM castle_manor_procure WHERE castle_id=?;"; - private static final String CASTLE_MANOR_DELETE_PROCURE_PERIOD = "DELETE FROM castle_manor_procure WHERE castle_id=? AND period=?;"; - private static final String CASTLE_UPDATE_CROP = "UPDATE castle_manor_procure SET can_buy=? WHERE crop_id=? AND castle_id=? AND period=?"; - private static final String CASTLE_UPDATE_SEED = "UPDATE castle_manor_production SET can_produce=? WHERE seed_id=? AND castle_id=? AND period=?"; - // ========================================================= - // Data Field private int _castleId = 0; private final List _doors = new ArrayList<>(); private final List _doorDefault = new ArrayList<>(); @@ -100,8 +91,6 @@ public class Castle }; private final Map _engrave = new HashMap<>(); - // ========================================================= - // Constructor public Castle(int castleId) { _castleId = castleId; @@ -114,9 +103,6 @@ public class Castle loadDoor(); } - // ========================================================= - // Method - Public - public void Engrave(L2Clan clan, int objId) { _engrave.put(objId, clan.getClanId()); @@ -149,7 +135,6 @@ public class Castle } } - // This method add to the treasury /** * Add amount to castle instance's treasury (warehouse). * @param amount @@ -510,9 +495,6 @@ public class Castle } } - // ========================================================= - // Method - Private - // This method loads castle private void load() { try (Connection con = DatabaseFactory.getConnection()) @@ -713,8 +695,6 @@ public class Castle } } - // ========================================================= - // Property public final int getCastleId() { return _castleId; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Fort.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Fort.java index 939a334509..bbc2368cf1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Fort.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Fort.java @@ -46,8 +46,6 @@ public class Fort { protected static final Logger LOGGER = Logger.getLogger(Fort.class.getName()); - // ========================================================= - // Data Field private int _fortId = 0; private final List _doors = new ArrayList<>(); private final List _doorDefault = new ArrayList<>(); @@ -61,8 +59,6 @@ public class Fort private L2FortZone _zone; private L2Clan _formerOwner = null; - // ========================================================= - // Constructor public Fort(int fortId) { _fortId = fortId; @@ -70,9 +66,6 @@ public class Fort loadDoor(); } - // ========================================================= - // Method - Public - public void EndOfSiege(L2Clan clan) { ThreadPool.schedule(new endFortressSiege(this, clan), 1000); @@ -84,7 +77,6 @@ public class Fort setOwner(clan); } - // This method add to the treasury /** * Add amount to fort instance's treasury (warehouse). * @param amount @@ -337,8 +329,6 @@ public class Fort } } - // ========================================================= - // Method - Private // This method loads fort private void load() { @@ -380,7 +370,6 @@ public class Fort if (_ownerId > 0) { L2Clan clan = ClanTable.getInstance().getClan(getOwnerId()); // Try to find clan instance - // ThreadPoolManager.scheduleGeneral(new FortUpdater(clan, 1), 3600000); // Schedule owner tasks to start running if (clan != null) { clan.setHasFort(_fortId); @@ -510,8 +499,6 @@ public class Fort statement.execute(); statement.close(); - // ============================================================================ - // Announce to clan memebers if (clan != null) { @@ -519,7 +506,6 @@ public class Fort Announcements.getInstance().announceToAll(clan.getName() + " has taken " + getName() + " fort!"); clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan)); clan.broadcastToOnlineMembers(new PlaySound(1, "Siege_Victory", 0, 0, 0, 0, 0)); - // ThreadPoolManager.scheduleGeneral(new FortUpdater(clan, 1), 3600000); // Schedule owner tasks to start running } } catch (Exception e) @@ -528,8 +514,6 @@ public class Fort } } - // ========================================================= - // Property public final int getFortId() { return _fortId; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/FortSiege.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/FortSiege.java index 03f6b97230..4f47012a4e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/FortSiege.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/FortSiege.java @@ -59,35 +59,17 @@ import com.l2jmobius.gameserver.network.serverpackets.UserInfo; */ public class FortSiege { - /** The Constant LOGGER. */ protected static final Logger LOGGER = Logger.getLogger(FortSiege.class.getName()); - /** - * The Enum TeleportWhoType. - */ public enum TeleportWhoType { - /** The All. */ All, - - /** The Attacker. */ Attacker, - - /** The Defender not owner. */ DefenderNotOwner, - - /** The Owner. */ Owner, - - /** The Spectator. */ Spectator } - // =============================================================== - // Schedule task - /** - * The Class ScheduleEndSiegeTask. - */ public class ScheduleEndSiegeTask implements Runnable { /** The _fort inst. */ @@ -102,10 +84,6 @@ public class FortSiege _fortInst = pFort; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -159,12 +137,8 @@ public class FortSiege } } - /** - * The Class ScheduleStartSiegeTask. - */ public class ScheduleStartSiegeTask implements Runnable { - /** The _fort inst. */ private final Fort _fortInst; /** @@ -240,54 +214,21 @@ public class FortSiege } } - // ========================================================= - // Data Field - // Attacker and Defender - /** The _attacker clans. */ private final List _attackerClans = new ArrayList<>(); // L2SiegeClan - - /** The _defender clans. */ private final List _defenderClans = new ArrayList<>(); // L2SiegeClan - - /** The _defender waiting clans. */ private final List _defenderWaitingClans = new ArrayList<>(); // L2SiegeClan - - /** The _defender respawn delay penalty. */ private int _defenderRespawnDelayPenalty; - - // Fort setting - /** The _commanders. */ private List _commanders = new ArrayList<>(); - - /** The _combatflag. */ private List _combatflag = new ArrayList<>(); - - /** The _fort. */ private final Fort[] _fort; - - /** The _is in progress. */ boolean _isInProgress = false; - - /** The _is scheduled. */ private boolean _isScheduled = false; - - /** The _is normal side. */ private boolean _isNormalSide = true; // true = Atk is Atk, false = Atk is Def - - /** The _is registration over. */ protected boolean _isRegistrationOver = false; - - /** The _siege end date. */ protected Calendar _siegeEndDate; - - /** The _siege guard manager. */ private FortSiegeGuardManager _siegeGuardManager; - - /** The _siege registration end date. */ protected Calendar _siegeRegistrationEndDate; - // ========================================================= - // Constructor /** * Instantiates a new fort siege. * @param fort the fort @@ -295,13 +236,9 @@ public class FortSiege public FortSiege(Fort[] fort) { _fort = fort; - // _siegeGuardManager = new SiegeGuardManager(getFort()); - checkAutoTask(); } - // ========================================================= - // Siege phases /** * When siege ends
    *
    @@ -514,8 +451,6 @@ public class FortSiege } } - // ========================================================= - // Method - Public /** * Announce to player.
    *
    @@ -860,7 +795,6 @@ public class FortSiege if (_commanders.size() == 0) { spawnFlag(getFort().getFortId()); - // LOGGER.info("Commander empty !"); } } } @@ -1139,8 +1073,6 @@ public class FortSiege } } - // ========================================================= - // Method - Private /** * Add clan as attacker
    *
    @@ -1503,38 +1435,6 @@ public class FortSiege private void spawnSiegeGuard() { getSiegeGuardManager().spawnSiegeGuard(); - - // Register guard to the closest Control Tower - // When CT dies, so do all the guards that it controls - // if (getSiegeGuardManager().getSiegeGuardSpawn().size() > 0 && _controlTowers.size() > 0) - // { - // L2ControlTowerInstance closestCt; - // double distance, x, y, z; - // double distanceClosest = 0; - // for (L2Spawn spawn : getSiegeGuardManager().getSiegeGuardSpawn()) - // { - // if (spawn == null) continue; - // closestCt = null; - // distanceClosest = 0; - // for (L2ControlTowerInstance ct : _controlTowers) - // { - // if (ct == null) continue; - // x = (spawn.getX() - ct.getX()); - // y = (spawn.getY() - ct.getY()); - // z = (spawn.getZ() - ct.getZ()); - // - // distance = (x * x) + (y * y) + (z * z); - // - // if (closestCt == null || distance < distanceClosest) - // { - // closestCt = ct; - // distanceClosest = distance; - // } - // } - // - // if (closestCt != null) closestCt.registerGuard(spawn); - // } - // } } /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Siege.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Siege.java index 0ebd6a43f0..6eeb26f357 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Siege.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/Siege.java @@ -102,31 +102,16 @@ public class Siege protected static final Logger LOGGER = Logger.getLogger(Siege.class.getName()); private final SimpleDateFormat fmt = new SimpleDateFormat("H:mm."); - /** - * The Enum TeleportWhoType. - */ public enum TeleportWhoType { - /** The All. */ All, - - /** The Attacker. */ Attacker, - - /** The Defender not owner. */ DefenderNotOwner, - - /** The Owner. */ Owner, - - /** The Spectator. */ Spectator } - /** The _control tower count. */ private int _controlTowerCount; - - /** The _control tower max count. */ private int _controlTowerMaxCount; /** @@ -138,8 +123,6 @@ public class Siege return _controlTowerCount; } - // =============================================================== - // Schedule task /** * The Class ScheduleEndSiegeTask. */ @@ -157,10 +140,6 @@ public class Siege _castleInst = pCastle; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -217,12 +196,8 @@ public class Siege } } - /** - * The Class ScheduleStartSiegeTask. - */ public class ScheduleStartSiegeTask implements Runnable { - /** The _castle inst. */ private final Castle _castleInst; /** @@ -234,10 +209,6 @@ public class Siege _castleInst = pCastle; } - /* - * (non-Javadoc) - * @see java.lang.Runnable#run() - */ @Override public void run() { @@ -303,51 +274,20 @@ public class Siege } } - // ========================================================= - // Data Field - // Attacker and Defender - /** The _attacker clans. */ private final List _attackerClans = new ArrayList<>(); // L2SiegeClan - - /** The _defender clans. */ private final List _defenderClans = new ArrayList<>(); // L2SiegeClan - - /** The _defender waiting clans. */ private final List _defenderWaitingClans = new ArrayList<>(); // L2SiegeClan - - /** The _defender respawn delay penalty. */ private int _defenderRespawnDelayPenalty; - - // Castle setting - /** The _artifacts. */ private List _artifacts = new ArrayList<>(); - - /** The _control towers. */ private List _controlTowers = new ArrayList<>(); - - /** The _castle. */ private final Castle[] _castle; - - /** The _is in progress. */ boolean _isInProgress = false; - - /** The _is normal side. */ private boolean _isNormalSide = true; // true = Atk is Atk, false = Atk is Def - - /** The _is registration over. */ protected boolean _isRegistrationOver = false; - - /** The _siege end date. */ protected Calendar _siegeEndDate; - - /** The _siege guard manager. */ private SiegeGuardManager _siegeGuardManager; - - /** The _siege registration end date. */ protected Calendar _siegeRegistrationEndDate; - // ========================================================= - // Constructor /** * Instantiates a new siege. * @param castle the castle @@ -360,8 +300,6 @@ public class Siege startAutoTask(); } - // ========================================================= - // Siege phases /** * When siege ends
    *
    @@ -681,8 +619,6 @@ public class Siege } } - // ========================================================= - // Method - Public /** * Announce to player.
    *
    @@ -1256,8 +1192,6 @@ public class Siege } } - // ========================================================= - // Method - Private /** * Add clan as attacker
    *
    @@ -1369,8 +1303,6 @@ public class Siege { continue; } - // if(siege.getSiegeDate().get(Calendar.DAY_OF_WEEK) == this.getSiegeDate().get(Calendar.DAY_OF_WEEK)) - // { if (siege.checkIsAttacker(clan)) { return true; @@ -1382,7 +1314,6 @@ public class Siege if (siege.checkIsDefenderWaiting(clan)) { return true; - // } } } return false; @@ -1698,10 +1629,6 @@ public class Siege L2NpcTemplate template = NpcTable.getInstance().getTemplate(_sp.getNpcId()); template.getStatsSet().set("baseHpMax", _sp.getHp()); - // TODO: Check/confirm if control towers have any special weapon resistances/vulnerabilities - // template.addVulnerability(Stats.BOW_WPN_VULN,0); - // template.addVulnerability(Stats.BLUNT_WPN_VULN,0); - // template.addVulnerability(Stats.DAGGER_WPN_VULN,0); ct = new L2ControlTowerInstance(IdFactory.getInstance().getNextId(), template); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/BanditStrongholdSiege.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/BanditStrongholdSiege.java index 381301bbea..67fcf4be48 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/BanditStrongholdSiege.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/BanditStrongholdSiege.java @@ -83,46 +83,43 @@ public class BanditStrongholdSiege extends ClanHallSiege public void startSiege() { - // if (GameServer._instanceOk) + setRegistrationPeriod(false); + if (_clansInfo.size() == 0) { - setRegistrationPeriod(false); - if (_clansInfo.size() == 0) + endSiege(false); + return; + } + + if ((_clansInfo.size() == 1) && (clanhall.getOwnerClan() == null)) + { + endSiege(false); + return; + } + + if ((_clansInfo.size() == 1) && (clanhall.getOwnerClan() != null)) + { + L2Clan clan = null; + for (clanPlayersInfo a : _clansInfo.values()) { - endSiege(false); - return; - } - - if ((_clansInfo.size() == 1) && (clanhall.getOwnerClan() == null)) - { - endSiege(false); - return; - } - - if ((_clansInfo.size() == 1) && (clanhall.getOwnerClan() != null)) - { - L2Clan clan = null; - for (clanPlayersInfo a : _clansInfo.values()) - { - clan = ClanTable.getInstance().getClanByName(a._clanName); - } - setIsInProgress(true); - startSecondStep(clan); - _siegeEndDate = Calendar.getInstance(); - _siegeEndDate.add(Calendar.MINUTE, 20); - _endSiegeTask.schedule(1000); - return; + clan = ClanTable.getInstance().getClanByName(a._clanName); } setIsInProgress(true); - spawnFlags(); - gateControl(1); - anonce("Take place at the siege of his headquarters.", 1); - ThreadPool.schedule(new startFirstStep(), 5 * 60000); - _midTimer = ThreadPool.schedule(new midSiegeStep(), 25 * 60000); - + startSecondStep(clan); _siegeEndDate = Calendar.getInstance(); - _siegeEndDate.add(Calendar.MINUTE, 60); + _siegeEndDate.add(Calendar.MINUTE, 20); _endSiegeTask.schedule(1000); + return; } + setIsInProgress(true); + spawnFlags(); + gateControl(1); + anonce("Take place at the siege of his headquarters.", 1); + ThreadPool.schedule(new startFirstStep(), 5 * 60000); + _midTimer = ThreadPool.schedule(new midSiegeStep(), 25 * 60000); + + _siegeEndDate = Calendar.getInstance(); + _siegeEndDate.add(Calendar.MINUTE, 60); + _endSiegeTask.schedule(1000); } public void startSecondStep(L2Clan winner) @@ -287,9 +284,6 @@ public class BanditStrongholdSiege extends ClanHallSiege continue; } template = NpcTable.getInstance().getTemplate(35427 + mobCounter); - /* - * template.setServerSideTitle(true); template.setTitle(clan.getName()); - */ final L2MonsterInstance questMob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), template); questMob.setHeading(100); questMob.getStatus().setCurrentHpMp(questMob.getMaxHp(), questMob.getMaxMp()); @@ -617,12 +611,9 @@ public class BanditStrongholdSiege extends ClanHallSiege else { final CreatureSay cs = new CreatureSay(0, 1, "Journal", text); - // L2MapRegion region = MapRegionManager.getInstance().getRegion(88404, -21821, -2276); for (L2PcInstance player : L2World.getInstance().getAllPlayers()) { - if /* - * (region == MapRegionManager.getInstance().getRegion(player.getX(), player.getY(), player.getZ()) && - */ (player.getInstanceId() == 0/* ) */) + if (player.getInstanceId() == 0) { player.sendPacket(cs); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/FortressOfResistance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/FortressOfResistance.java index c8a724ca87..c70a59030e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/FortressOfResistance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/FortressOfResistance.java @@ -117,10 +117,6 @@ public class FortressOfResistance _clansDamageInfo = new HashMap<>(); - /* - * synchronized (this) { setCalendarForNextCaprture(); long milliToCapture = getMilliToCapture(); RunMessengerSpawn rms = new RunMessengerSpawn(); ThreadPoolManager.scheduleGeneral(rms, milliToCapture); LOGGER.info("Fortress of Resistanse: " + milliToCapture / 1000 + - * " sec. to capture"); } - */ synchronized (this) { setCalendarForNextCaprture(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/WildBeastFarmSiege.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/WildBeastFarmSiege.java index a5aed49d4c..8592f48115 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/WildBeastFarmSiege.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/entity/siege/clanhalls/WildBeastFarmSiege.java @@ -272,9 +272,6 @@ public class WildBeastFarmSiege extends ClanHallSiege L2NpcTemplate template; final L2Clan clan = ClanTable.getInstance().getClanByName(clanName); template = NpcTable.getInstance().getTemplate(35617 + mobCounter); - /* - * template.setServerSideTitle(true); template.setTitle(clan.getName()); - */ final L2MonsterInstance questMob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), template); questMob.setHeading(100); questMob.getStatus().setCurrentHpMp(questMob.getMaxHp(), questMob.getMaxMp()); @@ -602,12 +599,9 @@ public class WildBeastFarmSiege extends ClanHallSiege else { final CreatureSay cs = new CreatureSay(0, 1, "Journal", text); - /* L2MapRegion region = MapRegionManager.getInstance().getRegion(53508, -93776, -1584); */ for (L2PcInstance player : L2World.getInstance().getAllPlayers()) { - if /* - * (region == MapRegionManager.getInstance().getRegion(player.getX(), player.getY(), player.getZ()) && - */ (player.getInstanceId() == 0)/* ) */ + if (player.getInstanceId() == 0) { player.sendPacket(cs); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/multisell/L2Multisell.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/multisell/L2Multisell.java index 2135221dc0..a9bf9d7809 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/multisell/L2Multisell.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/multisell/L2Multisell.java @@ -43,7 +43,7 @@ public class L2Multisell { private static Logger LOGGER = Logger.getLogger(L2Multisell.class.getName()); private final List _entries = new ArrayList<>(); - private static L2Multisell _instance;/* = new L2Multisell(); */ + private static L2Multisell _instance; public MultiSellListContainer getList(int id) { @@ -133,8 +133,7 @@ public class L2Multisell int enchantLevel; for (L2ItemInstance item : items) { - // only do the matchup on equipable items that are not currently equipped - // so for each appropriate item, produce a set of entries for the multisell list. + // Only do the matchup on equipable items that are not currently equipped so for each appropriate item, produce a set of entries for the multisell list. if (!item.isWear() && ((item.getItem() instanceof L2Armor) || (item.getItem() instanceof L2Weapon))) { enchantLevel = listTemplate.getMaintainEnchantment() ? item.getEnchantLevel() : 0; @@ -161,8 +160,8 @@ public class L2Multisell } } } - } // end for each inventory item. - } // end if "inventory-only" + } + } else // this is a list-all type { // if no taxes are applied, no modifications are needed @@ -177,10 +176,8 @@ public class L2Multisell // Regarding taxation, the following is the case: // a) The taxes come out purely from the adena TaxIngredient - // b) If the entry has no adena ingredients other than the taxIngredient, the resulting - // amount of adena is appended to the entry - // c) If the entry already has adena as an entry, the taxIngredient is used in order to increase - // the count for the existing adena ingredient + // b) If the entry has no adena ingredients other than the taxIngredient, the resulting amount of adena is appended to the entry + // c) If the entry already has adena as an entry, the taxIngredient is used in order to increase the count for the existing adena ingredient private MultiSellEntry prepareEntry(MultiSellEntry templateEntry, boolean applyTaxes, boolean maintainEnchantment, int enchantLevel, double taxRate) { final MultiSellEntry newEntry = new MultiSellEntry(); @@ -235,8 +232,7 @@ public class L2Multisell if (maintainEnchantment) { - // if it is an armor/weapon, modify the enchantment level appropriately - // (note, if maintain enchantment is "false" this modification will result to a +0) + // if it is an armor/weapon, modify the enchantment level appropriately (note, if maintain enchantment is "false" this modification will result to a +0) final L2Item tempItem = ItemTable.getInstance().createDummyItem(ing.getItemId()).getItem(); if ((tempItem instanceof L2Armor) || (tempItem instanceof L2Weapon)) @@ -464,7 +460,6 @@ public class L2Multisell if ((entry.getIngredients().size() == 1) && (entry.getIngredients().get(0).getItemId() == 57)) { // the buy price must necessarily higher then total reference item price / 2 that is the default sell price - int totalProductReferencePrice = 0; for (MultiSellIngredient product : entry.getProducts()) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/Quest.java index 7c6f384d56..914ffe3906 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -75,11 +75,9 @@ public class Quest extends ManagedScript private final String _prefixPath; // used only for admin_quest_reload private final String _descr; private final byte _initialState = State.CREATED; - // NOTE: questItemIds will be overriden by child classes. Ideally, it should be - // protected instead of public. However, quest scripts written in Jython will - // have trouble with protected, as Jython only knows private and public... - // In fact, protected will typically be considered private thus breaking the scripts. - // Leave this as public as a workaround. + // NOTE: questItemIds will be overriden by child classes. Ideally, it should be protected instead of public. + // However, quest scripts written in Jython will have trouble with protected, as Jython only knows private and public... + // In fact, protected will typically be considered private thus breaking the scripts. Leave this as public as a workaround. public int[] questItemIds = null; // Dimensional Diamond Rewards by Class for 2nd class transfer quest (35) @@ -159,11 +157,9 @@ public class Quest extends ManagedScript _name = name; _descr = descr; - // Given the quest instance, create a string representing the path and questName - // like a simplified version of a canonical class name. That is, if a script is in - // DATAPACK_PATH/scripts/quests/abc the result will be quests.abc - // Similarly, for a script in DATAPACK_PATH/scripts/ai/individual/myClass.py - // the result will be ai.individual.myClass + // Given the quest instance, create a string representing the path and questName like a simplified version of a canonical class name. + // That is, if a script is in DATAPACK_PATH/scripts/quests/abc the result will be quests.abc + // Similarly, for a script in DATAPACK_PATH/scripts/ai/individual/myClass.py the result will be ai.individual.myClass // All quests are to be indexed, processed, and reloaded by this form of pathname. StringBuffer temp = new StringBuffer(getClass().getCanonicalName()); temp.delete(0, temp.indexOf(".scripts.") + 9); @@ -231,8 +227,7 @@ public class Quest extends ManagedScript /** OnAttack действие при атаке (MOBGOTATTACKED) */ ON_ATTACK(true); - // control whether this event type is allowed for the same npc template in multiple quests - // or if the npc must be registered in at most one quest for the specified event + // Control whether this event type is allowed for the same npc template in multiple quests or if the npc must be registered in at most one quest for the specified event. private boolean _allowMultipleRegistration; QuestEventType(boolean allowMultipleRegistration) @@ -1681,8 +1676,7 @@ public class Quest extends ManagedScript return null; // no match } - // if the player is in a party, gather a list of all matching party members (possibly - // including this player) + // if the player is in a party, gather a list of all matching party members (possibly including this player) final List candidates = new ArrayList<>(); // get the target for enforcing distance limitations. @@ -1783,8 +1777,7 @@ public class Quest extends ManagedScript return null; // no match } - // if the player is in a party, gather a list of all matching party members (possibly - // including this player) + // if the player is in a party, gather a list of all matching party members (possibly including this player) final List candidates = new ArrayList<>(); // get the target for enforcing distance limitations. @@ -1917,11 +1910,8 @@ public class Quest extends ManagedScript public boolean unload() { saveGlobalData(); - // cancel all pending timers before reloading. - // if timers ought to be restarted, the quest can take care of it - // with its code (example: save global data indicating what timer must - // be restarted). - + // Cancel all pending timers before reloading. + // If timers ought to be restarted, the quest can take care of it with its code (example: save global data indicating what timer must be restarted). synchronized (_allEventTimers) { for (ArrayList timers : _allEventTimers.values()) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestSpawn.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestSpawn.java index 3209e7afa9..7ad5abad43 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestSpawn.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestSpawn.java @@ -60,7 +60,6 @@ public final class QuestSpawn } } - // Method - Public /** * Add spawn for player instance Will despawn after the spawn length expires Uses player's coords and heading. Adds a little randomization in the x y coords Return object id of newly spawned npc * @param npcId @@ -93,11 +92,8 @@ public final class QuestSpawn if (template != null) { - // Sometimes, even if the quest script specifies some xyz (for example npc.getX() etc) by the time the code - // reaches here, xyz have become 0! Also, a questdev might have purposely set xy to 0,0...however, - // the spawn code is coded such that if x=y=0, it looks into location for the spawn loc! This will NOT work - // with quest spawns! For both of the above cases, we need a fail-safe spawn. For this, we use the - // default spawn location, which is at the player's loc. + // Sometimes, even if the quest script specifies some xyz (for example npc.getX() etc) by the time the code reaches here, xyz have become 0! Also, a questdev might have purposely set xy to 0,0...however, + // the spawn code is coded such that if x=y=0, it looks into location for the spawn loc! This will NOT work with quest spawns! For both of the above cases, we need a fail-safe spawn. For this, we use the default spawn location, which is at the player's loc. if ((x == 0) && (y == 0)) { LOGGER.warning("Failed to adjust bad locks for quest spawn! Spawn aborted!"); @@ -153,5 +149,4 @@ public final class QuestSpawn return null; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestState.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestState.java index 090f8309f9..9ad783c62f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestState.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestState.java @@ -99,7 +99,7 @@ public final class QuestState _questName = quest.getName(); _player = player; - // Save the state of the quest for the player in the player's list of quest onwed + // Save the state of the quest for the player in the player's list of quest owned _player.setQuestState(this); // set the state of the quest @@ -285,9 +285,7 @@ public final class QuestState return; } - // cond 0 and 1 do not need completedStateFlags. Also, if cond > 1, the 1st step must - // always exist (i.e. it can never be skipped). So if cond is 2, we can still safely - // assume no steps have been skipped. + // cond 0 and 1 do not need completedStateFlags. Also, if cond > 1, the 1st step must always exist (i.e. it can never be skipped). So if cond is 2, we can still safely assume no steps have been skipped. // Finally, more than 31 steps CANNOT be supported in any way with skipping. if ((cond < 3) || (cond > 31)) { @@ -301,20 +299,15 @@ public final class QuestState // case 1: No steps have been skipped so far... if (completedStateFlags == 0) { - // check if this step also doesn't skip anything. If so, no further work is needed - // also, in this case, no work is needed if the state is being reset to a smaller value - // in those cases, skip forward to informing the client about the change... - + // Check if this step also doesn't skip anything. If so, no further work is needed also, in this case, no work is needed if the state is being reset to a smaller value in those cases, skip forward to informing the client about the change... // ELSE, if we just now skipped for the first time...prepare the flags!!! if (cond > (old + 1)) { // set the most significant bit to 1 (indicates that there exist skipped states) - // also, ensure that the least significant bit is an 1 (the first step is never skipped, no matter - // what the cond says) + // also, ensure that the least significant bit is an 1 (the first step is never skipped, no matter what the cond says) completedStateFlags = 0x80000001; - // since no flag had been skipped until now, the least significant bits must all - // be set to 1, up until "old" number of bits. + // since no flag had been skipped until now, the least significant bits must all be set to 1, up until "old" number of bits. completedStateFlags |= (1 << old) - 1; // now, just set the bit corresponding to the passed cond to 1 (current step) @@ -323,8 +316,7 @@ public final class QuestState } } // case 2: There were exist previously skipped steps - else // if this is a push back to a previous step, clear all completion flags ahead - if (cond < old) + else if (cond < old) // if this is a push back to a previous step, clear all completion flags ahead { completedStateFlags &= (1 << cond) - 1; // note, this also unsets the flag indicating that there exist skips @@ -336,14 +328,12 @@ public final class QuestState else { // set the most significant bit back to 1 again, to correctly indicate that this skips states. - // also, ensure that the least significant bit is an 1 (the first step is never skipped, no matter - // what the cond says) + // also, ensure that the least significant bit is an 1 (the first step is never skipped, no matter what the cond says) completedStateFlags |= 0x80000001; set("__compltdStateFlags", String.valueOf(completedStateFlags)); } } - // if this moves forward, it changes nothing on previously skipped steps...so just mark this - // state and we are done + // if this moves forward, it changes nothing on previously skipped steps...so just mark this state and we are done else { completedStateFlags |= 1 << (cond - 1); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestStateManager.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestStateManager.java index f61f7f47e9..c4f11facf7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestStateManager.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestStateManager.java @@ -24,8 +24,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class QuestStateManager { - // ========================================================= - // Schedule Task public class ScheduleTimerTask implements Runnable { @Override @@ -42,20 +40,14 @@ public class QuestStateManager } } - // ========================================================= - // Data Field private static QuestStateManager _instance; private List _questStates = new ArrayList<>(); - // ========================================================= - // Constructor public QuestStateManager() { ThreadPool.schedule(new ScheduleTimerTask(), 60000); } - // ========================================================= - // Method - Public /** * Add QuestState for the specified player instance * @param quest @@ -86,8 +78,6 @@ public class QuestStateManager } } - // ========================================================= - // Method - Private /** * Remove QuestState instance * @param qs @@ -97,8 +87,6 @@ public class QuestStateManager qs = null; } - // ========================================================= - // Property - Public public static final QuestStateManager getInstance() { if (_instance == null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestTimer.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestTimer.java index 2b5a00fd01..259299ba90 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestTimer.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/quest/QuestTimer.java @@ -24,8 +24,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; public class QuestTimer { - // ========================================================= - // Schedule Task public class ScheduleTimerTask implements Runnable { @Override @@ -50,8 +48,6 @@ public class QuestTimer } } - // ========================================================= - // Data Field boolean _isActive = true; final String _name; final Quest _quest; @@ -60,8 +56,6 @@ public class QuestTimer final boolean _isRepeating; private ScheduledFuture _schedular; - // ========================================================= - // Constructor public QuestTimer(Quest quest, String name, long time, L2NpcInstance npc, L2PcInstance player, boolean repeating) { _name = name; @@ -89,8 +83,6 @@ public class QuestTimer this(qs.getQuest(), name, time, null, qs.getPlayer(), false); } - // ========================================================= - // Method - Public public void cancel() { cancel(true); @@ -129,8 +121,6 @@ public class QuestTimer return (npc == _npc) && (player == _player); } - // ========================================================= - // Property - Public public final boolean getIsActive() { return _isActive; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/AutoSpawn.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/AutoSpawn.java index a084a110bb..a2d012bce5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/AutoSpawn.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/AutoSpawn.java @@ -106,8 +106,7 @@ public class AutoSpawn while (rs.next()) { - // Register random spawn group, set various options on the - // created spawn instance. + // Register random spawn group, set various options on the created spawn instance. final AutoSpawnInstance spawnInst = registerSpawn(rs.getInt("npcId"), rs.getInt("initialDelay"), rs.getInt("respawnDelay"), rs.getInt("despawnDelay")); spawnInst.setSpawnCount(rs.getInt("count")); @@ -489,8 +488,7 @@ public class AutoSpawn } - // If the spawn is not scheduled to be active, cancel the spawn - // task. + // If the spawn is not scheduled to be active, cancel the spawn task. if (!spawnInst.isSpawnActive()) { return; @@ -508,9 +506,7 @@ public class AutoSpawn final int locationCount = locationList.length; int locationIndex = Rnd.get(locationCount); - /* - * If random spawning is disabled, the spawn at the next set of co-ordinates after the last. If the index is greater than the number of possible spawns, reset the counter to zero. - */ + // If random spawning is disabled, the spawn at the next set of co-ordinates after the last. If the index is greater than the number of possible spawns, reset the counter to zero. if (!spawnInst.isRandomSpawn()) { locationIndex = spawnInst._lastLocIndex; @@ -524,8 +520,7 @@ public class AutoSpawn spawnInst._lastLocIndex = locationIndex; } - // Set the X, Y and Z co-ordinates, where this spawn will take - // place. + // Set the X, Y and Z co-ordinates, where this spawn will take place. final int x = locationList[locationIndex].getX(); final int y = locationList[locationIndex].getY(); final int z = locationList[locationIndex].getZ(); @@ -558,8 +553,7 @@ public class AutoSpawn newSpawn.setRespawnDelay(spawnInst._resDelay); } - // Add the new spawn information to the spawn table, but do not - // store it. + // Add the new spawn information to the spawn table, but do not store it. SpawnTable.getInstance().addNewSpawn(newSpawn, false); L2NpcInstance npcInst = null; @@ -575,21 +569,17 @@ public class AutoSpawn { npcInst = newSpawn.doSpawn(); - // To prevent spawning of more than one NPC in the exact - // same spot, - // move it slightly by a small random offset. + // To prevent spawning of more than one NPC in the exact same spot, move it slightly by a small random offset. npcInst.setXYZ(npcInst.getX() + Rnd.get(50), npcInst.getY() + Rnd.get(50), npcInst.getZ()); - // Add the NPC instance to the list of managed - // instances. + // Add the NPC instance to the list of managed instances. spawnInst.addNpcInstance(npcInst); } } String nearestTown = MapRegionTable.getInstance().getClosestTownName(npcInst); - // Announce to all players that the spawn has taken place, with - // the nearest town location. + // Announce to all players that the spawn has taken place, with the nearest town location. if (spawnInst.isBroadcasting() && (npcInst != null)) { Announcements.getInstance().announceToAll("The " + npcInst.getName() + " has spawned near " + nearestTown + "!"); @@ -672,9 +662,6 @@ public class AutoSpawn } catch (Exception e) { - // if(Config.ENABLE_ALL_EXCEPTIONS) - // e.printStackTrace(); - LOGGER.warning("AutoSpawnHandler: An error occurred while despawning spawn (Object ID = " + _objectId + "): " + e); e.printStackTrace(); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/L2Spawn.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/L2Spawn.java index 1e9bba7491..851cbbd315 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/L2Spawn.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/L2Spawn.java @@ -43,57 +43,22 @@ public class L2Spawn { protected static final Logger LOGGER = Logger.getLogger(L2Spawn.class.getName()); - /** - * The link on the L2NpcTemplate object containing generic and static properties of this spawn (ex : RewardExp, RewardSP, AggroRange...) - */ private L2NpcTemplate _template; - - /** The Identifier of this spawn in the spawn table */ private int _id; - - // private String _location = DEFAULT_LOCATION; - - /** The identifier of the location area where L2NpcInstance can be spawned */ private int _location; - - /** The maximum number of L2NpcInstance that can manage this L2Spawn */ private int _maximumCount; - - /** The current number of L2NpcInstance managed by this L2Spawn */ private int _currentCount; - - /** The current number of SpawnTask in progress or stand by of this L2Spawn */ protected int _scheduledCount; - - /** The X position of the spawn point */ private int _locX; - - /** The Y position of the spawn point */ private int _locY; - - /** The Z position of the spawn point */ private int _locZ; - - /** The heading of L2NpcInstance when they are spawned */ private int _heading; - - /** The delay between a L2NpcInstance remove and its re-spawn */ private int _respawnDelay; - - /** Minimum delay RaidBoss */ private int _respawnMinDelay; - - /** Maximum delay RaidBoss */ private int _respawnMaxDelay; - - /** The generic constructor of L2NpcInstance managed by this L2Spawn */ private Constructor _constructor; - - /** If True a L2NpcInstance is respawned each time that another is killed */ private boolean _doRespawn; - private int _instanceId = 0; - private L2NpcInstance _lastSpawn; private static List _spawnListeners = new ArrayList<>(); @@ -159,8 +124,6 @@ public class L2Spawn implementationName = "L2RaceManager"; } - // if (mobTemplate.npcId == 8050) - if ((mobTemplate.npcId >= 31046) && (mobTemplate.npcId <= 31053)) { implementationName = "L2SymbolMaker"; @@ -511,8 +474,7 @@ public class L2Spawn }; // Call the constructor of the L2NpcInstance - // (can be a L2ArtefactInstance, L2FriendlyMobInstance, L2GuardInstance, L2MonsterInstance, L2SiegeGuardInstance, L2BoxInstance, - // L2FeedableBeastInstance, L2TamedBeastInstance, L2FolkInstance) + // (can be a L2ArtefactInstance, L2FriendlyMobInstance, L2GuardInstance, L2MonsterInstance, L2SiegeGuardInstance, L2BoxInstance, L2FeedableBeastInstance, L2TamedBeastInstance, L2FolkInstance) final Object tmp = _constructor.newInstance(parameters); // Must be done before object is spawned into visible world diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/SpawnListener.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/SpawnListener.java index edb5dda53d..66587a7e6f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/SpawnListener.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/spawn/SpawnListener.java @@ -19,11 +19,9 @@ package com.l2jmobius.gameserver.model.spawn; import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance; /** - * This class ... * @author luisantonioa * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $ */ - public interface SpawnListener { void npcSpawned(L2NpcInstance npc); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/waypoint/WayPointNode.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/waypoint/WayPointNode.java index 43a66c6cff..aa0e34ccf1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/waypoint/WayPointNode.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/waypoint/WayPointNode.java @@ -30,10 +30,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.network.serverpackets.MyTargetSelected; -/** - * This class ... - * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $ - */ public class WayPointNode extends L2Object { private int _id; @@ -46,19 +42,12 @@ public class WayPointNode extends L2Object private static final String LINE_TYPE = "item"; private final Map> _linkLists; - /** - * @param objectId - */ public WayPointNode(int objectId) { super(objectId); _linkLists = Collections.synchronizedMap(new WeakHashMap>()); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Object#isAutoAttackable(com.l2jmobius.gameserver.model.L2Character) - */ @Override public boolean isAutoAttackable(L2Character attacker) { @@ -177,10 +166,6 @@ public class WayPointNode extends L2Object _type = type; } - /** - * @param nodeA - * @param nodeB - */ public static void drawLine(WayPointNode nodeA, WayPointNode nodeB) { int x1 = nodeA.getX(); @@ -221,10 +206,6 @@ public class WayPointNode extends L2Object _linkLists.put(node, line); } - /** - * @param target - * @param selectedNode - */ public static void eraseLine(WayPointNode target, WayPointNode selectedNode) { List lineNodes = target.getLineInfo(selectedNode); @@ -243,18 +224,11 @@ public class WayPointNode extends L2Object selectedNode.eraseLine(target); } - /** - * @param target - */ public void eraseLine(WayPointNode target) { _linkLists.remove(target); } - /** - * @param selectedNode - * @return - */ private List getLineInfo(WayPointNode selectedNode) { return _linkLists.get(selectedNode); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java index 44c0b89308..0709164255 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/L2ZoneType.java @@ -398,5 +398,4 @@ public abstract class L2ZoneType { return _characterList; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 59cc595df1..19282197ee 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -162,10 +162,7 @@ public class ZoneCuboid extends L2ZoneForm @Override public double getDistanceToZone(int x, int y) { - // Since we aren't given a z coordinate to test against - // we just use the minimum z coordinate to prevent the - // function from saying we aren't in the zone because - // of a bad z coordinate. + // Since we aren't given a z coordinate to test against we just use the minimum z coordinate to prevent the function from saying we aren't in the zone because of a bad z coordinate. if (isInsideZone(x, y, _z1)) { return 0; // If you are inside the zone distance to zone is 0. @@ -195,9 +192,6 @@ public class ZoneCuboid extends L2ZoneForm return Math.sqrt(shortestDist); } - /* - * getLowZ() / getHighZ() - These two functions were added to cope with the demand of the new fishing algorithms, wich are now able to correctly place the hook in the water, thanks to getHighZ(). getLowZ() was added, considering potential future modifications. - */ @Override public int getLowZ() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCylinder.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCylinder.java index a179ceeec4..69c0bb3612 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCylinder.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneCylinder.java @@ -115,10 +115,7 @@ public class ZoneCylinder extends L2ZoneForm @Override public double getDistanceToZone(int x, int y) { - // Since we aren't given a z coordinate to test against - // we just use the minimum z coordinate to prevent the - // function from saying we aren't in the zone because - // of a bad z coordinate. + // Since we aren't given a z coordinate to test against we just use the minimum z coordinate to prevent the function from saying we aren't in the zone because of a bad z coordinate. if (isInsideZone(x, y, _z1)) { return 0; // If you are inside the zone distance to zone is 0. @@ -127,9 +124,6 @@ public class ZoneCylinder extends L2ZoneForm return Math.sqrt((Math.pow(_x - x, 2) + Math.pow(_y - y, 2))) - _rad; } - /* - * getLowZ() / getHighZ() - These two functions were added to cope with the demand of the new fishing algorithms, wich are now able to correctly place the hook in the water, thanks to getHighZ(). getLowZ() was added, considering potential future modifications. - */ @Override public int getLowZ() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneNPoly.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneNPoly.java index fb7b8d8868..606e23e360 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneNPoly.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/form/ZoneNPoly.java @@ -76,9 +76,7 @@ public class ZoneNPoly extends L2ZoneForm return true; } - // If the first point wasn't inside the rectangle it might still have any line crossing any side - // of the rectangle - + // If the first point wasn't inside the rectangle it might still have any line crossing any side of the rectangle // Check every possible line of the polygon for a collision with any of the rectangles side for (int i = 0; i < _y.length; i++) { @@ -127,9 +125,6 @@ public class ZoneNPoly extends L2ZoneForm return Math.sqrt(shortestDist); } - /* - * getLowZ() / getHighZ() - These two functions were added to cope with the demand of the new fishing algorithms, wich are now able to correctly place the hook in the water, thanks to getHighZ(). getLowZ() was added, considering potential future modifications. - */ @Override public int getLowZ() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ArenaZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ArenaZone.java index e2fe2cfba1..99dac4512f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ArenaZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ArenaZone.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.network.SystemMessageId; */ public class L2ArenaZone extends L2ZoneType { - // private String _arenaName; private final int[] _spawnLoc; public L2ArenaZone(int id) @@ -42,11 +41,6 @@ public class L2ArenaZone extends L2ZoneType @Override public void setParameter(String name, String value) { - // if(name.equals("name")) - // { - // _arenaName = value; - // } - /* else */ switch (name) { case "spawnX": diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2BossZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2BossZone.java index 8b5e8133bd..cef0fb3165 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2BossZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2BossZone.java @@ -40,15 +40,11 @@ public class L2BossZone extends L2ZoneType private boolean _enabled = true; // default value, unless overridden by xml... private boolean _IsFlyingEnable = true; // default value, unless overridden by xml... - // track the times that players got disconnected. Players are allowed - // to LOGGER back into the zone as long as their LOGGER-out was within _timeInvade - // time... + // track the times that players got disconnected. Players are allowed to LOGGER back into the zone as long as their LOGGER-out was within _timeInvade time... // private final Map _playerAllowedReEntryTimes; - // track the players admitted to the zone who should be allowed back in - // after reboot/server downtime (outside of their control), within 30 - // of server restart + // track the players admitted to the zone who should be allowed back in after reboot/server downtime (outside of their control), within 30 of server restart private List _playersAllowed; private final int _bossId; @@ -98,7 +94,6 @@ public class L2BossZone extends L2ZoneType { if (character instanceof L2PcInstance) { - // Thread.dumpStack(); L2PcInstance player = (L2PcInstance) character; if (player.isGM() || Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM) @@ -130,8 +125,7 @@ public class L2BossZone extends L2ZoneType return; } - // if player has been (previously) cleared by npc/ai for entry and the zone is - // set to receive players (aka not waiting for boss to respawn) + // if player has been (previously) cleared by npc/ai for entry and the zone is set to receive players (aka not waiting for boss to respawn) if (_playersAllowed.contains(character.getObjectId())) { // Get the information about this player's last logout-exit from this zone. @@ -209,8 +203,7 @@ public class L2BossZone extends L2ZoneType return; } - // if the player just got disconnected/logged out, store the dc time so that - // decisions can be made later about allowing or not the player to LOGGER into the zone + // if the player just got disconnected/logged out, store the dc time so that decisions can be made later about allowing or not the player to LOGGER into the zone if ((player.isOnline() == 0) && _playersAllowed.contains(character.getObjectId())) { // mark the time that the player left the zone diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2CastleZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2CastleZone.java index fa31392638..2046cf793c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2CastleZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2CastleZone.java @@ -229,19 +229,11 @@ public class L2CastleZone extends L2ZoneType return players; } - /** - * Get the castles defender spawn - * @return - */ public int[] getSpawn() { return _spawnLoc; } - /** - * @return - */ - public boolean isSiegeActive() { if (_castle != null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DamageZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DamageZone.java index 0ec47f15e9..8f42517908 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DamageZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DamageZone.java @@ -114,5 +114,4 @@ public class L2DamageZone extends L2ZoneType protected void onReviveInside(L2Character character) { } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DerbyTrackZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DerbyTrackZone.java index 63e059476d..9ea354f999 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DerbyTrackZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DerbyTrackZone.java @@ -60,5 +60,4 @@ public class L2DerbyTrackZone extends L2PeaceZone protected void onReviveInside(L2Character character) { } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DynamicZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DynamicZone.java index d48a9b3188..96f3335819 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DynamicZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2DynamicZone.java @@ -129,5 +129,4 @@ public class L2DynamicZone extends L2ZoneType { _skill.getEffects(_owner, character, false, false, false); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2MotherTreeZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2MotherTreeZone.java index 3abfbd5570..86da31232b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2MotherTreeZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2MotherTreeZone.java @@ -76,5 +76,4 @@ public class L2MotherTreeZone extends L2ZoneType protected void onReviveInside(L2Character character) { } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PeaceZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PeaceZone.java index 23de83ee3b..554591ced9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PeaceZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PeaceZone.java @@ -52,5 +52,4 @@ public class L2PeaceZone extends L2ZoneType protected void onReviveInside(L2Character character) { } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PoisonZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PoisonZone.java index fa12afef68..c1ed8f5ae3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PoisonZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2PoisonZone.java @@ -145,19 +145,8 @@ public class L2PoisonZone extends L2ZoneType _enabled = val; } - /* - * protected Collection getCharacterList() { return _characterList.values(); } - */ - class ApplySkill implements Runnable { - // private L2PoisonZone _poisonZone; - - // ApplySkill(/*L2PoisonZone zone*/) - // { - // _poisonZone = zone; - // } - @Override public void run() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ScriptZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ScriptZone.java index 1ae0d1a14d..e4f1d25501 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ScriptZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2ScriptZone.java @@ -49,5 +49,4 @@ public class L2ScriptZone extends L2ZoneType protected void onReviveInside(L2Character character) { } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2SwampZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2SwampZone.java index ad0ff2c445..99a76b836d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2SwampZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2SwampZone.java @@ -84,5 +84,4 @@ public class L2SwampZone extends L2ZoneType public void onReviveInside(L2Character character) { } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2WaterZone.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2WaterZone.java index 08c6104999..5d5cefd721 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2WaterZone.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/zone/type/L2WaterZone.java @@ -44,12 +44,9 @@ public class L2WaterZone extends L2ZoneType else if (character instanceof L2NpcInstance) { final Collection plrs = character.getKnownList().getKnownPlayers().values(); - // synchronized (character.getKnownList().getKnownPlayers()) + for (L2PcInstance player : plrs) { - for (L2PcInstance player : plrs) - { - player.sendPacket(new NpcInfo((L2NpcInstance) character, player)); - } + player.sendPacket(new NpcInfo((L2NpcInstance) character, player)); } } } @@ -72,12 +69,9 @@ public class L2WaterZone extends L2ZoneType else if (character instanceof L2NpcInstance) { Collection plrs = character.getKnownList().getKnownPlayers().values(); - // synchronized (character.getKnownList().getKnownPlayers()) + for (L2PcInstance player : plrs) { - for (L2PcInstance player : plrs) - { - player.sendPacket(new NpcInfo((L2NpcInstance) character, player)); - } + player.sendPacket(new NpcInfo((L2NpcInstance) character, player)); } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java index 71ac9ec972..08b3d28960 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java @@ -468,8 +468,6 @@ public final class L2GameClient extends MMOClient> i public L2PcInstance loadCharFromDisk(int charslot) { - // L2PcInstance character = L2PcInstance.load(getObjectIdForSlot(charslot)); - final int objId = getObjectIdForSlot(charslot); if (objId < 0) { @@ -480,7 +478,6 @@ public final class L2GameClient extends MMOClient> i if (character != null) { // exploit prevention, should not happens in normal way - LOGGER.warning("Attempt of double login: " + character.getName() + "(" + objId + ") " + accountName); if (character.getClient() != null) @@ -501,44 +498,12 @@ public final class L2GameClient extends MMOClient> i } } - - // return null; } character = L2PcInstance.load(objId); - // if(character != null) - // { - // //restoreInventory(character); - // //restoreSkills(character); - // //character.restoreSkills(); - // //restoreShortCuts(character); - // //restoreWarehouse(character); - // - // // preinit some values for each login - // character.setRunning(); // running is default - // character.standUp(); // standing is default - // - // character.refreshOverloaded(); - // character.refreshExpertisePenalty(); - // character.refreshMasteryPenality(); - // character.refreshMasteryWeapPenality(); - // - // character.sendPacket(new UserInfo(character)); - // character.broadcastKarma(); - // character.setOnlineStatus(true); - // } - // if(character == null) - // { - // LOGGER.severe("could not restore in slot: " + charslot); - // } - - // setCharacter(character); return character; } - /** - * @param chars - */ public void setCharSelection(CharSelectInfoPackage[] chars) { _charSlotMapping.clear(); @@ -559,10 +524,6 @@ public final class L2GameClient extends MMOClient> i } } - /** - * @param charslot - * @return - */ private int getObjectIdForSlot(int charslot) { if ((charslot < 0) || (charslot >= _charSlotMapping.size())) @@ -691,10 +652,7 @@ public final class L2GameClient extends MMOClient> i { try { - // // we are going to manually save the char below thus we can force the cancel - // if (_autoSaveInDB != null) - // _autoSaveInDB.cancel(true); - // + // we are going to manually save the char below thus we can force the cancel final L2PcInstance player = activeChar; if (player != null) // this should only happen on connection loss @@ -779,9 +737,7 @@ public final class L2GameClient extends MMOClient> i { try { - // // we are going to manually save the char bellow thus we can force the cancel - // if(_autoSaveInDB != null) - // _autoSaveInDB.cancel(true); + // we are going to manually save the char bellow thus we can force the cancel L2PcInstance player = activeChar; if (player != null) // this should only happen on connection loss @@ -976,7 +932,6 @@ public final class L2GameClient extends MMOClient> i // save last action time _last_received_packet_action_time = System.currentTimeMillis(); - // LOGGER.severe("Client " + toString() + " - updated last action state "+_last_received_packet_action_time); try { @@ -1058,16 +1013,11 @@ public final class L2GameClient extends MMOClient> i public boolean isConnectionAlive() { - // if last received packet time is higher then Config.CHECK_CONNECTION_INACTIVITY_TIME --> check connection if ((System.currentTimeMillis() - _last_received_packet_action_time) > Config.CHECK_CONNECTION_INACTIVITY_TIME) { - _last_received_packet_action_time = System.currentTimeMillis(); - return getConnection().isConnected() && !getConnection().isClosed(); - } - return true; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GamePacketHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GamePacketHandler.java index 313bb18633..4c0d9b3cba 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GamePacketHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GamePacketHandler.java @@ -43,7 +43,6 @@ public final class L2GamePacketHandler implements IPacketHandler, { private static final Logger LOGGER = Logger.getLogger(L2GamePacketHandler.class.getName()); - // implementation @Override public ReceivablePacket handlePacket(ByteBuffer buf, L2GameClient client) { @@ -64,8 +63,6 @@ public final class L2GamePacketHandler implements IPacketHandler, } } - // LOGGER.warning("Packet: " + Integer.toHexString(opcode)); - ReceivablePacket msg = null; GameClientState state = client.getState(); @@ -151,7 +148,7 @@ public final class L2GamePacketHandler implements IPacketHandler, break; } // case 0x02: - // // Say ... not used any more ?? + // Say ... not used any more ?? // break; case 0x03: { @@ -180,7 +177,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x10: { - // // RequestEquipItem ... not used any more, instead "useItem" + // RequestEquipItem ... not used any more, instead "useItem" break; } case 0x11: @@ -285,7 +282,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x28: { - // // RequestDismissPledge + // RequestDismissPledge break; } case 0x29: @@ -389,7 +386,7 @@ public final class L2GamePacketHandler implements IPacketHandler, case 0x41: { msg = new MoveWithDelta(); - // // MoveWithDelta ... unused ?? or only on ship ?? + // MoveWithDelta ... unused ?? or only on ship ?? break; } case 0x42: @@ -429,10 +426,9 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x49: { - // // RequestSEKCustom + // RequestSEKCustom break; } - // THESE ARE NOW TEMPORARY DISABLED case 0x4a: { msg = new StartRotating(); @@ -565,7 +561,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x6a: { - // // Ride + // Ride break; } case 0x6b: // send when talking to trainer npc, to show list of available skills @@ -635,7 +631,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x78: { - // // RequestPrivateStoreList + // RequestPrivateStoreList break; } case 0x79: @@ -645,7 +641,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x7a: { - // // ReviveReply + // ReviveReply break; } case 0x7b: @@ -760,7 +756,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x92: { - // // RequestPrivateStoreBuyManageCancel + // RequestPrivateStoreBuyManageCancel break; } case 0x93: @@ -775,7 +771,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x95: { - // // RequestPrivateStoreBuyList + // RequestPrivateStoreBuyList break; } case 0x96: @@ -785,40 +781,37 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0x97: { - // // SendTimeCheckPacket + // SendTimeCheckPacket break; } case 0x98: { - // // RequestStartAllianceWar + // RequestStartAllianceWar break; } case 0x99: { - // // ReplyStartAllianceWar + // ReplyStartAllianceWar break; } case 0x9a: { - // // RequestStopAllianceWar + // RequestStopAllianceWar break; } case 0x9b: { - // // ReplyStopAllianceWar + // ReplyStopAllianceWar break; } case 0x9c: { - // // RequestSurrenderAllianceWar + // RequestSurrenderAllianceWar break; } case 0x9d: { msg = new RequestSkillCoolTime(); - /* - * if (Config.DEBUG) LOGGER.info("Request Skill Cool Time .. ignored"); msg = null; - */ break; } case 0x9e: @@ -838,7 +831,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0xa1: { - // // RequestCastleSiegeInfo + // RequestCastleSiegeInfo break; } case 0xa2: @@ -863,7 +856,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0xa6: { - // // RequestSetCastleSiegeTime + // RequestSetCastleSiegeTime break; } case 0xa7: @@ -873,7 +866,7 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0xa8: { - // // NetPing + // NetPing break; } case 0xaa: @@ -1039,9 +1032,6 @@ public final class L2GamePacketHandler implements IPacketHandler, } case 0xd0: { - /* - * int id2 = -1; if(buf.remaining() >= 2) { id2 = buf.getShort() & 0xffff; } else { LOGGER.warning("Client: " + client.toString() + " sent a 0xd0 without the second opcode."); break; } - */ if (opcode2 == -1) { LOGGER.warning("Client: " + client + " sent a 0xd0 without the second opcode."); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/SystemMessageId.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/SystemMessageId.java index 624395dd7c..f7c8da332f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/SystemMessageId.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/SystemMessageId.java @@ -5098,9 +5098,7 @@ public enum SystemMessageId * ID: 2028
    * Message: $s1 cannot receive a duel challenge because $s1 is too far away. */ - S1_CANNOT_RECEIVE_A_DUEL_CHALLENGE_BECAUSE_S1_IS_TOO_FAR_AWAY(2028), - - ; + S1_CANNOT_RECEIVE_A_DUEL_CHALLENGE_BECAUSE_S1_IS_TOO_FAR_AWAY(2028); private int _id; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java index d750bf49a9..fb190b571a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/EnterWorld.java @@ -245,7 +245,7 @@ public class EnterWorld extends L2GameClientPacket { if ((temp != null) && temp.isEquipped()) { - temp.getAugmentation().applyBoni(activeChar); + temp.getAugmentation().applyBonus(activeChar); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java index ef7c5e3d0a..0b8c97c787 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/MultiSellChoose.java @@ -304,7 +304,7 @@ public class MultiSellChoose extends L2GameClientPacket { if (inventoryContents[i].isAugmented()) { - inventoryContents[i].getAugmentation().removeBoni(player); + inventoryContents[i].getAugmentation().removeBonus(player); } } @@ -357,7 +357,7 @@ public class MultiSellChoose extends L2GameClientPacket { if (itemToTake.isAugmented()) { - itemToTake.getAugmentation().removeBoni(player); + itemToTake.getAugmentation().removeBonus(player); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java index b60c4fcfda..397ac49396 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java @@ -176,7 +176,7 @@ public final class RequestCrystallizeItem extends L2GameClientPacket { if (itemToRemove.isAugmented()) { - itemToRemove.getAugmentation().removeBoni(activeChar); + itemToRemove.getAugmentation().removeBonus(activeChar); } final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(itemToRemove.getEquipSlot()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java index 90ede898f0..8f4ade5e67 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDestroyItem.java @@ -124,7 +124,7 @@ public final class RequestDestroyItem extends L2GameClientPacket { if (itemToRemove.isAugmented()) { - itemToRemove.getAugmentation().removeBoni(activeChar); + itemToRemove.getAugmentation().removeBonus(activeChar); } final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(itemToRemove.getEquipSlot()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java index 6176ff2298..674720e717 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java @@ -210,7 +210,7 @@ public final class RequestDropItem extends L2GameClientPacket // Remove augementation boni on unequip if (item.isAugmented()) { - item.getAugmentation().removeBoni(activeChar); + item.getAugmentation().removeBonus(activeChar); } final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInBodySlotAndRecord(item.getItem().getBodyPart()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java index 338a006f25..c7a51fb73d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java @@ -704,7 +704,7 @@ public final class RequestEnchantItem extends L2GameClientPacket { if (item.isAugmented()) { - item.getAugmentation().removeBoni(activeChar); + item.getAugmentation().removeBonus(activeChar); } final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestRestart.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestRestart.java index 5674b23a8f..b915b9b8ed 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestRestart.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestRestart.java @@ -168,7 +168,7 @@ public final class RequestRestart extends L2GameClientPacket if ((player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) != null) && player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented()) { - player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getAugmentation().removeBoni(player); + player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getAugmentation().removeBonus(player); } // delete box from the world diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestUnEquipItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestUnEquipItem.java index c99a5e0dbe..8197970412 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestUnEquipItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/RequestUnEquipItem.java @@ -102,7 +102,7 @@ public class RequestUnEquipItem extends L2GameClientPacket // Remove augmentation bonus if ((item != null) && item.isAugmented()) { - item.getAugmentation().removeBoni(activeChar); + item.getAugmentation().removeBonus(activeChar); } final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInBodySlotAndRecord(_slot); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/UseItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/UseItem.java index 4ea9e6ec13..dad237d855 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/UseItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/clientpackets/UseItem.java @@ -474,7 +474,7 @@ public final class UseItem extends L2GameClientPacket // Remove augementation bonus on unequipment if (item.isAugmented()) { - item.getAugmentation().removeBoni(activeChar); + item.getAugmentation().removeBonus(activeChar); } switch (item.getEquipSlot()) @@ -542,7 +542,7 @@ public final class UseItem extends L2GameClientPacket // currently weapons only.. if ((tempItem != null) && tempItem.isAugmented()) { - tempItem.getAugmentation().removeBoni(activeChar); + tempItem.getAugmentation().removeBonus(activeChar); } // check if the item replaces a wear-item @@ -609,7 +609,7 @@ public final class UseItem extends L2GameClientPacket // Apply augementation boni on equip if (item.isAugmented()) { - item.getAugmentation().applyBoni(activeChar); + item.getAugmentation().applyBonus(activeChar); } // Apply cupid's bow skills on equip diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/InventoryUpdate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/InventoryUpdate.java index ff7e262773..765e4ee597 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/InventoryUpdate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/InventoryUpdate.java @@ -163,7 +163,7 @@ public class InventoryUpdate extends L2GameServerPacket writeH(item.getCustomType2()); // Pet name exists or not shown // in // control item - writeD(item.getAugemtationBoni()); + writeD(item.getAugemtationBonus()); writeD(item.getMana()); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EngineInterface.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EngineInterface.java index 5c179ad1e6..145bd5f5e5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EngineInterface.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EngineInterface.java @@ -67,5 +67,4 @@ public interface EngineInterface void addEventDrop(int[] items, int[] count, double chance, DateRange range); void onPlayerLogin(String[] message, DateRange range); - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EventDroplist.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EventDroplist.java index 60f48539b7..5f4b3350cf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EventDroplist.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/EventDroplist.java @@ -26,8 +26,6 @@ import java.util.List; */ public class EventDroplist { - // private static Logger LOGGER = Logger.getLogger(EventDroplist.class); - private static EventDroplist _instance; /** The table containing all DataDrop object */ @@ -97,17 +95,14 @@ public class EventDroplist public List getAllDrops() { final List list = new ArrayList<>(); - for (DateDrop drop : _allNpcDateDrops) { Date currentDate = new Date(); - // LOGGER.info("From: "+drop.from+" To: "+drop.to+" Now: "+ currentDate); if (drop.dateRange.isWithinRange(currentDate)) { list.add(drop); } } - return list; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/Expression.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/Expression.java index 23b1e77a54..acc20d9d2b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/Expression.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/Expression.java @@ -24,9 +24,6 @@ public class Expression { private final ScriptContext _context; - // private final String _lang; - // private final String _code; - public static Object eval(String lang, String code) { try @@ -53,11 +50,11 @@ public class Expression } } - public static Expression create(ScriptContext context/* , String lang, String code */) + public static Expression create(ScriptContext context) { try { - return new Expression(context/* , lang, code */); + return new Expression(context); } catch (Exception e) { @@ -66,11 +63,9 @@ public class Expression } } - private Expression(ScriptContext pContext/* , String pLang, String pCode */) + private Expression(ScriptContext pContext) { _context = pContext; - // _lang = pLang; - // _code = pCode; } public void addDynamicVariable(String name, T value) @@ -96,5 +91,4 @@ public class Expression e.printStackTrace(); } } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ParserFactory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ParserFactory.java index 4f7d8f55ba..e1a11a6d70 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ParserFactory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ParserFactory.java @@ -19,5 +19,4 @@ package com.l2jmobius.gameserver.script; public abstract class ParserFactory { public abstract Parser create(); - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptDocument.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptDocument.java index 495cb0f1d8..c0d2fa1f3d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptDocument.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptDocument.java @@ -90,5 +90,4 @@ public class ScriptDocument { return _name; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptEngine.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptEngine.java index e5903b7046..49494f1220 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptEngine.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/ScriptEngine.java @@ -31,26 +31,22 @@ public class ScriptEngine protected static Parser createParser(String name) throws ParserNotCreatedException { ParserFactory s = parserFactories.get(name); - if (s == null) // shape not found + if (s == null) // Shape not found. { try { Class.forName("com.l2jmobius.gameserver.script." + name); - // By now the static block with no function would - // have been executed if the shape was found. - // the shape is expected to have put its factory - // in the hashtable. + // By now the static block with no function would have been executed if the shape was found. The shape is expected to have put its factory in the hashtable. s = parserFactories.get(name); - if (s == null) // if the shape factory is not there even now + if (s == null) // If the shape factory is not there even now. { throw new ParserNotCreatedException(); } } catch (ClassNotFoundException e) { - // We'll throw an exception to indicate that - // the shape could not be created + // We'll throw an exception to indicate that the shape could not be created. throw new ParserNotCreatedException(); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/faenor/FaenorParser.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/faenor/FaenorParser.java index 9beb39cba5..acdf4fa3e8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/faenor/FaenorParser.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/script/faenor/FaenorParser.java @@ -37,9 +37,6 @@ public abstract class FaenorParser extends Parser protected static FaenorInterface _bridge = FaenorInterface.getInstance(); protected final DateFormat DATE_FORMAT = new SimpleDateFormat("dd MMM yyyy", Locale.US); - /* - * UTILITY FUNCTIONS - */ public static String attribute(Node node, String attributeName) { return attribute(node, attributeName, null); @@ -125,10 +122,6 @@ public abstract class FaenorParser extends Parser return "faenor.Faenor" + name + "Parser"; } - /** - * @param node - * @param context - */ @Override public abstract void parseScript(Node node, ScriptContext context); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/scripting/CompiledScriptCache.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/scripting/CompiledScriptCache.java index 98d160f42b..fd916386e7 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/scripting/CompiledScriptCache.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/scripting/CompiledScriptCache.java @@ -80,7 +80,6 @@ public class CompiledScriptCache implements Serializable isr = new InputStreamReader(fis); buff = new BufferedReader(isr); - // TODO lock file cs = eng.compile(buff); if (cs instanceof Serializable) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Calculator.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Calculator.java index e1ddbf71de..75dca1e803 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Calculator.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Calculator.java @@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.skills.funcs.Func; * Method addFunc and removeFunc permit to add and remove a Func object from a Calculator.
    *
    */ - public final class Calculator { /** Empty Func table definition */ diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Formulas.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Formulas.java index 6a7f316a08..4246902ad4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Formulas.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Formulas.java @@ -63,20 +63,9 @@ import com.l2jmobius.gameserver.util.Util; */ public final class Formulas { - /** Regen Task period */ protected static final Logger LOGGER = Logger.getLogger(L2Character.class.getName()); - private static final int HP_REGENERATE_PERIOD = 3000; // 3 secs - /* - * public static final int MAX_STAT_VALUE = 100; private static final double[] STRCompute = new double[] { 1.036, 34.845 }; //{1.016, 28.515}; for C1 private static final double[] INTCompute = new double[] { 1.020, 31.375 }; //{1.020, 31.375}; for C1 private static final double[] DEXCompute = - * new double[] { 1.009, 19.360 }; //{1.009, 19.360}; for C1 private static final double[] WITCompute = new double[] { 1.050, 20.000 }; //{1.050, 20.000}; for C1 private static final double[] CONCompute = new double[] { 1.030, 27.632 }; //{1.015, 12.488}; for C1 private static final double[] - * MENCompute = new double[] { 1.010, -0.060 }; //{1.010, -0.060}; for C1 protected static final double[] WITbonus = new double[MAX_STAT_VALUE]; protected static final double[] MENbonus = new double[MAX_STAT_VALUE]; protected static final double[] INTbonus = new double[MAX_STAT_VALUE]; protected - * static final double[] STRbonus = new double[MAX_STAT_VALUE]; protected static final double[] DEXbonus = new double[MAX_STAT_VALUE]; protected static final double[] CONbonus = new double[MAX_STAT_VALUE]; // These values are 100% matching retail tables, no need to change and no need add // - * calculation into the stat bonus when accessing (not efficient), // better to have everything precalculated and use values directly (saves CPU) static { for(int i = 0; i < STRbonus.length; i++) { STRbonus[i] = Math.floor(Math.pow(STRCompute[0], i - STRCompute[1]) * 100 + .5d) / 100; } for(int - * i = 0; i < INTbonus.length; i++) { INTbonus[i] = Math.floor(Math.pow(INTCompute[0], i - INTCompute[1]) * 100 + .5d) / 100; } for(int i = 0; i < DEXbonus.length; i++) { DEXbonus[i] = Math.floor(Math.pow(DEXCompute[0], i - DEXCompute[1]) * 100 + .5d) / 100; } for(int i = 0; i < WITbonus.length; - * i++) { WITbonus[i] = Math.floor(Math.pow(WITCompute[0], i - WITCompute[1]) * 100 + .5d) / 100; } for(int i = 0; i < CONbonus.length; i++) { CONbonus[i] = Math.floor(Math.pow(CONCompute[0], i - CONCompute[1]) * 100 + .5d) / 100; } for(int i = 0; i < MENbonus.length; i++) { MENbonus[i] = - * Math.floor(Math.pow(MENCompute[0], i - MENCompute[1]) * 100 + .5d) / 100; } } - */ + private static final int HP_REGENERATE_PERIOD = 3000; // 3 secs static class FuncAddLevel3 extends Func { @@ -414,7 +403,6 @@ public final class Formulas public void calc(Env env) { final int level = env.player.getLevel(); - // [Square(DEX)]*6 + lvl; final L2Character p = env.player; if (p instanceof L2PetInstance) @@ -575,7 +563,6 @@ public final class Formulas @Override public void calc(Env env) { - // L2PcTemplate t = (L2PcTemplate)env._player.getTemplate(); final L2PcInstance pc = (L2PcInstance) env.player; if (pc != null) { @@ -601,7 +588,6 @@ public final class Formulas @Override public void calc(Env env) { - // L2PcTemplate t = (L2PcTemplate)env._player.getTemplate(); final L2PcInstance pc = (L2PcInstance) env.player; if (pc != null) { @@ -627,7 +613,6 @@ public final class Formulas @Override public void calc(Env env) { - // L2PcTemplate t = (L2PcTemplate)env._player.getTemplate(); final L2PcInstance pc = (L2PcInstance) env.player; if (pc != null) { @@ -653,7 +638,6 @@ public final class Formulas @Override public void calc(Env env) { - // L2PcTemplate t = (L2PcTemplate)env._player.getTemplate(); final L2PcInstance pc = (L2PcInstance) env.player; if (pc != null) { @@ -679,7 +663,6 @@ public final class Formulas @Override public void calc(Env env) { - // L2PcTemplate t = (L2PcTemplate)env._player.getTemplate(); final L2PcInstance pc = (L2PcInstance) env.player; if (pc != null) { @@ -705,7 +688,6 @@ public final class Formulas @Override public void calc(Env env) { - // L2PcTemplate t = (L2PcTemplate)env._player.getTemplate(); final L2PcInstance pc = (L2PcInstance) env.player; if (pc != null) { @@ -937,11 +919,6 @@ public final class Formulas return std; } - /* - * // Add the FuncAtkAccuracy to the Standard Calculator of ACCURACY_COMBAT std[Stats.ACCURACY_COMBAT.ordinal()] = new Calculator(); std[Stats.ACCURACY_COMBAT.ordinal()].addFunc(FuncAtkAccuracy.getInstance()); // Add the FuncAtkEvasion to the Standard Calculator of EVASION_RATE - * std[Stats.EVASION_RATE.ordinal()] = new Calculator(); std[Stats.EVASION_RATE.ordinal()].addFunc(FuncAtkEvasion.getInstance()); return std; } - */ - /** * Add basics Func objects to L2PcInstance and L2Summon.
    *
    @@ -1090,7 +1067,6 @@ public final class Formulas } // Add CON bonus - // init *= cha.getLevelMod() * CONbonus[cha.getCON()]; init *= cha.getLevelMod() * BaseStats.CON.calcBonus(cha); } @@ -1297,10 +1273,6 @@ public final class Formulas */ public static double calcBlowDamage(L2Character attacker, L2Character target, L2Skill skill, boolean shld, boolean crit, boolean ss) { - /* - * wtf is this shit -Nefer if((skill.getCondition() & L2Skill.COND_BEHIND) != 0 && !attacker.isBehind(target)) return 0; - */ - double damage = attacker.getPAtk(target); double defence = target.getPDef(attacker); @@ -1330,10 +1302,6 @@ public final class Formulas damage = improvedDamageByCriticalVulnAndAdd; - /* - * damage = attacker.calcStat(Stats.CRITICAL_DAMAGE, (damage+power), target, skill); damage += attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 6.5; damage *= target.calcStat(Stats.CRIT_VULN, target.getTemplate().baseCritVuln, target, skill); - */ - final L2Effect vicious = attacker.getFirstEffect(312); if ((vicious != null) && (damage > 1)) { @@ -1371,9 +1339,6 @@ public final class Formulas } // possible skill power critical hit, based on Official Description: - /* - * skill critical effects (skill damage x2) have been added - */ if (calcCrit(skill.getBaseCritRate() * 10 * BaseStats.DEX.calcBonus(attacker))) { damage *= 2; @@ -1387,10 +1352,6 @@ public final class Formulas damage = attacker.calcStat(Stats.CRITICAL_DAMAGE, damage, target, skill); } - // Multiplier should be removed, it's false ?? - // damage += 1.5 * attacker.calcStat(Stats.CRITICAL_DAMAGE, damage + power, target, skill); - // damage *= (double)attacker.getLevel()/target.getLevel(); - // get the vulnerability for the instance due to skills (buffs, passives, toggles, etc) damage = target.calcStat(Stats.DAGGER_WPN_VULN, damage, target, null); // get the natural vulnerability for the template @@ -1408,11 +1369,8 @@ public final class Formulas damage *= 1.04; } - // Sami: Must be removed, after armor resistances are checked. - // These values are a quick fix to balance dagger gameplay and give - // armor resistances vs dagger. daggerWpnRes could also be used if a skill - // was given to all classes. The values here try to be a compromise. - // They were originally added in a late C4 rev (2289). + // Must be removed, after armor resistances are checked. + // These values are a quick fix to balance dagger gameplay and give armor resistances vs dagger. daggerWpnRes could also be used if a skill was given to all classes. The values here try to be a compromise. They were originally added in a late C4 rev (2289). if (target instanceof L2PcInstance) { final L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); @@ -1619,8 +1577,6 @@ public final class Formulas } damage += (Rnd.nextDouble() * damage) / 10; - // damage += _rnd.nextDouble()* attacker.getRandomDamage(target); - // } if (shld && Config.ALT_GAME_SHIELD_BLOCKS) { damage -= target.getShldDef(); @@ -1809,12 +1765,10 @@ public final class Formulas { if (bss) { - // ((L2Summon)attacker).setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); ssModifier = 4; } else if (ss) { - // ((L2Summon)attacker).setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); ssModifier = 2; } } @@ -1825,12 +1779,10 @@ public final class Formulas { if (bss) { - // weapon.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); ssModifier = 4; } else if (ss) { - // weapon.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); ssModifier = 2; } } @@ -2064,11 +2016,6 @@ public final class Formulas } } } - - // TODO: remove half kill since SYSMsg got changed. - /* - * else if (target instanceof L2Npc) // If is a monster remove first damage and after 50% of current hp target.reduceCurrentHp(target.getCurrentHp() / 2, activeChar, skill); - */ } else { @@ -2102,10 +2049,6 @@ public final class Formulas { return true; } - - // if (target.isCastingNow()&& target.getLastSkillCast() != null) - // if (target.getLastSkillCast().isCancelIfHit()) - // return true; } double init = 0; @@ -2208,10 +2151,6 @@ public final class Formulas */ public static boolean calcHitMiss(L2Character attacker, L2Character target) { - /* - * // OLD FORMULA // accuracy+dexterity => probability to hit in percents int acc_attacker; int evas_target; acc_attacker = attacker.getAccuracy(); evas_target = target.getEvasionRate(attacker); int d = 85 + acc_attacker - evas_target; return d < Rnd.get(100); - */ - int chance = (80 + (2 * (attacker.getAccuracy() - target.getEvasionRate(attacker)))) * 10; // Get additional bonus from the conditions when you are attacking chance *= hitConditionBonus.getConditionBonus(attacker, target); @@ -2287,8 +2226,7 @@ public final class Formulas { double multiplier = 1; // initialize... - // Get the skill type to calculate its effect in function of base stats - // of the L2Character target + // Get the skill type to calculate its effect in function of base stats of the L2Character target if (skill != null) { // first, get the natural template vulnerability values for the target @@ -2482,11 +2420,6 @@ public final class Formulas return multiplier; } - /* - * public double calcSkillStatModifier(SkillType type, L2Character target) { double multiplier = 1; if(type == null) return multiplier; switch(type) { case STUN: case BLEED: multiplier = 2 - Math.sqrt(CONbonus[target.getCON()]); break; case POISON: case SLEEP: case DEBUFF: case WEAKNESS: case - * ERASE: case ROOT: case MUTE: case FEAR: case BETRAY: case CONFUSION: case AGGREDUCE_CHAR: case PARALYZE: multiplier = 2 - Math.sqrt(MENbonus[target.getMEN()]); break; default: return multiplier; } if(multiplier < 0) { multiplier = 0; } return multiplier; } - */ - public static double calcSkillStatModifier(L2Skill skill, L2Character target) { final BaseStats saveVs = skill.getSavevs(); @@ -2631,15 +2564,9 @@ public final class Formulas { ssModifier = 2; } - /* - * // Add Bonus for Sps/SS if(attacker instanceof L2Summon && !(attacker instanceof L2PetInstance)){ if (bss){ ((L2Summon)attacker).setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); ssModifier = 4; }else if(sps){ ((L2Summon)attacker).setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); - * ssModifier = 2; } }else{ L2ItemInstance weapon = attacker.getActiveWeaponInstance(); if(weapon!=null){ if (bss){ weapon.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); ssModifier = 4; }else if (sps){ weapon.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); ssModifier = 2; } } } - */ mAtkModifier = (14 * Math.sqrt(ssModifier * attacker.getMAtk(target, skill))) / mAtkModifier; - } /* - * else{ L2ItemInstance weapon = attacker.getActiveWeaponInstance(); if(weapon!=null){ if(ss){ weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); } } //no soulshots influence over not magic attacks } - */ + } final SkillType type = skill.getSkillType(); @@ -2664,9 +2591,7 @@ public final class Formulas // Resists final double vulnModifier = calcSkillVulnerability(target, skill); - - // double profModifier = calcSkillProficiency(skill, attacker, target); - final double res = vulnModifier/* + profModifier */; + final double res = vulnModifier; double resMod = 1; if (res != 0) { @@ -2768,8 +2693,6 @@ public final class Formulas if (skill.isMagic()) { mAtkModifier = target.getMDef(target, skill); - // if (shld == SHIELD_DEFENSE_SUCCEED) - // mAtkModifier += target.getShldDef(); // Add Bonus for Sps/SS if (bss) @@ -2792,8 +2715,6 @@ public final class Formulas // Resists final double vulnModifier = calcSkillTypeVulnerability(1, target, type); - // double profModifier = calcSkillTypeProficiency(0, attacker, target, type); - final double res = vulnModifier; double resMod = 1; if (res != 0) @@ -2825,12 +2746,6 @@ public final class Formulas rate *= resMod; } - /* - * double res = vulnModifier; double resMod = 1; if (res != 0) { if (res < 0) { resMod = 1 - 0.075 * res; resMod = 1 / resMod; } else resMod = 1 + 0.02 * res; rate *= resMod; } - */ - - // int elementModifier = calcElementModifier(attacker, target, skill); - // rate += elementModifier; // lvl modifier. final int deltamod = calcLvlDependModifier(attacker, target, skill); @@ -3129,12 +3044,10 @@ public final class Formulas { if (bss) { - // ((L2Summon)attacker).setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); ssModifier = 4; } else if (ss) { - // ((L2Summon)attacker).setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); ssModifier = 2; } } @@ -3145,12 +3058,10 @@ public final class Formulas { if (bss) { - // weapon.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); ssModifier = 4; } else if (ss) { - // weapon.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); ssModifier = 2; } } @@ -3192,10 +3103,6 @@ public final class Formulas return restorePercent; } - /* - * public static double getSTRBonus(L2Character activeChar) { return STRbonus[activeChar.getSTR()]; } - */ - public static boolean calcPhysicalSkillEvasion(L2Character target, L2Skill skill) { if (skill.isMagic() || (skill.getCastRange() > 40)) @@ -3219,12 +3126,10 @@ public final class Formulas { if (((L2PcInstance) actor).isMageClass()) { - // val *= INTbonus[actor.getINT()]; val *= BaseStats.INT.calcBonus(actor); } else { - // val *= STRbonus[actor.getSTR()]; val *= BaseStats.STR.calcBonus(actor); } } @@ -3281,7 +3186,6 @@ public final class Formulas if (crit) { - // double cAtkMultiplied = (damage) + attacker.calcStat(Stats.CRITICAL_DAMAGE, damage, target, skill); final double improvedDamageByCriticalVuln = target.calcStat(Stats.CRIT_VULN, damage, target, skill); final double improvedDamageByCriticalVulnAndAdd = (attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, improvedDamageByCriticalVuln, target, skill)); @@ -3294,22 +3198,9 @@ public final class Formulas } damage = improvedDamageByCriticalVulnAndAdd; - - /* - * //Finally retail like formula double cAtkMultiplied = damage+attacker.calcStat(Stats.CRITICAL_DAMAGE, damage, target, skill); double cAtkVuln = target.calcStat(Stats.CRIT_VULN, 1, target, null); double improvedDamageByCriticalMulAndVuln = cAtkMultiplied * cAtkVuln; double - * improvedDamageByCriticalMulAndAdd = improvedDamageByCriticalMulAndVuln + attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill); if(Config.DEBUG){ LOGGER.info("Attacker '"+attacker.getName()+"' Critical Skill Damage Debug:"); LOGGER.info(" - Initial Damage: "+damage); - * LOGGER.info(" - Damage increased of mult: "+cAtkMultiplied); LOGGER.info(" - cAtkVuln Mult: "+cAtkVuln); LOGGER.info(" - improvedDamageByCriticalMulAndVuln: "+improvedDamageByCriticalMulAndVuln); - * LOGGER.info(" - improvedDamageByCriticalMulAndAdd: "+improvedDamageByCriticalMulAndAdd); } damage = improvedDamageByCriticalMulAndAdd; - */ - - /* - * //Finally retail like formula damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * target.calcStat(Stats.CRIT_VULN, 1, target, null) * (56 * damage / defence); //Crit dmg add is almost useless in normal hits... damage += - * (attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 56 / defence); - */ } - if (skill != null) // skill add is not influenced by criticals improvements, - // so it's applied later + if (skill != null) // skill add is not influenced by criticals improvements, so it's applied later { double skillpower = skill.getPower(attacker); final float ssboost = skill.getSSBoost(); @@ -3425,8 +3316,6 @@ public final class Formulas damage *= 1.04; } - // LOGGER.info(" - Final damage: "+damage); - if (shld && Config.ALT_GAME_SHIELD_BLOCKS) { damage -= target.getShldDef(); @@ -3545,5 +3434,4 @@ public final class Formulas return damage; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Stats.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Stats.java index c53175fd3e..313253c7f9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Stats.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/Stats.java @@ -24,9 +24,7 @@ import java.util.NoSuchElementException; */ public enum Stats { - // // Base stats, for each in Calculator a slot is allocated - // // HP & MP MAX_HP("maxHp"), @@ -72,15 +70,11 @@ public enum Stats MAGIC_ATTACK_RANGE("mAtkRange"), POWER_ATTACK_ANGLE("pAtkAngle"), ATTACK_COUNT_MAX("atkCountMax"), - // Run speed, - // walk & escape speed are calculated proportionally, - // magic speed is a buff + // Run speed, walk & escape speed are calculated proportionally, magic speed is a buff RUN_SPEED("runSpd"), WALK_SPEED("walkSpd"), - // // Player-only stats - // STAT_STR("STR"), STAT_CON("CON"), STAT_DEX("DEX"), @@ -88,14 +82,11 @@ public enum Stats STAT_WIT("WIT"), STAT_MEN("MEN"), - // // Special stats, share one slot in Calculator - // // stats of various abilities BREATH("breath"), FALL("fall"), - // AGGRESSION("aggression"), // locks a mob on tank caster BLEED("bleed"), // by daggers, like poison POISON("poison"), // by magic, hp dmg over time diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionElementSeed.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionElementSeed.java index f2680c8208..c989da44bb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionElementSeed.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionElementSeed.java @@ -35,7 +35,6 @@ public class ConditionElementSeed extends Condition public ConditionElementSeed(int[] seeds) { _requiredSeeds = seeds; - // if (Config.DEVELOPER) LOGGER.info("Required seeds: " + _requiredSeeds[0] + ", " + _requiredSeeds[1] + ", " + _requiredSeeds[2]+ ", " + _requiredSeeds[3]+ ", " + _requiredSeeds[4]); } ConditionElementSeed(int fire, int water, int wind, int various, int any) @@ -65,7 +64,6 @@ public class ConditionElementSeed extends Condition } } - // if (Config.DEVELOPER) LOGGER.info("Seeds: " + Seeds[0] + ", " + Seeds[1] + ", " + Seeds[2]); if (_requiredSeeds[3] > 0) { int count = 0; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionLogicOr.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionLogicOr.java index 46023b1392..2b7f3723f4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionLogicOr.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionLogicOr.java @@ -75,5 +75,4 @@ public class ConditionLogicOr extends Condition } return false; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerClassIdRestriction.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerClassIdRestriction.java index 85a9d19f2d..8c8f581fb9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerClassIdRestriction.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerClassIdRestriction.java @@ -37,10 +37,6 @@ public class ConditionPlayerClassIdRestriction extends Condition _classIds = classId; } - /* - * (non-Javadoc) - * @see com.l2jserver.gameserver.skills.conditions.Condition#testImpl(com.l2jserver.gameserver.skills.Env) - */ @Override public boolean testImpl(Env env) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerWeight.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerWeight.java index 48d7f3f465..66b6df8034 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerWeight.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionPlayerWeight.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.skills.Stats; */ public class ConditionPlayerWeight extends Condition { - private final int _weight; /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionUsingItemType.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionUsingItemType.java index f1c9ac481d..88ec9a62df 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionUsingItemType.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/conditions/ConditionUsingItemType.java @@ -42,10 +42,6 @@ public final class ConditionUsingItemType extends Condition _armor = (_mask & (L2ArmorType.MAGIC.mask() | L2ArmorType.LIGHT.mask() | L2ArmorType.HEAVY.mask())) != 0; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.skills.conditions.Condition#testImpl(com.l2jmobius.gameserver.skills.Env) - */ @Override public boolean testImpl(Env env) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBestowSkill.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBestowSkill.java index 4d68b49e4c..9b9bc62299 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBestowSkill.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBestowSkill.java @@ -31,18 +31,12 @@ final class EffectBestowSkill extends L2Effect super(env, template); } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#getEffectType() - */ @Override public EffectType getEffectType() { return EffectType.BUFF; } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onStart() - */ @Override public void onStart() { @@ -53,18 +47,12 @@ final class EffectBestowSkill extends L2Effect } } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onExit() - */ @Override public void onExit() { getEffected().removeSkill(getSkill().getTriggeredId()); } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onActionTime() - */ @Override public boolean onActionTime() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBluff.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBluff.java index 440322e865..334461c38e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBluff.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectBluff.java @@ -51,12 +51,6 @@ public class EffectBluff extends L2Effect return false; } - /* - * @Override public void onExit() { super.onExit(); } - */ - - /** Notify started */ - @Override public void onStart() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCancel.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCancel.java index bfa5effc08..c448b97c7d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCancel.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCancel.java @@ -38,7 +38,6 @@ final class EffectCancel extends L2Effect return EffectType.CANCEL; } - /** Notify started */ @Override public void onStart() { @@ -56,9 +55,9 @@ final class EffectCancel extends L2Effect switch (e.getEffectType()) { case SIGNET_GROUND: - case SIGNET_EFFECT: + case SIGNET_EFFECT: { - continue; + continue; } } @@ -98,7 +97,8 @@ final class EffectCancel extends L2Effect } } } - } else if (getEffector() instanceof L2PcInstance) + } + else if (getEffector() instanceof L2PcInstance) { SystemMessage sm = new SystemMessage(SystemMessageId.S1_WAS_UNAFFECTED_BY_S2); sm.addString(getEffected().getName()); @@ -107,11 +107,9 @@ final class EffectCancel extends L2Effect } } - /** Notify exited */ @Override public void onExit() { - // null } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectChameleonRest.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectChameleonRest.java index 828c422a15..d60a02d823 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectChameleonRest.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectChameleonRest.java @@ -38,7 +38,6 @@ public final class EffectChameleonRest extends L2Effect return EffectType.RELAXING; } - /** Notify started */ @Override public void onStart() { @@ -55,10 +54,6 @@ public final class EffectChameleonRest extends L2Effect } } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Effect#onExit() - */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCharmOfLuck.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCharmOfLuck.java index 241afa07fd..5d23e82da5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCharmOfLuck.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectCharmOfLuck.java @@ -36,7 +36,6 @@ public class EffectCharmOfLuck extends L2Effect return EffectType.CHARM_OF_LUCK; } - /** Notify started */ @Override public void onStart() { @@ -46,7 +45,6 @@ public class EffectCharmOfLuck extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfuseMob.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfuseMob.java index 6943389da0..04d7a94aa1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfuseMob.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfuseMob.java @@ -43,7 +43,6 @@ final class EffectConfuseMob extends L2Effect return EffectType.CONFUSE_MOB_ONLY; } - /** Notify started */ @Override public void onStart() { @@ -51,7 +50,6 @@ final class EffectConfuseMob extends L2Effect onActionTime(); } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfusion.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfusion.java index 5114d60ff9..6115607c5a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfusion.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectConfusion.java @@ -42,7 +42,6 @@ final class EffectConfusion extends L2Effect return EffectType.CONFUSION; } - /** Notify started */ @Override public void onStart() { @@ -50,7 +49,6 @@ final class EffectConfusion extends L2Effect onActionTime(); } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDamOverTime.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDamOverTime.java index 9237a107c9..0dddad4eb5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDamOverTime.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDamOverTime.java @@ -68,10 +68,7 @@ class EffectDamOverTime extends L2Effect } final boolean awake = !(getEffected() instanceof L2Attackable) && ((getSkill().getTargetType() != SkillTargetType.TARGET_SELF) || !getSkill().isToggle()); - - // getEffected().reduceCurrentHp(damage, getEffector(), awake); getEffected().reduceCurrentHpByDamOverTime(damage, getEffector(), awake, getPeriod()); - return true; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDeflectBuff.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDeflectBuff.java index 415aa63347..07d4afd9b9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDeflectBuff.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectDeflectBuff.java @@ -27,29 +27,17 @@ import com.l2jmobius.gameserver.skills.Env; */ public final class EffectDeflectBuff extends L2Effect { - /** - * @param env - * @param template - */ public EffectDeflectBuff(Env env, EffectTemplate template) { super(env, template); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Effect#getEffectType() - */ @Override public EffectType getEffectType() { return EffectType.PREVENT_BUFF; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Effect#onActionTime() - */ @Override public boolean onActionTime() { @@ -72,10 +60,6 @@ public final class EffectDeflectBuff extends L2Effect return true; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Effect#onStart() - */ @Override public void onStart() { @@ -83,10 +67,6 @@ public final class EffectDeflectBuff extends L2Effect return; } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Effect#onExit() - */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFakeDeath.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFakeDeath.java index 314857f1bc..44050c52e9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFakeDeath.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFakeDeath.java @@ -37,14 +37,12 @@ final class EffectFakeDeath extends L2Effect return EffectType.FAKE_DEATH; } - /** Notify started */ @Override public void onStart() { getEffected().startFakeDeath(); } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFear.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFear.java index 80b03cf599..fd10bb536f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFear.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectFear.java @@ -47,7 +47,6 @@ final class EffectFear extends L2Effect return EffectType.FEAR; } - /** Notify started */ @Override public void onStart() { @@ -63,7 +62,6 @@ final class EffectFear extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectForce.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectForce.java index b7072216e1..550dd34180 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectForce.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectForce.java @@ -85,15 +85,5 @@ public class EffectForce extends L2Effect @Override public void onExit() { - // try - // { - // getEffector().abortCast(); - // if(getEffector().getForceBuff() != null) - // getEffector().getForceBuff().delete(); - // } - // catch(Exception e) - // { - // null - // } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImmobileUntilAttacked.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImmobileUntilAttacked.java index afb330eb7a..0d62e16ee1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImmobileUntilAttacked.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImmobileUntilAttacked.java @@ -47,8 +47,6 @@ public class EffectImmobileUntilAttacked extends L2Effect return false; } - /** Notify exited */ - @Override public void onExit() { @@ -56,8 +54,6 @@ public class EffectImmobileUntilAttacked extends L2Effect getEffected().stopImmobileUntilAttacked(this); } - /** Notify started */ - @Override public void onStart() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobileBuff.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobileBuff.java index 6600aae7bc..23a4609cf3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobileBuff.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobileBuff.java @@ -35,14 +35,12 @@ final class EffectImobileBuff extends L2Effect return EffectType.BUFF; } - /** Notify started */ @Override public void onStart() { getEffector().setIsImobilised(true); } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobilePetBuff.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobilePetBuff.java index 921e5159ac..fb18e314cb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobilePetBuff.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectImobilePetBuff.java @@ -39,7 +39,6 @@ final class EffectImobilePetBuff extends L2Effect return EffectType.BUFF; } - /** Notify started */ @Override public void onStart() { @@ -52,7 +51,6 @@ final class EffectImobilePetBuff extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectInterrupt.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectInterrupt.java index 8041f7af55..ebfb930d6e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectInterrupt.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectInterrupt.java @@ -45,13 +45,11 @@ public class EffectInterrupt extends L2Effect @Override public void onExit() { - // nothing } @Override public boolean onActionTime() { - // nothing return false; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNegate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNegate.java index 4643196d86..6b34c2059f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNegate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNegate.java @@ -71,7 +71,6 @@ public class EffectNegate extends L2Effect } catch (Exception e) { - // } if (type != null) @@ -94,7 +93,6 @@ public class EffectNegate extends L2Effect } catch (Exception e) { - // } if (type != null) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNoblesseBless.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNoblesseBless.java index 5049c47c29..6550137819 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNoblesseBless.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectNoblesseBless.java @@ -36,7 +36,6 @@ final class EffectNoblesseBless extends L2Effect return EffectType.NOBLESSE_BLESSING; } - /** Notify started */ @Override public void onStart() { @@ -46,7 +45,6 @@ final class EffectNoblesseBless extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPetrification.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPetrification.java index a195e94acb..2f9ac1e4f4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPetrification.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPetrification.java @@ -37,8 +37,6 @@ public class EffectPetrification extends L2Effect public void onStart() { getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2); - // getEffected().setIsParalyzed(true); - // getEffected().setIsInvul(true); getEffected().setPetrified(true); } @@ -46,8 +44,6 @@ public class EffectPetrification extends L2Effect public void onExit() { getEffected().stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2); - // getEffected().setIsParalyzed(false); - // getEffected().setIsInvul(false); getEffected().setPetrified(false); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPhoenixBless.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPhoenixBless.java index a34e0178fc..aca4b190b5 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPhoenixBless.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectPhoenixBless.java @@ -36,7 +36,6 @@ final class EffectPhoenixBless extends L2Effect return EffectType.PHOENIX_BLESSING; } - /** Notify started */ @Override public void onStart() { @@ -46,7 +45,6 @@ final class EffectPhoenixBless extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectProtectionBlessing.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectProtectionBlessing.java index b82376c1d2..97a5970b01 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectProtectionBlessing.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectProtectionBlessing.java @@ -36,7 +36,6 @@ public class EffectProtectionBlessing extends L2Effect return EffectType.PROTECTION_BLESSING; } - /** Notify started */ @Override public void onStart() { @@ -46,7 +45,6 @@ public class EffectProtectionBlessing extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRelax.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRelax.java index b8490e701b..eac0f60a84 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRelax.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRelax.java @@ -36,7 +36,6 @@ class EffectRelax extends L2Effect return EffectType.RELAXING; } - /** Notify started */ @Override public void onStart() { @@ -52,10 +51,6 @@ class EffectRelax extends L2Effect super.onStart(); } - /* - * (non-Javadoc) - * @see com.l2jmobius.gameserver.model.L2Effect#onExit() - */ @Override public void onExit() { @@ -87,8 +82,6 @@ class EffectRelax extends L2Effect final SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); sm.addString("Fully rested. Effect of " + getSkill().getName() + " has been removed."); getEffected().sendPacket(sm); - // if (getEffected() instanceof L2PcInstance) - // ((L2PcInstance)getEffected()).standUp(); retval = false; } } @@ -101,8 +94,6 @@ class EffectRelax extends L2Effect { final SystemMessage sm = new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP); getEffected().sendPacket(sm); - // if (getEffected() instanceof L2PcInstance) - // ((L2PcInstance)getEffected()).standUp(); retval = false; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRemoveTarget.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRemoveTarget.java index c13bd4671e..3f9ad8edbc 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRemoveTarget.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRemoveTarget.java @@ -41,14 +41,9 @@ public class EffectRemoveTarget extends L2Effect @Override public boolean onActionTime() { - // nothing return false; } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onExit() - */ - @Override public void onExit() { @@ -63,9 +58,6 @@ public class EffectRemoveTarget extends L2Effect } } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onStart() - */ @Override public void onStart() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRoot.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRoot.java index d989223e36..9296435d63 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRoot.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectRoot.java @@ -35,14 +35,12 @@ final class EffectRoot extends L2Effect return EffectType.ROOT; } - /** Notify started */ @Override public void onStart() { getEffected().startRooted(); } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignet.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignet.java index 2305ae0271..365ad09fe1 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignet.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignet.java @@ -61,7 +61,6 @@ public final class EffectSignet extends L2Effect @Override public boolean onActionTime() { - // if (getCount() == getTotalCount() - 1) return true; // do nothing first time if (_skill == null) { return true; @@ -95,7 +94,8 @@ public final class EffectSignet extends L2Effect continue; } } - } else if (cha instanceof L2PcInstance) + } + else if (cha instanceof L2PcInstance) { if (((cha.getParty() != null) && (caster.getParty() != null) && cha.getParty().equals(caster.getParty())) || ((((L2PcInstance) cha).getClanId() > 0) && (caster.getClanId() > 0) && (((L2PcInstance) cha).getClanId() == caster.getClanId())) || ((((L2PcInstance) cha).getAllyId() > 0) && (caster.getAllyId() > 0) && (((L2PcInstance) cha).getAllyId() == caster.getAllyId()))) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java index a203e4fb42..f3fbc2a630 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java @@ -48,8 +48,6 @@ public final class EffectSignetMDam extends L2Effect private boolean bss; private boolean sps; - // private SigmetMDAMTask skill_task; - public EffectSignetMDam(Env env, EffectTemplate template) { super(env, template); @@ -99,8 +97,6 @@ public final class EffectSignetMDam extends L2Effect effectPoint.spawnMe(x, y, z); _actor = effectPoint; - - // skill_task = new SigmetMDAMTask(); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSilentMove.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSilentMove.java index 3da2889509..832a0cb239 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSilentMove.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSilentMove.java @@ -31,7 +31,6 @@ final class EffectSilentMove extends L2Effect super(env, template); } - /** Notify started */ @Override public void onStart() { @@ -44,7 +43,6 @@ final class EffectSilentMove extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSleep.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSleep.java index 87f0bbff75..80d53f93c0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSleep.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectSleep.java @@ -35,14 +35,12 @@ final class EffectSleep extends L2Effect return EffectType.SLEEP; } - /** Notify started */ @Override public void onStart() { getEffected().startSleeping(); } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectStun.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectStun.java index 3eec561c83..3bbd9fd5fb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectStun.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectStun.java @@ -35,7 +35,6 @@ final class EffectStun extends L2Effect return EffectType.STUN; } - /** Notify started */ @Override public void onStart() { @@ -45,7 +44,6 @@ final class EffectStun extends L2Effect } } - /** Notify exited */ @Override public void onExit() { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTargetMe.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTargetMe.java index 441e98c813..079708004e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTargetMe.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTargetMe.java @@ -33,18 +33,12 @@ public class EffectTargetMe extends L2Effect super(env, template); } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#getEffectType() - */ @Override public EffectType getEffectType() { return EffectType.TARGET_ME; } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onStart() - */ @Override public void onStart() { @@ -58,8 +52,6 @@ public class EffectTargetMe extends L2Effect if (getEffected().getTarget() != getEffector()) { // Target is different - stop autoattack and break cast - // getEffected().abortAttack(); - // getEffected().abortCast(); getEffected().setTarget(getEffector()); final MyTargetSelected my = new MyTargetSelected(getEffector().getObjectId(), 0); getEffected().sendPacket(my); @@ -69,22 +61,14 @@ public class EffectTargetMe extends L2Effect } } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onExit() - */ @Override public void onExit() { - // nothing } - /** - * @see com.l2jmobius.gameserver.model.L2Effect#onActionTime() - */ @Override public boolean onActionTime() { - // nothing return false; } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTemplate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTemplate.java index c4e1d19753..c797631611 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTemplate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/effects/EffectTemplate.java @@ -92,8 +92,6 @@ public final class EffectTemplate try { final L2Effect effect = (L2Effect) _constructor.newInstance(env, this); - // if (_applayCond != null) - // effect.setCondition(_applayCond); return effect; } catch (IllegalAccessException e) @@ -132,5 +130,4 @@ public final class EffectTemplate funcTemplates = tmp; } } - } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/Func.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/Func.java index fc8318721d..58c2b4e920 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/Func.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/Func.java @@ -78,5 +78,4 @@ public abstract class Func * @param env */ public abstract void calc(Env env); - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncBaseMul.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncBaseMul.java index 8677a812c6..ef621e7a96 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncBaseMul.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncBaseMul.java @@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.skills.Stats; /** * @author ProGramMoS */ - public class FuncBaseMul extends Func { private final Lambda _lambda; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncTemplate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncTemplate.java index d8c034d35d..173f242751 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncTemplate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/FuncTemplate.java @@ -58,8 +58,7 @@ public final class FuncTemplate Stats.class, // stats to update Integer.TYPE, // order of execution Object.class, // owner - Lambda.class - // value for function + Lambda.class, // value for function }); } catch (NoSuchMethodException e) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaCalc.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaCalc.java index 655ea09859..db804c7580 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaCalc.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaCalc.java @@ -60,5 +60,4 @@ public final class LambdaCalc extends Lambda tmp[len] = f; funcs = tmp; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaConst.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaConst.java index ff319f66cb..ea96145fc4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaConst.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaConst.java @@ -35,5 +35,4 @@ public final class LambdaConst extends Lambda { return _value; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaRnd.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaRnd.java index cb00a2369b..b7ea57a401 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaRnd.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaRnd.java @@ -42,5 +42,4 @@ public final class LambdaRnd extends Lambda } return _max.calc(env) * Rnd.nextGaussian(); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaStats.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaStats.java index 2e05035de2..fefe0d6b2a 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaStats.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/funcs/LambdaStats.java @@ -43,40 +43,39 @@ public final class LambdaStats extends Lambda { switch (_stat) { - case PLAYER_LEVEL: + case PLAYER_LEVEL: { if (env.player == null) { return 1; } - return env.player.getLevel(); + return env.player.getLevel(); } - case TARGET_LEVEL: + case TARGET_LEVEL: { if (env.target == null) { return 1; } - return env.target.getLevel(); + return env.target.getLevel(); } - case PLAYER_MAX_HP: + case PLAYER_MAX_HP: { if (env.player == null) { return 1; } - return env.player.getMaxHp(); + return env.player.getMaxHp(); } - case PLAYER_MAX_MP: + case PLAYER_MAX_MP: { if (env.player == null) { return 1; } - return env.player.getMaxMp(); + return env.player.getMaxMp(); } } return 0; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/hitConditionBonus.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/hitConditionBonus.java index 9cd09046f1..deefe0b329 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/hitConditionBonus.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/hitConditionBonus.java @@ -42,8 +42,6 @@ public class hitConditionBonus private static int lowBonus = 0; private static int darkBonus = 0; - // private static int rainBonus = 0; - protected static double getConditionBonus(L2Character attacker, L2Character target) { double mod = 100; @@ -61,8 +59,6 @@ public class hitConditionBonus if (GameTimeController.getInstance().isNowNight()) { mod += darkBonus; - // else if () No rain support yet. - // chance += hitConditionBonus.rainBonus; } // Get side bonus @@ -158,8 +154,6 @@ public class hitConditionBonus break; } } - // else if ("rain".equals(name)) - // rainBonus = bonus; } } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCharge.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCharge.java index e875f4b0c6..6034b24452 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCharge.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCharge.java @@ -93,14 +93,6 @@ public class L2SkillCharge extends L2Skill } getEffects(caster, caster, false, false, false); - // effect self :] - // L2Effect seffect = caster.getEffect(getId()); - // TODO ?? this is always null due to a return in the if block above! - // if (effect != null && seffect.isSelfEffect()) - // { - // Replace old effect with new one. - // seffect.exit(); - // } // cast self effect if any getEffectsSelf(caster); } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillChargeEffect.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillChargeEffect.java index 6a8a1009e7..47c11d00de 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillChargeEffect.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillChargeEffect.java @@ -75,9 +75,6 @@ public class L2SkillChargeEffect extends L2Skill // decrease? effect.numCharges -= getNumCharges(); - // update icons - // activeChar.updateEffectIcons(); - // maybe exit? no charge if (effect.numCharges == 0) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCreateItem.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCreateItem.java index 4761b222e6..725f24007b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCreateItem.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillCreateItem.java @@ -45,9 +45,6 @@ public class L2SkillCreateItem extends L2Skill _randomCount = set.getInteger("random_count", 1); } - /** - * @see com.l2jmobius.gameserver.model.L2Skill#useSkill(com.l2jmobius.gameserver.model.actor.L2Character, com.l2jmobius.gameserver.model.L2Object[]) - */ @Override public void useSkill(L2Character activeChar, L2Object[] targets) { @@ -77,9 +74,6 @@ public class L2SkillCreateItem extends L2Skill public void giveItems(L2PcInstance activeChar, int itemId, int count) { final L2ItemInstance item = new L2ItemInstance(IdFactory.getInstance().getNextId(), itemId); - // if(item == null) - // return; - item.setCount(count); activeChar.getInventory().addItem("Skill", item, activeChar, activeChar); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDefault.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDefault.java index 50f71d5b51..93f1b935a2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDefault.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDefault.java @@ -40,5 +40,4 @@ public class L2SkillDefault extends L2Skill sm.addString("Skill not implemented. Skill ID: " + getId() + " " + getSkillType()); caster.sendPacket(sm); } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDrain.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDrain.java index b9c77d8469..4b4e404309 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDrain.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillDrain.java @@ -69,12 +69,6 @@ public class L2SkillDrain extends L2Skill continue; // No effect on invulnerable chars unless they cast it themselves. } - /* - * L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance(); if(weaponInst != null) { if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } else - * if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) { ss = true; weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE); } } // If there is no weapon equipped, check for an active summon. else if(activeChar instanceof L2Summon) { L2Summon activeSummon = - * (L2Summon) activeChar; if(activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) { bss = true; activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } else if(activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT) { ss = true; - * activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE); } } - */ final boolean mcrit = Formulas.calcMCrit(activeChar.getMCriticalHit(target, this)); final int damage = (int) Formulas.calcMagicDam(activeChar, target, this, sps, bss, mcrit); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillElemental.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillElemental.java index 3e27967207..4f6023a532 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillElemental.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillElemental.java @@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.templates.StatsSet; public class L2SkillElemental extends L2Skill { - private final int[] _seeds; private final boolean _seedAny; @@ -141,6 +140,5 @@ public class L2SkillElemental extends L2Skill { activeChar.removeSps(); } - } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillSeed.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillSeed.java index 88d0654928..c7798ba968 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillSeed.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/skills/l2skills/L2SkillSeed.java @@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.templates.StatsSet; public class L2SkillSeed extends L2Skill { - public L2SkillSeed(StatsSet set) { super(set); @@ -64,9 +63,6 @@ public class L2SkillSeed extends L2Skill if (effect.getEffectType() == L2Effect.EffectType.SEED) { effect.rescheduleEffect(); - /* - * for (int j=0;j= 88) { return _teachInfo.contains(classId.getParent()); @@ -190,17 +189,8 @@ public final class L2NpcTemplate extends L2CharTemplate // add a drop to a given category. If the category does not exist, create it. public void addDropData(L2DropData drop, int categoryType) { - if (drop.isQuestDrop()) + if (!drop.isQuestDrop()) { - // if (_questDrops == null) - // _questDrops = new ArrayList(0); - // _questDrops.add(drop); - } - else - { - // if the category doesn't already exist, create it first - // synchronized (_categories) - // { boolean catExists = false; for (L2DropCategory cat : _categories) { @@ -219,7 +209,6 @@ public final class L2NpcTemplate extends L2CharTemplate cat.addDropData(drop, type.equalsIgnoreCase("L2RaidBoss") || type.equalsIgnoreCase("L2GrandBoss")); _categories.add(cat); } - // } } } @@ -322,10 +311,9 @@ public final class L2NpcTemplate extends L2CharTemplate final Quest[] _quests = _questEvents.get(EventType); final int len = _quests.length; - // if only one registration per npc is allowed for this event type - // then only register this NPC if not already registered for the specified event. - // if a quest allows multiple registrations, then register regardless of count - // In all cases, check if this new registration is replacing an older copy of the SAME quest + // If only one registration per npc is allowed for this event type then only register this NPC if not already registered for the specified event. + // If a quest allows multiple registrations, then register regardless of count. + // In all cases, check if this new registration is replacing an older copy of the SAME quest. if (!EventType.isMultipleRegistrationAllowed()) { if (_quests[0].getName().equals(q.getName())) @@ -339,12 +327,10 @@ public final class L2NpcTemplate extends L2CharTemplate } else { - // be ready to add a new quest to a new copy of the list, with larger size than previously. + // Be ready to add a new quest to a new copy of the list, with larger size than previously. final Quest[] tmp = new Quest[len + 1]; - // loop through the existing quests and copy them to the new list. While doing so, also - // check if this new quest happens to be just a replacement for a previously loaded quest. - // If so, just save the updated reference and do NOT use the new list. Else, add the new - // quest to the end of the new list + // Loop through the existing quests and copy them to the new list. While doing so, also check if this new quest happens to be just a replacement for a previously loaded quest. + // If so, just save the updated reference and do NOT use the new list. Else, add the new quest to the end of the new list. for (int i = 0; i < len; i++) { if (_quests[i].getName().equals(q.getName())) @@ -540,5 +526,4 @@ public final class L2NpcTemplate extends L2CharTemplate { return _custom; } - } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2PcTemplate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2PcTemplate.java index c6876f9965..1d4ed345bf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2PcTemplate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2PcTemplate.java @@ -131,11 +131,6 @@ public class L2PcTemplate extends L2CharTemplate } return 400; - - /* - * Dark Elf Fighter F 380 Dark Elf Fighter M 350 Dark Elf Mystic F 330 Dark Elf Mystic M 300 Dwarf Fighter F 200 Dwarf Fighter M 180 Elf Fighter F 380 Elf Fighter M 350 Elf Mystic F 330 Elf Mystic M 300 Human Fighter F 270 Human Fighter M 250 Human Mystic F 220 Human Mystic M 200 Orc Fighter - * F 220 Orc Fighter M 200 Orc Mystic F 280 Orc Mystic M 250 - */ } public final int getFallHeight() diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2ArmorType.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2ArmorType.java index a4dfa6dcfd..9bbc9baedd 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2ArmorType.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2ArmorType.java @@ -19,7 +19,6 @@ package com.l2jmobius.gameserver.templates.item; /** * Description of Armor Type */ - public enum L2ArmorType { NONE(1, "None"), diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Henna.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Henna.java index 338264996a..39bf4a1514 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Henna.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Henna.java @@ -18,10 +18,6 @@ package com.l2jmobius.gameserver.templates.item; import com.l2jmobius.gameserver.templates.StatsSet; -/** - * This class ... - * @version $Revision$ $Date$ - */ public class L2Henna { public final int symbolId; @@ -56,78 +52,48 @@ public class L2Henna return symbolId; } - /** - * @return - */ public int getDyeId() { return dye; } - /** - * @return - */ public int getPrice() { return price; } - /** - * @return - */ public int getAmountDyeRequire() { return amount; } - /** - * @return - */ public int getStatINT() { return statINT; } - /** - * @return - */ public int getStatSTR() { return statSTR; } - /** - * @return - */ public int getStatCON() { return statCON; } - /** - * @return - */ public int getStatMEM() { return statMEM; } - /** - * @return - */ public int getStatDEX() { return statDEX; } - /** - * @return - */ public int getStatWIT() { return statWIT; } - /** - * @return - */ } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Item.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Item.java index 36dfcf53fa..084bdfcaf3 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Item.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Item.java @@ -726,8 +726,7 @@ public abstract class L2Item { final int len = _funcTemplates.length; final FuncTemplate[] tmp = new FuncTemplate[len + 1]; - // Definition : arraycopy(array source, begins copy at this position of source, array destination, begins copy at this position in dest, - // number of components to be copied) + // Definition : arraycopy(array source, begins copy at this position of source, array destination, begins copy at this position in dest, number of components to be copied) System.arraycopy(_funcTemplates, 0, tmp, 0, len); tmp[len] = f; _funcTemplates = tmp; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Weapon.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Weapon.java index be73985ca4..8fd0cd260d 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Weapon.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/item/L2Weapon.java @@ -373,9 +373,6 @@ public final class L2Weapon extends L2Item return output; } - // return _emptyEffectSet; - // List effects = new ArrayList(); - for (L2Skill skill : _skillsOnCast) { if (trigger.isOffensive() != skill.isOffensive()) @@ -440,9 +437,6 @@ public final class L2Weapon extends L2Item { } } - // if(effects.size() == 0) - // return _emptyEffectSet; - // return effects.toArray(new L2Effect[effects.size()]); return output; } @@ -464,8 +458,7 @@ public final class L2Weapon extends L2Item { final int len = _skillsOnCrit.length; final L2Skill[] tmp = new L2Skill[len + 1]; - // Definition : arraycopy(array source, begins copy at this position of source, array destination, begins copy at this position in dest, - // number of components to be copied) + // Definition : arraycopy(array source, begins copy at this position of source, array destination, begins copy at this position in dest, number of components to be copied) System.arraycopy(_skillsOnCrit, 0, tmp, 0, len); tmp[len] = skill; _skillsOnCrit = tmp; @@ -489,8 +482,7 @@ public final class L2Weapon extends L2Item { final int len = _skillsOnCast.length; final L2Skill[] tmp = new L2Skill[len + 1]; - // Definition : arraycopy(array source, begins copy at this position of source, array destination, begins copy at this position in dest, - // number of components to be copied) + // Definition : arraycopy(array source, begins copy at this position of source, array destination, begins copy at this position in dest, number of components to be copied) System.arraycopy(_skillsOnCast, 0, tmp, 0, len); tmp[len] = skill; _skillsOnCast = tmp; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/LoginServerThread.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/LoginServerThread.java index e7f4401076..26f3be14eb 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/LoginServerThread.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/LoginServerThread.java @@ -426,7 +426,6 @@ public class LoginServerThread extends Thread } catch (InterruptedException e) { - // no need exception LOGGER } } } @@ -497,10 +496,6 @@ public class LoginServerThread extends Thread } } - /* - * public void addGameServerLogin(String account, L2GameClient client) { _accountsInGameServer.put(account, client); } - */ - public boolean addGameServerLogin(String account, L2GameClient client) { final L2GameClient savedClient = _accountsInGameServer.get(account); @@ -731,7 +726,7 @@ public class LoginServerThread extends Thread public int playOkID2; public int loginOkID1; public int loginOkID2; - public int clientKey = -1; // by Azagthtot + public int clientKey = -1; public SessionKey(int loginOK1, int loginOK2, int playOK1, int playOK2) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/daemons/PcPoint.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/daemons/PcPoint.java index 35d9878b96..e01fc58ed4 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/daemons/PcPoint.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/thread/daemons/PcPoint.java @@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; /** * @author ProGramMoS */ - public class PcPoint implements Runnable { Logger LOGGER = Logger.getLogger(PcPoint.class.getName()); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Broadcast.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Broadcast.java index d35e72a9a4..8cc794f187 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Broadcast.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Broadcast.java @@ -27,11 +27,6 @@ import com.l2jmobius.gameserver.network.serverpackets.CharInfo; import com.l2jmobius.gameserver.network.serverpackets.L2GameServerPacket; import com.l2jmobius.gameserver.network.serverpackets.RelationChanged; -/** - * This class ... - * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $ - */ - public final class Broadcast { private static Logger LOGGER = Logger.getLogger(Broadcast.class.getName()); @@ -88,9 +83,7 @@ public final class Broadcast continue; } - /* - * TEMP FIX: If player is not visible don't send packets broadcast to all his KnowList. This will avoid GM detection with l2net and olympiad's crash. We can now find old problems with invisible mode. - */ + // TEMP FIX: If player is not visible don't send packets broadcast to all his KnowList. This will avoid GM detection with l2net and olympiad's crash. We can now find old problems with invisible mode. if ((character instanceof L2PcInstance) && !player.isGM() && (((L2PcInstance) character).getAppearance().getInvisible() || ((L2PcInstance) character).inObserverMode())) { return; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/FloodProtectorAction.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/FloodProtectorAction.java index 9ea87b345b..8416582c1b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/FloodProtectorAction.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/FloodProtectorAction.java @@ -174,14 +174,11 @@ public final class FloodProtectorAction if (command_count == null) { command_count = new AtomicInteger(0); - // received_commands_actions.put(command, command_count); } final int count = command_count.incrementAndGet(); received_commands_actions.put(command, command_count); - // _count.incrementAndGet(); - if (!_punishmentInProgress && (config.PUNISHMENT_LIMIT > 0) && (count >= config.PUNISHMENT_LIMIT) && (config.PUNISHMENT_TYPE != null)) { _punishmentInProgress = true; @@ -257,8 +254,8 @@ public final class FloodProtectorAction long newChatBanTime = 60000; // 1 minute if (activeChar.getPunishLevel() == PunishLevel.CHAT) { - if (activeChar.getPunishTimer() <= (60000 * 3)) - { // if less then 3 minutes (MAX CHAT BAN TIME), add 1 minute + if (activeChar.getPunishTimer() <= (60000 * 3)) // if less then 3 minutes (MAX CHAT BAN TIME), add 1 minute + { newChatBanTime += activeChar.getPunishTimer(); } else diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Locator.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Locator.java index 346be08926..5c111c3a8b 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Locator.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/Locator.java @@ -204,8 +204,7 @@ public final class Locator { return null; } - // couldn't find compiler - try to find tools.jar - // based on java.home setting + // couldn't find compiler - try to find tools.jar based on java.home setting String javaHome = System.getProperty("java.home"); if (javaHome.toLowerCase(Locale.US).endsWith("jre")) { diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MinionList.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MinionList.java index 2d26bcaf78..8e62143acf 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MinionList.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MinionList.java @@ -241,7 +241,6 @@ public class MinionList final int randSpawnLim = 170; int randPlusMin = 1; spawnConstant = Rnd.get(randSpawnLim); - // randomize +/- randPlusMin = Rnd.get(2); if (randPlusMin == 1) { @@ -250,7 +249,6 @@ public class MinionList final int newX = master.getX() + spawnConstant; spawnConstant = Rnd.get(randSpawnLim); - // randomize +/- randPlusMin = Rnd.get(2); if (randPlusMin == 1) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java index 1d6140fedb..b2622e94c0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java @@ -239,8 +239,7 @@ public class MultiSort { final int currValue = getValues().get(i); - // If the current value is equal to the last value, we have at least one - // duplicate that has been outputted already, so continue. + // If the current value is equal to the last value, we have at least one duplicate that has been outputted already, so continue. if (currValue == lastValue) { continue; @@ -249,8 +248,7 @@ public class MultiSort // Set the last value to the current value, to prevent duplication. lastValue = currValue; - // Iterate through each key and match it to its stored integer value, - // then output both sets of data in the correct descending numerical order. + // Iterate through each key and match it to its stored integer value, then output both sets of data in the correct descending numerical order. for (int j = 0; j < getKeys().size(); j++) { final Object currKey = getKeys().get(j);