diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/ISkillHandler.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/ISkillHandler.java index 19f055b182..04bf98c814 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/ISkillHandler.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/ISkillHandler.java @@ -25,7 +25,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; public interface ISkillHandler { /** - * this is the worker method that is called when using an item. + * This is the worker method that is called when using a skill. * @param creature * @param skill * @param targets @@ -33,8 +33,8 @@ public interface ISkillHandler void useSkill(Creature creature, Skill skill, List targets); /** - * this method is called at initialization to register all the item ids automatically - * @return all known itemIds + * This method is called at initialization to register all the skill types automatically. + * @return all known skill types. */ - SkillType[] getSkillIds(); + SkillType[] getSkillTypes(); } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/SkillHandler.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/SkillHandler.java index ef6dc35a31..a15b054aad 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/SkillHandler.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/SkillHandler.java @@ -106,8 +106,7 @@ public class SkillHandler public void registerSkillHandler(ISkillHandler handler) { - final SkillType[] types = handler.getSkillIds(); - for (SkillType t : types) + for (SkillType t : handler.getSkillTypes()) { _datatable.put(t, handler); } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java index 86a86d5b53..6ffa6256e0 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java @@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate; */ public class BalanceLife implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BALANCE_LIFE }; @@ -41,7 +41,7 @@ public class BalanceLife implements ISkillHandler @Override public void useSkill(Creature creature, Skill skill, List targets) { - // check for other effects + // Check for other effects. try { final ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF); @@ -61,13 +61,13 @@ public class BalanceLife implements ISkillHandler { target = (Creature) target2; - // We should not heal if char is dead + // We should not heal if char is dead. if ((target == null) || target.isDead()) { continue; } - // Avoid characters heal inside Baium lair from outside + // Avoid characters heal inside Baium lair from outside. if (((GrandBossManager.getInstance().getZone(creature) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(creature) != null))) { continue; @@ -104,8 +104,8 @@ public class BalanceLife implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java index a659dc38e2..afa88b7df2 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class BeastFeed implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BEAST_FEED }; @@ -52,8 +52,8 @@ public class BeastFeed implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java index 66c423b33e..b9eec78d5f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java @@ -44,7 +44,7 @@ import org.l2jmobius.gameserver.util.Util; */ public class Blow implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BLOW }; @@ -69,7 +69,7 @@ public class Blow implements ISkillHandler continue; } - // Check firstly if target dodges skill + // Check firstly if target dodges skill. final boolean skillIsEvaded = Formulas.calcPhysicalSkillEvasion(target, skill); byte successChance = 0; if (skill.getName().equals("Backstab")) @@ -136,13 +136,13 @@ public class Blow implements ISkillHandler final boolean shld = Formulas.calcShldUse(creature, target); - // Critical hit + // Critical hit. boolean crit = false; - // Critical damage condition is applied for sure if there is skill critical condition + // Critical damage condition is applied for sure if there is skill critical condition. if ((skill.getCondition() & Skill.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 * BaseStat.DEX.calcBonus(creature))) { @@ -152,7 +152,7 @@ public class Blow implements ISkillHandler double damage = Formulas.calcBlowDamage(creature, target, skill, shld, crit, soul); if (skill.getDmgDirectlyToHP() && (target instanceof PlayerInstance)) { - // no vegeange implementation + // No vengeance implementation. final Creature[] ts = { target, @@ -164,13 +164,13 @@ public class Blow implements ISkillHandler final PlayerInstance player = (PlayerInstance) targ; if (!player.isInvul()) { - // Check and calculate transfered damage + // Check and calculate transfered damage. final Summon summon = player.getPet(); if ((summon instanceof SummonInstance) && Util.checkIfInRange(900, player, summon, true)) { int tDmg = ((int) damage * (int) player.getStat().calcStat(Stat.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; @@ -211,7 +211,7 @@ public class Blow implements ISkillHandler smsg.addNumber((int) damage); player.sendPacket(smsg); - // stop if no vengeance, so only target will be effected + // Stop if no vengeance, so only target will be effected. if (!player.vengeanceSkill(skill)) { break; @@ -222,14 +222,14 @@ public class Blow implements ISkillHandler { target.reduceCurrentHp(damage, creature); - // vengeance reflected damage + // Vengeance reflected damage. if (target.vengeanceSkill(skill)) { creature.reduceCurrentHp(damage, target); } } - // Manage attack or cast break of the target (calculating rate, sending message...) + // Manage attack or cast break of the target (calculating rate, sending message...). if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) { target.breakAttack(); @@ -245,7 +245,7 @@ public class Blow implements ISkillHandler } } - // Possibility of a lethal strike + // Possibility of a lethal strike. Formulas.calcLethalHit(creature, target, skill); creature.sendPacket(new PlaySound("skillsound.critical_hit_02")); } @@ -264,7 +264,7 @@ public class Blow implements ISkillHandler return; } - // Self Effect + // Self effect. if (skill.hasSelfEffects()) { final Effect effect = creature.getFirstEffect(skill.getId()); @@ -294,8 +294,8 @@ public class Blow implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java index 681fe620c3..63944447f7 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.gameserver.handler.ISkillHandler; import org.l2jmobius.gameserver.model.Effect; @@ -29,11 +28,9 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; public class Charge implements ISkillHandler { - static Logger LOGGER = Logger.getLogger(Charge.class.getName()); - - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { - /* SkillType.CHARGE */ + // SkillType.CHARGE }; @Override @@ -48,8 +45,8 @@ public class Charge implements ISkillHandler final PlayerInstance target = (PlayerInstance) target1; skill.applyEffects(creature, target, false, false, false); } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -60,8 +57,8 @@ public class Charge implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java index d0b17db217..ab61da5954 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class ClanGate implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.CLAN_GATE }; @@ -65,7 +65,7 @@ public class ClanGate implements ISkillHandler final Castle castle = CastleManager.getInstance().getCastleByOwner(clan); if (player.isCastleLord(castle.getCastleId())) { - // please note clan gate expires in two minutes WHATEVER happens to the clan leader. + // Please note clan gate expires in two minutes WHATEVER happens to the clan leader. ThreadPool.schedule(new RemoveClanGate(castle.getCastleId(), player), skill.getTotalLifeTime()); castle.createClanGate(player.getX(), player.getY(), player.getZ() + 20); player.getClan().broadcastToOnlineMembers(new SystemMessage(SystemMessageId.COURT_MAGICIAN_THE_PORTAL_HAS_BEEN_CREATED)); @@ -104,8 +104,8 @@ public class ClanGate implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java index f7be887613..225bf5162c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java @@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class CombatPointHeal implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.COMBATPOINTHEAL, SkillType.COMBATPOINTPERCENTHEAL @@ -39,7 +39,7 @@ public class CombatPointHeal implements ISkillHandler @Override public void useSkill(Creature creature, Skill skill, List targets) { - // check for other effects + // Check for other effects. try { final ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF); @@ -77,8 +77,8 @@ public class CombatPointHeal implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java index 9e37d30c21..b0cf521429 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java @@ -43,7 +43,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Continuous implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BUFF, SkillType.DEBUFF, @@ -131,19 +131,19 @@ public class Continuous implements ISkillHandler target = creature; } - // Walls and Door should not be buffed + // Walls and doors should not be buffed. if ((target instanceof DoorInstance) && ((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HOT))) { continue; } - // Anti-Buff Protection prevents you from getting buffs by other players + // Anti-Buff Protection prevents you from getting buffs by other players. if ((creature instanceof Playable) && (target != creature) && target.isBuffProtected() && !skill.isHeroSkill() && ((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HEAL_PERCENT) || (skill.getSkillType() == SkillType.FORCE_BUFF) || (skill.getSkillType() == SkillType.MANAHEAL_PERCENT) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.REFLECT))) { continue; } - // Possibility of a lethal strike + // Possibility of a lethal strike. if (!target.isRaid() && (!(target instanceof NpcInstance) || (((NpcInstance) target).getNpcId() != 35062))) { final int chance = Rnd.get(1000); @@ -263,8 +263,8 @@ public class Continuous implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java index f4a30cbc10..5f95f465e5 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java @@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.model.skills.Formulas; */ public class CpDam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.CPDAM }; @@ -82,7 +82,7 @@ public class CpDam implements ISkillHandler final int damage = (int) (target.getCurrentCp() * (1 - skill.getPower())); - // Manage attack or cast break of the target (calculating rate, sending message...) + // Manage attack or cast break of the target (calculating rate, sending message...). if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) { target.breakAttack(); @@ -111,8 +111,8 @@ public class CpDam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java index 1379aafe8b..9596219891 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java @@ -28,7 +28,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId; public class Craft implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.COMMON_CRAFT, SkillType.DWARVEN_CRAFT @@ -45,7 +45,7 @@ public class Craft implements ISkillHandler final PlayerInstance player = (PlayerInstance) creature; if (!player.getFloodProtectors().getManufacture().tryPerformAction("craft")) { - player.sendMessage("You Cannot craft So Fast!"); + player.sendMessage("You cannot craft so fast!"); return; } @@ -58,8 +58,8 @@ public class Craft implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java index 423822c42e..55736117ec 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class DeluxeKey implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.DELUXE_KEY_UNLOCK }; @@ -51,8 +51,8 @@ public class DeluxeKey implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java index 2b5d6af36c..fc91338a2e 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java @@ -55,7 +55,7 @@ public class Disablers implements ISkillHandler { protected static final Logger LOGGER = Logger.getLogger(Disablers.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.STUN, SkillType.ROOT, @@ -86,15 +86,16 @@ public class Disablers implements ISkillHandler final boolean bss = creature.checkBss(); final boolean sps = creature.checkSps(); final boolean ss = creature.checkSs(); - for (WorldObject target2 : targets) + + for (WorldObject worldObject : targets) { - // Get a target - if (!(target2 instanceof Creature)) + // Get a target. + if (!(worldObject instanceof Creature)) { continue; } - Creature target = (Creature) target2; + Creature target = (Creature) worldObject; if (target.isDead()) { continue; @@ -119,19 +120,19 @@ public class Disablers implements ISkillHandler } case FAKE_DEATH: { - // stun/fakedeath is not mdef dependant, it depends on lvl difference, target CON and power of stun + // Stun/fakedeath is not mdef dependant, it depends on lvl difference, target CON and power of stun. skill.applyEffects(creature, target, ss, sps, bss); break; } case STUN: { - // Calculate skill evasion + // Calculate skill evasion. if (Formulas.calcPhysicalSkillEvasion(target, skill)) { creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_ATTACK_HAS_FAILED)); break; } - // Calculate vengeance + // Calculate vengeance. if (target.vengeanceSkill(skill)) { target = creature; @@ -158,7 +159,7 @@ public class Disablers implements ISkillHandler break; } case SLEEP: - case PARALYZE: // use same as root for now + case PARALYZE: // Use same as root for now. { if (target.reflectSkill(skill)) { @@ -199,7 +200,7 @@ public class Disablers implements ISkillHandler } case CONFUSE_MOB_ONLY: { - // do nothing if not on mob + // Do nothing if not on mob. if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss)) { for (Effect effect : target.getAllEffects()) @@ -223,13 +224,13 @@ public class Disablers implements ISkillHandler { target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, creature, (int) ((150 * skill.getPower()) / (target.getLevel() + 7))); } - // TODO [Nemesiss] should this have 100% chance? + // TODO: [Nemesiss] should this have 100% chance? skill.applyEffects(creature, target, ss, sps, bss); break; } case AGGREDUCE: { - // these skills needs to be rechecked + // These skills needs to be rechecked. if (target instanceof Attackable) { skill.applyEffects(creature, target, ss, sps, bss); @@ -247,7 +248,7 @@ public class Disablers implements ISkillHandler } case AGGREDUCE_CHAR: { - // these skills needs to be rechecked + // These skills needs to be rechecked. if (skill.getName().equals("Bluff")) { if (target instanceof Attackable) @@ -292,7 +293,7 @@ public class Disablers implements ISkillHandler } case AGGREMOVE: { - // these skills needs to be rechecked + // These skills needs to be rechecked. if ((target instanceof Attackable) && !target.isRaid()) { if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss)) @@ -332,7 +333,7 @@ public class Disablers implements ISkillHandler case ERASE: { if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss) - // Doesn't affect siege golem, wild hog cannon and Pets + // Doesn't affect siege golem, wild hog cannon and pets. && !(target instanceof SiegeSummonInstance) && !(target instanceof PetInstance)) { PlayerInstance summonOwner = null; @@ -405,7 +406,7 @@ public class Disablers implements ISkillHandler } if (skill.getId() == 1056) { - // If target isInvul (for example Celestial shield) CANCEL doesn't work + // If target isInvul (for example Celestial Shield) CANCEL does not work. if (target.isInvul()) { if (creature instanceof PlayerInstance) @@ -457,7 +458,7 @@ public class Disablers implements ISkillHandler } if ((e.getSkill().getId() != 4082) && (e.getSkill().getId() != 4215) && (e.getSkill().getId() != 5182) && (e.getSkill().getId() != 4515) && (e.getSkill().getId() != 110) && (e.getSkill().getId() != 111) && (e.getSkill().getId() != 1323) && (e.getSkill().getId() != 1325)) - // Cannot cancel skills 4082, 4215, 4515, 110, 111, 1323, 1325 + // Cannot cancel skills 4082, 4215, 4515, 110, 111, 1323, 1325. { if (e.getSkill().getSkillType() != SkillType.BUFF) { @@ -485,13 +486,13 @@ public class Disablers implements ISkillHandler { if (Config.RESTORE_CANCELLED_BUFFS_SECONDS > 0) { - // store them + // Store them. if (!cancelledBuffs.contains(e.getSkill())) { cancelledBuffs.add(e.getSkill()); } } - // cancel them + // Cancel them. e.exit(true); maxfive--; if (maxfive == 0) @@ -579,13 +580,13 @@ public class Disablers implements ISkillHandler case NEGATE: { float negatePower; - if (skill.getId() == 2275) // fishing potion + if (skill.getId() == 2275) // Fishing potion. { negatePower = skill.getNegatePower(); final int negateId = skill.getNegateId(); negateEffect(target, SkillType.BUFF, negatePower, negateId); } - else // all others negate type skills + else // All others negate type skills. { final String[] negateSkillTypes = skill.getNegateSkillTypes(); final String[] negateEffectTypes = skill.getNegateEffectTypes(); @@ -671,14 +672,7 @@ public class Disablers implements ISkillHandler final List tgts = new ArrayList<>(); tgts.add(target); - // try - // { healhandler.useSkill(creature, skill, tgts); - // } - // catch (IOException e) - // { - // LOGGER.warning(e.getMessage()); - // } } } for (String stat : negateEffectTypes) @@ -690,7 +684,6 @@ public class Disablers implements ISkillHandler } catch (Exception e) { - // } if (effectType != null) { @@ -744,7 +737,7 @@ public class Disablers implements ISkillHandler creature.removeSs(); } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -765,9 +758,9 @@ public class Disablers implements ISkillHandler { if (((e.getSkill() != null) && (e.getSkill().getId() == 4215)) || (e.getSkill().getId() == 4515)) { - continue; // skills cannot be removed + continue; // Skills cannot be removed. } - else if (power == -1) // if power is -1 the effect is always removed without power/lvl check ^^ + else if (power == -1) // If power is -1 the effect is always removed without power/lvl check. { if ((e.getSkill().getSkillType() == type) || ((e.getSkill().getEffectType() != null) && (e.getSkill().getEffectType() == type))) { @@ -802,8 +795,8 @@ public class Disablers implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java index 9b0f9da7ef..28d1b2aa74 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.gameserver.handler.ISkillHandler; import org.l2jmobius.gameserver.model.Skill; @@ -30,8 +29,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class DrainSoul implements ISkillHandler { - private static final Logger LOGGER = Logger.getLogger(DrainSoul.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.DRAIN_SOUL }; @@ -50,14 +48,12 @@ public class DrainSoul implements ISkillHandler return; } - 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. } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java index 1e6c48b89d..28bb822cd4 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java @@ -41,7 +41,7 @@ import org.l2jmobius.gameserver.util.Util; public class Fishing implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.FISHING }; @@ -73,7 +73,7 @@ public class Fishing implements ISkillHandler { player.endFishing(false); } - // Cancels fishing + // Cancels fishing. player.sendPacket(SystemMessageId.YOUR_ATTEMPT_AT_FISHING_HAS_BEEN_CANCELLED); return; } @@ -105,7 +105,7 @@ public class Fishing implements ISkillHandler if (player.isInBoat()) { - // You can't fish while you are on boat + // You can't fish while you are on boat. player.sendPacket(SystemMessageId.YOU_CANNOT_FISH_WHILE_RIDING_AS_A_PASSENGER_OF_A_BOAT_IT_S_AGAINST_THE_RULES); return; } @@ -113,7 +113,6 @@ public class Fishing implements ISkillHandler if (player.isCrafting() || player.isInStoreMode()) { player.sendPacket(SystemMessageId.YOU_CANNOT_FISH_WHILE_USING_A_RECIPE_BOOK_PRIVATE_MANUFACTURE_OR_PRIVATE_STORE); - // if(!player.isGM()) return; } @@ -145,7 +144,7 @@ public class Fishing implements ISkillHandler } else { - // You can't fish here + // You can't fish here. player.sendPacket(SystemMessageId.YOU_MUST_PUT_BAIT_ON_YOUR_HOOK_BEFORE_YOU_CAN_FISH); final SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS); sm.addString(skill.getName()); @@ -156,7 +155,7 @@ public class Fishing implements ISkillHandler // 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 + // You can't fish in water. player.sendPacket(SystemMessageId.YOU_CANNOT_FISH_WHILE_UNDER_WATER); return; } @@ -165,13 +164,13 @@ public class Fishing implements ISkillHandler final 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, cast the hook and start fishing. player.startFishing(x, y, z); } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java index 5ce473bf0b..93fc0aaa95 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java @@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class FishingSkill implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.PUMPING, SkillType.REELING @@ -53,12 +53,12 @@ public class FishingSkill implements ISkillHandler { if (skill.getSkillType() == SkillType.PUMPING) { - // Pumping skill is available only while fishing + // Pumping skill is available only while fishing. // player.sendPacket(SystemMessageId.CAN_USE_PUMPING_ONLY_WHILE_FISHING)); } else if (skill.getSkillType() == SkillType.REELING) { - // Reeling skill is available only while fishing + // Reeling skill is available only while fishing. // player.sendPacket(SystemMessageId.CAN_USE_REELING_ONLY_WHILE_FISHING)); } player.sendPacket(ActionFailed.STATIC_PACKET); @@ -99,19 +99,19 @@ 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); } } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java index db960f5dfe..14b4aab496 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation; public class GetPlayer implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.GET_PLAYER }; @@ -59,8 +59,8 @@ public class GetPlayer implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java index 04abd145c4..1a6466c8e7 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; */ public class GiveSp implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.GIVE_SP }; @@ -49,8 +49,8 @@ public class GiveSp implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java index e2fb865935..41c3cda2d3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.Config; import org.l2jmobius.commons.util.Rnd; @@ -41,8 +40,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Harvest implements ISkillHandler { - protected static final Logger LOGGER = Logger.getLogger(Harvest.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.HARVEST }; @@ -95,7 +93,7 @@ public class Harvest implements ISkillHandler { for (Attackable.RewardItem ritem : items) { - cropId = ritem.getItemId(); // always got 1 type of crop as reward + cropId = ritem.getItemId(); // Always got 1 type of crop as reward. if (_player.isInParty()) { _player.getParty().distributeItem(_player, ritem, true, _target); @@ -161,14 +159,14 @@ public class Harvest implements ISkillHandler diff = -diff; } - // apply penalty, target <=> player levels - // 5% penalty for each level + // Apply penalty, target <=> player levels. + // 5% penalty for each level. if (diff > 5) { basicSuccess -= (diff - 5) * 5; } - // success rate cant be less than 1% + // Success rate can't be less than 1%. if (basicSuccess < 1) { basicSuccess = 1; @@ -178,8 +176,8 @@ public class Harvest implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java index 1ce73bbae8..33c218ea80 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java @@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Heal implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.HEAL, SkillType.HEAL_PERCENT, @@ -56,7 +56,7 @@ public class Heal implements ISkillHandler final boolean bss = creature.checkBss(); final boolean sps = creature.checkSps(); - // check for other effects + // Check for other effects. try { final ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF); @@ -78,26 +78,26 @@ public class Heal implements ISkillHandler continue; } - // Avoid players heal inside Baium lair from outside + // Avoid players heal inside Baium lair from outside. if (((GrandBossManager.getInstance().getZone(player) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(creature) != null))) { continue; } - // We should not heal walls and door + // We should not heal walls and door. if (target instanceof DoorInstance) { continue; } - // We should not heal siege flags + // We should not heal siege flags. if ((target instanceof NpcInstance) && (((NpcInstance) target).getNpcId() == 35062)) { creature.getActingPlayer().sendMessage("You cannot heal siege flags!"); continue; } - // Fixed about Infinity Rod skill on Raid Boss and BigBoss + // Fixed about Infinity Rod skill on Raid Boss and BigBoss. if ((skill.getId() == 3598) && ((target instanceof RaidBossInstance) || (target instanceof GrandBossInstance))) { continue; @@ -156,8 +156,8 @@ public class Heal implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java index 72ece8d985..607af3b123 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java @@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class ManaHeal implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.MANAHEAL, SkillType.MANARECHARGE, @@ -99,8 +99,8 @@ public class ManaHeal implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java index 220f7e1ffc..8a62ed5181 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java @@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Manadam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.MANADAM }; @@ -122,8 +122,8 @@ public class Manadam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java index 7b12ce2839..4a60d26c99 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java @@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Mdam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.MDAM, SkillType.DEATHLINK @@ -79,7 +79,7 @@ public class Mdam implements ISkillHandler // target.reduceCurrentHp(damage, activeChar); if (damage > 0) { - // Manage attack or cast break of the target (calculating rate, sending message...) + // Manage attack or cast break of the target (calculating rate, sending message...). if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) { target.breakAttack(); @@ -97,9 +97,9 @@ public class Mdam implements ISkillHandler sm.addSkillName(skill.getId()); creature.sendPacket(sm); } - else if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, false, sps, bss)) // activate attacked effects, if any + else if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, false, sps, bss)) // Activate attacked effects, if any. { - // Like L2OFF must remove the first effect only if the second effect is successful + // Like L2OFF must remove the first effect only if the second effect is successful. target.stopSkillEffects(skill.getId()); skill.applyEffects(creature, target, false, sps, bss); } @@ -125,7 +125,7 @@ public class Mdam implements ISkillHandler creature.removeSps(); } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -142,8 +142,8 @@ public class Mdam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java index fa6b36a54d..5cd5c476c3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java @@ -42,11 +42,11 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Pdam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.PDAM, SkillType.FATALCOUNTER - /* , SkillType.CHARGEDAM */ + // SkillType.CHARGEDAM }; @Override @@ -59,7 +59,7 @@ public class Pdam implements ISkillHandler int damage = 0; - // Calculate targets based on vegeance + // Calculate targets based on vengeance. final List result = new ArrayList<>(); for (WorldObject wo : targets) { @@ -94,7 +94,7 @@ public class Pdam implements ISkillHandler continue; } - // Calculate skill evasion + // Calculate skill evasion. if (Formulas.calcPhysicalSkillEvasion(target, skill)) { creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_ATTACK_HAS_FAILED)); @@ -127,7 +127,7 @@ public class Pdam implements ISkillHandler if (crit) { - damage *= 2; // PDAM Critical damage always 2x and not affected by buffs + damage *= 2; // PDAM Critical damage always 2x and not affected by buffs. } if (damage > 0) @@ -155,9 +155,9 @@ public class Pdam implements ISkillHandler sm.addSkillName(skill.getId()); creature.sendPacket(sm); } - else if (f.calcSkillSuccess(creature, target, skill, soul, false, false)) // activate attacked effects, if any + else if (f.calcSkillSuccess(creature, target, skill, soul, false, false)) // Activate attacked effects, if any. { - // Like L2OFF must remove the first effect if the second effect lands + // Like L2OFF must remove the first effect if the second effect lands. skill.applyEffects(creature, target, ss, sps, bss); final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU); sm.addSkillName(skill.getId()); @@ -172,11 +172,11 @@ public class Pdam implements ISkillHandler } } - // Success of lethal effect + // Success of lethal effect. final int chance = Rnd.get(1000); if ((target != creature) && !target.isRaid() && (chance < skill.getLethalChance1()) && !(target instanceof DoorInstance) && (!(target instanceof NpcInstance) || (((NpcInstance) target).getNpcId() != 35062))) { - // 1st lethal effect activate (cp to 1 or if target is npc then hp to 50%) + // 1st lethal effect activate (cp to 1 or if target is npc then hp to 50%). if ((skill.getLethalChance2() > 0) && (chance >= skill.getLethalChance2())) { if (target instanceof PlayerInstance) @@ -188,7 +188,7 @@ public class Pdam implements ISkillHandler player.reduceCurrentHp(damage, creature); } } - else if (target instanceof MonsterInstance) // If is a monster remove first damage and after 50% of current hp + else if (target instanceof MonsterInstance) // If is a monster remove first damage and after 50% of current hp. { target.reduceCurrentHp(damage, creature); target.reduceCurrentHp(target.getCurrentHp() / 2, creature); @@ -196,14 +196,14 @@ public class Pdam implements ISkillHandler // Half Kill! creature.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 is a monster damage is (CurrentHp - 1) so HP = 1. if (target instanceof NpcInstance) { target.reduceCurrentHp(target.getCurrentHp() - 1, creature); } - else if (target instanceof PlayerInstance) // If is a active player set his HP and CP to 1 + else if (target instanceof PlayerInstance) // If is a active player set his HP and CP to 1. { final PlayerInstance player = (PlayerInstance) target; if (!player.isInvul()) @@ -217,7 +217,7 @@ public class Pdam implements ISkillHandler creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_LETHAL_STRIKE_WAS_SUCCESSFUL)); } } - else if (skill.getDmgDirectlyToHP() || !(creature instanceof Playable)) // Make damage directly to HP + else if (skill.getDmgDirectlyToHP() || !(creature instanceof Playable)) // Make damage directly to HP. { if (target instanceof PlayerInstance) { @@ -279,12 +279,12 @@ public class Pdam implements ISkillHandler target.reduceCurrentHp(damage, creature); } } - else // No - damage + else // No damage. { creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_ATTACK_HAS_FAILED)); } - if ((skill.getId() == 345) || (skill.getId() == 346)) // Sonic Rage or Raging Force + if ((skill.getId() == 345) || (skill.getId() == 346)) // Sonic Rage or Raging Force. { final EffectCharge effect = (EffectCharge) creature.getFirstEffect(Effect.EffectType.CHARGE); if (effect != null) @@ -304,18 +304,18 @@ public class Pdam implements ISkillHandler creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_FORCE_HAS_REACHED_MAXIMUM_CAPACITY)); } } - else if (skill.getId() == 345) // Sonic Rage + else if (skill.getId() == 345) // Sonic Rage. { final Skill dummy = SkillTable.getInstance().getSkill(8, 7); // Lv7 Sonic Focus dummy.applyEffects(creature, creature, ss, sps, bss); } - else if (skill.getId() == 346) // Raging Force + else if (skill.getId() == 346) // Raging Force. { final Skill dummy = SkillTable.getInstance().getSkill(50, 7); // Lv7 Focused Force dummy.applyEffects(creature, creature, ss, sps, bss); } } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -349,8 +349,8 @@ public class Pdam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java index b705fe35d4..85e6403840 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java @@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Recall implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.RECALL }; @@ -55,7 +55,7 @@ public class Recall implements ISkillHandler return; } - // Checks summoner not in siege zone + // Checks summoner not in siege zone. if (creature.isInsideZone(ZoneId.SIEGE)) { ((PlayerInstance) creature).sendMessage("You cannot summon in siege zone."); @@ -167,8 +167,8 @@ public class Recall implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java index d8b627e0c7..5699bb324f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java @@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; public class Resurrect implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.RESURRECT }; @@ -133,8 +133,8 @@ public class Resurrect implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java index 221aa8d1a9..ecf5b6d083 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java @@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.model.zone.ZoneId; */ public class SiegeFlag implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SIEGEFLAG }; @@ -79,7 +79,7 @@ public class SiegeFlag implements ISkillHandler try { - // Spawn a new flag + // Spawn a new flag. final SiegeFlagInstance flag = new SiegeFlagInstance(player, IdManager.getInstance().getNextId(), NpcTable.getInstance().getTemplate(35062)); if (skill.isAdvancedFlag()) { @@ -106,12 +106,6 @@ public class SiegeFlag implements ISkillHandler } } - @Override - public SkillType[] getSkillIds() - { - return SKILL_IDS; - } - /** * Return true if character clan place a flag * @param creature The Creature of the creature placing the flag @@ -224,4 +218,10 @@ public class SiegeFlag implements ISkillHandler return false; } + + @Override + public SkillType[] getSkillTypes() + { + return SKILL_TYPES; + } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java index 48a1366b8f..06835a6d2c 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.ai.CtrlIntention; @@ -39,8 +38,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Sow implements ISkillHandler { - protected static final Logger LOGGER = Logger.getLogger(Sow.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SOW }; @@ -129,7 +127,7 @@ public class Sow implements ISkillHandler _player.getParty().broadcastToPartyMembers(sm); } - // TODO: Mob should not aggro on player, this way doesn't work really nice + // TODO: Mob should not aggro on player, this way doesn't work really nice. _target.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } @@ -148,11 +146,11 @@ public class Sow implements ISkillHandler minlevelSeed = ManorSeedData.getInstance().getSeedMinLevel(_seedId); maxlevelSeed = ManorSeedData.getInstance().getSeedMaxLevel(_seedId); - final int levelPlayer = _player.getLevel(); // Attacker Level - final int levelTarget = _target.getLevel(); // taret Level + final int levelPlayer = _player.getLevel(); // Attacker Level. + final int levelTarget = _target.getLevel(); // Target Level. - // 5% decrease in chance if player level - // is more then +/- 5 levels to _seed's_ level + // 5% decrease in chance if player level. + // Is more then +/- 5 levels to _seed's level. if (levelTarget < minlevelSeed) { basicSuccess -= 5; @@ -162,8 +160,8 @@ public class Sow implements ISkillHandler basicSuccess -= 5; } - // 5% decrease in chance if player level - // is more than +/- 5 levels to _target's_ level + // 5% decrease in chance if player level. + // Is more than +/- 5 levels to _target's level. int diff = (levelPlayer - levelTarget); if (diff < 0) { @@ -175,7 +173,7 @@ public class Sow implements ISkillHandler basicSuccess -= 5 * (diff - 5); } - // chance can't be less than 1% + // Chance can't be less than 1%. if (basicSuccess < 1) { basicSuccess = 1; @@ -186,8 +184,8 @@ public class Sow implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java index dcd80102de..8a99395fa9 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Spoil implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SPOIL }; @@ -90,8 +90,8 @@ public class Spoil implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java index 0b7574441c..4c5b6b8d19 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java @@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class StrSiegeAssault implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.STRSIEGEASSAULT }; @@ -90,7 +90,7 @@ public class StrSiegeAssault implements ISkillHandler return; } - // damage calculation + // Damage calculation. int damage = 0; for (WorldObject target2 : targets) { @@ -146,9 +146,9 @@ public class StrSiegeAssault implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } /** diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java index 9fb6b3327f..cb606476c1 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java @@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.util.Util; public class SummonFriend implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SUMMON_FRIEND }; @@ -92,14 +92,14 @@ public class SummonFriend implements ISkillHandler return; } - // Checks summoner not in siege zone + // Checks summoner not in siege zone. if (activePlayer.isInsideZone(ZoneId.SIEGE)) { activePlayer.sendMessage("You cannot summon in a siege zone."); return; } - // Checks summoner not in arenas, siege zones, jail + // Checks summoner not in arenas, siege zones, jail. if (activePlayer.isInsideZone(ZoneId.PVP)) { activePlayer.sendPacket(SystemMessageId.YOU_CANNOT_SUMMON_DURING_COMBAT); @@ -177,7 +177,7 @@ public class SummonFriend implements ISkillHandler continue; } - // Target cannot be in combat (or dead, but that's checked by TARGET_PARTY) + // Target cannot be in combat (or dead, but that's checked by TARGET_PARTY). if (targetPlayer.isRooted() || targetPlayer.isInCombat()) { final SystemMessage sm = new SystemMessage(SystemMessageId.S1_IS_ENGAGED_IN_COMBAT_AND_CANNOT_BE_SUMMONED); @@ -191,28 +191,28 @@ public class SummonFriend implements ISkillHandler activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); continue; } - // Check for the the target's festival status + // Check for the the target's festival status. if (targetPlayer.isInOlympiadMode()) { activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_SUMMON_PLAYERS_WHO_ARE_CURRENTLY_PARTICIPATING_IN_THE_GRAND_OLYMPIAD)); continue; } - // Check for the the target's festival status + // Check for the the target's festival status. if (targetPlayer.isFestivalParticipant()) { activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); continue; } - // Check for the target's jail status, arenas and siege zones + // Check for the target's jail status, arenas and siege zones. if (targetPlayer.isInsideZone(ZoneId.PVP)) { activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); continue; } - // Requires a Summoning Crystal + // Requires a Summoning Crystal. if ((targetPlayer.getInventory().getItemByItemId(8615) == null) && (skill.getId() != 1429)) // KidZor { activePlayer.sendMessage("Your target cannot be summoned while he hasn't got a Summoning Crystal."); @@ -222,7 +222,7 @@ public class SummonFriend implements ISkillHandler if (!Util.checkIfInRange(0, activePlayer, targetPlayer, false)) { - // Check already summon + // Check already summon. if (!targetPlayer.teleportRequest(activePlayer, skill)) { final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_ALREADY_BEEN_SUMMONED); @@ -231,10 +231,10 @@ public class SummonFriend implements ISkillHandler continue; } - // Summon friend + // Summon friend. if (skill.getId() == 1403) { - // Send message + // Send message. final ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.S1_WISHES_TO_SUMMON_YOU_FROM_S2_DO_YOU_ACCEPT.getId()); confirm.addString(activePlayer.getName()); confirm.addZoneName(activePlayer.getX(), activePlayer.getY(), activePlayer.getZ()); @@ -257,8 +257,8 @@ public class SummonFriend implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java index cdaabcd685..309f5cadf8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java @@ -31,8 +31,9 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class SummonTreasureKey implements ISkillHandler { - static Logger LOGGER = Logger.getLogger(SummonTreasureKey.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final Logger LOGGER = Logger.getLogger(SummonTreasureKey.class.getName()); + + private static final SkillType[] SKILL_TYPES = { SkillType.SUMMON_TREASURE_KEY }; @@ -82,8 +83,8 @@ public class SummonTreasureKey implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java index 56340bdccb..90a89bd1eb 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java @@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Sweep implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SWEEP }; @@ -96,13 +96,13 @@ public class Sweep implements ISkillHandler SystemMessage smsg; if (ritem.getCount() > 1) { - smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S2_S1_S); // earned $s2$s1 + smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S2_S1_S); smsg.addItemName(ritem.getItemId()); smsg.addNumber(ritem.getCount()); } else { - smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); // earned $s1 + smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); smsg.addItemName(ritem.getItemId()); } player.sendPacket(smsg); @@ -126,8 +126,8 @@ public class Sweep implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java index 2304ebd909..784122e6d5 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.util.Util; */ public class TakeCastle implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.TAKECASTLE }; @@ -92,12 +92,6 @@ public class TakeCastle implements ISkillHandler } } - @Override - public SkillType[] getSkillIds() - { - return SKILL_IDS; - } - /** * Return true if character clan place a flag * @param creature The Creature of the creature placing the flag @@ -211,4 +205,10 @@ public class TakeCastle implements ISkillHandler return false; } + + @Override + public SkillType[] getSkillTypes() + { + return SKILL_TYPES; + } } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java index 53266b324f..3491d2d9bb 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java @@ -20,9 +20,9 @@ package org.l2jmobius.gameserver.handler.skillhandlers; * @author programmos TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates */ /* - * public class TakeFort implements ISkillHandler { //private static final Logger LOGGER = Logger.getLogger(TakeFort.class); //private static final SkillType[] SKILL_IDS = { SkillType.TAKEFORT }; public void useSkill(Creature creature, @SuppressWarnings("unused") Skill + * public class TakeFort implements ISkillHandler { //private static final Logger LOGGER = Logger.getLogger(TakeFort.class); //private static final SkillType[] SKILL_TYPES = { SkillType.TAKEFORT }; public void useSkill(Creature creature, @SuppressWarnings("unused") Skill * skill, @SuppressWarnings("unused") WorldObject[] targets) { if (activeChar == null || !(activeChar instanceof PlayerInstance)) return; PlayerInstance player = (PlayerInstance)activeChar; if (player.getClan() == null ) return; Fort fort = FortManager.getInstance().getFort(player); if (fort == null - * || !checkIfOkToCastFlagDisplay(player, fort, true)) return; try { // if(targets[0] instanceof ArtefactInstance) fort.EndOfSiege(player.getClan()); } catch(Exception e) {} } //public SkillType[] getSkillIds() //{ //return SKILL_IDS; //} + * || !checkIfOkToCastFlagDisplay(player, fort, true)) return; try { // if(targets[0] instanceof ArtefactInstance) fort.EndOfSiege(player.getClan()); } catch(Exception e) {} } //public SkillType[] getSkillITypes() //{ //return SKILL_TYPES; //} */ /** * Return true if character clan place a flag
diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java index 98e23aa3dd..b87758135f 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Unlock implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.UNLOCK }; @@ -124,8 +124,8 @@ public class Unlock implements ISkillHandler chestChance = 40; } chestTrapLimit = 10; - } break; + } case 2: { if (skill.getLevel() > 12) @@ -153,8 +153,8 @@ public class Unlock implements ISkillHandler chestChance = 30; } chestTrapLimit = 30; - } break; + } case 3: { if (skill.getLevel() >= 14) @@ -194,8 +194,8 @@ public class Unlock implements ISkillHandler chestChance = 10; } chestTrapLimit = 50; - } break; + } case 4: { if (skill.getLevel() >= 14) @@ -215,8 +215,8 @@ public class Unlock implements ISkillHandler chestChance = 35; } chestTrapLimit = 80; - } break; + } } if (Rnd.get(100) <= chestChance) @@ -243,8 +243,8 @@ public class Unlock implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java index 9195dadbbb..8cc91a18a3 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java @@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; public class ZakenPlayer implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.ZAKENPLAYER }; @@ -121,8 +121,8 @@ public class ZakenPlayer implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java index c3a39ae7d1..a8205a9f28 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java @@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; public class ZakenSelf implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.ZAKENSELF }; @@ -121,8 +121,8 @@ public class ZakenSelf implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/ISkillHandler.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/ISkillHandler.java index 19f055b182..04bf98c814 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/ISkillHandler.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/ISkillHandler.java @@ -25,7 +25,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; public interface ISkillHandler { /** - * this is the worker method that is called when using an item. + * This is the worker method that is called when using a skill. * @param creature * @param skill * @param targets @@ -33,8 +33,8 @@ public interface ISkillHandler void useSkill(Creature creature, Skill skill, List targets); /** - * this method is called at initialization to register all the item ids automatically - * @return all known itemIds + * This method is called at initialization to register all the skill types automatically. + * @return all known skill types. */ - SkillType[] getSkillIds(); + SkillType[] getSkillTypes(); } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/SkillHandler.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/SkillHandler.java index ef6dc35a31..a15b054aad 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/SkillHandler.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/SkillHandler.java @@ -106,8 +106,7 @@ public class SkillHandler public void registerSkillHandler(ISkillHandler handler) { - final SkillType[] types = handler.getSkillIds(); - for (SkillType t : types) + for (SkillType t : handler.getSkillTypes()) { _datatable.put(t, handler); } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java index 09d1e57362..84296f76b5 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BalanceLife.java @@ -34,7 +34,7 @@ import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate; */ public class BalanceLife implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BALANCE_LIFE }; @@ -42,7 +42,7 @@ public class BalanceLife implements ISkillHandler @Override public void useSkill(Creature creature, Skill skill, List targets) { - // check for other effects + // Check for other effects. try { final ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF); @@ -68,19 +68,19 @@ public class BalanceLife implements ISkillHandler { target = (Creature) target2; - // We should not heal if char is dead + // We should not heal if char is dead. if ((target == null) || target.isDead()) { continue; } - // Avoid characters heal inside Baium lair from outside + // Avoid characters heal inside Baium lair from outside. if (((GrandBossManager.getInstance().getZone(creature) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(creature) != null))) { continue; } - // Player holding a cursed weapon can't be healed and can't heal + // Player holding a cursed weapon can't be healed and can't heal. if (target != creature) { if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isCursedWeaponEquiped()) @@ -124,8 +124,8 @@ public class BalanceLife implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java index a659dc38e2..afa88b7df2 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/BeastFeed.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class BeastFeed implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BEAST_FEED }; @@ -52,8 +52,8 @@ public class BeastFeed implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java index 4efe80fda4..525c1c1593 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Blow.java @@ -44,7 +44,7 @@ import org.l2jmobius.gameserver.util.Util; */ public class Blow implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BLOW }; @@ -69,7 +69,7 @@ public class Blow implements ISkillHandler continue; } - // Check firstly if target dodges skill + // Check firstly if target dodges skill. final boolean skillIsEvaded = Formulas.calcPhysicalSkillEvasion(target, skill); byte successChance = 0; if (skill.getName().equals("Backstab")) @@ -136,13 +136,13 @@ public class Blow implements ISkillHandler final boolean shld = Formulas.calcShldUse(creature, target); - // Critical hit + // Critical hit. boolean crit = false; - // Critical damage condition is applied for sure if there is skill critical condition + // Critical damage condition is applied for sure if there is skill critical condition. if ((skill.getCondition() & Skill.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 * BaseStat.DEX.calcBonus(creature))) { @@ -152,7 +152,7 @@ public class Blow implements ISkillHandler double damage = Formulas.calcBlowDamage(creature, target, skill, shld, crit, soul); if (skill.getDmgDirectlyToHP() && (target instanceof PlayerInstance)) { - // no vegeange implementation + // No vengeance implementation. final Creature[] ts = { target, @@ -164,13 +164,13 @@ public class Blow implements ISkillHandler final PlayerInstance player = (PlayerInstance) targ; if (!player.isInvul()) { - // Check and calculate transfered damage + // Check and calculate transfered damage. final Summon summon = player.getPet(); if ((summon instanceof SummonInstance) && Util.checkIfInRange(900, player, summon, true)) { int tDmg = ((int) damage * (int) player.getStat().calcStat(Stat.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; @@ -218,7 +218,7 @@ public class Blow implements ISkillHandler smsg.addNumber((int) damage); player.sendPacket(smsg); - // stop if no vengeance, so only target will be effected + // Stop if no vengeance, so only target will be effected. if (!player.vengeanceSkill(skill)) { break; @@ -229,14 +229,14 @@ public class Blow implements ISkillHandler { target.reduceCurrentHp(damage, creature); - // vengeance reflected damage + // Vengeance reflected damage. if (target.vengeanceSkill(skill)) { creature.reduceCurrentHp(damage, target); } } - // Manage attack or cast break of the target (calculating rate, sending message...) + // Manage attack or cast break of the target (calculating rate, sending message...). if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) { target.breakAttack(); @@ -252,7 +252,7 @@ public class Blow implements ISkillHandler } } - // Possibility of a lethal strike + // Possibility of a lethal strike. Formulas.calcLethalHit(creature, target, skill); creature.sendPacket(new PlaySound("skillsound.critical_hit_02")); } @@ -271,7 +271,7 @@ public class Blow implements ISkillHandler return; } - // Self Effect + // Self effect. if (skill.hasSelfEffects()) { final Effect effect = creature.getFirstEffect(skill.getId()); @@ -301,8 +301,8 @@ public class Blow implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java index 681fe620c3..63944447f7 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Charge.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.gameserver.handler.ISkillHandler; import org.l2jmobius.gameserver.model.Effect; @@ -29,11 +28,9 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; public class Charge implements ISkillHandler { - static Logger LOGGER = Logger.getLogger(Charge.class.getName()); - - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { - /* SkillType.CHARGE */ + // SkillType.CHARGE }; @Override @@ -48,8 +45,8 @@ public class Charge implements ISkillHandler final PlayerInstance target = (PlayerInstance) target1; skill.applyEffects(creature, target, false, false, false); } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -60,8 +57,8 @@ public class Charge implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java index d0b17db217..ab61da5954 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ClanGate.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class ClanGate implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.CLAN_GATE }; @@ -65,7 +65,7 @@ public class ClanGate implements ISkillHandler final Castle castle = CastleManager.getInstance().getCastleByOwner(clan); if (player.isCastleLord(castle.getCastleId())) { - // please note clan gate expires in two minutes WHATEVER happens to the clan leader. + // Please note clan gate expires in two minutes WHATEVER happens to the clan leader. ThreadPool.schedule(new RemoveClanGate(castle.getCastleId(), player), skill.getTotalLifeTime()); castle.createClanGate(player.getX(), player.getY(), player.getZ() + 20); player.getClan().broadcastToOnlineMembers(new SystemMessage(SystemMessageId.COURT_MAGICIAN_THE_PORTAL_HAS_BEEN_CREATED)); @@ -104,8 +104,8 @@ public class ClanGate implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java index f7be887613..225bf5162c 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CombatPointHeal.java @@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class CombatPointHeal implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.COMBATPOINTHEAL, SkillType.COMBATPOINTPERCENTHEAL @@ -39,7 +39,7 @@ public class CombatPointHeal implements ISkillHandler @Override public void useSkill(Creature creature, Skill skill, List targets) { - // check for other effects + // Check for other effects. try { final ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF); @@ -77,8 +77,8 @@ public class CombatPointHeal implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java index 5a9d968a37..ee2a67f7a5 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Continuous.java @@ -44,7 +44,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Continuous implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.BUFF, SkillType.DEBUFF, @@ -132,19 +132,19 @@ public class Continuous implements ISkillHandler target = creature; } - // Walls and Door should not be buffed + // Walls and doors should not be buffed. if ((target instanceof DoorInstance) && ((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HOT))) { continue; } - // Anti-Buff Protection prevents you from getting buffs by other players + // Anti-Buff Protection prevents you from getting buffs by other players. if ((creature instanceof Playable) && (target != creature) && target.isBuffProtected() && !skill.isHeroSkill() && ((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HEAL_PERCENT) || (skill.getSkillType() == SkillType.FORCE_BUFF) || (skill.getSkillType() == SkillType.MANAHEAL_PERCENT) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.REFLECT))) { continue; } - // Player holding a cursed weapon can't be buffed and can't buff + // Player holding a cursed weapon can't be buffed and can't buff. if ((skill.getSkillType() == SkillType.BUFF) && (target != creature)) { if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isCursedWeaponEquiped()) @@ -157,7 +157,7 @@ public class Continuous implements ISkillHandler } } - // Possibility of a lethal strike + // Possibility of a lethal strike. if (!target.isRaid() && (!(target instanceof NpcInstance) || (((NpcInstance) target).getNpcId() != 35062))) { final int chance = Rnd.get(1000); @@ -227,7 +227,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 PlayerInstance) && (player != null) && ((PlayerInstance) target).isInDuel() && ((skill.getSkillType() == SkillType.DEBUFF) || (skill.getSkillType() == SkillType.BUFF)) && (player.getDuelId() == ((PlayerInstance) target).getDuelId())) { final DuelManager dm = DuelManager.getInstance(); @@ -295,8 +295,8 @@ public class Continuous implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java index f4a30cbc10..5f95f465e5 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/CpDam.java @@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.model.skills.Formulas; */ public class CpDam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.CPDAM }; @@ -82,7 +82,7 @@ public class CpDam implements ISkillHandler final int damage = (int) (target.getCurrentCp() * (1 - skill.getPower())); - // Manage attack or cast break of the target (calculating rate, sending message...) + // Manage attack or cast break of the target (calculating rate, sending message...). if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) { target.breakAttack(); @@ -111,8 +111,8 @@ public class CpDam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java index 1379aafe8b..9596219891 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Craft.java @@ -28,7 +28,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId; public class Craft implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.COMMON_CRAFT, SkillType.DWARVEN_CRAFT @@ -45,7 +45,7 @@ public class Craft implements ISkillHandler final PlayerInstance player = (PlayerInstance) creature; if (!player.getFloodProtectors().getManufacture().tryPerformAction("craft")) { - player.sendMessage("You Cannot craft So Fast!"); + player.sendMessage("You cannot craft so fast!"); return; } @@ -58,8 +58,8 @@ public class Craft implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java index 423822c42e..55736117ec 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DeluxeKey.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class DeluxeKey implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.DELUXE_KEY_UNLOCK }; @@ -51,8 +51,8 @@ public class DeluxeKey implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java index 2b5d6af36c..fc91338a2e 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Disablers.java @@ -55,7 +55,7 @@ public class Disablers implements ISkillHandler { protected static final Logger LOGGER = Logger.getLogger(Disablers.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.STUN, SkillType.ROOT, @@ -86,15 +86,16 @@ public class Disablers implements ISkillHandler final boolean bss = creature.checkBss(); final boolean sps = creature.checkSps(); final boolean ss = creature.checkSs(); - for (WorldObject target2 : targets) + + for (WorldObject worldObject : targets) { - // Get a target - if (!(target2 instanceof Creature)) + // Get a target. + if (!(worldObject instanceof Creature)) { continue; } - Creature target = (Creature) target2; + Creature target = (Creature) worldObject; if (target.isDead()) { continue; @@ -119,19 +120,19 @@ public class Disablers implements ISkillHandler } case FAKE_DEATH: { - // stun/fakedeath is not mdef dependant, it depends on lvl difference, target CON and power of stun + // Stun/fakedeath is not mdef dependant, it depends on lvl difference, target CON and power of stun. skill.applyEffects(creature, target, ss, sps, bss); break; } case STUN: { - // Calculate skill evasion + // Calculate skill evasion. if (Formulas.calcPhysicalSkillEvasion(target, skill)) { creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_ATTACK_HAS_FAILED)); break; } - // Calculate vengeance + // Calculate vengeance. if (target.vengeanceSkill(skill)) { target = creature; @@ -158,7 +159,7 @@ public class Disablers implements ISkillHandler break; } case SLEEP: - case PARALYZE: // use same as root for now + case PARALYZE: // Use same as root for now. { if (target.reflectSkill(skill)) { @@ -199,7 +200,7 @@ public class Disablers implements ISkillHandler } case CONFUSE_MOB_ONLY: { - // do nothing if not on mob + // Do nothing if not on mob. if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss)) { for (Effect effect : target.getAllEffects()) @@ -223,13 +224,13 @@ public class Disablers implements ISkillHandler { target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, creature, (int) ((150 * skill.getPower()) / (target.getLevel() + 7))); } - // TODO [Nemesiss] should this have 100% chance? + // TODO: [Nemesiss] should this have 100% chance? skill.applyEffects(creature, target, ss, sps, bss); break; } case AGGREDUCE: { - // these skills needs to be rechecked + // These skills needs to be rechecked. if (target instanceof Attackable) { skill.applyEffects(creature, target, ss, sps, bss); @@ -247,7 +248,7 @@ public class Disablers implements ISkillHandler } case AGGREDUCE_CHAR: { - // these skills needs to be rechecked + // These skills needs to be rechecked. if (skill.getName().equals("Bluff")) { if (target instanceof Attackable) @@ -292,7 +293,7 @@ public class Disablers implements ISkillHandler } case AGGREMOVE: { - // these skills needs to be rechecked + // These skills needs to be rechecked. if ((target instanceof Attackable) && !target.isRaid()) { if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss)) @@ -332,7 +333,7 @@ public class Disablers implements ISkillHandler case ERASE: { if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss) - // Doesn't affect siege golem, wild hog cannon and Pets + // Doesn't affect siege golem, wild hog cannon and pets. && !(target instanceof SiegeSummonInstance) && !(target instanceof PetInstance)) { PlayerInstance summonOwner = null; @@ -405,7 +406,7 @@ public class Disablers implements ISkillHandler } if (skill.getId() == 1056) { - // If target isInvul (for example Celestial shield) CANCEL doesn't work + // If target isInvul (for example Celestial Shield) CANCEL does not work. if (target.isInvul()) { if (creature instanceof PlayerInstance) @@ -457,7 +458,7 @@ public class Disablers implements ISkillHandler } if ((e.getSkill().getId() != 4082) && (e.getSkill().getId() != 4215) && (e.getSkill().getId() != 5182) && (e.getSkill().getId() != 4515) && (e.getSkill().getId() != 110) && (e.getSkill().getId() != 111) && (e.getSkill().getId() != 1323) && (e.getSkill().getId() != 1325)) - // Cannot cancel skills 4082, 4215, 4515, 110, 111, 1323, 1325 + // Cannot cancel skills 4082, 4215, 4515, 110, 111, 1323, 1325. { if (e.getSkill().getSkillType() != SkillType.BUFF) { @@ -485,13 +486,13 @@ public class Disablers implements ISkillHandler { if (Config.RESTORE_CANCELLED_BUFFS_SECONDS > 0) { - // store them + // Store them. if (!cancelledBuffs.contains(e.getSkill())) { cancelledBuffs.add(e.getSkill()); } } - // cancel them + // Cancel them. e.exit(true); maxfive--; if (maxfive == 0) @@ -579,13 +580,13 @@ public class Disablers implements ISkillHandler case NEGATE: { float negatePower; - if (skill.getId() == 2275) // fishing potion + if (skill.getId() == 2275) // Fishing potion. { negatePower = skill.getNegatePower(); final int negateId = skill.getNegateId(); negateEffect(target, SkillType.BUFF, negatePower, negateId); } - else // all others negate type skills + else // All others negate type skills. { final String[] negateSkillTypes = skill.getNegateSkillTypes(); final String[] negateEffectTypes = skill.getNegateEffectTypes(); @@ -671,14 +672,7 @@ public class Disablers implements ISkillHandler final List tgts = new ArrayList<>(); tgts.add(target); - // try - // { healhandler.useSkill(creature, skill, tgts); - // } - // catch (IOException e) - // { - // LOGGER.warning(e.getMessage()); - // } } } for (String stat : negateEffectTypes) @@ -690,7 +684,6 @@ public class Disablers implements ISkillHandler } catch (Exception e) { - // } if (effectType != null) { @@ -744,7 +737,7 @@ public class Disablers implements ISkillHandler creature.removeSs(); } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -765,9 +758,9 @@ public class Disablers implements ISkillHandler { if (((e.getSkill() != null) && (e.getSkill().getId() == 4215)) || (e.getSkill().getId() == 4515)) { - continue; // skills cannot be removed + continue; // Skills cannot be removed. } - else if (power == -1) // if power is -1 the effect is always removed without power/lvl check ^^ + else if (power == -1) // If power is -1 the effect is always removed without power/lvl check. { if ((e.getSkill().getSkillType() == type) || ((e.getSkill().getEffectType() != null) && (e.getSkill().getEffectType() == type))) { @@ -802,8 +795,8 @@ public class Disablers implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java index 9b0f9da7ef..28d1b2aa74 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/DrainSoul.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.gameserver.handler.ISkillHandler; import org.l2jmobius.gameserver.model.Skill; @@ -30,8 +29,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class DrainSoul implements ISkillHandler { - private static final Logger LOGGER = Logger.getLogger(DrainSoul.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.DRAIN_SOUL }; @@ -50,14 +48,12 @@ public class DrainSoul implements ISkillHandler return; } - 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. } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java index 1e6c48b89d..28bb822cd4 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Fishing.java @@ -41,7 +41,7 @@ import org.l2jmobius.gameserver.util.Util; public class Fishing implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.FISHING }; @@ -73,7 +73,7 @@ public class Fishing implements ISkillHandler { player.endFishing(false); } - // Cancels fishing + // Cancels fishing. player.sendPacket(SystemMessageId.YOUR_ATTEMPT_AT_FISHING_HAS_BEEN_CANCELLED); return; } @@ -105,7 +105,7 @@ public class Fishing implements ISkillHandler if (player.isInBoat()) { - // You can't fish while you are on boat + // You can't fish while you are on boat. player.sendPacket(SystemMessageId.YOU_CANNOT_FISH_WHILE_RIDING_AS_A_PASSENGER_OF_A_BOAT_IT_S_AGAINST_THE_RULES); return; } @@ -113,7 +113,6 @@ public class Fishing implements ISkillHandler if (player.isCrafting() || player.isInStoreMode()) { player.sendPacket(SystemMessageId.YOU_CANNOT_FISH_WHILE_USING_A_RECIPE_BOOK_PRIVATE_MANUFACTURE_OR_PRIVATE_STORE); - // if(!player.isGM()) return; } @@ -145,7 +144,7 @@ public class Fishing implements ISkillHandler } else { - // You can't fish here + // You can't fish here. player.sendPacket(SystemMessageId.YOU_MUST_PUT_BAIT_ON_YOUR_HOOK_BEFORE_YOU_CAN_FISH); final SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS); sm.addString(skill.getName()); @@ -156,7 +155,7 @@ public class Fishing implements ISkillHandler // 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 + // You can't fish in water. player.sendPacket(SystemMessageId.YOU_CANNOT_FISH_WHILE_UNDER_WATER); return; } @@ -165,13 +164,13 @@ public class Fishing implements ISkillHandler final 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, cast the hook and start fishing. player.startFishing(x, y, z); } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java index 5ce473bf0b..93fc0aaa95 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/FishingSkill.java @@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class FishingSkill implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.PUMPING, SkillType.REELING @@ -53,12 +53,12 @@ public class FishingSkill implements ISkillHandler { if (skill.getSkillType() == SkillType.PUMPING) { - // Pumping skill is available only while fishing + // Pumping skill is available only while fishing. // player.sendPacket(SystemMessageId.CAN_USE_PUMPING_ONLY_WHILE_FISHING)); } else if (skill.getSkillType() == SkillType.REELING) { - // Reeling skill is available only while fishing + // Reeling skill is available only while fishing. // player.sendPacket(SystemMessageId.CAN_USE_REELING_ONLY_WHILE_FISHING)); } player.sendPacket(ActionFailed.STATIC_PACKET); @@ -99,19 +99,19 @@ 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); } } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java index db960f5dfe..14b4aab496 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GetPlayer.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation; public class GetPlayer implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.GET_PLAYER }; @@ -59,8 +59,8 @@ public class GetPlayer implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java index 04abd145c4..1a6466c8e7 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/GiveSp.java @@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; */ public class GiveSp implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.GIVE_SP }; @@ -49,8 +49,8 @@ public class GiveSp implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java index e2fb865935..41c3cda2d3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Harvest.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.Config; import org.l2jmobius.commons.util.Rnd; @@ -41,8 +40,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Harvest implements ISkillHandler { - protected static final Logger LOGGER = Logger.getLogger(Harvest.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.HARVEST }; @@ -95,7 +93,7 @@ public class Harvest implements ISkillHandler { for (Attackable.RewardItem ritem : items) { - cropId = ritem.getItemId(); // always got 1 type of crop as reward + cropId = ritem.getItemId(); // Always got 1 type of crop as reward. if (_player.isInParty()) { _player.getParty().distributeItem(_player, ritem, true, _target); @@ -161,14 +159,14 @@ public class Harvest implements ISkillHandler diff = -diff; } - // apply penalty, target <=> player levels - // 5% penalty for each level + // Apply penalty, target <=> player levels. + // 5% penalty for each level. if (diff > 5) { basicSuccess -= (diff - 5) * 5; } - // success rate cant be less than 1% + // Success rate can't be less than 1%. if (basicSuccess < 1) { basicSuccess = 1; @@ -178,8 +176,8 @@ public class Harvest implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java index f4a166fb34..39989d7636 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Heal.java @@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Heal implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.HEAL, SkillType.HEAL_PERCENT, @@ -56,7 +56,7 @@ public class Heal implements ISkillHandler final boolean bss = creature.checkBss(); final boolean sps = creature.checkSps(); - // check for other effects + // Check for other effects. try { final ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(SkillType.BUFF); @@ -78,26 +78,26 @@ public class Heal implements ISkillHandler continue; } - // Avoid players heal inside Baium lair from outside + // Avoid players heal inside Baium lair from outside. if (((GrandBossManager.getInstance().getZone(player) == null) && (GrandBossManager.getInstance().getZone(target) != null)) || ((GrandBossManager.getInstance().getZone(target) == null) && (GrandBossManager.getInstance().getZone(creature) != null))) { continue; } - // We should not heal walls and door + // We should not heal walls and door. if (target instanceof DoorInstance) { continue; } - // We should not heal siege flags + // We should not heal siege flags. if ((target instanceof NpcInstance) && (((NpcInstance) target).getNpcId() == 35062)) { creature.getActingPlayer().sendMessage("You cannot heal siege flags!"); continue; } - // Player holding a cursed weapon can't be healed and can't heal + // Player holding a cursed weapon can't be healed and can't heal. if (target != creature) { if ((target instanceof PlayerInstance) && ((PlayerInstance) target).isCursedWeaponEquiped()) @@ -110,7 +110,7 @@ public class Heal implements ISkillHandler } } - // Fixed about Infinity Rod skill on Raid Boss and BigBoss + // Fixed about Infinity Rod skill on Raid Boss and BigBoss. if ((skill.getId() == 3598) && ((target instanceof RaidBossInstance) || (target instanceof GrandBossInstance))) { continue; @@ -169,8 +169,8 @@ public class Heal implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java index 72ece8d985..607af3b123 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ManaHeal.java @@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class ManaHeal implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.MANAHEAL, SkillType.MANARECHARGE, @@ -99,8 +99,8 @@ public class ManaHeal implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java index 606710db0d..2dec2a9a9b 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Manadam.java @@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Manadam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.MANADAM }; @@ -124,8 +124,8 @@ public class Manadam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java index 7b12ce2839..4a60d26c99 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Mdam.java @@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Mdam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.MDAM, SkillType.DEATHLINK @@ -79,7 +79,7 @@ public class Mdam implements ISkillHandler // target.reduceCurrentHp(damage, activeChar); if (damage > 0) { - // Manage attack or cast break of the target (calculating rate, sending message...) + // Manage attack or cast break of the target (calculating rate, sending message...). if (!target.isRaid() && Formulas.calcAtkBreak(target, damage)) { target.breakAttack(); @@ -97,9 +97,9 @@ public class Mdam implements ISkillHandler sm.addSkillName(skill.getId()); creature.sendPacket(sm); } - else if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, false, sps, bss)) // activate attacked effects, if any + else if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, false, sps, bss)) // Activate attacked effects, if any. { - // Like L2OFF must remove the first effect only if the second effect is successful + // Like L2OFF must remove the first effect only if the second effect is successful. target.stopSkillEffects(skill.getId()); skill.applyEffects(creature, target, false, sps, bss); } @@ -125,7 +125,7 @@ public class Mdam implements ISkillHandler creature.removeSps(); } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -142,8 +142,8 @@ public class Mdam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java index 3f3cdc0f17..e591157be3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Pdam.java @@ -43,11 +43,11 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Pdam implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.PDAM, SkillType.FATALCOUNTER - /* , SkillType.CHARGEDAM */ + // SkillType.CHARGEDAM }; @Override @@ -60,7 +60,7 @@ public class Pdam implements ISkillHandler int damage = 0; - // Calculate targets based on vegeance + // Calculate targets based on vengeance. final List result = new ArrayList<>(); for (WorldObject wo : targets) { @@ -95,7 +95,7 @@ public class Pdam implements ISkillHandler continue; } - // Calculate skill evasion + // Calculate skill evasion. if (Formulas.calcPhysicalSkillEvasion(target, skill)) { creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_ATTACK_HAS_FAILED)); @@ -128,7 +128,7 @@ public class Pdam implements ISkillHandler if (crit) { - damage *= 2; // PDAM Critical damage always 2x and not affected by buffs + damage *= 2; // PDAM Critical damage always 2x and not affected by buffs. } if (damage > 0) @@ -156,9 +156,9 @@ public class Pdam implements ISkillHandler sm.addSkillName(skill.getId()); creature.sendPacket(sm); } - else if (f.calcSkillSuccess(creature, target, skill, soul, false, false)) // activate attacked effects, if any + else if (f.calcSkillSuccess(creature, target, skill, soul, false, false)) // Activate attacked effects, if any. { - // Like L2OFF must remove the first effect if the second effect lands + // Like L2OFF must remove the first effect if the second effect lands. skill.applyEffects(creature, target, ss, sps, bss); final SystemMessage sm = new SystemMessage(SystemMessageId.THE_EFFECTS_OF_S1_FLOW_THROUGH_YOU); sm.addSkillName(skill.getId()); @@ -173,11 +173,11 @@ public class Pdam implements ISkillHandler } } - // Success of lethal effect + // Success of lethal effect. final int chance = Rnd.get(1000); if ((target != creature) && !target.isRaid() && (chance < skill.getLethalChance1()) && !(target instanceof DoorInstance) && (!(target instanceof NpcInstance) || (((NpcInstance) target).getNpcId() != 35062))) { - // 1st lethal effect activate (cp to 1 or if target is npc then hp to 50%) + // 1st lethal effect activate (cp to 1 or if target is npc then hp to 50%). if ((skill.getLethalChance2() > 0) && (chance >= skill.getLethalChance2())) { if (target instanceof PlayerInstance) @@ -189,7 +189,7 @@ public class Pdam implements ISkillHandler player.reduceCurrentHp(damage, creature); } } - else if (target instanceof MonsterInstance) // If is a monster remove first damage and after 50% of current hp + else if (target instanceof MonsterInstance) // If is a monster remove first damage and after 50% of current hp. { target.reduceCurrentHp(damage, creature); target.reduceCurrentHp(target.getCurrentHp() / 2, creature); @@ -197,14 +197,14 @@ public class Pdam implements ISkillHandler // Half Kill! creature.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 is a monster damage is (CurrentHp - 1) so HP = 1. if (target instanceof NpcInstance) { target.reduceCurrentHp(target.getCurrentHp() - 1, creature); } - else if (target instanceof PlayerInstance) // If is a active player set his HP and CP to 1 + else if (target instanceof PlayerInstance) // If is a active player set his HP and CP to 1. { final PlayerInstance player = (PlayerInstance) target; if (!player.isInvul()) @@ -218,7 +218,7 @@ public class Pdam implements ISkillHandler creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_LETHAL_STRIKE_WAS_SUCCESSFUL)); } } - else if (skill.getDmgDirectlyToHP() || !(creature instanceof Playable)) // Make damage directly to HP + else if (skill.getDmgDirectlyToHP() || !(creature instanceof Playable)) // Make damage directly to HP. { if (target instanceof PlayerInstance) { @@ -287,12 +287,12 @@ public class Pdam implements ISkillHandler target.reduceCurrentHp(damage, creature); } } - else // No - damage + else // No damage. { creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_ATTACK_HAS_FAILED)); } - if ((skill.getId() == 345) || (skill.getId() == 346)) // Sonic Rage or Raging Force + if ((skill.getId() == 345) || (skill.getId() == 346)) // Sonic Rage or Raging Force. { final EffectCharge effect = (EffectCharge) creature.getFirstEffect(Effect.EffectType.CHARGE); if (effect != null) @@ -313,18 +313,18 @@ public class Pdam implements ISkillHandler creature.sendPacket(new SystemMessage(SystemMessageId.YOUR_FORCE_HAS_REACHED_MAXIMUM_CAPACITY)); } } - else if (skill.getId() == 345) // Sonic Rage + else if (skill.getId() == 345) // Sonic Rage. { final Skill dummy = SkillTable.getInstance().getSkill(8, 7); // Lv7 Sonic Focus dummy.applyEffects(creature, creature, ss, sps, bss); } - else if (skill.getId() == 346) // Raging Force + else if (skill.getId() == 346) // Raging Force. { final Skill dummy = SkillTable.getInstance().getSkill(50, 7); // Lv7 Focused Force dummy.applyEffects(creature, creature, ss, sps, bss); } } - // self Effect :] + // Self effect. final Effect effect = creature.getFirstEffect(skill.getId()); if ((effect != null) && effect.isSelfEffect()) { @@ -358,8 +358,8 @@ public class Pdam implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java index 53d4cdd367..cdea868c37 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Recall.java @@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Recall implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.RECALL }; @@ -55,7 +55,7 @@ public class Recall implements ISkillHandler return; } - // Checks summoner not in siege zone + // Checks summoner not in siege zone. if (creature.isInsideZone(ZoneId.SIEGE)) { ((PlayerInstance) creature).sendMessage("You cannot summon in siege zone."); @@ -173,8 +173,8 @@ public class Recall implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java index d8b627e0c7..5699bb324f 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Resurrect.java @@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; public class Resurrect implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.RESURRECT }; @@ -133,8 +133,8 @@ public class Resurrect implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java index 221aa8d1a9..ecf5b6d083 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SiegeFlag.java @@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.model.zone.ZoneId; */ public class SiegeFlag implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SIEGEFLAG }; @@ -79,7 +79,7 @@ public class SiegeFlag implements ISkillHandler try { - // Spawn a new flag + // Spawn a new flag. final SiegeFlagInstance flag = new SiegeFlagInstance(player, IdManager.getInstance().getNextId(), NpcTable.getInstance().getTemplate(35062)); if (skill.isAdvancedFlag()) { @@ -106,12 +106,6 @@ public class SiegeFlag implements ISkillHandler } } - @Override - public SkillType[] getSkillIds() - { - return SKILL_IDS; - } - /** * Return true if character clan place a flag * @param creature The Creature of the creature placing the flag @@ -224,4 +218,10 @@ public class SiegeFlag implements ISkillHandler return false; } + + @Override + public SkillType[] getSkillTypes() + { + return SKILL_TYPES; + } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java index 48a1366b8f..06835a6d2c 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sow.java @@ -17,7 +17,6 @@ package org.l2jmobius.gameserver.handler.skillhandlers; import java.util.List; -import java.util.logging.Logger; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.ai.CtrlIntention; @@ -39,8 +38,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Sow implements ISkillHandler { - protected static final Logger LOGGER = Logger.getLogger(Sow.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SOW }; @@ -129,7 +127,7 @@ public class Sow implements ISkillHandler _player.getParty().broadcastToPartyMembers(sm); } - // TODO: Mob should not aggro on player, this way doesn't work really nice + // TODO: Mob should not aggro on player, this way doesn't work really nice. _target.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); } } @@ -148,11 +146,11 @@ public class Sow implements ISkillHandler minlevelSeed = ManorSeedData.getInstance().getSeedMinLevel(_seedId); maxlevelSeed = ManorSeedData.getInstance().getSeedMaxLevel(_seedId); - final int levelPlayer = _player.getLevel(); // Attacker Level - final int levelTarget = _target.getLevel(); // taret Level + final int levelPlayer = _player.getLevel(); // Attacker Level. + final int levelTarget = _target.getLevel(); // Target Level. - // 5% decrease in chance if player level - // is more then +/- 5 levels to _seed's_ level + // 5% decrease in chance if player level. + // Is more then +/- 5 levels to _seed's level. if (levelTarget < minlevelSeed) { basicSuccess -= 5; @@ -162,8 +160,8 @@ public class Sow implements ISkillHandler basicSuccess -= 5; } - // 5% decrease in chance if player level - // is more than +/- 5 levels to _target's_ level + // 5% decrease in chance if player level. + // Is more than +/- 5 levels to _target's level. int diff = (levelPlayer - levelTarget); if (diff < 0) { @@ -175,7 +173,7 @@ public class Sow implements ISkillHandler basicSuccess -= 5 * (diff - 5); } - // chance can't be less than 1% + // Chance can't be less than 1%. if (basicSuccess < 1) { basicSuccess = 1; @@ -186,8 +184,8 @@ public class Sow implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java index dcd80102de..8a99395fa9 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Spoil.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Spoil implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SPOIL }; @@ -90,8 +90,8 @@ public class Spoil implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java index 0b7574441c..4c5b6b8d19 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/StrSiegeAssault.java @@ -39,7 +39,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class StrSiegeAssault implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.STRSIEGEASSAULT }; @@ -90,7 +90,7 @@ public class StrSiegeAssault implements ISkillHandler return; } - // damage calculation + // Damage calculation. int damage = 0; for (WorldObject target2 : targets) { @@ -146,9 +146,9 @@ public class StrSiegeAssault implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } /** diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java index 9fb6b3327f..cb606476c1 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonFriend.java @@ -37,7 +37,7 @@ import org.l2jmobius.gameserver.util.Util; public class SummonFriend implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SUMMON_FRIEND }; @@ -92,14 +92,14 @@ public class SummonFriend implements ISkillHandler return; } - // Checks summoner not in siege zone + // Checks summoner not in siege zone. if (activePlayer.isInsideZone(ZoneId.SIEGE)) { activePlayer.sendMessage("You cannot summon in a siege zone."); return; } - // Checks summoner not in arenas, siege zones, jail + // Checks summoner not in arenas, siege zones, jail. if (activePlayer.isInsideZone(ZoneId.PVP)) { activePlayer.sendPacket(SystemMessageId.YOU_CANNOT_SUMMON_DURING_COMBAT); @@ -177,7 +177,7 @@ public class SummonFriend implements ISkillHandler continue; } - // Target cannot be in combat (or dead, but that's checked by TARGET_PARTY) + // Target cannot be in combat (or dead, but that's checked by TARGET_PARTY). if (targetPlayer.isRooted() || targetPlayer.isInCombat()) { final SystemMessage sm = new SystemMessage(SystemMessageId.S1_IS_ENGAGED_IN_COMBAT_AND_CANNOT_BE_SUMMONED); @@ -191,28 +191,28 @@ public class SummonFriend implements ISkillHandler activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); continue; } - // Check for the the target's festival status + // Check for the the target's festival status. if (targetPlayer.isInOlympiadMode()) { activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_SUMMON_PLAYERS_WHO_ARE_CURRENTLY_PARTICIPATING_IN_THE_GRAND_OLYMPIAD)); continue; } - // Check for the the target's festival status + // Check for the the target's festival status. if (targetPlayer.isFestivalParticipant()) { activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); continue; } - // Check for the target's jail status, arenas and siege zones + // Check for the target's jail status, arenas and siege zones. if (targetPlayer.isInsideZone(ZoneId.PVP)) { activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING)); continue; } - // Requires a Summoning Crystal + // Requires a Summoning Crystal. if ((targetPlayer.getInventory().getItemByItemId(8615) == null) && (skill.getId() != 1429)) // KidZor { activePlayer.sendMessage("Your target cannot be summoned while he hasn't got a Summoning Crystal."); @@ -222,7 +222,7 @@ public class SummonFriend implements ISkillHandler if (!Util.checkIfInRange(0, activePlayer, targetPlayer, false)) { - // Check already summon + // Check already summon. if (!targetPlayer.teleportRequest(activePlayer, skill)) { final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_ALREADY_BEEN_SUMMONED); @@ -231,10 +231,10 @@ public class SummonFriend implements ISkillHandler continue; } - // Summon friend + // Summon friend. if (skill.getId() == 1403) { - // Send message + // Send message. final ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.S1_WISHES_TO_SUMMON_YOU_FROM_S2_DO_YOU_ACCEPT.getId()); confirm.addString(activePlayer.getName()); confirm.addZoneName(activePlayer.getX(), activePlayer.getY(), activePlayer.getZ()); @@ -257,8 +257,8 @@ public class SummonFriend implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java index cdaabcd685..309f5cadf8 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/SummonTreasureKey.java @@ -31,8 +31,9 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; */ public class SummonTreasureKey implements ISkillHandler { - static Logger LOGGER = Logger.getLogger(SummonTreasureKey.class.getName()); - private static final SkillType[] SKILL_IDS = + private static final Logger LOGGER = Logger.getLogger(SummonTreasureKey.class.getName()); + + private static final SkillType[] SKILL_TYPES = { SkillType.SUMMON_TREASURE_KEY }; @@ -82,8 +83,8 @@ public class SummonTreasureKey implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java index 56340bdccb..90a89bd1eb 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Sweep.java @@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; */ public class Sweep implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.SWEEP }; @@ -96,13 +96,13 @@ public class Sweep implements ISkillHandler SystemMessage smsg; if (ritem.getCount() > 1) { - smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S2_S1_S); // earned $s2$s1 + smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S2_S1_S); smsg.addItemName(ritem.getItemId()); smsg.addNumber(ritem.getCount()); } else { - smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); // earned $s1 + smsg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); smsg.addItemName(ritem.getItemId()); } player.sendPacket(smsg); @@ -126,8 +126,8 @@ public class Sweep implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java index 2304ebd909..784122e6d5 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeCastle.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.util.Util; */ public class TakeCastle implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.TAKECASTLE }; @@ -92,12 +92,6 @@ public class TakeCastle implements ISkillHandler } } - @Override - public SkillType[] getSkillIds() - { - return SKILL_IDS; - } - /** * Return true if character clan place a flag * @param creature The Creature of the creature placing the flag @@ -211,4 +205,10 @@ public class TakeCastle implements ISkillHandler return false; } + + @Override + public SkillType[] getSkillTypes() + { + return SKILL_TYPES; + } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java index 53266b324f..3491d2d9bb 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/TakeFort.java @@ -20,9 +20,9 @@ package org.l2jmobius.gameserver.handler.skillhandlers; * @author programmos TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates */ /* - * public class TakeFort implements ISkillHandler { //private static final Logger LOGGER = Logger.getLogger(TakeFort.class); //private static final SkillType[] SKILL_IDS = { SkillType.TAKEFORT }; public void useSkill(Creature creature, @SuppressWarnings("unused") Skill + * public class TakeFort implements ISkillHandler { //private static final Logger LOGGER = Logger.getLogger(TakeFort.class); //private static final SkillType[] SKILL_TYPES = { SkillType.TAKEFORT }; public void useSkill(Creature creature, @SuppressWarnings("unused") Skill * skill, @SuppressWarnings("unused") WorldObject[] targets) { if (activeChar == null || !(activeChar instanceof PlayerInstance)) return; PlayerInstance player = (PlayerInstance)activeChar; if (player.getClan() == null ) return; Fort fort = FortManager.getInstance().getFort(player); if (fort == null - * || !checkIfOkToCastFlagDisplay(player, fort, true)) return; try { // if(targets[0] instanceof ArtefactInstance) fort.EndOfSiege(player.getClan()); } catch(Exception e) {} } //public SkillType[] getSkillIds() //{ //return SKILL_IDS; //} + * || !checkIfOkToCastFlagDisplay(player, fort, true)) return; try { // if(targets[0] instanceof ArtefactInstance) fort.EndOfSiege(player.getClan()); } catch(Exception e) {} } //public SkillType[] getSkillITypes() //{ //return SKILL_TYPES; //} */ /** * Return true if character clan place a flag
diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java index 98e23aa3dd..b87758135f 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/Unlock.java @@ -35,7 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; public class Unlock implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.UNLOCK }; @@ -124,8 +124,8 @@ public class Unlock implements ISkillHandler chestChance = 40; } chestTrapLimit = 10; - } break; + } case 2: { if (skill.getLevel() > 12) @@ -153,8 +153,8 @@ public class Unlock implements ISkillHandler chestChance = 30; } chestTrapLimit = 30; - } break; + } case 3: { if (skill.getLevel() >= 14) @@ -194,8 +194,8 @@ public class Unlock implements ISkillHandler chestChance = 10; } chestTrapLimit = 50; - } break; + } case 4: { if (skill.getLevel() >= 14) @@ -215,8 +215,8 @@ public class Unlock implements ISkillHandler chestChance = 35; } chestTrapLimit = 80; - } break; + } } if (Rnd.get(100) <= chestChance) @@ -243,8 +243,8 @@ public class Unlock implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java index 9195dadbbb..8cc91a18a3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenPlayer.java @@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; public class ZakenPlayer implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.ZAKENPLAYER }; @@ -121,8 +121,8 @@ public class ZakenPlayer implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java index c3a39ae7d1..a8205a9f28 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/skillhandlers/ZakenSelf.java @@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; public class ZakenSelf implements ISkillHandler { - private static final SkillType[] SKILL_IDS = + private static final SkillType[] SKILL_TYPES = { SkillType.ZAKENSELF }; @@ -121,8 +121,8 @@ public class ZakenSelf implements ISkillHandler } @Override - public SkillType[] getSkillIds() + public SkillType[] getSkillTypes() { - return SKILL_IDS; + return SKILL_TYPES; } } \ No newline at end of file