Эх сурвалжийг харах

BETA/STABLE: Arena buffs handler fix by Xaras2 a little bit changed by me
- Merged HP/CP Recovery in ArenaBuffs handler
- Arena buffs fix by MELERIX
- Proper bypass handlers exception logging

Rumen Nikiforov 13 жил өмнө
parent
commit
2b461e8056
44 өөрчлөгдсөн 948 нэмэгдсэн , 487 устгасан
  1. 4 1
      L2J_DataPack_BETA/dist/game/data/html/default/31226.htm
  2. 3 3
      L2J_DataPack_BETA/dist/game/data/html/warehouse/31225.htm
  3. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/MasterHandler.java
  4. 132 0
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ArenaBuff.java
  5. 9 3
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Augment.java
  6. 13 9
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/BloodAlliance.java
  7. 10 3
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Buy.java
  8. 15 3
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/BuyShadowItem.java
  9. 0 66
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/CPRecovery.java
  10. 8 6
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ChatLink.java
  11. 31 7
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java
  12. 5 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/DrawHenna.java
  13. 9 3
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/EventEngine.java
  14. 57 45
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Festival.java
  15. 16 13
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/FortSiege.java
  16. 14 5
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Freight.java
  17. 25 4
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ItemAuctionLink.java
  18. 12 4
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Link.java
  19. 51 25
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Loto.java
  20. 47 8
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ManorManager.java
  21. 10 4
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Multisell.java
  22. 14 5
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Observation.java
  23. 11 3
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java
  24. 54 67
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java
  25. 17 9
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/PlayerHelp.java
  26. 30 6
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java
  27. 42 15
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java
  28. 5 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/QuestList.java
  29. 5 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ReceivePremium.java
  30. 5 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ReleaseAttribute.java
  31. 11 8
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RemoveDeathPenalty.java
  32. 9 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RemoveHennaList.java
  33. 36 19
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RentPet.java
  34. 20 7
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RideWyvern.java
  35. 22 8
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Rift.java
  36. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/SkillList.java
  37. 10 6
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/SupportBlessing.java
  38. 38 21
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/SupportMagic.java
  39. 6 2
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/TerritoryStatus.java
  40. 39 12
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/TerritoryWar.java
  41. 10 8
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/VoiceCommand.java
  42. 13 2
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Wear.java
  43. 8 6
      L2J_DataPack_BETA/dist/game/data/stats/skills/04300-04399.xml
  44. 68 63
      L2J_DataPack_BETA/dist/game/data/stats/skills/06800-06899.xml

+ 4 - 1
L2J_DataPack_BETA/dist/game/data/html/default/31226.htm

@@ -1,5 +1,8 @@
 <html><body>Arena Director:<br>
 Play the game according to the rules! The loser should be silent! What? Unfair? Then, why don't you hold your tonque and give it another try!<br>
-<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery: consumption of 100 adena</a><br>
+(Be careful! CP/HP will not get recovered inside the fence.)<br>
+<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery : 1,000 Adena</a><br>
+<a action="bypass -h npc_%objectId%_HPRecovery">HP Recovery : 1,000 Adena</a><br><br>
+<a action="bypass -h npc_%objectId%_ArenaBuffs">Buff for Battle Ground : 1,000 Adena</a><br><br>
 <a action="bypass -h npc_%objectId%_Quest">Quest</a>
 </body></html>

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/html/warehouse/31225.htm

@@ -1,9 +1,9 @@
 <html><body>Arena Manager:<br>
 Way to go! Hooray! Hooray!!!<br>
 (Be careful! CP/HP will not get recovered inside the fence.)<br><br>
-<a action="bypass -h npc_%objectId%_cprecovery">CP Recovery : 1,000 Adena</a><br>
-<a action="bypass -h npc_%objectId%_hprecovery">HP Recovery : 1,000 Adena</a><br><br>
-<a action="bypass -h npc_%objectId%_arenabuff">Buff for Battle Ground : 2,000 Adena</a><br><br>
+<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery : 1,000 Adena</a><br>
+<a action="bypass -h npc_%objectId%_HPRecovery">HP Recovery : 1,000 Adena</a><br><br>
+<a action="bypass -h npc_%objectId%_ArenaBuffs">Buff for Battle Ground : 2,000 Adena</a><br><br>
 <a action="bypass -h npc_%objectId%_DepositP">Private Warehouse: Deposit an Item</a><br1>
 <a action="bypass -h npc_%objectId%_WithdrawP">Private Warehouse: Withdraw an Item</a><br>
 <a action="bypass -h npc_%objectId%_Quest">Quest</a>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/handlers/MasterHandler.java

@@ -101,11 +101,11 @@ import handlers.admincommandhandlers.AdminTvTEvent;
 import handlers.admincommandhandlers.AdminUnblockIp;
 import handlers.admincommandhandlers.AdminVitality;
 import handlers.admincommandhandlers.AdminZone;
+import handlers.bypasshandlers.ArenaBuff;
 import handlers.bypasshandlers.Augment;
 import handlers.bypasshandlers.BloodAlliance;
 import handlers.bypasshandlers.Buy;
 import handlers.bypasshandlers.BuyShadowItem;
-import handlers.bypasshandlers.CPRecovery;
 import handlers.bypasshandlers.ChatLink;
 import handlers.bypasshandlers.ClanWarehouse;
 import handlers.bypasshandlers.DrawHenna;
@@ -423,12 +423,12 @@ public class MasterHandler
 	private static void loadBypassHandlers()
 	{
 		BYPASS.registerBypassHandler(new Augment());
+		BYPASS.registerBypassHandler(new ArenaBuff());
 		BYPASS.registerBypassHandler(new BloodAlliance());
 		BYPASS.registerBypassHandler(new Buy());
 		BYPASS.registerBypassHandler(new BuyShadowItem());
 		BYPASS.registerBypassHandler(new ChatLink());
 		BYPASS.registerBypassHandler(new ClanWarehouse());
-		BYPASS.registerBypassHandler(new CPRecovery());
 		BYPASS.registerBypassHandler(new DrawHenna());
 		BYPASS.registerBypassHandler(new EventEngine());
 		BYPASS.registerBypassHandler(new Festival());

+ 132 - 0
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ArenaBuff.java

@@ -0,0 +1,132 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package handlers.bypasshandlers;
+
+import java.util.StringTokenizer;
+import java.util.logging.Level;
+
+import com.l2jserver.gameserver.datatables.SkillTable;
+import com.l2jserver.gameserver.handler.IBypassHandler;
+import com.l2jserver.gameserver.model.L2Skill;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * @author Xaras2
+ */
+public class ArenaBuff implements IBypassHandler
+{
+	private static final String[] COMMANDS =
+	{
+		"ArenaBuffs", 
+		"HPRecovery",
+		"CPRecovery"
+	};
+	
+	private final int[][] _Buffs =
+	{
+		{ // Fighter Buffs
+			6803, 6804, 6808, 6809, 6811, 6812
+		},
+		{ // Mage Buffs
+			6804, 6805, 6806, 6807, 6812
+		}
+	};
+	
+	@Override
+	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
+	{
+		if (!(target instanceof L2Npc))
+		{
+			return false;
+		}
+		else if (activeChar.isCursedWeaponEquipped())
+		{
+			activeChar.sendMessage("Go away, you're not welcome here."); // / TODO: Replace with proper system message
+			return true;
+		}
+		
+		L2Npc npc = (L2Npc) target;
+		
+		StringTokenizer st = new StringTokenizer(command);
+		try
+		{
+			String cmd = st.nextToken();
+			
+			if (cmd.equalsIgnoreCase(COMMANDS[0]))
+			{
+				
+				if (!activeChar.reduceAdena("ArenaBuffs", 2000, activeChar.getLastFolkNPC(), true))
+				{
+					return false;
+				}
+				
+				for (int skillId : _Buffs[activeChar.isMageClass() ? 1 : 0])
+				{
+					L2Skill skill = SkillTable.getInstance().getInfo(skillId, 1);
+					
+					if (skill != null)
+					{
+						npc.setTarget(activeChar);
+						npc.doCast(skill);
+					}
+				}
+				return true;
+			}
+			else if (cmd.equalsIgnoreCase(COMMANDS[1]))
+			{
+				if (!activeChar.reduceAdena("RestoreHP", 1000, activeChar.getLastFolkNPC(), true))
+				{
+					return false;
+				}
+				
+				L2Skill skill = SkillTable.getInstance().getInfo(6817, 1);
+				if (skill != null)
+				{
+					npc.setTarget(activeChar);
+					npc.doCast(skill);
+				}
+				return true;
+			}
+			else if (cmd.equalsIgnoreCase(COMMANDS[2]))
+			{
+				if (!activeChar.reduceAdena("RestoreCP", 1000, activeChar.getLastFolkNPC(), true))
+				{
+					return false;
+				}
+				
+				L2Skill skill = SkillTable.getInstance().getInfo(4380, 1);
+				if (skill != null)
+				{
+					npc.setTarget(activeChar);
+					npc.doCast(skill);
+				}
+				return true;
+			}
+		}
+		catch (Exception e)
+		{
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
+		}
+		return false;
+	}
+	
+	@Override
+	public String[] getBypassList()
+	{
+		return COMMANDS;
+	}
+}

+ 9 - 3
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Augment.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.L2Npc;
@@ -28,14 +30,17 @@ public class Augment implements IBypassHandler
 		"Augment"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
-			switch(Integer.parseInt(command.substring(8, 9).trim()))
+			switch (Integer.parseInt(command.substring(8, 9).trim()))
 			{
 				case 1:
 					activeChar.sendPacket(new ExShowVariationMakeWindow());
@@ -47,13 +52,14 @@ public class Augment implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 13 - 9
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/BloodAlliance.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -29,20 +30,23 @@ import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
  */
 public class BloodAlliance implements IBypassHandler
 {
-
-	private static final String[] COMMANDS = {
+	
+	private static final String[] COMMANDS =
+	{
 		"HonoraryItem",
-		"Receive",
+		"Receive", 
 		"Exchange"
 	};
-
+	
 	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
-		L2CastleWarehouseInstance npc = ((L2CastleWarehouseInstance)target);
+		L2CastleWarehouseInstance npc = ((L2CastleWarehouseInstance) target);
 		
 		try
 		{
@@ -86,7 +90,7 @@ public class BloodAlliance implements IBypassHandler
 				}
 				else
 				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/castlewarehouse/castlewarehouse-8.htm");	
+					html.setFile(activeChar.getHtmlPrefix(), "data/html/castlewarehouse/castlewarehouse-8.htm");
 				}
 				
 			}
@@ -96,14 +100,14 @@ public class BloodAlliance implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
-
+	
 	@Override
 	public String[] getBypassList()
 	{
-		return COMMANDS ;
+		return COMMANDS;
 	}
 }

+ 10 - 3
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Buy.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -28,10 +29,13 @@ public class Buy implements IBypassHandler
 		"Buy"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2MerchantInstance))
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -39,20 +43,23 @@ public class Buy implements IBypassHandler
 			st.nextToken();
 			
 			if (st.countTokens() < 1)
+			{
 				return false;
+			}
 			
-			((L2MerchantInstance)target).showBuyWindow(activeChar, Integer.parseInt(st.nextToken()));
+			((L2MerchantInstance) target).showBuyWindow(activeChar, Integer.parseInt(st.nextToken()));
 			return true;
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 15 - 3
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/BuyShadowItem.java

@@ -28,28 +28,40 @@ public class BuyShadowItem implements IBypassHandler
 		"BuyShadowItem"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2MerchantInstance))
+		{
 			return false;
+		}
 		
-		NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc)target).getObjectId());
+		NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc) target).getObjectId());
 		if (activeChar.getLevel() < 40)
+		{
 			html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item-lowlevel.htm");
+		}
 		else if ((activeChar.getLevel() >= 40) && (activeChar.getLevel() < 46))
+		{
 			html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item_d.htm");
+		}
 		else if ((activeChar.getLevel() >= 46) && (activeChar.getLevel() < 52))
+		{
 			html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item_c.htm");
+		}
 		else if (activeChar.getLevel() >= 52)
+		{
 			html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item_b.htm");
-		html.replace("%objectId%", String.valueOf(((L2Npc)target).getObjectId()));
+		}
+		html.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId()));
 		activeChar.sendPacket(html);
 		
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 0 - 66
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/CPRecovery.java

@@ -1,66 +0,0 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package handlers.bypasshandlers;
-
-import com.l2jserver.gameserver.datatables.SkillTable;
-import com.l2jserver.gameserver.handler.IBypassHandler;
-import com.l2jserver.gameserver.model.L2Skill;
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.model.actor.L2Npc;
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
-
-public class CPRecovery implements IBypassHandler
-{
-	private static final String[] COMMANDS =
-	{
-		"CPRecovery"
-	};
-	
-	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
-	{
-		if (!(target instanceof L2Npc))
-			return false;
-		
-		final L2Npc npc = (L2Npc) target;
-		
-		if (npc.getNpcId() != 31225 && npc.getNpcId() != 31226)
-			return false;
-		
-		if (activeChar.isCursedWeaponEquipped())
-		{
-			activeChar.sendMessage("Go away, you're not welcome here.");
-			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
-			return true;
-		}
-		
-		if (!activeChar.reduceAdena("RestoreCP", 100, activeChar.getLastFolkNPC(), true))
-			return false;
-		
-		L2Skill skill = SkillTable.getInstance().getInfo(4380, 1);
-		if (skill != null)
-		{
-			npc.setTarget(activeChar);
-			npc.doCast(skill);
-		}
-		activeChar.sendPacket(ActionFailed.STATIC_PACKET);
-		return true;
-	}
-	
-	public String[] getBypassList()
-	{
-		return COMMANDS;
-	}
-}

+ 8 - 6
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ChatLink.java

@@ -26,29 +26,31 @@ public class ChatLink implements IBypassHandler
 		"Chat"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		int val = 0;
 		try
 		{
 			val = Integer.parseInt(command.substring(5));
 		}
-		catch (IndexOutOfBoundsException ioobe)
-		{
-		}
-		catch (NumberFormatException nfe)
+		catch (Exception ioobe)
 		{
+			
 		}
-		((L2Npc)target).showChatWindow(activeChar, val);
+		((L2Npc) target).showChatWindow(activeChar, val);
 		
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 31 - 7
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.L2Clan;
@@ -35,18 +37,23 @@ public class ClanWarehouse implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"withdrawc",
+		"withdrawc", 
 		"withdrawsortedc",
 		"depositc"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2WarehouseInstance) && !(target instanceof L2ClanHallManagerInstance))
+		{
 			return false;
+		}
 		
 		if (activeChar.isEnchanting())
+		{
 			return false;
+		}
 		
 		if (activeChar.getClan() == null)
 		{
@@ -66,13 +73,15 @@ public class ClanWarehouse implements IBypassHandler
 			{
 				if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_CLAN)
 				{
-					NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc)target).getObjectId());
+					NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc) target).getObjectId());
 					msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/WhSortedC.htm");
-					msg.replace("%objectId%", String.valueOf(((L2Npc)target).getObjectId()));
+					msg.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId()));
 					activeChar.sendPacket(msg);
 				}
 				else
+				{
 					showWithdrawWindow(activeChar, null, (byte) 0);
+				}
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[1])) // WithdrawSortedC
@@ -80,11 +89,17 @@ public class ClanWarehouse implements IBypassHandler
 				final String param[] = command.split(" ");
 				
 				if (param.length > 2)
+				{
 					showWithdrawWindow(activeChar, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
+				}
 				else if (param.length > 1)
+				{
 					showWithdrawWindow(activeChar, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
+				}
 				else
+				{
 					showWithdrawWindow(activeChar, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
+				}
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[2])) // DepositC
@@ -94,7 +109,9 @@ public class ClanWarehouse implements IBypassHandler
 				activeChar.tempInventoryDisable();
 				
 				if (Config.DEBUG)
-					_log.fine("Source: L2WarehouseInstance.java; Player: "+activeChar.getName()+"; Command: showDepositWindowClan; Message: Showing items to deposit.");
+				{
+					_log.fine("Source: L2WarehouseInstance.java; Player: " + activeChar.getName() + "; Command: showDepositWindowClan; Message: Showing items to deposit.");
+				}
 				
 				activeChar.sendPacket(new WareHouseDepositList(activeChar, WareHouseDepositList.CLAN));
 				return true;
@@ -104,7 +121,7 @@ public class ClanWarehouse implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
@@ -128,16 +145,23 @@ public class ClanWarehouse implements IBypassHandler
 		}
 		
 		if (itemtype != null)
+		{
 			player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN, itemtype, sortorder));
+		}
 		else
+		{
 			player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN));
+		}
 		
 		if (Config.DEBUG)
-			_log.fine("Source: L2WarehouseInstance.java; Player: "+player.getName()+"; Command: showRetrieveWindowClan; Message: Showing stored items.");
+		{
+			_log.fine("Source: L2WarehouseInstance.java; Player: " + player.getName() + "; Command: showRetrieveWindowClan; Message: Showing stored items.");
+		}
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 5 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/DrawHenna.java

@@ -28,17 +28,21 @@ public class DrawHenna implements IBypassHandler
 		"Draw"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2SymbolMakerInstance))
+		{
 			return false;
+		}
 		
 		activeChar.sendPacket(new HennaEquipList(activeChar, HennaTreeTable.getInstance().getAvailableHenna(activeChar.getClassId())));
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 9 - 3
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/EventEngine.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.L2Npc;
@@ -24,14 +26,17 @@ public class EventEngine implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"event_participate",
+		"event_participate", 
 		"event_unregister"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -48,13 +53,14 @@ public class EventEngine implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 57 - 45
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Festival.java

@@ -16,6 +16,7 @@ package handlers.bypasshandlers;
 
 import java.util.Calendar;
 import java.util.List;
+import java.util.logging.Level;
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.SevenSigns;
@@ -37,16 +38,19 @@ public class Festival implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"festival",
+		"festival", 
 		"festivaldesc"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2FestivalGuideInstance))
+		{
 			return false;
+		}
 		
-		final L2FestivalGuideInstance npc = (L2FestivalGuideInstance)target;
+		final L2FestivalGuideInstance npc = (L2FestivalGuideInstance) target;
 		
 		try
 		{
@@ -122,10 +126,14 @@ public class Festival implements IBypassHandler
 						final int stoneType = Integer.parseInt(command.substring(11));
 						final int stoneCount = npc.getStoneCount(stoneType);
 						if (stoneCount <= 0)
+						{
 							return false;
+						}
 						
 						if (!activeChar.destroyItemByItemId("SevenSigns", stoneType, stoneCount, npc, true))
+						{
 							return false;
+						}
 						
 						SevenSignsFestival.getInstance().setParticipants(npc.getFestivalOracle(), npc.getFestivalType(), activeChar.getParty());
 						SevenSignsFestival.getInstance().addAccumulatedBonus(npc.getFestivalType(), stoneType, stoneCount);
@@ -157,9 +165,7 @@ public class Festival implements IBypassHandler
 						final List<Integer> prevParticipants = SevenSignsFestival.getInstance().getPreviousParticipants(npc.getFestivalOracle(), npc.getFestivalType());
 						
 						// Check if there are any past participants.
-						if (prevParticipants == null
-								|| prevParticipants.isEmpty()
-								|| !prevParticipants.contains(activeChar.getObjectId()))
+						if ((prevParticipants == null) || prevParticipants.isEmpty() || !prevParticipants.contains(activeChar.getObjectId()))
 						{
 							npc.showChatWindow(activeChar, 3, "b", false);
 							return true;
@@ -183,7 +189,9 @@ public class Festival implements IBypassHandler
 						
 						final long offeringScore = bloodOfferings.getCount() * SevenSignsFestival.FESTIVAL_OFFERING_VALUE;
 						if (!activeChar.destroyItem("SevenSigns", bloodOfferings, npc, false))
+						{
 							return true;
+						}
 						
 						final boolean isHighestScore = SevenSignsFestival.getInstance().setFinalScore(activeChar, npc.getFestivalOracle(), npc.getFestivalType(), offeringScore);
 						SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.CONTRIB_SCORE_INCREASED_S1);
@@ -191,13 +199,16 @@ public class Festival implements IBypassHandler
 						activeChar.sendPacket(sm);
 						
 						if (isHighestScore)
+						{
 							npc.showChatWindow(activeChar, 3, "c", false);
+						}
 						else
+						{
 							npc.showChatWindow(activeChar, 3, "d", false);
+						}
 						break;
 					case 4: // Current High Scores
-						final StringBuilder strBuffer = StringUtil.startAppend(500,
-						"<html><body>Festival Guide:<br>These are the top scores of the week, for the ");
+						final StringBuilder strBuffer = StringUtil.startAppend(500, "<html><body>Festival Guide:<br>These are the top scores of the week, for the ");
 						
 						final StatsSet dawnData = SevenSignsFestival.getInstance().getHighestScoreData(SevenSigns.CABAL_DAWN, npc.getFestivalType());
 						final StatsSet duskData = SevenSignsFestival.getInstance().getHighestScoreData(SevenSigns.CABAL_DUSK, npc.getFestivalType());
@@ -209,70 +220,50 @@ public class Festival implements IBypassHandler
 						
 						// If no data is returned, assume there is no record, or all scores are 0.
 						if (overallData != null)
+						{
 							overallScore = overallData.getInteger("score");
+						}
 						
-						StringUtil.append(strBuffer,
-								SevenSignsFestival.getFestivalName(npc.getFestivalType()),
-						" festival.<br>");
+						StringUtil.append(strBuffer, SevenSignsFestival.getFestivalName(npc.getFestivalType()), " festival.<br>");
 						
 						if (dawnScore > 0)
 						{
-							StringUtil.append(strBuffer,
-									"Dawn: ",
-									calculateDate(dawnData.getString("date")),
-									". Score ",
-									String.valueOf(dawnScore),
-									"<br>",
-									dawnData.getString("members"),
-									"<br>"
-							);
+							StringUtil.append(strBuffer, "Dawn: ", calculateDate(dawnData.getString("date")), ". Score ", String.valueOf(dawnScore), "<br>", dawnData.getString("members"), "<br>");
 						}
 						else
+						{
 							strBuffer.append("Dawn: No record exists. Score 0<br>");
+						}
 						
 						if (duskScore > 0)
 						{
-							StringUtil.append(strBuffer,
-									"Dusk: ",
-									calculateDate(duskData.getString("date")),
-									". Score ",
-									String.valueOf(duskScore),
-									"<br>",
-									duskData.getString("members"),
-									"<br>"
-							);
+							StringUtil.append(strBuffer, "Dusk: ", calculateDate(duskData.getString("date")), ". Score ", String.valueOf(duskScore), "<br>", duskData.getString("members"), "<br>");
 						}
 						else
+						{
 							strBuffer.append("Dusk: No record exists. Score 0<br>");
+						}
 						
 						if (overallScore > 0)
 						{
 							final String cabalStr;
 							if (overallData.getString("cabal").equals("dawn"))
+							{
 								cabalStr = "Children of Dawn";
+							}
 							else
+							{
 								cabalStr = "Children of Dusk";
+							}
 							
-							StringUtil.append(strBuffer,
-									"Consecutive top scores: ",
-									calculateDate(overallData.getString("date")),
-									". Score ",
-									String.valueOf(overallScore),
-									"<br>Affilated side: ",
-									cabalStr,
-									"<br>",
-									overallData.getString("members"),
-									"<br>"
-							);
+							StringUtil.append(strBuffer, "Consecutive top scores: ", calculateDate(overallData.getString("date")), ". Score ", String.valueOf(overallScore), "<br>Affilated side: ", cabalStr, "<br>", overallData.getString("members"), "<br>");
 						}
 						else
+						{
 							strBuffer.append("Consecutive top scores: No record exists. Score 0<br>");
+						}
 						
-						StringUtil.append(strBuffer,
-								"<a action=\"bypass -h npc_",
-								String.valueOf(npc.getObjectId()),
-								"_Chat 0\">Go back.</a></body></html>"
-						);
+						StringUtil.append(strBuffer, "<a action=\"bypass -h npc_", String.valueOf(npc.getObjectId()), "_Chat 0\">Go back.</a></body></html>");
 						
 						NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
 						html.setHtml(strBuffer.toString());
@@ -280,10 +271,14 @@ public class Festival implements IBypassHandler
 						break;
 					case 8: // Increase the Festival Challenge
 						if (!activeChar.isInParty())
+						{
 							return true;
+						}
 						
 						if (!SevenSignsFestival.getInstance().isFestivalInProgress())
+						{
 							return true;
+						}
 						
 						party = activeChar.getParty();
 						if (!party.isLeader(activeChar))
@@ -293,23 +288,35 @@ public class Festival implements IBypassHandler
 						}
 						
 						if (SevenSignsFestival.getInstance().increaseChallenge(npc.getFestivalOracle(), npc.getFestivalType()))
+						{
 							npc.showChatWindow(activeChar, 8, "b", false);
+						}
 						else
+						{
 							npc.showChatWindow(activeChar, 8, "c", false);
+						}
 						break;
 					case 9: // Leave the Festival
 						if (!activeChar.isInParty())
+						{
 							return true;
+						}
 						
 						party = activeChar.getParty();
 						if (party.isLeader(activeChar))
+						{
 							SevenSignsFestival.getInstance().updateParticipants(activeChar, null);
+						}
 						else
 						{
 							if (party.getMemberCount() > Config.ALT_FESTIVAL_MIN_PLAYER)
+							{
 								party.removePartyMember(activeChar, messageType.Expelled);
+							}
 							else
+							{
 								activeChar.sendMessage("Only the party leader can leave a festival when a party has minimum number of members.");
+							}
 						}
 						break;
 					case 0: // Distribute Accumulated Bonus
@@ -320,9 +327,13 @@ public class Festival implements IBypassHandler
 						}
 						
 						if (SevenSignsFestival.getInstance().distribAccumulatedBonus(activeChar) > 0)
+						{
 							npc.showChatWindow(activeChar, 0, "a", false);
+						}
 						else
+						{
 							npc.showChatWindow(activeChar, 0, "b", false);
+						}
 						break;
 					default:
 						npc.showChatWindow(activeChar, val, null, false);
@@ -332,7 +343,7 @@ public class Festival implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
@@ -345,6 +356,7 @@ public class Festival implements IBypassHandler
 		return calCalc.get(Calendar.YEAR) + "/" + calCalc.get(Calendar.MONTH) + "/" + calCalc.get(Calendar.DAY_OF_MONTH);
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;

+ 16 - 13
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/FortSiege.java

@@ -28,55 +28,58 @@ public class FortSiege implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"fort_register",
+		"fort_register", 
 		"fort_unregister"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2FortSiegeNpcInstance))
+		{
 			return false;
+		}
 		
-		if (activeChar.getClanId() > 0
-				&& (activeChar.getClanPrivileges() & L2Clan.CP_CS_MANAGE_SIEGE) == L2Clan.CP_CS_MANAGE_SIEGE)
+		if ((activeChar.getClanId() > 0) && ((activeChar.getClanPrivileges() & L2Clan.CP_CS_MANAGE_SIEGE) == L2Clan.CP_CS_MANAGE_SIEGE))
 		{
 			if (command.toLowerCase().startsWith(COMMANDS[0])) // register
 			{
-				if (System.currentTimeMillis() < TerritoryWarManager.getInstance().getTWStartTimeInMillis()
-						&& TerritoryWarManager.getInstance().getIsRegistrationOver())
+				if ((System.currentTimeMillis() < TerritoryWarManager.getInstance().getTWStartTimeInMillis()) && TerritoryWarManager.getInstance().getIsRegistrationOver())
 				{
 					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOT_SIEGE_REGISTRATION_TIME2));
 					return false;
 				}
-				else if (System.currentTimeMillis() > TerritoryWarManager.getInstance().getTWStartTimeInMillis()
-						&& TerritoryWarManager.getInstance().isTWChannelOpen())
+				else if ((System.currentTimeMillis() > TerritoryWarManager.getInstance().getTWStartTimeInMillis()) && TerritoryWarManager.getInstance().isTWChannelOpen())
 				{
 					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOT_SIEGE_REGISTRATION_TIME2));
 					return false;
 				}
-				else if (((L2Npc)target).getFort().getSiege().registerAttacker(activeChar, false))
+				else if (((L2Npc) target).getFort().getSiege().registerAttacker(activeChar, false))
 				{
 					SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.REGISTERED_TO_S1_FORTRESS_BATTLE);
-					sm.addString(((L2Npc)target).getFort().getName());
+					sm.addString(((L2Npc) target).getFort().getName());
 					activeChar.sendPacket(sm);
-					((L2Npc)target).showChatWindow(activeChar, 7);
+					((L2Npc) target).showChatWindow(activeChar, 7);
 					return true;
 				}
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[1])) // unregister
 			{
-				((L2Npc)target).getFort().getSiege().removeSiegeClan(activeChar.getClan());
-				((L2Npc)target).showChatWindow(activeChar, 8);
+				((L2Npc) target).getFort().getSiege().removeSiegeClan(activeChar.getClan());
+				((L2Npc) target).showChatWindow(activeChar, 8);
 				return true;
 			}
 			return false;
 		}
 		else
-			((L2Npc)target).showChatWindow(activeChar, 10);
+		{
+			((L2Npc) target).showChatWindow(activeChar, 10);
+		}
 		
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;

+ 14 - 5
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Freight.java

@@ -26,20 +26,22 @@ import com.l2jserver.gameserver.network.serverpackets.WareHouseWithdrawalList;
 
 /**
  * @author UnAfraid
- *
  */
 public class Freight implements IBypassHandler
 {
-	private static final String[] COMMANDS = 
-	{ 
-		"package_withdraw", 
-		"package_deposit" 
+	private static final String[] COMMANDS =
+	{
+		"package_withdraw",
+		"package_deposit"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		if (command.equalsIgnoreCase(COMMANDS[0]))
 		{
@@ -52,19 +54,26 @@ public class Freight implements IBypassHandler
 					activeChar.sendPacket(new WareHouseWithdrawalList(activeChar, WareHouseWithdrawalList.FREIGHT));
 				}
 				else
+				{
 					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_ITEM_DEPOSITED_IN_WH));
+				}
 			}
 		}
 		else if (command.equalsIgnoreCase(COMMANDS[1]))
 		{
 			if (activeChar.getAccountChars().size() < 1)
+			{
 				activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHARACTER_DOES_NOT_EXIST));
+			}
 			else
+			{
 				activeChar.sendPacket(new PackageToList(activeChar.getAccountChars()));
+			}
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;

+ 25 - 4
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ItemAuctionLink.java

@@ -17,6 +17,7 @@ package handlers.bypasshandlers;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.handler.IBypassHandler;
@@ -39,10 +40,13 @@ public class ItemAuctionLink implements IBypassHandler
 		"ItemAuction"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		if (!Config.ALT_ITEM_AUCTION_ENABLED)
 		{
@@ -50,25 +54,33 @@ public class ItemAuctionLink implements IBypassHandler
 			return true;
 		}
 		
-		final ItemAuctionInstance au = ItemAuctionManager.getInstance().getManagerInstance(((L2Npc)target).getNpcId());
+		final ItemAuctionInstance au = ItemAuctionManager.getInstance().getManagerInstance(((L2Npc) target).getNpcId());
 		if (au == null)
+		{
 			return false;
+		}
 		
 		try
 		{
 			StringTokenizer st = new StringTokenizer(command);
 			st.nextToken(); // bypass "ItemAuction"
 			if (!st.hasMoreTokens())
+			{
 				return false;
+			}
 			
 			String cmd = st.nextToken();
 			if ("show".equalsIgnoreCase(cmd))
 			{
 				if (!activeChar.getFloodProtectors().getItemAuction().tryPerformAction("RequestInfoItemAuction"))
+				{
 					return false;
+				}
 				
 				if (activeChar.isItemAuctionPolling())
+				{
 					return false;
+				}
 				
 				final ItemAuction currentAuction = au.getCurrentAuction();
 				final ItemAuction nextAuction = au.getNextAuction();
@@ -77,8 +89,10 @@ public class ItemAuctionLink implements IBypassHandler
 				{
 					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_AUCTION_PERIOD));
 					
-					if (nextAuction != null) // used only once when database is empty
+					if (nextAuction != null)
+					{
 						activeChar.sendMessage("The next auction will begin on the " + fmt.format(new Date(nextAuction.getStartingTime())) + ".");
+					}
 					return true;
 				}
 				
@@ -91,24 +105,31 @@ public class ItemAuctionLink implements IBypassHandler
 				for (final ItemAuction auction : auctions)
 				{
 					if (auction.cancelBid(activeChar))
+					{
 						returned = true;
+					}
 				}
 				if (!returned)
+				{
 					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_OFFERINGS_OWN_OR_MADE_BID_FOR));
+				}
 			}
 			else
+			{
 				return false;
+			}
 		}
 		catch (Exception e)
 		{
-			_log.severe("Exception in: " + getClass().getSimpleName() + ":" + e.getMessage());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 12 - 4
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Link.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.L2Npc;
@@ -27,32 +29,38 @@ public class Link implements IBypassHandler
 		"Link"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
 			String path = command.substring(5).trim();
 			if (path.indexOf("..") != -1)
+			{
 				return false;
+			}
 			String filename = "data/html/" + path;
-			NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc)target).getObjectId());
+			NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc) target).getObjectId());
 			html.setFile(activeChar.getHtmlPrefix(), filename);
-			html.replace("%objectId%", String.valueOf(((L2Npc)target).getObjectId()));
+			html.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId()));
 			activeChar.sendPacket(html);
 			return true;
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 51 - 25
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Loto.java

@@ -37,10 +37,13 @@ public class Loto implements IBypassHandler
 		"Loto"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		int val = 0;
 		try
@@ -57,25 +60,25 @@ public class Loto implements IBypassHandler
 		{
 			// new loto ticket
 			for (int i = 0; i < 5; i++)
+			{
 				activeChar.setLoto(i, 0);
+			}
 		}
-		showLotoWindow(activeChar, (L2Npc)target, val);
+		showLotoWindow(activeChar, (L2Npc) target, val);
 		
 		return false;
 	}
 	
 	/**
-	 * Open a Loto window on client with the text of the L2NpcInstance.<BR><BR>
-	 * 
-	 * <B><U> Actions</U> :</B><BR><BR>
-	 * <li>Get the text of the selected HTML file in function of the npcId and of the page number </li>
-	 * <li>Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance </li>
-	 * <li>Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet </li><BR>
-	 * 
+	 * Open a Loto window on client with the text of the L2NpcInstance.<BR>
+	 * <BR>
+	 * <B><U> Actions</U> :</B><BR>
+	 * <BR>
+	 * <li>Get the text of the selected HTML file in function of the npcId and of the page number</li> <li>Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance</li> <li>Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the
+	 * client wait another packet</li><BR>
 	 * @param player The L2PcInstance that talk with the L2NpcInstance
 	 * @param npc L2Npc loto instance
 	 * @param val The number of the page of the L2NpcInstance to display
-	 * 
 	 */
 	// 0 - first buy lottery ticket window
 	// 1-20 - buttons
@@ -96,17 +99,17 @@ public class Loto implements IBypassHandler
 			filename = (npc.getHtmlPath(npcId, 1));
 			html.setFile(player.getHtmlPrefix(), filename);
 		}
-		else if (val >= 1 && val <= 21) // 1-20 - buttons, 21 - second buy lottery ticket window
+		else if ((val >= 1) && (val <= 21)) // 1-20 - buttons, 21 - second buy lottery ticket window
 		{
 			if (!Lottery.getInstance().isStarted())
 			{
-				//tickets can't be sold
+				// tickets can't be sold
 				player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_LOTTERY_TICKETS_CURRENT_SOLD));
 				return;
 			}
 			if (!Lottery.getInstance().isSellableTickets())
 			{
-				//tickets can't be sold
+				// tickets can't be sold
 				player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_LOTTERY_TICKETS_AVAILABLE));
 				return;
 			}
@@ -121,7 +124,7 @@ public class Loto implements IBypassHandler
 			{
 				if (player.getLoto(i) == val)
 				{
-					//unsetting button
+					// unsetting button
 					player.setLoto(i, 0);
 					found = 1;
 				}
@@ -131,28 +134,36 @@ public class Loto implements IBypassHandler
 				}
 			}
 			
-			//if not rearched limit 5 and not unseted value
-			if (count < 5 && found == 0 && val <= 20)
+			// if not rearched limit 5 and not unseted value
+			if ((count < 5) && (found == 0) && (val <= 20))
+			{
 				for (int i = 0; i < 5; i++)
+				{
 					if (player.getLoto(i) == 0)
 					{
 						player.setLoto(i, val);
 						break;
 					}
+				}
+			}
 			
-			//setting pusshed buttons
+			// setting pusshed buttons
 			count = 0;
 			for (int i = 0; i < 5; i++)
+			{
 				if (player.getLoto(i) > 0)
 				{
 					count++;
 					String button = String.valueOf(player.getLoto(i));
 					if (player.getLoto(i) < 10)
+					{
 						button = "0" + button;
+					}
 					String search = "fore=\"L2UI.lottoNum" + button + "\" back=\"L2UI.lottoNum" + button + "a_check\"";
 					String replace = "fore=\"L2UI.lottoNum" + button + "a_check\" back=\"L2UI.lottoNum" + button + "\"";
 					html.replace(search, replace);
 				}
+			}
 			
 			if (count == 5)
 			{
@@ -161,17 +172,17 @@ public class Loto implements IBypassHandler
 				html.replace(search, replace);
 			}
 		}
-		else if (val == 22) //22 - selected ticket with 5 numbers
+		else if (val == 22) // 22 - selected ticket with 5 numbers
 		{
 			if (!Lottery.getInstance().isStarted())
 			{
-				//tickets can't be sold
+				// tickets can't be sold
 				player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_LOTTERY_TICKETS_CURRENT_SOLD));
 				return;
 			}
 			if (!Lottery.getInstance().isSellableTickets())
 			{
-				//tickets can't be sold
+				// tickets can't be sold
 				player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_LOTTERY_TICKETS_AVAILABLE));
 				return;
 			}
@@ -184,12 +195,18 @@ public class Loto implements IBypassHandler
 			for (int i = 0; i < 5; i++)
 			{
 				if (player.getLoto(i) == 0)
+				{
 					return;
+				}
 				
 				if (player.getLoto(i) < 17)
+				{
 					enchant += Math.pow(2, player.getLoto(i) - 1);
+				}
 				else
+				{
 					type2 += Math.pow(2, player.getLoto(i) - 17);
+				}
 			}
 			if (player.getAdena() < price)
 			{
@@ -198,7 +215,9 @@ public class Loto implements IBypassHandler
 				return;
 			}
 			if (!player.reduceAdena("Loto", price, npc, true))
+			{
 				return;
+			}
 			Lottery.getInstance().increasePrize(price);
 			
 			sm = SystemMessage.getSystemMessage(SystemMessageId.ACQUIRED_S1_S2);
@@ -222,7 +241,7 @@ public class Loto implements IBypassHandler
 			filename = (npc.getHtmlPath(npcId, 6));
 			html.setFile(player.getHtmlPrefix(), filename);
 		}
-		else if (val == 23) //23 - current lottery jackpot
+		else if (val == 23) // 23 - current lottery jackpot
 		{
 			filename = (npc.getHtmlPath(npcId, 3));
 			html.setFile(player.getHtmlPrefix(), filename);
@@ -237,8 +256,10 @@ public class Loto implements IBypassHandler
 			for (L2ItemInstance item : player.getInventory().getItems())
 			{
 				if (item == null)
+				{
 					continue;
-				if (item.getItemId() == 4442 && item.getCustomType1() < lotonumber)
+				}
+				if ((item.getItemId() == 4442) && (item.getCustomType1() < lotonumber))
 				{
 					message = message + "<a action=\"bypass -h npc_%objectId%_Loto " + item.getObjectId() + "\">" + item.getCustomType1() + " Event Number ";
 					int[] numbers = Lottery.getInstance().decodeNumbers(item.getEnchantLevel(), item.getCustomType2());
@@ -249,7 +270,7 @@ public class Loto implements IBypassHandler
 					long[] check = Lottery.getInstance().checkTicket(item);
 					if (check[0] > 0)
 					{
-						switch ((int)check[0])
+						switch ((int) check[0])
 						{
 							case 1:
 								message += "- 1st Prize";
@@ -275,7 +296,7 @@ public class Loto implements IBypassHandler
 			}
 			html.replace("%result%", message);
 		}
-		else if (val == 25) //25 - lottery instructions
+		else if (val == 25) // 25 - lottery instructions
 		{
 			filename = (npc.getHtmlPath(npcId, 2));
 			html.setFile(player.getHtmlPrefix(), filename);
@@ -284,8 +305,10 @@ public class Loto implements IBypassHandler
 		{
 			int lotonumber = Lottery.getInstance().getId();
 			L2ItemInstance item = player.getInventory().getItemByObjectId(val);
-			if (item == null || item.getItemId() != 4442 || item.getCustomType1() >= lotonumber)
+			if ((item == null) || (item.getItemId() != 4442) || (item.getCustomType1() >= lotonumber))
+			{
 				return;
+			}
 			long[] check = Lottery.getInstance().checkTicket(item);
 			
 			sm = SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED);
@@ -294,7 +317,9 @@ public class Loto implements IBypassHandler
 			
 			long adena = check[1];
 			if (adena > 0)
+			{
 				player.addAdena("Loto", adena, npc, true);
+			}
 			player.destroyItem("Loto", item, npc, false);
 			return;
 		}
@@ -313,8 +338,9 @@ public class Loto implements IBypassHandler
 		player.sendPacket(ActionFailed.STATIC_PACKET);
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 47 - 8
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ManorManager.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.instancemanager.CastleManager;
@@ -46,24 +47,27 @@ public class ManorManager implements IBypassHandler
 		"manor_menu_select"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		final L2Npc manager = activeChar.getLastFolkNPC();
 		final boolean isCastle = manager instanceof L2CastleChamberlainInstance;
-		if (!(manager instanceof L2ManorManagerInstance || isCastle))
+		if (!((manager instanceof L2ManorManagerInstance) || isCastle))
+		{
 			return false;
+		}
 		
 		if (!activeChar.isInsideRadius(manager, L2Npc.INTERACTION_DISTANCE, true, false))
+		{
 			return false;
+		}
 		
 		try
 		{
 			final Castle castle = manager.getCastle();
 			if (isCastle)
 			{
-				if (activeChar.getClan() == null
-						|| castle.getOwnerId() != activeChar.getClanId()
-						|| (activeChar.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) != L2Clan.CP_CS_MANOR_ADMIN)
+				if ((activeChar.getClan() == null) || (castle.getOwnerId() != activeChar.getClanId()) || ((activeChar.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) != L2Clan.CP_CS_MANOR_ADMIN))
 				{
 					manager.showChatWindow(activeChar, "data/html/chamberlain/chamberlain-noprivs.htm");
 					return false;
@@ -89,15 +93,21 @@ public class ManorManager implements IBypassHandler
 			
 			final int castleId;
 			if (state < 0)
+			{
 				castleId = castle.getCastleId(); // info for current manor
+			}
 			else
+			{
 				castleId = state; // info for requested manor
+			}
 			
 			switch (ask)
 			{
 				case 1: // Seed purchase
 					if (isCastle)
+					{
 						break;
+					}
 					if (castleId != castle.getCastleId())
 					{
 						SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.HERE_YOU_CAN_BUY_ONLY_SEEDS_OF_S1_MANOR);
@@ -105,52 +115,80 @@ public class ManorManager implements IBypassHandler
 						activeChar.sendPacket(sm);
 					}
 					else
+					{
 						activeChar.sendPacket(new BuyListSeed(activeChar.getAdena(), castleId, castle.getSeedProduction(CastleManorManager.PERIOD_CURRENT)));
+					}
 					break;
 				case 2: // Crop sales
 					if (isCastle)
+					{
 						break;
+					}
 					activeChar.sendPacket(new ExShowSellCropList(activeChar, castleId, castle.getCropProcure(CastleManorManager.PERIOD_CURRENT)));
 					break;
 				case 3: // Current seeds (Manor info)
-					if (time == 1 && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())
+					if ((time == 1) && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())
+					{
 						activeChar.sendPacket(new ExShowSeedInfo(castleId, null));
+					}
 					else
+					{
 						activeChar.sendPacket(new ExShowSeedInfo(castleId, CastleManager.getInstance().getCastleById(castleId).getSeedProduction(time)));
+					}
 					break;
 				case 4: // Current crops (Manor info)
-					if (time == 1 && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())
+					if ((time == 1) && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())
+					{
 						activeChar.sendPacket(new ExShowCropInfo(castleId, null));
+					}
 					else
+					{
 						activeChar.sendPacket(new ExShowCropInfo(castleId, CastleManager.getInstance().getCastleById(castleId).getCropProcure(time)));
+					}
 					break;
 				case 5: // Basic info (Manor info)
 					activeChar.sendPacket(new ExShowManorDefaultInfo());
 					break;
 				case 6: // Buy harvester
 					if (isCastle)
+					{
 						break;
-					((L2MerchantInstance)manager).showBuyWindow(activeChar, 300000 + manager.getNpcId());
+					}
+					((L2MerchantInstance) manager).showBuyWindow(activeChar, 300000 + manager.getNpcId());
 					break;
 				case 7: // Edit seed setup
 					if (!isCastle)
+					{
 						break;
+					}
 					if (castle.isNextPeriodApproved())
+					{
 						activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.A_MANOR_CANNOT_BE_SET_UP_BETWEEN_6_AM_AND_8_PM));
+					}
 					else
+					{
 						activeChar.sendPacket(new ExShowSeedSetting(castle.getCastleId()));
+					}
 					break;
 				case 8: // Edit crop setup
 					if (!isCastle)
+					{
 						break;
+					}
 					if (castle.isNextPeriodApproved())
+					{
 						activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.A_MANOR_CANNOT_BE_SET_UP_BETWEEN_6_AM_AND_8_PM));
+					}
 					else
+					{
 						activeChar.sendPacket(new ExShowCropSetting(castle.getCastleId()));
+					}
 					break;
 				case 9: // Edit sales (Crop sales)
 					if (isCastle)
+					{
 						break;
+					}
 					activeChar.sendPacket(new ExShowProcureCropDetail(state));
 					break;
 				default:
@@ -160,11 +198,12 @@ public class ManorManager implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info(e.getMessage());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;

+ 10 - 4
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Multisell.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.gameserver.datatables.MultiSell;
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -28,10 +30,13 @@ public class Multisell implements IBypassHandler
 		"exc_multisell"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -39,26 +44,27 @@ public class Multisell implements IBypassHandler
 			if (command.toLowerCase().startsWith(COMMANDS[0])) // multisell
 			{
 				listId = Integer.parseInt(command.substring(9).trim());
-				MultiSell.getInstance().separateAndSend(listId, activeChar, (L2Npc)target, false);
+				MultiSell.getInstance().separateAndSend(listId, activeChar, (L2Npc) target, false);
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[1])) // exc_multisell
 			{
 				listId = Integer.parseInt(command.substring(13).trim());
-				MultiSell.getInstance().separateAndSend(listId, activeChar, (L2Npc)target, true);
+				MultiSell.getInstance().separateAndSend(listId, activeChar, (L2Npc) target, true);
 				return true;
 			}
 			return false;
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 14 - 5
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Observation.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.instancemanager.SiegeManager;
@@ -35,10 +36,13 @@ public class Observation implements IBypassHandler
 		"observe"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -49,9 +53,13 @@ public class Observation implements IBypassHandler
 				st.nextToken(); // Bypass cost
 				
 				if (SiegeManager.getInstance().getSiege(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken())) != null)
-					doObserve(activeChar, (L2Npc)target, val);
+				{
+					doObserve(activeChar, (L2Npc) target, val);
+				}
 				else
+				{
 					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ONLY_VIEW_SIEGE));
+				}
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[1])) // oracle
@@ -59,12 +67,12 @@ public class Observation implements IBypassHandler
 				String val = command.substring(13);
 				StringTokenizer st = new StringTokenizer(val);
 				st.nextToken(); // Bypass cost
-				doObserve(activeChar, (L2Npc)target, val);
+				doObserve(activeChar, (L2Npc) target, val);
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[2])) // observe
 			{
-				doObserve(activeChar, (L2Npc)target, command.substring(8));
+				doObserve(activeChar, (L2Npc) target, command.substring(8));
 				return true;
 			}
 			
@@ -72,7 +80,7 @@ public class Observation implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
@@ -94,8 +102,9 @@ public class Observation implements IBypassHandler
 		player.sendPacket(ActionFailed.STATIC_PACKET);
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 11 - 3
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java

@@ -46,12 +46,19 @@ import com.l2jserver.util.L2FastList;
  */
 public class OlympiadManagerLink implements IBypassHandler
 {
-	private static final String[] COMMANDS = { "olympiaddesc", "olympiadnoble", "olybuff", "olympiad" };
+	private static final String[] COMMANDS =
+	{
+		"olympiaddesc", 
+		"olympiadnoble", 
+		"olybuff",
+		"olympiad"
+	};
 	
 	private static final String FEWER_THAN = "Fewer than " + String.valueOf(Config.ALT_OLY_REG_DISPLAY);
 	private static final String MORE_THAN = "More than " + String.valueOf(Config.ALT_OLY_REG_DISPLAY);
 	private static final int GATE_PASS = Config.ALT_OLY_COMP_RITEM;
 	
+	@Override
 	public final boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2OlympiadManagerInstance))
@@ -285,7 +292,7 @@ public class OlympiadManagerLink implements IBypassHandler
 				
 				switch (val)
 				{
-					case 2: // show rank for a specific class 
+					case 2: // show rank for a specific class
 						// for example >> Olympiad 1_88
 						int classId = Integer.parseInt(command.substring(11));
 						if (((classId >= 88) && (classId <= 118)) || ((classId >= 131) && (classId <= 134)) || (classId == 136))
@@ -325,12 +332,13 @@ public class OlympiadManagerLink implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.log(Level.INFO, "Exception in " + e.getMessage(), e);
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		
 		return true;
 	}
 	
+	@Override
 	public final String[] getBypassList()
 	{
 		return COMMANDS;

+ 54 - 67
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java

@@ -31,9 +31,7 @@ import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
 import com.l2jserver.util.StringUtil;
 
 /**
- * 
  * @author DS
- *
  */
 public class OlympiadObservation implements IBypassHandler
 {
@@ -42,7 +40,8 @@ public class OlympiadObservation implements IBypassHandler
 		"arenalist",
 		"arenachange"
 	};
-
+	
+	@Override
 	public final boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		try
@@ -51,13 +50,13 @@ public class OlympiadObservation implements IBypassHandler
 			if (!isManager)
 			{
 				// without npc command can be used only in observer mode on arena
-				if (!activeChar.inObserverMode()
-						|| activeChar.isInOlympiadMode()
-						|| activeChar.getOlympiadGameId() < 0)
+				if (!activeChar.inObserverMode() || activeChar.isInOlympiadMode() || (activeChar.getOlympiadGameId() < 0))
+				{
 					return false;
+				}
 			}
-
-			if (command.startsWith(COMMANDS[0])) //list
+			
+			if (command.startsWith(COMMANDS[0])) // list
 			{
 				NpcHtmlMessage message = new NpcHtmlMessage(0);
 				if (command.length() < 10)
@@ -68,12 +67,14 @@ public class OlympiadObservation implements IBypassHandler
 						message.replace("%objectId%", String.valueOf(target.getObjectId()));
 					}
 					else
+					{
 						message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_arena_observe.htm");
-
+					}
+					
 					activeChar.sendPacket(message);
 					return true;
 				}
-
+				
 				final int firstArena, lastArena;
 				switch (Integer.parseInt(command.substring(10).trim()))
 				{
@@ -96,10 +97,10 @@ public class OlympiadObservation implements IBypassHandler
 					default:
 						return false;
 				}
-
+				
 				StringBuilder list = new StringBuilder(3500);
 				OlympiadGameTask task;
-
+				
 				if (isManager)
 				{
 					message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_observe_list.htm");
@@ -108,32 +109,27 @@ public class OlympiadObservation implements IBypassHandler
 						task = OlympiadGameManager.getInstance().getOlympiadTask(i);
 						if (task != null)
 						{
-							StringUtil.append(list,
-									"<a action=\"bypass -h npc_%objectId%_arenachange ",
-									String.valueOf(i),
-									"\">Arena ",
-									String.valueOf(i + 1),
-									"&nbsp;&nbsp;&nbsp;");
-
+							StringUtil.append(list, "<a action=\"bypass -h npc_%objectId%_arenachange ", String.valueOf(i), "\">Arena ", String.valueOf(i + 1), "&nbsp;&nbsp;&nbsp;");
+							
 							if (task.isGameStarted())
 							{
 								if (task.isBattleStarted())
+								{
 									StringUtil.append(list, "&$1719;"); // Playing
+								}
 								else
+								{
 									StringUtil.append(list, "&$1718;"); // Standby
-
-								StringUtil.append(list,
-										"&nbsp;&nbsp;&nbsp;",
-										task.getGame().getPlayerNames()[0],
-										"&nbsp; : &nbsp;",
-										task.getGame().getPlayerNames()[1]);
+								}
+								
+								StringUtil.append(list, "&nbsp;&nbsp;&nbsp;", task.getGame().getPlayerNames()[0], "&nbsp; : &nbsp;", task.getGame().getPlayerNames()[1]);
 							}
 							else
 							{
 								StringUtil.append(list, "&$906;", // Initial State
-										"</td><td>&nbsp;");
+									"</td><td>&nbsp;");
 							}
-
+							
 							StringUtil.append(list, "</a><br>");
 						}
 					}
@@ -142,84 +138,74 @@ public class OlympiadObservation implements IBypassHandler
 				}
 				else
 				{
-					message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_arena_observe_list.htm");					
+					message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_arena_observe_list.htm");
 					for (int i = firstArena; i <= lastArena; i++)
 					{
 						task = OlympiadGameManager.getInstance().getOlympiadTask(i);
 						if (task != null)
 						{
-							StringUtil.append(list,
-									"<tr><td fixwidth=30><a action=\"bypass arenachange ",
-									String.valueOf(i),
-									"\">",
-									String.valueOf(i + 1),
-									"</a></td><td fixwidth=60>");
-
+							StringUtil.append(list, "<tr><td fixwidth=30><a action=\"bypass arenachange ", String.valueOf(i), "\">", String.valueOf(i + 1), "</a></td><td fixwidth=60>");
+							
 							if (task.isGameStarted())
 							{
 								if (task.isBattleStarted())
+								{
 									StringUtil.append(list, "&$1719;"); // Playing
+								}
 								else
+								{
 									StringUtil.append(list, "&$1718;"); // Standby
-
-								StringUtil.append(list,
-										"</td><td>",
-										task.getGame().getPlayerNames()[0],
-										"&nbsp;",
-										task.getGame().getPlayerNames()[1]);
+								}
+								
+								StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], "&nbsp;", task.getGame().getPlayerNames()[1]);
 							}
 							else
 							{
 								StringUtil.append(list, "&$906;", // Initial State
-										"</td><td>&nbsp;");
+									"</td><td>&nbsp;");
 							}
-
+							
 							StringUtil.append(list, "</td><td><font color=\"aaccff\"></font></td></tr>");
 						}
 					}
 				}
-
+				
 				for (int i = firstArena; i <= lastArena; i++)
 				{
 					task = OlympiadGameManager.getInstance().getOlympiadTask(i);
 					if (task != null)
 					{
-						StringUtil.append(list,
-								"<tr><td fixwidth=30><a action=\"bypass arenachange ",
-								String.valueOf(i),
-								"\">",
-								String.valueOf(i + 1),
-								"</a></td><td fixwidth=60>");
-
+						StringUtil.append(list, "<tr><td fixwidth=30><a action=\"bypass arenachange ", String.valueOf(i), "\">", String.valueOf(i + 1), "</a></td><td fixwidth=60>");
+						
 						if (task.isGameStarted())
 						{
 							if (task.isBattleStarted())
+							{
 								StringUtil.append(list, "&$1719;"); // Playing
+							}
 							else
+							{
 								StringUtil.append(list, "&$1718;"); // Standby
-
-							StringUtil.append(list,
-									"</td><td>",
-									task.getGame().getPlayerNames()[0],
-									"&nbsp;",
-									task.getGame().getPlayerNames()[1]);
+							}
+							
+							StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], "&nbsp;", task.getGame().getPlayerNames()[1]);
 						}
 						else
 						{
 							StringUtil.append(list, "&$906;", // Initial State
-									"</td><td>&nbsp;");
+								"</td><td>&nbsp;");
 						}
-
-						StringUtil.append(list,
-								"</td><td><font color=\"aaccff\"></font></td></tr>");
+						
+						StringUtil.append(list, "</td><td><font color=\"aaccff\"></font></td></tr>");
 					}
 					message.replace("%list%", list.toString());
 				}
-
+				
 				activeChar.sendPacket(message);
 				return true;
 			}
-			else //change
+			else
+			// change
 			{
 				if (isManager)
 				{
@@ -234,7 +220,7 @@ public class OlympiadObservation implements IBypassHandler
 						return false;
 					}
 				}
-
+				
 				final int arenaId = Integer.parseInt(command.substring(12).trim());
 				final OlympiadGameTask nextArena = OlympiadGameManager.getInstance().getOlympiadTask(arenaId);
 				if (nextArena != null)
@@ -247,13 +233,14 @@ public class OlympiadObservation implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.log(Level.INFO, "Exception in " + e.getMessage(), e);
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
-
+	
+	@Override
 	public final String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 17 - 9
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/PlayerHelp.java

@@ -28,18 +28,23 @@ public class PlayerHelp implements IBypassHandler
 	{
 		"player_help"
 	};
-
+	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		try
 		{
 			if (command.length() < 13)
+			{
 				return false;
-
+			}
+			
 			final String path = command.substring(12);
 			if (path.indexOf("..") != -1)
+			{
 				return false;
-
+			}
+			
 			final StringTokenizer st = new StringTokenizer(path);
 			final String[] cmd = st.nextToken().split("#");
 			
@@ -47,24 +52,27 @@ public class PlayerHelp implements IBypassHandler
 			if (cmd.length > 1)
 			{
 				final int itemId = Integer.parseInt(cmd[1]);
-				html = new NpcHtmlMessage(1,itemId);
+				html = new NpcHtmlMessage(1, itemId);
 			}
 			else
+			{
 				html = new NpcHtmlMessage(1);
-
-			html.setFile(activeChar.getHtmlPrefix(), "data/html/help/"+cmd[0]);
+			}
+			
+			html.setFile(activeChar.getHtmlPrefix(), "data/html/help/" + cmd[0]);
 			html.disableValidation();
 			activeChar.sendPacket(html);
 		}
 		catch (Exception e)
 		{
-			_log.log(Level.INFO, "Exception in " + e.getMessage(), e);
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return true;
 	}
-
+	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 30 - 6
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -37,13 +39,18 @@ public class PrivateWarehouse implements IBypassHandler
 		"depositp"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		if (activeChar.isEnchanting())
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -51,13 +58,15 @@ public class PrivateWarehouse implements IBypassHandler
 			{
 				if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE)
 				{
-					NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc)target).getObjectId());
+					NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc) target).getObjectId());
 					msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/WhSortedP.htm");
-					msg.replace("%objectId%", String.valueOf(((L2Npc)target).getObjectId()));
+					msg.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId()));
 					activeChar.sendPacket(msg);
 				}
 				else
+				{
 					showWithdrawWindow(activeChar, null, (byte) 0);
+				}
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[1])) // WithdrawSortedP
@@ -65,11 +74,17 @@ public class PrivateWarehouse implements IBypassHandler
 				final String param[] = command.split(" ");
 				
 				if (param.length > 2)
+				{
 					showWithdrawWindow(activeChar, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
+				}
 				else if (param.length > 1)
+				{
 					showWithdrawWindow(activeChar, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
+				}
 				else
+				{
 					showWithdrawWindow(activeChar, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
+				}
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[2])) // DepositP
@@ -79,7 +94,9 @@ public class PrivateWarehouse implements IBypassHandler
 				activeChar.tempInventoryDisable();
 				
 				if (Config.DEBUG)
-					_log.fine("Source: L2WarehouseInstance.java; Player: "+activeChar.getName()+"; Command: showDepositWindow; Message: Showing items to deposit.");
+				{
+					_log.fine("Source: L2WarehouseInstance.java; Player: " + activeChar.getName() + "; Command: showDepositWindow; Message: Showing items to deposit.");
+				}
 				
 				activeChar.sendPacket(new WareHouseDepositList(activeChar, WareHouseDepositList.PRIVATE));
 				return true;
@@ -89,7 +106,7 @@ public class PrivateWarehouse implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
@@ -106,16 +123,23 @@ public class PrivateWarehouse implements IBypassHandler
 		}
 		
 		if (itemtype != null)
+		{
 			player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE, itemtype, sortorder));
+		}
 		else
+		{
 			player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE));
+		}
 		
 		if (Config.DEBUG)
-			_log.fine("Source: L2WarehouseInstance.java; Player: "+player.getName()+"; Command: showRetrieveWindow; Message: Showing stored items.");
+		{
+			_log.fine("Source: L2WarehouseInstance.java; Player: " + player.getName() + "; Command: showRetrieveWindow; Message: Showing stored items.");
+		}
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 42 - 15
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/QuestLink.java

@@ -40,10 +40,13 @@ public class QuestLink implements IBypassHandler
 		"Quest"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		String quest = "";
 		try
@@ -54,17 +57,24 @@ public class QuestLink implements IBypassHandler
 		{
 		}
 		if (quest.length() == 0)
-			showQuestWindow(activeChar, (L2Npc)target);
+		{
+			showQuestWindow(activeChar, (L2Npc) target);
+		}
 		else
-			showQuestWindow(activeChar, (L2Npc)target, quest);
+		{
+			showQuestWindow(activeChar, (L2Npc) target, quest);
+		}
 		
 		return true;
 	}
 	
 	/**
-	 * Open a choose quest window on client with all quests available of the L2NpcInstance.<BR><BR>
-	 * <B><U> Actions</U> :</B><BR><BR>
-	 * <li>Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance </li><BR><BR>
+	 * Open a choose quest window on client with all quests available of the L2NpcInstance.<BR>
+	 * <BR>
+	 * <B><U> Actions</U> :</B><BR>
+	 * <BR>
+	 * <li>Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance</li><BR>
+	 * <BR>
 	 * @param player The L2PcInstance that talk with the L2NpcInstance
 	 * @param npc The table containing quests of the L2NpcInstance
 	 * @param quests
@@ -122,11 +132,13 @@ public class QuestLink implements IBypassHandler
 	}
 	
 	/**
-	 * Open a quest window on client with the text of the L2NpcInstance.<BR><BR>
-	 * <B><U> Actions</U> :</B><BR><BR>
-	 * <li>Get the text of the quest state in the folder data/scripts/quests/questId/stateId.htm </li>
-	 * <li>Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance </li>
-	 * <li>Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet </li><BR><BR>
+	 * Open a quest window on client with the text of the L2NpcInstance.<BR>
+	 * <BR>
+	 * <B><U> Actions</U> :</B><BR>
+	 * <BR>
+	 * <li>Get the text of the quest state in the folder data/scripts/quests/questId/stateId.htm</li> <li>Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance</li> <li>Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the
+	 * client wait another packet</li><BR>
+	 * <BR>
 	 * @param player the L2PcInstance that talk with the {@code npc}.
 	 * @param npc the L2NpcInstance that chats with the {@code player}.
 	 * @param questId the Id of the quest to display the message.
@@ -142,7 +154,7 @@ public class QuestLink implements IBypassHandler
 		
 		if (q != null)
 		{
-			if ((q.getQuestIntId() >= 1 && q.getQuestIntId() < 20000) && (player.getWeightPenalty() >= 3 || !player.isInventoryUnder80(true)))
+			if (((q.getQuestIntId() >= 1) && (q.getQuestIntId() < 20000)) && ((player.getWeightPenalty() >= 3) || !player.isInventoryUnder80(true)))
 			{
 				player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT));
 				return;
@@ -150,7 +162,7 @@ public class QuestLink implements IBypassHandler
 			
 			if (qs == null)
 			{
-				if (q.getQuestIntId() >= 1 && q.getQuestIntId() < 20000)
+				if ((q.getQuestIntId() >= 1) && (q.getQuestIntId() < 20000))
 				{
 					if (player.getAllActiveQuests().length > 40) // if too many ongoing quests, don't show window and send message
 					{
@@ -161,7 +173,7 @@ public class QuestLink implements IBypassHandler
 				// check for start point
 				Quest[] qlst = npc.getTemplate().getEventQuests(Quest.QuestEventType.QUEST_START);
 				
-				if (qlst != null && qlst.length > 0)
+				if ((qlst != null) && (qlst.length > 0))
 				{
 					for (Quest temp : qlst)
 					{
@@ -175,18 +187,22 @@ public class QuestLink implements IBypassHandler
 			}
 		}
 		else
+		{
 			content = Quest.getNoQuestMsg(player); // no quests found
+		}
 		
 		if (qs != null)
 		{
 			// If the quest is alreday started, no need to show a window
 			if (!qs.getQuest().notifyTalk(npc, qs))
+			{
 				return;
+			}
 			
 			questId = qs.getQuest().getName();
 			String stateId = State.getStateName(qs.getState());
 			String path = "data/scripts/quests/" + questId + "/" + stateId + ".htm";
-			content = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), path); //TODO path for quests html
+			content = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), path); // TODO path for quests html
 			
 			if (Config.DEBUG)
 			{
@@ -203,7 +219,9 @@ public class QuestLink implements IBypassHandler
 		
 		// Send a Server->Client packet NpcHtmlMessage to the L2PcInstance in order to display the message of the L2NpcInstance
 		if (content != null)
+		{
 			npc.insertObjectIdAndShowChatWindow(player, content);
+		}
 		
 		// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
 		player.sendPacket(ActionFailed.STATIC_PACKET);
@@ -229,8 +247,12 @@ public class QuestLink implements IBypassHandler
 			for (QuestState x : awaits)
 			{
 				if (!options.contains(x.getQuest()))
+				{
 					if ((x.getQuest().getQuestIntId() > 0) && (x.getQuest().getQuestIntId() < 20000))
+					{
 						options.add(x.getQuest());
+					}
+				}
 			}
 		}
 		
@@ -239,8 +261,12 @@ public class QuestLink implements IBypassHandler
 			for (Quest x : starts)
 			{
 				if (!options.contains(x))
+				{
 					if ((x.getQuestIntId() > 0) && (x.getQuestIntId() < 20000))
+					{
 						options.add(x);
+					}
+				}
 			}
 		}
 		
@@ -259,8 +285,9 @@ public class QuestLink implements IBypassHandler
 		}
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 5 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/QuestList.java

@@ -27,17 +27,21 @@ public class QuestList implements IBypassHandler
 		"questlist"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2AdventurerInstance))
+		{
 			return false;
+		}
 		
 		activeChar.sendPacket(new ExShowQuestInfo());
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 5 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ReceivePremium.java

@@ -29,10 +29,13 @@ public class ReceivePremium implements IBypassHandler
 		"ReceivePremium"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target.isInstanceType(InstanceType.L2Npc)))
+		{
 			return false;
+		}
 		
 		if (activeChar.getPremiumItemList().isEmpty())
 		{
@@ -45,8 +48,9 @@ public class ReceivePremium implements IBypassHandler
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 5 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/ReleaseAttribute.java

@@ -27,17 +27,21 @@ public class ReleaseAttribute implements IBypassHandler
 		"ReleaseAttribute"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		activeChar.sendPacket(new ExShowBaseAttributeCancelWindow(activeChar));
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 11 - 8
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RemoveDeathPenalty.java

@@ -31,20 +31,23 @@ public class RemoveDeathPenalty implements IBypassHandler
 		"remove_dp"
 	};
 	
-	static final int[] pen_clear_price =
+	private static final int[] pen_clear_price =
 	{
 		3600, 8640, 25200, 50400, 86400, 144000, 144000, 144000
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
 			final int cmdChoice = Integer.parseInt(command.substring(10, 11).trim());
-			final L2Npc npc = (L2Npc)target;
+			final L2Npc npc = (L2Npc) target;
 			switch (cmdChoice)
 			{
 				case 1:
@@ -57,16 +60,16 @@ public class RemoveDeathPenalty implements IBypassHandler
 					break;
 				case 2:
 					NpcHtmlMessage Reply = new NpcHtmlMessage(npc.getObjectId());
-					final StringBuilder replyMSG = StringUtil.startAppend(400,
-							"<html><body>Black Judge:<br>"
-					);
+					final StringBuilder replyMSG = StringUtil.startAppend(400, "<html><body>Black Judge:<br>");
 					
 					if (activeChar.getDeathPenaltyBuffLevel() > 0)
 					{
 						if (activeChar.getAdena() >= pen_clear_price[activeChar.getExpertiseLevel()])
 						{
 							if (!activeChar.reduceAdena("DeathPenality", pen_clear_price[activeChar.getExpertiseLevel()], npc, true))
+							{
 								return false;
+							}
 							activeChar.setDeathPenaltyBuffLevel(activeChar.getDeathPenaltyBuffLevel() - 1);
 							activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DEATH_PENALTY_LIFTED));
 							activeChar.sendPacket(new EtcStatusUpdate(activeChar));
@@ -79,8 +82,7 @@ public class RemoveDeathPenalty implements IBypassHandler
 					}
 					else
 					{
-						replyMSG.append("You have no more death wounds that require healing.<br>" +
-						"Go forth and fight, both for this world and your own glory.");
+						replyMSG.append("You have no more death wounds that require healing.<br>" + "Go forth and fight, both for this world and your own glory.");
 					}
 					
 					replyMSG.append("</body></html>");
@@ -97,8 +99,9 @@ public class RemoveDeathPenalty implements IBypassHandler
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 9 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RemoveHennaList.java

@@ -28,10 +28,13 @@ public class RemoveHennaList implements IBypassHandler
 		"RemoveList"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2SymbolMakerInstance))
+		{
 			return false;
+		}
 		
 		boolean hasHennas = false;
 		for (int i = 1; i <= 3; i++)
@@ -39,16 +42,21 @@ public class RemoveHennaList implements IBypassHandler
 			L2HennaInstance henna = activeChar.getHenna(i);
 			
 			if (henna != null)
+			{
 				hasHennas = true;
+			}
 		}
 		if (hasHennas)
+		{
 			activeChar.sendPacket(new HennaRemoveList(activeChar));
+		}
 		
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 36 - 19
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RentPet.java

@@ -32,16 +32,23 @@ public class RentPet implements IBypassHandler
 		"RentPet"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2MerchantInstance))
+		{
 			return false;
+		}
 		
 		if (!Config.ALLOW_RENTPET)
+		{
 			return false;
+		}
 		
-		if (!Config.LIST_PET_RENT_NPC.contains(((L2Npc)target).getTemplate().getNpcId()))
+		if (!Config.LIST_PET_RENT_NPC.contains(((L2Npc) target).getTemplate().getNpcId()))
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -50,22 +57,15 @@ public class RentPet implements IBypassHandler
 			
 			if (st.countTokens() < 1)
 			{
-				NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc)target).getObjectId());
-				msg.setHtml("<html><body>Pet Manager:<br>" +
-						"You can rent a wyvern or strider for adena.<br>My prices:<br1>" +
-						"<table border=0><tr><td>Ride</td></tr>" +
-						"<tr><td>Wyvern</td><td>Strider</td></tr>" +
-						"<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 1\">30 sec/1800 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 11\">30 sec/900 adena</a></td></tr>" +
-						"<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 2\">1 min/7200 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 12\">1 min/3600 adena</a></td></tr>" +
-						"<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 3\">10 min/720000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 13\">10 min/360000 adena</a></td></tr>" +
-						"<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 4\">30 min/6480000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 14\">30 min/3240000 adena</a></td></tr>" +
-						"</table>" +
-				"</body></html>");
-				msg.replace("%objectId%", String.valueOf(((L2Npc)target).getObjectId()));
+				NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc) target).getObjectId());
+				msg.setHtml("<html><body>Pet Manager:<br>" + "You can rent a wyvern or strider for adena.<br>My prices:<br1>" + "<table border=0><tr><td>Ride</td></tr>" + "<tr><td>Wyvern</td><td>Strider</td></tr>" + "<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 1\">30 sec/1800 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 11\">30 sec/900 adena</a></td></tr>" + "<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 2\">1 min/7200 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 12\">1 min/3600 adena</a></td></tr>" + "<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 3\">10 min/720000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 13\">10 min/360000 adena</a></td></tr>" + "<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 4\">30 min/6480000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 14\">30 min/3240000 adena</a></td></tr>" + "</table>" + "</body></html>");
+				msg.replace("%objectId%", String.valueOf(((L2Npc) target).getObjectId()));
 				activeChar.sendPacket(msg);
 			}
 			else
+			{
 				tryRentPet(activeChar, Integer.parseInt(st.nextToken()));
+			}
 			
 			return true;
 		}
@@ -78,15 +78,25 @@ public class RentPet implements IBypassHandler
 	
 	public static final void tryRentPet(L2PcInstance player, int val)
 	{
-		if (player == null || player.getPet() != null || player.isMounted() || player.isRentedPet() || player.isTransformed() || player.isCursedWeaponEquipped())
+		if ((player == null) || (player.getPet() != null) || player.isMounted() || player.isRentedPet() || player.isTransformed() || player.isCursedWeaponEquipped())
+		{
 			return;
+		}
 		if (!player.disarmWeapons())
+		{
 			return;
+		}
 		
 		int petId;
 		double price = 1;
-		int cost[] = {1800, 7200, 720000, 6480000};
-		int ridetime[] = {30, 60, 600, 1800};
+		int cost[] =
+		{
+			1800, 7200, 720000, 6480000
+		};
+		int ridetime[] =
+		{
+			30, 60, 600, 1800
+		};
 		
 		if (val > 10)
 		{
@@ -95,25 +105,32 @@ public class RentPet implements IBypassHandler
 			price /= 2;
 		}
 		else
+		{
 			petId = 12621;
+		}
 		
-		if (val < 1 || val > 4)
+		if ((val < 1) || (val > 4))
+		{
 			return;
+		}
 		
 		price *= cost[val - 1];
 		int time = ridetime[val - 1];
 		
 		if (!player.reduceAdena("Rent", (long) price, player.getLastFolkNPC(), true))
+		{
 			return;
+		}
 		
 		player.mount(petId, 0, false);
-		SetupGauge sg = new SetupGauge(3, time*1000);
+		SetupGauge sg = new SetupGauge(3, time * 1000);
 		player.sendPacket(sg);
 		player.startRentPet(time);
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 20 - 7
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/RideWyvern.java

@@ -30,18 +30,26 @@ public class RideWyvern implements IBypassHandler
 		"RideWyvern"
 	};
 	
-	private static final int[] STRIDERS = { 12526, 12527, 12528, 16038, 16039, 16040, 16068, 13197 };
+	private static final int[] STRIDERS =
+	{
+		12526, 12527, 12528, 16038, 16039, 16040, 16068, 13197
+	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2WyvernManagerInstance))
+		{
 			return false;
+		}
 		
-		L2WyvernManagerInstance npc = (L2WyvernManagerInstance)target;
+		L2WyvernManagerInstance npc = (L2WyvernManagerInstance) target;
 		if (!npc.isOwnerClan(activeChar))
+		{
 			return false;
+		}
 		
-		if(!Config.ALLOW_WYVERN_DURING_SIEGE && (npc.isInSiege() || activeChar.isInSiege()))
+		if (!Config.ALLOW_WYVERN_DURING_SIEGE && (npc.isInSiege() || activeChar.isInSiege()))
 		{
 			activeChar.sendMessage("You cannot ride wyvern during siege.");
 			return false;
@@ -53,16 +61,20 @@ public class RideWyvern implements IBypassHandler
 			return false;
 		}
 		
-		if(activeChar.getPet() == null)
+		if (activeChar.getPet() == null)
 		{
-			if(activeChar.isMounted())
+			if (activeChar.isMounted())
+			{
 				activeChar.sendMessage("You already have a pet.");
+			}
 			else
+			{
 				activeChar.sendMessage("Summon your Strider first.");
+			}
 		}
 		else if (Util.contains(STRIDERS, activeChar.getPet().getNpcId()))
 		{
-			if (activeChar.getInventory().getItemByItemId(1460) != null && activeChar.getInventory().getItemByItemId(1460).getCount() >= 25)
+			if ((activeChar.getInventory().getItemByItemId(1460) != null) && (activeChar.getInventory().getItemByItemId(1460).getCount() >= 25))
 			{
 				if (activeChar.getPet().getLevel() < 55)
 				{
@@ -93,8 +105,9 @@ public class RideWyvern implements IBypassHandler
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 22 - 8
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Rift.java

@@ -14,6 +14,8 @@
  */
 package handlers.bypasshandlers;
 
+import java.util.logging.Level;
+
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.instancemanager.DimensionalRiftManager;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -29,43 +31,54 @@ public class Rift implements IBypassHandler
 		"exitrift"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		if (command.toLowerCase().startsWith(COMMANDS[0])) // EnterRift
 		{
 			try
 			{
 				Byte b1 = Byte.parseByte(command.substring(10)); // Selected Area: Recruit, Soldier etc
-				DimensionalRiftManager.getInstance().start(activeChar, b1, (L2Npc)target);
+				DimensionalRiftManager.getInstance().start(activeChar, b1, (L2Npc) target);
 				return true;
 			}
 			catch (Exception e)
 			{
-				_log.info("Exception in " + getClass().getSimpleName());
+				_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 			}
 		}
 		else
 		{
 			final boolean inRift = activeChar.isInParty() && activeChar.getParty().isInDimensionalRift();
 			
-			if (command.toLowerCase().startsWith(COMMANDS[1])) //ChangeRiftRoom
+			if (command.toLowerCase().startsWith(COMMANDS[1])) // ChangeRiftRoom
 			{
 				if (inRift)
-					activeChar.getParty().getDimensionalRift().manualTeleport(activeChar, (L2Npc)target);
+				{
+					activeChar.getParty().getDimensionalRift().manualTeleport(activeChar, (L2Npc) target);
+				}
 				else
-					DimensionalRiftManager.getInstance().handleCheat(activeChar, (L2Npc)target);
+				{
+					DimensionalRiftManager.getInstance().handleCheat(activeChar, (L2Npc) target);
+				}
 				
 				return true;
 			}
 			else if (command.toLowerCase().startsWith(COMMANDS[2])) // ExitRift
 			{
 				if (inRift)
-					activeChar.getParty().getDimensionalRift().manualExitRift(activeChar, (L2Npc)target);
+				{
+					activeChar.getParty().getDimensionalRift().manualExitRift(activeChar, (L2Npc) target);
+				}
 				else
-					DimensionalRiftManager.getInstance().handleCheat(activeChar, (L2Npc)target);
+				{
+					DimensionalRiftManager.getInstance().handleCheat(activeChar, (L2Npc) target);
+				}
 				
 			}
 			return true;
@@ -73,8 +86,9 @@ public class Rift implements IBypassHandler
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/SkillList.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.List;
+import java.util.logging.Level;
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.datatables.SkillTreesData;
@@ -116,7 +117,7 @@ public class SkillList implements IBypassHandler
 			}
 			catch (Exception e)
 			{
-				_log.info("Exception in " + getClass().getSimpleName());
+				_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 			}
 		}
 		else

+ 10 - 6
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/SupportBlessing.java

@@ -29,35 +29,39 @@ public class SupportBlessing implements IBypassHandler
 		"GiveBlessing"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		// Blessing of protection - author kerberos_20. Used codes from Rayan - L2Emu project.
 		// Prevent a cursed weapon weilder of being buffed - I think no need of that becouse karma check > 0
 		// if (player.isCursedWeaponEquiped())
-		//   return;
+		// return;
 		
 		int player_level = activeChar.getLevel();
 		// Select the player
-		((L2Npc)target).setTarget(activeChar);
+		((L2Npc) target).setTarget(activeChar);
 		// If the player is too high level, display a message and return
-		if (player_level > 39 || activeChar.getClassId().level() >= 2)
+		if ((player_level > 39) || (activeChar.getClassId().level() >= 2))
 		{
-			NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc)target).getObjectId());
+			NpcHtmlMessage msg = new NpcHtmlMessage(((L2Npc) target).getObjectId());
 			msg.setHtml("<html><body>Newbie Guide:<br>I'm sorry, but you are not eligible to receive the protection blessing.<br1>It can only be bestowed on <font color=\"LEVEL\">characters below level 39 who have not made a seccond transfer.</font></body></html>");
 			activeChar.sendPacket(msg);
 			return true;
 		}
 		L2Skill skill = SkillTable.FrequentSkill.BLESSING_OF_PROTECTION.getSkill();
-		((L2Npc)target).doCast(skill);
+		((L2Npc) target).doCast(skill);
 		
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 38 - 21
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/SupportMagic.java

@@ -29,45 +29,54 @@ public class SupportMagic implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"supportmagicservitor",
+		"supportmagicservitor", 
 		"supportmagic"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		boolean result = false;
 		if (command.toLowerCase().startsWith(COMMANDS[0]))
-			result = makeSupportMagic(activeChar, (L2Npc)target, true);
+		{
+			result = makeSupportMagic(activeChar, (L2Npc) target, true);
+		}
 		else if (command.toLowerCase().startsWith(COMMANDS[1]))
-			result = makeSupportMagic(activeChar, (L2Npc)target, false);
+		{
+			result = makeSupportMagic(activeChar, (L2Npc) target, false);
+		}
 		
 		return result;
 	}
 	
 	/**
-	 * Add Newbie helper buffs to L2Player according to its level.<BR><BR>
-	 * 
-	 * <B><U> Actions</U> :</B><BR><BR>
-	 * <li>Get the range level in wich player must be to obtain buff </li>
-	 * <li>If player level is out of range, display a message and return </li>
-	 * <li>According to player level cast buff </li><BR><BR>
-	 * 
-	 * <FONT COLOR=#FF0000><B> Newbie Helper Buff list is define in sql table helper_buff_list</B></FONT><BR><BR>
-	 * 
+	 * Add Newbie helper buffs to L2Player according to its level.<BR>
+	 * <BR>
+	 * <B><U> Actions</U> :</B><BR>
+	 * <BR>
+	 * <li>Get the range level in wich player must be to obtain buff</li> <li>If player level is out of range, display a message and return</li> <li>According to player level cast buff</li><BR>
+	 * <BR>
+	 * <FONT COLOR=#FF0000><B> Newbie Helper Buff list is define in sql table helper_buff_list</B></FONT><BR>
+	 * <BR>
 	 * @param player The L2PcInstance that talk with the L2NpcInstance
-	 * 
 	 */
 	public static boolean makeSupportMagic(L2PcInstance player, L2Npc npc, boolean isSummon)
 	{
 		if (player == null)
+		{
 			return false;
+		}
 		
 		// Prevent a cursed weapon weilder of being buffed
 		if (player.isCursedWeaponEquipped())
+		{
 			return false;
+		}
 		
 		int player_level = player.getLevel();
 		int lowestLevel = 0;
@@ -75,7 +84,7 @@ public class SupportMagic implements IBypassHandler
 		
 		if (isSummon)
 		{
-			if (player.getPet() == null || !(player.getPet() instanceof L2SummonInstance))
+			if ((player.getPet() == null) || !(player.getPet() instanceof L2SummonInstance))
 			{
 				String content = "<html><body>Only servitors can receive this Support Magic. If you do not have a servitor, you cannot access these spells.</body></html>";
 				npc.insertObjectIdAndShowChatWindow(player, content);
@@ -84,8 +93,10 @@ public class SupportMagic implements IBypassHandler
 			npc.setTarget(player.getPet());
 		}
 		else
-			// 	Select the player
+		{
+			// Select the player
 			npc.setTarget(player);
+		}
 		
 		if (isSummon)
 		{
@@ -94,7 +105,7 @@ public class SupportMagic implements IBypassHandler
 		}
 		else
 		{
-			// 	Calculate the min and max level between which the player must be to obtain buff
+			// Calculate the min and max level between which the player must be to obtain buff
 			if (player.isMageClass())
 			{
 				lowestLevel = HelperBuffTable.getInstance().getMagicClassLowestLevel();
@@ -109,8 +120,7 @@ public class SupportMagic implements IBypassHandler
 		// If the player is too high level, display a message and return
 		if (player_level > highestLevel)
 		{
-			String content = "<html><body>Newbie Guide:<br>Only a <font color=\"LEVEL\">novice character of level " + highestLevel
-			+ " or less</font> can receive my support magic.<br>Your novice character is the first one that you created and raised in this world.</body></html>";
+			String content = "<html><body>Newbie Guide:<br>Only a <font color=\"LEVEL\">novice character of level " + highestLevel + " or less</font> can receive my support magic.<br>Your novice character is the first one that you created and raised in this world.</body></html>";
 			npc.insertObjectIdAndShowChatWindow(player, content);
 			return true;
 		}
@@ -132,24 +142,30 @@ public class SupportMagic implements IBypassHandler
 				{
 					skill = SkillTable.getInstance().getInfo(helperBuffItem.getSkillID(), helperBuffItem.getSkillLevel());
 					if (skill != null)
+					{
 						npc.doCast(skill);
+					}
 				}
 			}
 		}
 		else
 		{
-			// 	Go through the Helper Buff list define in sql table helper_buff_list and cast skill
+			// Go through the Helper Buff list define in sql table helper_buff_list and cast skill
 			for (L2HelperBuff helperBuffItem : HelperBuffTable.getInstance().getHelperBuffTable())
 			{
 				if (helperBuffItem.isMagicClassBuff() == player.isMageClass())
 				{
-					if (player_level >= helperBuffItem.getLowerLevel() && player_level <= helperBuffItem.getUpperLevel())
+					if ((player_level >= helperBuffItem.getLowerLevel()) && (player_level <= helperBuffItem.getUpperLevel()))
 					{
 						skill = SkillTable.getInstance().getInfo(helperBuffItem.getSkillID(), helperBuffItem.getSkillLevel());
 						if (skill.getSkillType() == L2SkillType.SUMMON)
+						{
 							player.doSimultaneousCast(skill);
+						}
 						else
+						{
 							npc.doCast(skill);
+						}
 					}
 				}
 			}
@@ -157,8 +173,9 @@ public class SupportMagic implements IBypassHandler
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 6 - 2
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/TerritoryStatus.java

@@ -29,12 +29,15 @@ public class TerritoryStatus implements IBypassHandler
 		"TerritoryStatus"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
-		final L2Npc npc = (L2Npc)target;
+		final L2Npc npc = (L2Npc) target;
 		final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
 		{
 			if (npc.getCastle().getOwnerId() > 0)
@@ -66,8 +69,9 @@ public class TerritoryStatus implements IBypassHandler
 		return true;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 39 - 12
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/TerritoryWar.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.gameserver.datatables.MultiSell;
 import com.l2jserver.gameserver.handler.IBypassHandler;
@@ -34,19 +35,22 @@ public class TerritoryWar implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"Territory",
-		"TW_Multisell",
+		"Territory", 
+		"TW_Multisell", 
 		"TW_Buy_List",
-		"TW_Buy",
-		"TW_Buy_Elite",
-		"CalcRewards",
+		"TW_Buy", 
+		"TW_Buy_Elite", 
+		"CalcRewards", 
 		"ReceiveRewards"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -56,19 +60,25 @@ public class TerritoryWar implements IBypassHandler
 			if (actualCommand.equalsIgnoreCase("Territory"))
 			{
 				if (st.countTokens() < 1)
+				{
 					return false;
+				}
 				
 				int castleId = Integer.parseInt(st.nextToken());
 				activeChar.sendPacket(new ExShowDominionRegistry(castleId, activeChar));
 			}
 			else if (!(target instanceof L2MercenaryManagerInstance))
+			{
 				return false;
+			}
 			
-			L2MercenaryManagerInstance mercman = ((L2MercenaryManagerInstance)target);
+			L2MercenaryManagerInstance mercman = ((L2MercenaryManagerInstance) target);
 			if (actualCommand.equalsIgnoreCase("TW_Multisell"))
 			{
 				if (st.countTokens() < 1)
+				{
 					return false;
+				}
 				int territoryItemId = Integer.parseInt(st.nextToken());
 				if (activeChar.getInventory().getItemByItemId(territoryItemId) == null)
 				{
@@ -82,7 +92,9 @@ public class TerritoryWar implements IBypassHandler
 			else if (actualCommand.equalsIgnoreCase("TW_Buy_List"))
 			{
 				if (st.countTokens() < 1)
+				{
 					return false;
+				}
 				
 				String itemId = st.nextToken();
 				NpcHtmlMessage html = new NpcHtmlMessage(mercman.getObjectId());
@@ -106,11 +118,13 @@ public class TerritoryWar implements IBypassHandler
 					if (count <= playerItemCount)
 					{
 						int boughtId = 0;
-						switch(type)
+						switch (type)
 						{
 							case 0:
 								if (activeChar.isNoble())
+								{
 									return false;
+								}
 								boughtId = 7694;
 								activeChar.setNoble(true);
 								activeChar.sendPacket(new UserInfo(activeChar));
@@ -142,11 +156,13 @@ public class TerritoryWar implements IBypassHandler
 			}
 			else if (actualCommand.equalsIgnoreCase("TW_Buy_Elite"))
 			{
-				if(activeChar.getInventory().getItemByItemId(13767) != null)
+				if (activeChar.getInventory().getItemByItemId(13767) != null)
 				{
 					int _castleid = mercman.getCastle().getCastleId();
 					if (_castleid > 0)
-						MultiSell.getInstance().separateAndSend(_castleid+676, activeChar, mercman, false);
+					{
+						MultiSell.getInstance().separateAndSend(_castleid + 676, activeChar, mercman, false);
+					}
 				}
 				else
 				{
@@ -161,15 +177,19 @@ public class TerritoryWar implements IBypassHandler
 				int territoryId = Integer.parseInt(st.nextToken());
 				int[] reward = TerritoryWarManager.getInstance().calcReward(activeChar);
 				NpcHtmlMessage html = new NpcHtmlMessage(mercman.getObjectId());
-				if (TerritoryWarManager.getInstance().isTWInProgress() || reward[0] == 0)
+				if (TerritoryWarManager.getInstance().isTWInProgress() || (reward[0] == 0))
+				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
+				}
 				else if (reward[0] != territoryId)
 				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0b.htm");
 					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
 				}
 				else if (reward[1] == 0)
+				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
+				}
 				else
 				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-1.htm");
@@ -187,18 +207,24 @@ public class TerritoryWar implements IBypassHandler
 				int territoryId = Integer.parseInt(st.nextToken());
 				int badgeId = 57;
 				if (TerritoryWarManager.getInstance().TERRITORY_ITEM_IDS.containsKey(territoryId))
+				{
 					badgeId = TerritoryWarManager.getInstance().TERRITORY_ITEM_IDS.get(territoryId);
+				}
 				int[] reward = TerritoryWarManager.getInstance().calcReward(activeChar);
 				NpcHtmlMessage html = new NpcHtmlMessage(mercman.getObjectId());
-				if (TerritoryWarManager.getInstance().isTWInProgress() || reward[0] == 0)
+				if (TerritoryWarManager.getInstance().isTWInProgress() || (reward[0] == 0))
+				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
+				}
 				else if (reward[0] != territoryId)
 				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0b.htm");
 					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
 				}
 				else if (reward[1] == 0)
+				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
+				}
 				else
 				{
 					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-2.htm");
@@ -215,11 +241,12 @@ public class TerritoryWar implements IBypassHandler
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;

+ 10 - 8
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/VoiceCommand.java

@@ -21,9 +21,7 @@ import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
 /**
- * 
  * @author DS
- *
  */
 public class VoiceCommand implements IBypassHandler
 {
@@ -31,11 +29,12 @@ public class VoiceCommand implements IBypassHandler
 	{
 		"voice"
 	};
-
+	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		// only voice commands allowed
-		if (command.length() > 7 && command.charAt(6) == '.')
+		if ((command.length() > 7) && (command.charAt(6) == '.'))
 		{
 			final String vc, vparams;
 			int endOfCommand = command.indexOf(" ", 7);
@@ -49,20 +48,23 @@ public class VoiceCommand implements IBypassHandler
 				vc = command.substring(7).trim();
 				vparams = null;
 			}
-
+			
 			if (vc.length() > 0)
 			{
 				IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(vc);
 				if (vch != null)
+				{
 					return vch.useVoicedCommand(vc, activeChar, vparams);
+				}
 			}
 		}
-
+		
 		return false;
 	}
-
+	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 13 - 2
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/Wear.java

@@ -15,6 +15,7 @@
 package handlers.bypasshandlers;
 
 import java.util.StringTokenizer;
+import java.util.logging.Level;
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.TradeController;
@@ -33,13 +34,18 @@ public class Wear implements IBypassHandler
 		"Wear"
 	};
 	
+	@Override
 	public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
 	{
 		if (!(target instanceof L2Npc))
+		{
 			return false;
+		}
 		
 		if (!Config.ALLOW_WEAR)
+		{
 			return false;
+		}
 		
 		try
 		{
@@ -47,14 +53,16 @@ public class Wear implements IBypassHandler
 			st.nextToken();
 			
 			if (st.countTokens() < 1)
+			{
 				return false;
+			}
 			
 			showWearWindow(activeChar, Integer.parseInt(st.nextToken()));
 			return true;
 		}
 		catch (Exception e)
 		{
-			_log.info("Exception in " + getClass().getSimpleName());
+			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
 		}
 		return false;
 	}
@@ -64,7 +72,9 @@ public class Wear implements IBypassHandler
 		player.tempInventoryDisable();
 		
 		if (Config.DEBUG)
+		{
 			_log.fine("Showing wearlist");
+		}
 		
 		L2TradeList list = TradeController.getInstance().getBuyList(val);
 		
@@ -80,8 +90,9 @@ public class Wear implements IBypassHandler
 		}
 	}
 	
+	@Override
 	public String[] getBypassList()
 	{
 		return COMMANDS;
 	}
-}
+}

+ 8 - 6
L2J_DataPack_BETA/dist/game/data/stats/skills/04300-04399.xml

@@ -1205,14 +1205,16 @@
 		</for>
 	</skill>
 	<skill id="4380" levels="1" name="Arena CP Recovery">
-		<!-- Freya retail confirmed -->
-		<set name="power" val="5000" />
-		<set name="target" val="TARGET_ONE" />
-		<set name="skillType" val="COMBATPOINTHEAL" />
-		<set name="operateType" val="OP_ACTIVE" />
-		<set name="isMagic" val="true" />
+		<!-- Confirmed CT2.5 -->
+		<!-- Arena Skill -->
 		<set name="castRange" val="600" />
 		<set name="effectRange" val="1100" />
+		<set name="isMagic" val="true" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="power" val="5000" />
+		<set name="skillType" val="COMBATPOINTHEAL" />
+		<set name="target" val="TARGET_ONE" />
 	</skill>
 	<skill id="4381" levels="1" name="Magic Skill Block">
 		<!-- Freya retail confirmed -->

+ 68 - 63
L2J_DataPack_BETA/dist/game/data/stats/skills/06800-06899.xml

@@ -19,13 +19,13 @@
 		<set name="operateType" val="OP_PASSIVE" />
 	</skill>
 	<skill id="6803" levels="1" name="Arena Haste">
-		<!-- Increases Atk. Spd. by 33% for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="2" abnormalType="attack_time_down">
 				<mul order="0x30" stat="pAtkSpd" val="1.33" />
@@ -33,13 +33,13 @@
 		</for>
 	</skill>
 	<skill id="6804" levels="1" name="Arena Wind Walk">
-		<!-- Increases Speed by 33 for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="2" abnormalType="speed_up">
 				<add order="0x40" stat="runSpd" val="33" />
@@ -47,13 +47,13 @@
 		</for>
 	</skill>
 	<skill id="6805" levels="1" name="Arena Empower">
-		<!-- Increases M. Atk. by 75% for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="3" abnormalType="ma_up">
 				<mul order="0x30" stat="mAtk" val="1.75" />
@@ -61,13 +61,13 @@
 		</for>
 	</skill>
 	<skill id="6806" levels="1" name="Arena Acumen">
-		<!-- Increases Casting Spd. by 30% for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="3" abnormalType="casting_time_down">
 				<mul order="0x30" stat="mAtkSpd" val="1.3" />
@@ -75,13 +75,13 @@
 		</for>
 	</skill>
 	<skill id="6807" levels="1" name="Arena Concentration">
-		<!-- Decreases magic cancel damage by 53 for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="6" abnormalType="cancel_prob_down">
 				<sub order="0x40" stat="cancel" val="53" />
@@ -89,13 +89,13 @@
 		</for>
 	</skill>
 	<skill id="6808" levels="1" name="Arena Might">
-		<!-- Increases P. Atk. by 15% for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="3" abnormalType="pa_up">
 				<mul order="0x30" stat="pAtk" val="1.15" />
@@ -103,13 +103,13 @@
 		</for>
 	</skill>
 	<skill id="6809" levels="1" name="Arena Guidance">
-		<!-- Increases accuracy by 4 for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="3" abnormalType="hit_up">
 				<add order="0x40" stat="accCombat" val="4" />
@@ -117,13 +117,13 @@
 		</for>
 	</skill>
 	<skill id="6810" levels="1" name="Arena Focus">
-		<!-- Increases critical attack rate by 30% for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="3" abnormalType="critical_prob_up">
 				<basemul order="0x30" stat="rCrit" val="0.3" />
@@ -131,13 +131,13 @@
 		</for>
 	</skill>
 	<skill id="6811" levels="1" name="Arena Death Whisper">
-		<!-- Increases critical attack effect by 35% for 5 minutes. -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="3" abnormalType="critical_dmg_up">
 				<mul order="0x30" stat="cAtk" val="1.35" />
@@ -145,13 +145,13 @@
 		</for>
 	</skill>
 	<skill id="6812" levels="1" name="Arena Berserker Spirit">
-		<!-- "Decreases P. Def. by 8%, M. Def. by 16%, and evasion by 4, and increases P. Atk. by 8%, M. Atk. by 16%, Atk. Spd. by 8%, Casting Spd. by 8%, and Speed by 8 for 5 minutes." -->
-		<set name="target" val="TARGET_ONE" />
-		<set name="hitTime" val="400" />
-		<set name="skillType" val="BUFF" />
-		<set name="operateType" val="OP_ACTIVE" />
+		<!-- Arena Skill -->
 		<set name="castRange" val="400" />
-		<set name="effectRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="skillType" val="BUFF" />
+		<set name="target" val="TARGET_ONE" />
 		<for>
 			<effect name="Buff" abnormalTime="300" val="0" abnormalLvl="2" abnormalType="berserker">
 				<mul order="0x30" stat="mAtk" val="1.16" />
@@ -208,9 +208,14 @@
 		<set name="operateType" val="OP_PASSIVE" />
 	</skill>
 	<skill id="6817" levels="1" name="Arena HP Recovery">
-		<set name="target" val="TARGET_NONE" />
-		<set name="skillType" val="NOTDONE" />
-		<set name="operateType" val="OP_PASSIVE" />
+		<!-- Arena Skill -->
+		<set name="castRange" val="400" />
+		<set name="effectRange" val="900" />
+		<set name="magicLvl" val="1" />
+		<set name="operateType" val="OP_ACTIVE" />
+		<set name="power" val="5000" /> <!-- Guess -->
+		<set name="skillType" val="HEAL_STATIC" />
+		<set name="target" val="TARGET_ONE" />
 	</skill>
 	<skill id="6818" levels="1" name="Powerful Rage">
 		<!-- none -->