소스 검색

Full source code formatting.

Zoey76 6 년 전
부모
커밋
c9c6ecffbe
49개의 변경된 파일254개의 추가작업 그리고 285개의 파일을 삭제
  1. 2 2
      src/main/java/com/l2jserver/gameserver/SevenSigns.java
  2. 1 2
      src/main/java/com/l2jserver/gameserver/ai/L2PlayableAI.java
  3. 0 1
      src/main/java/com/l2jserver/gameserver/communitybbs/Manager/PostBBSManager.java
  4. 3 5
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ItemReuseDAOMySQLImpl.java
  5. 1 1
      src/main/java/com/l2jserver/gameserver/data/xml/impl/AdminData.java
  6. 2 1
      src/main/java/com/l2jserver/gameserver/data/xml/impl/RecipeData.java
  7. 1 1
      src/main/java/com/l2jserver/gameserver/datatables/NpcPersonalAIData.java
  8. 21 4
      src/main/java/com/l2jserver/gameserver/handler/IHandler.java
  9. 3 26
      src/main/java/com/l2jserver/gameserver/handler/ItemHandler.java
  10. 1 1
      src/main/java/com/l2jserver/gameserver/instancemanager/DuelManager.java
  11. 0 1
      src/main/java/com/l2jserver/gameserver/instancemanager/FourSepulchersManager.java
  12. 1 2
      src/main/java/com/l2jserver/gameserver/instancemanager/HandysBlockCheckerManager.java
  13. 7 2
      src/main/java/com/l2jserver/gameserver/instancemanager/PetitionManager.java
  14. 0 3
      src/main/java/com/l2jserver/gameserver/model/CombatFlag.java
  15. 2 1
      src/main/java/com/l2jserver/gameserver/model/L2Seed.java
  16. 2 2
      src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java
  17. 3 3
      src/main/java/com/l2jserver/gameserver/model/actor/instance/L2PetManagerInstance.java
  18. 4 2
      src/main/java/com/l2jserver/gameserver/model/actor/instance/L2SepulcherNpcInstance.java
  19. 1 1
      src/main/java/com/l2jserver/gameserver/model/actor/instance/L2TrapInstance.java
  20. 2 1
      src/main/java/com/l2jserver/gameserver/model/clientstrings/Builder.java
  21. 10 3
      src/main/java/com/l2jserver/gameserver/model/drops/GroupedGeneralDropItem.java
  22. 2 1
      src/main/java/com/l2jserver/gameserver/model/drops/strategy/IGroupedItemDropCalculationStrategy.java
  23. 2 1
      src/main/java/com/l2jserver/gameserver/model/entity/Hero.java
  24. 1 1
      src/main/java/com/l2jserver/gameserver/model/entity/Instance.java
  25. 8 14
      src/main/java/com/l2jserver/gameserver/model/entity/Siege.java
  26. 67 91
      src/main/java/com/l2jserver/gameserver/model/entity/TvTEvent.java
  27. 18 30
      src/main/java/com/l2jserver/gameserver/model/entity/TvTEventTeam.java
  28. 3 11
      src/main/java/com/l2jserver/gameserver/model/entity/TvTManager.java
  29. 4 1
      src/main/java/com/l2jserver/gameserver/model/itemauction/ItemAuction.java
  30. 22 12
      src/main/java/com/l2jserver/gameserver/model/olympiad/Olympiad.java
  31. 1 1
      src/main/java/com/l2jserver/gameserver/model/olympiad/OlympiadGameTask.java
  32. 4 4
      src/main/java/com/l2jserver/gameserver/model/quest/Quest.java
  33. 0 1
      src/main/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java
  34. 1 2
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeNicknameColor.java
  35. 3 1
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestExOustFromMPCC.java
  36. 2 1
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java
  37. 2 1
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestGiveItemToPet.java
  38. 3 5
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestPreviewItem.java
  39. 1 2
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestReplyStartPledgeWar.java
  40. 1 2
      src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestReplyStopPledgeWar.java
  41. 16 7
      src/main/java/com/l2jserver/gameserver/network/serverpackets/CharCreateFail.java
  42. 2 1
      src/main/java/com/l2jserver/gameserver/network/serverpackets/ExChangeClientEffectInfo.java
  43. 2 1
      src/main/java/com/l2jserver/gameserver/pathfinding/cellnodes/CellPathFinding.java
  44. 4 1
      src/main/java/com/l2jserver/loginserver/FloodProtectedListener.java
  45. 1 3
      src/main/java/com/l2jserver/loginserver/network/clientpackets/RequestAuthLogin.java
  46. 1 0
      src/main/java/com/l2jserver/loginserver/network/gameserverpackets/GameServerAuth.java
  47. 7 19
      src/main/java/com/l2jserver/tools/gsregistering/BaseGameServerRegister.java
  48. 1 1
      src/main/java/com/l2jserver/util/PrimeFinder.java
  49. 8 5
      src/main/java/com/l2jserver/util/StringUtil.java

+ 2 - 2
src/main/java/com/l2jserver/gameserver/SevenSigns.java

@@ -143,7 +143,7 @@ public class SevenSigns
 	private static final String UPDATE_STATUS = "UPDATE seven_signs_status SET current_cycle=?, active_period=?, previous_winner=?, " + "dawn_stone_score=?, dawn_festival_score=?, dusk_stone_score=?, dusk_festival_score=?, "
 		+ "avarice_owner=?, gnosis_owner=?, strife_owner=?, avarice_dawn_score=?, gnosis_dawn_score=?, " + "strife_dawn_score=?, avarice_dusk_score=?, gnosis_dusk_score=?, strife_dusk_score=?, " + "festival_cycle=?, accumulated_bonus0=?, accumulated_bonus1=?, accumulated_bonus2=?,"
 		+ "accumulated_bonus3=?, accumulated_bonus4=?, date=? WHERE id=0";
-		
+	
 	protected SevenSigns()
 	{
 		try
@@ -338,7 +338,7 @@ public class SevenSigns
 							AutoSpawnHandler.getInstance().setSpawnActive(duskCrest, false);
 						}
 						break;
-						
+					
 					case CABAL_DUSK:
 						if (!AutoSpawnHandler.getInstance().getAutoSpawnInstance(anakimSpawn.getObjectId(), true).isSpawnActive())
 						{

+ 1 - 2
src/main/java/com/l2jserver/gameserver/ai/L2PlayableAI.java

@@ -26,8 +26,7 @@ import com.l2jserver.gameserver.model.zone.ZoneId;
 import com.l2jserver.gameserver.network.SystemMessageId;
 
 /**
- * This class manages AI of L2Playable.<br>
- * L2PlayableAI : <li>L2SummonAI</li> <li>L2PlayerAI</li>
+ * This class manages AI of L2Playable.
  * @author JIV
  */
 public abstract class L2PlayableAI extends L2CharacterAI

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
src/main/java/com/l2jserver/gameserver/communitybbs/Manager/PostBBSManager.java


+ 3 - 5
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ItemReuseDAOMySQLImpl.java

@@ -103,11 +103,9 @@ public class ItemReuseDAOMySQLImpl implements ItemReuseDAO
 			{
 				while (rs.next())
 				{
-					int itemId = rs.getInt("itemId");
-					@SuppressWarnings("unused")
-					int itemObjId = rs.getInt("itemObjId");
-					long reuseDelay = rs.getLong("reuseDelay");
-					long systime = rs.getLong("systime");
+					final int itemId = rs.getInt("itemId");
+					final long reuseDelay = rs.getLong("reuseDelay");
+					final long systime = rs.getLong("systime");
 					boolean isInInventory = true;
 					
 					// Using item Id

+ 1 - 1
src/main/java/com/l2jserver/gameserver/data/xml/impl/AdminData.java

@@ -339,7 +339,7 @@ public final class AdminData implements IXmlReader
 	
 	/**
 	 * Gets the single instance of AdminTable.
-	 * @return AccessLevels: the one and only instance of this class<br>
+	 * @return the one and only instance of this class
 	 */
 	public static AdminData getInstance()
 	{

+ 2 - 1
src/main/java/com/l2jserver/gameserver/data/xml/impl/RecipeData.java

@@ -69,7 +69,8 @@ public class RecipeData implements IXmlReader
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
-				RECIPES_FILE: for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
+				RECIPES_FILE:
+				for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
 				{
 					if ("item".equalsIgnoreCase(d.getNodeName()))
 					{

+ 1 - 1
src/main/java/com/l2jserver/gameserver/datatables/NpcPersonalAIData.java

@@ -27,7 +27,7 @@ import com.l2jserver.util.Rnd;
 
 /**
  * This class holds parameter, specific to certain NPCs.<br>
- * It can be either general parameters overridden for certain NPC instance instead of template parameters(aggro range, for example), or some optional parameters, handled by datapack scripts.<br>
+ * It can be either general parameters overridden for certain NPC instance instead of template parameters(aggro range, for example), or some optional parameters, handled by datapack scripts.
  * @author GKR
  */
 public class NpcPersonalAIData

+ 21 - 4
src/main/java/com/l2jserver/gameserver/handler/IHandler.java

@@ -34,11 +34,28 @@ public interface IHandler<K, V>
 		registerHandler((K) object);
 	}
 	
-	public void registerHandler(K object);
+	/**
+	 * Registers the handler.
+	 * @param handler the handler
+	 */
+	void registerHandler(K handler);
 	
-	public void removeHandler(K handler);
+	/**
+	 * Removes the handler.
+	 * @param handler the handler to remove
+	 */
+	void removeHandler(K handler);
 	
-	public K getHandler(V val);
+	/**
+	 * Gets the handler for the given object.
+	 * @param val the object
+	 * @return the handler
+	 */
+	K getHandler(V val);
 	
-	public int size();
+	/**
+	 * Gets the amount of handlers.
+	 * @return the amount of handlers
+	 */
+	int size();
 }

+ 3 - 26
src/main/java/com/l2jserver/gameserver/handler/ItemHandler.java

@@ -24,28 +24,18 @@ import java.util.Map;
 import com.l2jserver.gameserver.model.items.L2EtcItem;
 
 /**
- * This class manages handlers of items
+ * Item handlers.
  * @author UnAfraid
  */
 public class ItemHandler implements IHandler<IItemHandler, L2EtcItem>
 {
 	private final Map<String, IItemHandler> _datatable;
 	
-	/**
-	 * Constructor of ItemHandler
-	 */
 	protected ItemHandler()
 	{
 		_datatable = new HashMap<>();
 	}
 	
-	/**
-	 * Adds handler of item type in <I>datatable</I>.<BR>
-	 * <BR>
-	 * <B><I>Concept :</I></U><BR>
-	 * This handler is put in <I>datatable</I> Map &lt;String ; IItemHandler &gt; for each ID corresponding to an item type (existing in classes of package itemhandlers) sets as key of the Map.
-	 * @param handler (IItemHandler)
-	 */
 	@Override
 	public void registerHandler(IItemHandler handler)
 	{
@@ -58,11 +48,6 @@ public class ItemHandler implements IHandler<IItemHandler, L2EtcItem>
 		_datatable.remove(handler.getClass().getSimpleName());
 	}
 	
-	/**
-	 * Returns the handler of the item
-	 * @param item
-	 * @return IItemHandler
-	 */
 	@Override
 	public IItemHandler getHandler(L2EtcItem item)
 	{
@@ -73,27 +58,19 @@ public class ItemHandler implements IHandler<IItemHandler, L2EtcItem>
 		return _datatable.get(item.getHandlerName());
 	}
 	
-	/**
-	 * Returns the number of elements contained in datatable
-	 * @return int : Size of the datatable
-	 */
 	@Override
 	public int size()
 	{
 		return _datatable.size();
 	}
 	
-	/**
-	 * Create ItemHandler if doesn't exist and returns ItemHandler
-	 * @return ItemHandler
-	 */
 	public static ItemHandler getInstance()
 	{
-		return SingletonHolder._instance;
+		return SingletonHolder.INSTANCE;
 	}
 	
 	private static class SingletonHolder
 	{
-		protected static final ItemHandler _instance = new ItemHandler();
+		protected static final ItemHandler INSTANCE = new ItemHandler();
 	}
 }

+ 1 - 1
src/main/java/com/l2jserver/gameserver/instancemanager/DuelManager.java

@@ -116,7 +116,7 @@ public final class DuelManager
 	}
 	
 	/**
-	 * Checks if this player might join / start a duel.<br>
+	 * Checks if this player might join / start a duel.
 	 * @param player
 	 * @param target
 	 * @param partyDuel

+ 0 - 1
src/main/java/com/l2jserver/gameserver/instancemanager/FourSepulchersManager.java

@@ -1181,7 +1181,6 @@ public final class FourSepulchersManager
 				case 31484:
 					_viscountMobs.put(npcId, mobs);
 					break;
-					
 				case 31472:
 				case 31477:
 				case 31482:

+ 1 - 2
src/main/java/com/l2jserver/gameserver/instancemanager/HandysBlockCheckerManager.java

@@ -40,8 +40,7 @@ import com.l2jserver.gameserver.network.serverpackets.ExCubeGameRemovePlayer;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
 
 /**
- * This class manage the player add/remove, team change and event arena status,<br>
- * as the clearance of the participants list or liberate the arena.
+ * This class manage the player add/remove, team change and event arena status, as the clearance of the participants list or liberate the arena.
  * @author BiggBoss
  */
 public final class HandysBlockCheckerManager

+ 7 - 2
src/main/java/com/l2jserver/gameserver/instancemanager/PetitionManager.java

@@ -366,7 +366,11 @@ public final class PetitionManager
 	
 	public void sendPendingPetitionList(L2PcInstance activeChar)
 	{
-		final StringBuilder htmlContent = StringUtil.startAppend(600 + (getPendingPetitionCount() * 300), "<html><body><center><table width=270><tr>" + "<td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>" + "<td width=180><center>Petition Menu</center></td>" + "<td width=45><button value=\"Back\" action=\"bypass -h admin_admin7\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br>" + "<table width=\"270\">" + "<tr><td><table width=\"270\"><tr><td><button value=\"Reset\" action=\"bypass -h admin_reset_petitions\" width=\"80\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>" + "<td align=right><button value=\"Refresh\" action=\"bypass -h admin_view_petitions\" width=\"80\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br></td></tr>");
+		final StringBuilder htmlContent = StringUtil.startAppend(600 + (getPendingPetitionCount() * 300), "<html><body><center><table width=270><tr>"
+			+ "<td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>" + "<td width=180><center>Petition Menu</center></td>"
+			+ "<td width=45><button value=\"Back\" action=\"bypass -h admin_admin7\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br>" + "<table width=\"270\">"
+			+ "<tr><td><table width=\"270\"><tr><td><button value=\"Reset\" action=\"bypass -h admin_reset_petitions\" width=\"80\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>"
+			+ "<td align=right><button value=\"Refresh\" action=\"bypass -h admin_view_petitions\" width=\"80\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br></td></tr>");
 		
 		final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
 		
@@ -393,7 +397,8 @@ public final class PetitionManager
 			StringUtil.append(htmlContent, "<tr><td width=\"130\">");
 			if (currPetition.getState() != PetitionState.IN_PROCESS)
 			{
-				StringUtil.append(htmlContent, "<table width=\"130\" cellpadding=\"2\"><tr>" + "<td><button value=\"View\" action=\"bypass -h admin_view_petition ", String.valueOf(currPetition.getId()), "\" width=\"50\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>" + "<td><button value=\"Reject\" action=\"bypass -h admin_reject_petition ", String.valueOf(currPetition.getId()), "\" width=\"50\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>");
+				StringUtil.append(htmlContent, "<table width=\"130\" cellpadding=\"2\"><tr>" + "<td><button value=\"View\" action=\"bypass -h admin_view_petition ", String.valueOf(currPetition.getId()), "\" width=\"50\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>"
+					+ "<td><button value=\"Reject\" action=\"bypass -h admin_reject_petition ", String.valueOf(currPetition.getId()), "\" width=\"50\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>");
 			}
 			else
 			{

+ 0 - 3
src/main/java/com/l2jserver/gameserver/model/CombatFlag.java

@@ -37,12 +37,9 @@ public class CombatFlag
 	private L2ItemInstance _itemInstance;
 	private final Location _location;
 	private final int _itemId;
-	@SuppressWarnings("unused")
-	private final int _fortId;
 	
 	public CombatFlag(int fort_id, int x, int y, int z, int heading, int item_id)
 	{
-		_fortId = fort_id;
 		_location = new Location(x, y, z, heading);
 		_itemId = item_id;
 	}

+ 2 - 1
src/main/java/com/l2jserver/gameserver/model/L2Seed.java

@@ -134,6 +134,7 @@ public final class L2Seed
 	@Override
 	public final String toString()
 	{
-		return "SeedData [_id=" + _seedId + ", _level=" + _level + ", _crop=" + _cropId + ", _mature=" + _matureId + ", _type1=" + _reward1 + ", _type2=" + _reward2 + ", _manorId=" + _castleId + ", _isAlternative=" + _isAlternative + ", _limitSeeds=" + _limitSeeds + ", _limitCrops=" + _limitCrops + "]";
+		return "SeedData [_id=" + _seedId + ", _level=" + _level + ", _crop=" + _cropId + ", _mature=" + _matureId + ", _type1=" + _reward1 + ", _type2=" + _reward2 + //
+			", _manorId=" + _castleId + ", _isAlternative=" + _isAlternative + ", _limitSeeds=" + _limitSeeds + ", _limitCrops=" + _limitCrops + "]";
 	}
 }

+ 2 - 2
src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java

@@ -4886,11 +4886,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 					target.sendPacket(sm);
 				}
 				
-				if (this.isSummon())
+				if (isSummon())
 				{
 					SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_RECEIVED_DAMAGE_OF_S3_FROM_C2);
 					sm.addCharName(this).addCharName(target).addInt(reflectedDamage);
-					this.getActingPlayer().sendPacket(sm);
+					getActingPlayer().sendPacket(sm);
 				}
 				
 				reduceCurrentHp(reflectedDamage, target, true, false, null);

+ 3 - 3
src/main/java/com/l2jserver/gameserver/model/actor/instance/L2PetManagerInstance.java

@@ -101,8 +101,8 @@ public class L2PetManagerInstance extends L2MerchantInstance
 			boolean ok = false;
 			switch (val)
 			{
-			// Info evolve(player, "curent pet summon item", "new pet summon item", "lvl required to evolve")
-			// To ignore evolve just put value 0 where do you like example: evolve(player, 0, 9882, 55);
+				// Info evolve(player, "curent pet summon item", "new pet summon item", "lvl required to evolve")
+				// To ignore evolve just put value 0 where do you like example: evolve(player, 0, 9882, 55);
 				case 1:
 					ok = Evolve.doEvolve(player, this, 2375, 9882, 55);
 					break;
@@ -134,7 +134,7 @@ public class L2PetManagerInstance extends L2MerchantInstance
 			boolean ok = false;
 			switch (val)
 			{
-			// Info evolve(player, "curent pet summon item", "new pet summon item", "lvl required to evolve")
+				// Info evolve(player, "curent pet summon item", "new pet summon item", "lvl required to evolve")
 				case 1:
 					ok = Evolve.doRestore(player, this, 10307, 9882, 55);
 					break;

+ 4 - 2
src/main/java/com/l2jserver/gameserver/model/actor/instance/L2SepulcherNpcInstance.java

@@ -211,6 +211,7 @@ public class L2SepulcherNpcInstance extends L2Npc
 			case 31485:
 			case 31486:
 			case 31487:
+			{
 				setIsInvul(false);
 				reduceCurrentHp(getMaxHp() + 1, player, null);
 				if (_spawnMonsterTask != null)
@@ -219,7 +220,7 @@ public class L2SepulcherNpcInstance extends L2Npc
 				}
 				_spawnMonsterTask = ThreadPoolManager.getInstance().scheduleEffect(new SpawnMonster(getId()), 3500);
 				break;
-				
+			}
 			case 31455:
 			case 31456:
 			case 31457:
@@ -233,6 +234,7 @@ public class L2SepulcherNpcInstance extends L2Npc
 			case 31465:
 			case 31466:
 			case 31467:
+			{
 				setIsInvul(false);
 				reduceCurrentHp(getMaxHp() + 1, player, null);
 				if ((player.getParty() != null) && !player.getParty().isLeader(player))
@@ -241,7 +243,7 @@ public class L2SepulcherNpcInstance extends L2Npc
 				}
 				player.addItem("Quest", HALLS_KEY, 1, player, true);
 				break;
-				
+			}
 			default:
 			{
 				if (hasListener(EventType.ON_NPC_QUEST_START))

+ 1 - 1
src/main/java/com/l2jserver/gameserver/model/actor/instance/L2TrapInstance.java

@@ -442,7 +442,7 @@ public final class L2TrapInstance extends L2Npc
 	@Override
 	public void updateAbnormalEffect()
 	{
-	
+		
 	}
 	
 	public boolean hasLifeTime()

+ 2 - 1
src/main/java/com/l2jserver/gameserver/model/clientstrings/Builder.java

@@ -41,7 +41,8 @@ public abstract class Builder
 		final int arrayLength = array.length;
 		
 		char c, c2, c3;
-		LOOP: for (; index1 < arrayLength; index1++)
+		LOOP:
+		for (; index1 < arrayLength; index1++)
 		{
 			c = array[index1];
 			if ((c == '$') && (index1 < (arrayLength - 2)))

+ 10 - 3
src/main/java/com/l2jserver/gameserver/model/drops/GroupedGeneralDropItem.java

@@ -18,6 +18,8 @@
  */
 package com.l2jserver.gameserver.model.drops;
 
+import static com.l2jserver.gameserver.model.drops.strategy.IKillerChanceModifierStrategy.NO_RULES;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -142,7 +144,7 @@ public final class GroupedGeneralDropItem implements IDropItem
 			sumchance += (item.getChance() * getChance()) / 100;
 		}
 		final double sumchance1 = sumchance;
-		GroupedGeneralDropItem group = new GroupedGeneralDropItem(sumchance1, getDropCalculationStrategy(), IKillerChanceModifierStrategy.NO_RULES, getPreciseStrategy());
+		GroupedGeneralDropItem group = new GroupedGeneralDropItem(sumchance1, getDropCalculationStrategy(), NO_RULES, getPreciseStrategy());
 		List<GeneralDropItem> items = new ArrayList<>();
 		for (final GeneralDropItem item : getItems())
 		{
@@ -216,12 +218,17 @@ public final class GroupedGeneralDropItem implements IDropItem
 		{
 			sumchance += (item.getChance(victim) * getChance() * chanceModifier) / 100;
 		}
-		GroupedGeneralDropItem group = new GroupedGeneralDropItem(sumchance, getDropCalculationStrategy(), IKillerChanceModifierStrategy.NO_RULES, getPreciseStrategy()); // to discard further deep blue calculations
+		
+		// to discard further deep blue calculations
+		GroupedGeneralDropItem group = new GroupedGeneralDropItem(sumchance, getDropCalculationStrategy(), NO_RULES, getPreciseStrategy());
 		List<GeneralDropItem> items = new ArrayList<>();
 		for (GeneralDropItem item : getItems())
 		{
 			// the item is made almost "static"
-			items.add(new GeneralDropItem(item.getItemId(), item.getMin(victim), item.getMax(victim), (item.getChance(victim) * getChance() * chanceModifier) / sumchance, IAmountMultiplierStrategy.STATIC, IChanceMultiplierStrategy.STATIC, getPreciseStrategy(), IKillerChanceModifierStrategy.NO_RULES, item.getDropCalculationStrategy()));
+			items.add(new GeneralDropItem(item.getItemId(), item.getMin(victim), item.getMax(victim), //
+				(item.getChance(victim) * getChance() * chanceModifier) / sumchance, //
+				IAmountMultiplierStrategy.STATIC, IChanceMultiplierStrategy.STATIC, getPreciseStrategy(), //
+				NO_RULES, item.getDropCalculationStrategy()));
 		}
 		group.setItems(items);
 		return group;

+ 2 - 1
src/main/java/com/l2jserver/gameserver/model/drops/strategy/IGroupedItemDropCalculationStrategy.java

@@ -46,7 +46,8 @@ public interface IGroupedItemDropCalculationStrategy
 		private GeneralDropItem getSingleItem(GroupedGeneralDropItem dropItem)
 		{
 			final GeneralDropItem item1 = dropItem.getItems().iterator().next();
-			singleItemCache.putIfAbsent(dropItem, new GeneralDropItem(item1.getItemId(), item1.getMin(), item1.getMax(), (item1.getChance() * dropItem.getChance()) / 100, item1.getAmountStrategy(), item1.getChanceStrategy(), dropItem.getPreciseStrategy(), dropItem.getKillerChanceModifierStrategy(), item1.getDropCalculationStrategy()));
+			singleItemCache.putIfAbsent(dropItem, new GeneralDropItem(item1.getItemId(), item1.getMin(), item1.getMax(), (item1.getChance() * dropItem.getChance()) / 100, //
+				item1.getAmountStrategy(), item1.getChanceStrategy(), dropItem.getPreciseStrategy(), dropItem.getKillerChanceModifierStrategy(), item1.getDropCalculationStrategy()));
 			return singleItemCache.get(dropItem);
 		}
 		

+ 2 - 1
src/main/java/com/l2jserver/gameserver/model/entity/Hero.java

@@ -567,7 +567,8 @@ public class Hero
 						{
 							StringUtil.append(fList, "<table width=270>");
 						}
-						StringUtil.append(fList, "<tr><td width=220><font color=\"LEVEL\">" + fight.getString("start") + "</font>&nbsp;&nbsp;" + fight.getString("result") + "</td><td width=50 align=right>" + (fight.getInt("classed") > 0 ? "<font color=\"FFFF99\">cls</font>" : "<font color=\"999999\">non-cls<font>") + "</td></tr>");
+						StringUtil.append(fList, "<tr><td width=220><font color=\"LEVEL\">" + fight.getString("start") + "</font>&nbsp;&nbsp;" + fight.getString("result") + //
+							"</td><td width=50 align=right>" + (fight.getInt("classed") > 0 ? "<font color=\"FFFF99\">cls</font>" : "<font color=\"999999\">non-cls<font>") + "</td></tr>");
 						StringUtil.append(fList, "<tr><td width=220>vs " + fight.getString("oponent") + " (" + fight.getString("oponentclass") + ")</td><td width=50 align=right>(" + fight.getString("time") + ")</td></tr>");
 						StringUtil.append(fList, "<tr><td colspan=2>&nbsp;</td></tr></table>");
 						StringUtil.append(fList, "</td></tr>");

+ 1 - 1
src/main/java/com/l2jserver/gameserver/model/entity/Instance.java

@@ -915,7 +915,7 @@ public final class Instance
 						player.teleToLocation(TeleportWhereType.TOWN);
 					}
 				}
-			} , _ejectTime));
+			}, _ejectTime));
 		}
 	}
 	

+ 8 - 14
src/main/java/com/l2jserver/gameserver/model/entity/Siege.java

@@ -373,21 +373,20 @@ public class Siege implements Siegable
 	}
 	
 	/**
-	 * When control of castle changed during siege<BR>
-	 * <BR>
+	 * When control of castle changed during siege.
 	 */
 	public void midVictory()
 	{
-		if (isInProgress()) // Siege still in progress
+		// Siege still in progress
+		if (isInProgress())
 		{
 			if (getCastle().getOwnerId() > 0)
 			{
 				_siegeGuardManager.removeMercs(); // Remove all merc entry from db
 			}
 			
-			if (getDefenderClans().isEmpty() && // If defender doesn't exist (Pc vs Npc)
-			(getAttackerClans().size() == 1 // Only 1 attacker
-			))
+			// If defender doesn't exist (Pc vs Npc) and only 1 attacker
+			if (getDefenderClans().isEmpty() && (getAttackerClans().size() == 1))
 			{
 				L2SiegeClan sc_newowner = getAttackerClan(getCastle().getOwnerId());
 				removeAttacker(sc_newowner);
@@ -398,8 +397,8 @@ public class Siege implements Siegable
 			if (getCastle().getOwnerId() > 0)
 			{
 				int allyId = ClanTable.getInstance().getClan(getCastle().getOwnerId()).getAllyId();
-				if (getDefenderClans().isEmpty()) // If defender doesn't exist (Pc vs Npc)
-				// and only an alliance attacks
+				// If defender doesn't exist (Pc vs Npc) and only an alliance attacks
+				if (getDefenderClans().isEmpty())
 				{
 					// The player's clan is in an alliance
 					if (allyId != 0)
@@ -467,10 +466,6 @@ public class Siege implements Siegable
 		}
 	}
 	
-	/**
-	 * When siege starts<BR>
-	 * <BR>
-	 */
 	@Override
 	public void startSiege()
 	{
@@ -528,8 +523,7 @@ public class Siege implements Siegable
 	}
 	
 	/**
-	 * Announce to player.<BR>
-	 * <BR>
+	 * Announce to player.
 	 * @param message The SystemMessage to send to player
 	 * @param bothSides True - broadcast to both attackers and defenders. False - only to defenders.
 	 */

+ 67 - 91
src/main/java/com/l2jserver/gameserver/model/entity/TvTEvent.java

@@ -77,16 +77,16 @@ public class TvTEvent
 	
 	protected static final Logger _log = Logger.getLogger(TvTEvent.class.getName());
 	/** html path **/
-	private static final String htmlPath = "data/scripts/custom/events/TvT/TvTManager/";
-	/** The teams of the TvTEvent<br> */
+	private static final String HTML_PATH = "data/scripts/custom/events/TvT/TvTManager/";
+	/** The teams of the TvTEvent. */
 	private static TvTEventTeam[] _teams = new TvTEventTeam[2];
-	/** The state of the TvTEvent<br> */
+	/** The state of the TvTEvent. */
 	private static EventState _state = EventState.INACTIVE;
-	/** The spawn of the participation npc<br> */
+	/** The spawn of the participation npc. */
 	private static L2Spawn _npcSpawn = null;
-	/** the npc instance of the participation npc<br> */
+	/** The npc instance of the participation npc. */
 	private static L2Npc _lastNpcSpawn = null;
-	/** Instance id<br> */
+	/** Instance Id. */
 	private static int _TvTEventInstance = 0;
 	
 	private TvTEvent()
@@ -94,9 +94,7 @@ public class TvTEvent
 		// Prevent external initialization.
 	}
 	
-	/**
-	 * Teams initializing<br>
-	 */
+	/** Teams initializing. */
 	public static void init()
 	{
 		AntiFeedManager.getInstance().registerEvent(AntiFeedManager.TVT_ID);
@@ -107,9 +105,8 @@ public class TvTEvent
 	/**
 	 * Starts the participation of the TvTEvent<br>
 	 * 1. Get L2NpcTemplate by Config.TVT_EVENT_PARTICIPATION_NPC_ID<br>
-	 * 2. Try to spawn a new npc of it<br>
-	 * <br>
-	 * @return boolean: true if success, otherwise false<br>
+	 * 2. Try to spawn a new npc of it
+	 * @return true if success, otherwise false
 	 */
 	public static boolean startParticipation()
 	{
@@ -165,9 +162,8 @@ public class TvTEvent
 	 * 2. Close doors specified in configs<br>
 	 * 3. Abort if not enough participants(return false)<br>
 	 * 4. Set state EventState.STARTED<br>
-	 * 5. Teleport all participants to team spot<br>
-	 * <br>
-	 * @return boolean: true if success, otherwise false<br>
+	 * 5. Teleport all participants to team spot
+	 * @return true if success, otherwise false
 	 */
 	public static boolean startFight()
 	{
@@ -314,9 +310,8 @@ public class TvTEvent
 	 * 2. Wait till teams are not at a tie anymore<br>
 	 * 3. Set state EvcentState.REWARDING<br>
 	 * 4. Reward team with more points<br>
-	 * 5. Show win html to wining team participants<br>
-	 * <br>
-	 * @return String: winning team name<br>
+	 * 5. Show win html to wining team participants
+	 * @return winning team name
 	 */
 	public static String calculateRewards()
 	{
@@ -407,7 +402,7 @@ public class TvTEvent
 			final NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage();
 			
 			statusUpdate.addAttribute(StatusUpdate.CUR_LOAD, playerInstance.getCurrentLoad());
-			npcHtmlMessage.setHtml(HtmCache.getInstance().getHtm(playerInstance.getHtmlPrefix(), htmlPath + "Reward.html"));
+			npcHtmlMessage.setHtml(HtmCache.getInstance().getHtm(playerInstance.getHtmlPrefix(), HTML_PATH + "Reward.html"));
 			playerInstance.sendPacket(statusUpdate);
 			playerInstance.sendPacket(npcHtmlMessage);
 		}
@@ -420,7 +415,7 @@ public class TvTEvent
 	 * 3. Open doors specified in configs<br>
 	 * 4. Teleport all participants back to participation npc location<br>
 	 * 5. Teams cleaning<br>
-	 * 6. Set state EventState.INACTIVE<br>
+	 * 6. Set state EventState.INACTIVE
 	 */
 	public static void stopFight()
 	{
@@ -460,14 +455,12 @@ public class TvTEvent
 	/**
 	 * Adds a player to a TvTEvent team<br>
 	 * 1. Calculate the id of the team in which the player should be added<br>
-	 * 2. Add the player to the calculated team<br>
-	 * <br>
-	 * @param playerInstance as L2PcInstance<br>
-	 * @return boolean: true if success, otherwise false<br>
+	 * 2. Add the player to the calculated team
+	 * @param playerInstance as L2PcInstance
+	 * @return boolean: true if success, otherwise false
 	 */
 	public static synchronized boolean addParticipant(L2PcInstance playerInstance)
 	{
-		// Check for nullpoitner
 		if (playerInstance == null)
 		{
 			return false;
@@ -491,10 +484,9 @@ public class TvTEvent
 	/**
 	 * Removes a TvTEvent player from it's team<br>
 	 * 1. Get team id of the player<br>
-	 * 2. Remove player from it's team<br>
-	 * <br>
+	 * 2. Remove player from it's team
 	 * @param playerObjectId
-	 * @return boolean: true if success, otherwise false
+	 * @return true if success, otherwise false
 	 */
 	public static boolean removeParticipant(int playerObjectId)
 	{
@@ -549,9 +541,8 @@ public class TvTEvent
 	/**
 	 * Send a SystemMessage to all participated players<br>
 	 * 1. Send the message to all players of team number one<br>
-	 * 2. Send the message to all players of team number two<br>
-	 * <br>
-	 * @param message as String<br>
+	 * 2. Send the message to all players of team number two
+	 * @param message the message
 	 */
 	public static void sysMsgToAllParticipants(String message)
 	{
@@ -637,9 +628,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called when a player logs in<br>
-	 * <br>
-	 * @param playerInstance as L2PcInstance<br>
+	 * Called when a player logs in.
+	 * @param playerInstance the player
 	 */
 	public static void onLogin(L2PcInstance playerInstance)
 	{
@@ -660,9 +650,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called when a player logs out<br>
-	 * <br>
-	 * @param playerInstance as L2PcInstance<br>
+	 * Called when a player logs out.
+	 * @param playerInstance the player
 	 */
 	public static void onLogout(L2PcInstance playerInstance)
 	{
@@ -676,11 +665,10 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called on every onAction in L2PcIstance<br>
-	 * <br>
+	 * Called on every onAction in L2PcIstance.
 	 * @param playerInstance
 	 * @param targetedPlayerObjectId
-	 * @return boolean: true if player is allowed to target, otherwise false
+	 * @return true if player is allowed to target, otherwise false
 	 */
 	public static boolean onAction(L2PcInstance playerInstance, int targetedPlayerObjectId)
 	{
@@ -711,10 +699,9 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called on every scroll use<br>
-	 * <br>
+	 * Called on every scroll use.
 	 * @param playerObjectId
-	 * @return boolean: true if player is allowed to use scroll, otherwise false
+	 * @return true if player is allowed to use scroll, otherwise false
 	 */
 	public static boolean onScrollUse(int playerObjectId)
 	{
@@ -732,9 +719,9 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called on every potion use
+	 * Called on every potion use.
 	 * @param playerObjectId
-	 * @return boolean: true if player is allowed to use potions, otherwise false
+	 * @return true if player is allowed to use potions, otherwise false
 	 */
 	public static boolean onPotionUse(int playerObjectId)
 	{
@@ -752,9 +739,9 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called on every escape use(thanks to nbd)
+	 * Called on every escape use.
 	 * @param playerObjectId
-	 * @return boolean: true if player is not in tvt event, otherwise false
+	 * @return true if player is not in tvt event, otherwise false
 	 */
 	public static boolean onEscapeUse(int playerObjectId)
 	{
@@ -772,9 +759,9 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called on every summon item use
+	 * Called on every summon item use.
 	 * @param playerObjectId
-	 * @return boolean: true if player is allowed to summon by item, otherwise false
+	 * @return true if player is allowed to summon by item, otherwise false
 	 */
 	public static boolean onItemSummon(int playerObjectId)
 	{
@@ -792,10 +779,9 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is called when a player is killed<br>
-	 * <br>
-	 * @param killerCharacter as L2Character<br>
-	 * @param killedPlayerInstance as L2PcInstance<br>
+	 * Is called when a player is killed.
+	 * @param killerCharacter as L2Character
+	 * @param killedPlayerInstance as L2PcInstance
 	 */
 	public static void onKill(L2Character killerCharacter, L2PcInstance killedPlayerInstance)
 	{
@@ -862,7 +848,7 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Called on Appearing packet received (player finished teleporting)
+	 * Called on Appearing packet received (player finished teleporting).
 	 * @param playerInstance
 	 */
 	public static void onTeleported(L2PcInstance playerInstance)
@@ -942,9 +928,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Sets the TvTEvent state<br>
-	 * <br>
-	 * @param state as EventState<br>
+	 * Sets the TvTEvent state.
+	 * @param state as EventState
 	 */
 	private static void setState(EventState state)
 	{
@@ -955,9 +940,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is TvTEvent inactive?<br>
-	 * <br>
-	 * @return boolean: true if event is inactive(waiting for next event cycle), otherwise false<br>
+	 * Is TvTEvent inactive?
+	 * @return true if event is inactive(waiting for next event cycle), otherwise false
 	 */
 	public static boolean isInactive()
 	{
@@ -972,9 +956,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is TvTEvent in inactivating?<br>
-	 * <br>
-	 * @return boolean: true if event is in inactivating progress, otherwise false<br>
+	 * Is TvTEvent in inactivating?.
+	 * @return true if event is in inactivating progress, otherwise false
 	 */
 	public static boolean isInactivating()
 	{
@@ -989,9 +972,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is TvTEvent in participation?<br>
-	 * <br>
-	 * @return boolean: true if event is in participation progress, otherwise false<br>
+	 * Is TvTEvent in participation?.
+	 * @return true if event is in participation progress, otherwise false
 	 */
 	public static boolean isParticipating()
 	{
@@ -1006,9 +988,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is TvTEvent starting?<br>
-	 * <br>
-	 * @return boolean: true if event is starting up(setting up fighting spot, teleport players etc.), otherwise false<br>
+	 * Is TvTEvent starting?
+	 * @return true if event is starting up(setting up fighting spot, teleport players etc.), otherwise false
 	 */
 	public static boolean isStarting()
 	{
@@ -1023,9 +1004,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is TvTEvent started?<br>
-	 * <br>
-	 * @return boolean: true if event is started, otherwise false<br>
+	 * Is TvTEvent started?
+	 * @return true if event is started, otherwise false
 	 */
 	public static boolean isStarted()
 	{
@@ -1040,9 +1020,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Is TvTEvent rewarding?<br>
-	 * <br>
-	 * @return boolean: true if event is currently rewarding, otherwise false<br>
+	 * Is TvTEvent rewarding?
+	 * @return true if event is currently rewarding, otherwise false
 	 */
 	public static boolean isRewarding()
 	{
@@ -1059,7 +1038,7 @@ public class TvTEvent
 	/**
 	 * Returns the team id of a player, if player is not participant it returns -1
 	 * @param playerObjectId
-	 * @return byte: team name of the given playerName, if not in event -1
+	 * @return team name of the given playerName, if not in event -1
 	 */
 	public static byte getParticipantTeamId(int playerObjectId)
 	{
@@ -1069,7 +1048,7 @@ public class TvTEvent
 	/**
 	 * Returns the team of a player, if player is not participant it returns null
 	 * @param playerObjectId
-	 * @return TvTEventTeam: team of the given playerObjectId, if not in event null
+	 * @return team of the given playerObjectId, if not in event null
 	 */
 	public static TvTEventTeam getParticipantTeam(int playerObjectId)
 	{
@@ -1079,7 +1058,7 @@ public class TvTEvent
 	/**
 	 * Returns the enemy team of a player, if player is not participant it returns null
 	 * @param playerObjectId
-	 * @return TvTEventTeam: enemy team of the given playerObjectId, if not in event null
+	 * @return enemy team of the given playerObjectId, if not in event null
 	 */
 	public static TvTEventTeam getParticipantEnemyTeam(int playerObjectId)
 	{
@@ -1089,7 +1068,7 @@ public class TvTEvent
 	/**
 	 * Returns the team coordinates in which the player is in, if player is not in a team return null
 	 * @param playerObjectId
-	 * @return int[]: coordinates of teams, 2 elements, index 0 for team 1 and index 1 for team 2
+	 * @return coordinates of teams, 2 elements, index 0 for team 1 and index 1 for team 2
 	 */
 	public static int[] getParticipantTeamCoordinates(int playerObjectId)
 	{
@@ -1099,7 +1078,7 @@ public class TvTEvent
 	/**
 	 * Is given player participant of the event?
 	 * @param playerObjectId
-	 * @return boolean: true if player is participant, ohterwise false
+	 * @return true if player is participant, ohterwise false
 	 */
 	public static boolean isPlayerParticipant(int playerObjectId)
 	{
@@ -1112,9 +1091,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Returns participated player count<br>
-	 * <br>
-	 * @return int: amount of players registered in the event<br>
+	 * Returns participated player count.
+	 * @return amount of players registered in the event
 	 */
 	public static int getParticipatedPlayersCount()
 	{
@@ -1127,9 +1105,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Returns teams names<br>
-	 * <br>
-	 * @return String[]: names of teams, 2 elements, index 0 for team 1 and index 1 for team 2<br>
+	 * Returns teams names.
+	 * @return names of teams, 2 elements, index 0 for team 1 and index 1 for team 2
 	 */
 	public static String[] getTeamNames()
 	{
@@ -1141,9 +1118,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Returns player count of both teams<br>
-	 * <br>
-	 * @return int[]: player count of teams, 2 elements, index 0 for team 1 and index 1 for team 2<br>
+	 * Returns player count of both teams.
+	 * @return player count of teams, 2 elements, index 0 for team 1 and index 1 for team 2
 	 */
 	public static int[] getTeamsPlayerCounts()
 	{
@@ -1155,8 +1131,8 @@ public class TvTEvent
 	}
 	
 	/**
-	 * Returns points count of both teams
-	 * @return int[]: points of teams, 2 elements, index 0 for team 1 and index 1 for team 2<br>
+	 * Returns points count of both teams.
+	 * @return int[]: points of teams, 2 elements, index 0 for team 1 and index 1 for team 2
 	 */
 	public static int[] getTeamsPoints()
 	{

+ 18 - 30
src/main/java/com/l2jserver/gameserver/model/entity/TvTEventTeam.java

@@ -28,21 +28,15 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  */
 public class TvTEventTeam
 {
-	/** The name of the team<br> */
+	/** The name of the team. */
 	private final String _name;
-	/** The team spot coordinated<br> */
+	/** The team spot coordinated. */
 	private int[] _coordinates = new int[3];
-	/** The points of the team<br> */
+	/** The points of the team. */
 	private short _points;
 	/** Name and instance of all participated players in map. */
 	private final Map<Integer, L2PcInstance> _participatedPlayers = new ConcurrentHashMap<>();
 	
-	/**
-	 * C'tor initialize the team<br>
-	 * <br>
-	 * @param name as String<br>
-	 * @param coordinates as int[]<br>
-	 */
 	public TvTEventTeam(String name, int[] coordinates)
 	{
 		_name = name;
@@ -51,10 +45,9 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Adds a player to the team<br>
-	 * <br>
-	 * @param playerInstance as L2PcInstance<br>
-	 * @return boolean: true if success, otherwise false<br>
+	 * Adds a player to the team.
+	 * @param playerInstance as L2PcInstance
+	 * @return boolean: true if success, otherwise false
 	 */
 	public boolean addPlayer(L2PcInstance playerInstance)
 	{
@@ -78,7 +71,7 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Increases the points of the team<br>
+	 * Increases the points of the team.
 	 */
 	public void increasePoints()
 	{
@@ -86,7 +79,7 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Cleanup the team and make it ready for adding players again<br>
+	 * Cleanup the team and make it ready for adding players again.
 	 */
 	public void cleanMe()
 	{
@@ -105,9 +98,8 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Returns the name of the team<br>
-	 * <br>
-	 * @return String: name of the team<br>
+	 * Returns the name of the team.
+	 * @return String: name of the team
 	 */
 	public String getName()
 	{
@@ -115,9 +107,8 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Returns the coordinates of the team spot<br>
-	 * <br>
-	 * @return int[]: team coordinates<br>
+	 * Returns the coordinates of the team spot.
+	 * @return team coordinates
 	 */
 	public int[] getCoordinates()
 	{
@@ -125,9 +116,8 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Returns the points of the team<br>
-	 * <br>
-	 * @return short: team points<br>
+	 * Returns the points of the team.
+	 * @return short: team points
 	 */
 	public short getPoints()
 	{
@@ -135,9 +125,8 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Returns name and instance of all participated players in Map<br>
-	 * <br>
-	 * @return Map<String, L2PcInstance>: map of players in this team<br>
+	 * Returns name and instance of all participated players in Map.
+	 * @return map of players in this team
 	 */
 	public Map<Integer, L2PcInstance> getParticipatedPlayers()
 	{
@@ -145,9 +134,8 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Returns player count of this team<br>
-	 * <br>
-	 * @return int: number of players in team<br>
+	 * Returns player count of this team.
+	 * @return number of players in team
 	 */
 	public int getParticipatedPlayerCount()
 	{

+ 3 - 11
src/main/java/com/l2jserver/gameserver/model/entity/TvTManager.java

@@ -27,18 +27,15 @@ import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.util.Broadcast;
 
 /**
+ * TVT Manager.
  * @author HorridoJoho
  */
 public class TvTManager
 {
 	protected static final Logger _log = Logger.getLogger(TvTManager.class.getName());
 	
-	/** Task for event cycles<br> */
 	private TvTStartTask _task;
 	
-	/**
-	 * New instance only by getInstance()<br>
-	 */
 	protected TvTManager()
 	{
 		if (Config.TVT_EVENT_ENABLED)
@@ -54,14 +51,9 @@ public class TvTManager
 		}
 	}
 	
-	/**
-	 * Initialize new/Returns the one and only instance<br>
-	 * <br>
-	 * @return TvTManager<br>
-	 */
 	public static TvTManager getInstance()
 	{
-		return SingletonHolder._instance;
+		return SingletonHolder.INSTANCE;
 	}
 	
 	/**
@@ -292,6 +284,6 @@ public class TvTManager
 	
 	private static class SingletonHolder
 	{
-		protected static final TvTManager _instance = new TvTManager();
+		protected static final TvTManager INSTANCE = new TvTManager();
 	}
 }

+ 4 - 1
src/main/java/com/l2jserver/gameserver/model/itemauction/ItemAuction.java

@@ -433,14 +433,17 @@ public final class ItemAuction
 		switch (getAuctionState())
 		{
 			case CREATED:
+			{
 				return false;
-				
+			}
 			case FINISHED:
+			{
 				if (_startingTime < (System.currentTimeMillis() - TimeUnit.MILLISECONDS.convert(Config.ALT_ITEM_AUCTION_EXPIRED_AFTER, TimeUnit.DAYS)))
 				{
 					return false;
 				}
 				break;
+			}
 		}
 		
 		final int playerObjId = player.getObjectId();

+ 22 - 12
src/main/java/com/l2jserver/gameserver/model/olympiad/Olympiad.java

@@ -65,16 +65,26 @@ public class Olympiad extends ListenersContainer
 	
 	public static final String OLYMPIAD_HTML_PATH = "data/html/olympiad/";
 	private static final String OLYMPIAD_LOAD_DATA = "SELECT current_cycle, period, olympiad_end, validation_end, " + "next_weekly_change FROM olympiad_data WHERE id = 0";
-	private static final String OLYMPIAD_SAVE_DATA = "INSERT INTO olympiad_data (id, current_cycle, " + "period, olympiad_end, validation_end, next_weekly_change) VALUES (0,?,?,?,?,?) " + "ON DUPLICATE KEY UPDATE current_cycle=?, period=?, olympiad_end=?, " + "validation_end=?, next_weekly_change=?";
-	private static final String OLYMPIAD_LOAD_NOBLES = "SELECT olympiad_nobles.charId, olympiad_nobles.class_id, " + "characters.char_name, olympiad_nobles.olympiad_points, olympiad_nobles.competitions_done, " + "olympiad_nobles.competitions_won, olympiad_nobles.competitions_lost, olympiad_nobles.competitions_drawn, " + "olympiad_nobles.competitions_done_week, olympiad_nobles.competitions_done_week_classed, olympiad_nobles.competitions_done_week_non_classed, olympiad_nobles.competitions_done_week_team " + "FROM olympiad_nobles, characters WHERE characters.charId = olympiad_nobles.charId";
-	private static final String OLYMPIAD_SAVE_NOBLES = "INSERT INTO olympiad_nobles " + "(`charId`,`class_id`,`olympiad_points`,`competitions_done`,`competitions_won`,`competitions_lost`," + "`competitions_drawn`, `competitions_done_week`, `competitions_done_week_classed`, `competitions_done_week_non_classed`, `competitions_done_week_team`) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
-	private static final String OLYMPIAD_UPDATE_NOBLES = "UPDATE olympiad_nobles SET " + "olympiad_points = ?, competitions_done = ?, competitions_won = ?, competitions_lost = ?, competitions_drawn = ?, competitions_done_week = ?, competitions_done_week_classed = ?, competitions_done_week_non_classed = ?, competitions_done_week_team = ? WHERE charId = ?";
-	private static final String OLYMPIAD_GET_HEROS = "SELECT olympiad_nobles.charId, characters.char_name " + "FROM olympiad_nobles, characters WHERE characters.charId = olympiad_nobles.charId " + "AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " AND olympiad_nobles.competitions_won > 0 " + "ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC";
+	private static final String OLYMPIAD_SAVE_DATA = "INSERT INTO olympiad_data (id, current_cycle, " + "period, olympiad_end, validation_end, next_weekly_change) VALUES (0,?,?,?,?,?) " + "ON DUPLICATE KEY UPDATE current_cycle=?, period=?, olympiad_end=?, "
+		+ "validation_end=?, next_weekly_change=?";
+	private static final String OLYMPIAD_LOAD_NOBLES = "SELECT olympiad_nobles.charId, olympiad_nobles.class_id, " + "characters.char_name, olympiad_nobles.olympiad_points, olympiad_nobles.competitions_done, "
+		+ "olympiad_nobles.competitions_won, olympiad_nobles.competitions_lost, olympiad_nobles.competitions_drawn, "
+		+ "olympiad_nobles.competitions_done_week, olympiad_nobles.competitions_done_week_classed, olympiad_nobles.competitions_done_week_non_classed, olympiad_nobles.competitions_done_week_team " + "FROM olympiad_nobles, characters WHERE characters.charId = olympiad_nobles.charId";
+	private static final String OLYMPIAD_SAVE_NOBLES = "INSERT INTO olympiad_nobles " + "(`charId`,`class_id`,`olympiad_points`,`competitions_done`,`competitions_won`,`competitions_lost`,"
+		+ "`competitions_drawn`, `competitions_done_week`, `competitions_done_week_classed`, `competitions_done_week_non_classed`, `competitions_done_week_team`) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
+	private static final String OLYMPIAD_UPDATE_NOBLES = "UPDATE olympiad_nobles SET "
+		+ "olympiad_points = ?, competitions_done = ?, competitions_won = ?, competitions_lost = ?, competitions_drawn = ?, competitions_done_week = ?, competitions_done_week_classed = ?, competitions_done_week_non_classed = ?, competitions_done_week_team = ? WHERE charId = ?";
+	private static final String OLYMPIAD_GET_HEROS = "SELECT olympiad_nobles.charId, characters.char_name " + "FROM olympiad_nobles, characters WHERE characters.charId = olympiad_nobles.charId " + "AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= "
+		+ Config.ALT_OLY_MIN_MATCHES + " AND olympiad_nobles.competitions_won > 0 " + "ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC";
 	private static final String GET_ALL_CLASSIFIED_NOBLESS = "SELECT charId from olympiad_nobles_eom " + "WHERE competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_points DESC, competitions_done DESC, competitions_won DESC";
-	private static final String GET_EACH_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles_eom, characters " + "WHERE characters.charId = olympiad_nobles_eom.charId AND olympiad_nobles_eom.class_id = ? " + "AND olympiad_nobles_eom.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " " + "ORDER BY olympiad_nobles_eom.olympiad_points DESC, olympiad_nobles_eom.competitions_done DESC, olympiad_nobles_eom.competitions_won DESC LIMIT 10";
-	private static final String GET_EACH_CLASS_LEADER_CURRENT = "SELECT characters.char_name from olympiad_nobles, characters " + "WHERE characters.charId = olympiad_nobles.charId AND olympiad_nobles.class_id = ? " + "AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " " + "ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10";
-	private static final String GET_EACH_CLASS_LEADER_SOULHOUND = "SELECT characters.char_name from olympiad_nobles_eom, characters " + "WHERE characters.charId = olympiad_nobles_eom.charId AND (olympiad_nobles_eom.class_id = ? OR olympiad_nobles_eom.class_id = 133) " + "AND olympiad_nobles_eom.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " " + "ORDER BY olympiad_nobles_eom.olympiad_points DESC, olympiad_nobles_eom.competitions_done DESC, olympiad_nobles_eom.competitions_won DESC LIMIT 10";
-	private static final String GET_EACH_CLASS_LEADER_CURRENT_SOULHOUND = "SELECT characters.char_name from olympiad_nobles, characters " + "WHERE characters.charId = olympiad_nobles.charId AND (olympiad_nobles.class_id = ? OR olympiad_nobles.class_id = 133) " + "AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " " + "ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10";
+	private static final String GET_EACH_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles_eom, characters " + "WHERE characters.charId = olympiad_nobles_eom.charId AND olympiad_nobles_eom.class_id = ? " + "AND olympiad_nobles_eom.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES
+		+ " " + "ORDER BY olympiad_nobles_eom.olympiad_points DESC, olympiad_nobles_eom.competitions_done DESC, olympiad_nobles_eom.competitions_won DESC LIMIT 10";
+	private static final String GET_EACH_CLASS_LEADER_CURRENT = "SELECT characters.char_name from olympiad_nobles, characters " + "WHERE characters.charId = olympiad_nobles.charId AND olympiad_nobles.class_id = ? " + "AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " "
+		+ "ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10";
+	private static final String GET_EACH_CLASS_LEADER_SOULHOUND = "SELECT characters.char_name from olympiad_nobles_eom, characters " + "WHERE characters.charId = olympiad_nobles_eom.charId AND (olympiad_nobles_eom.class_id = ? OR olympiad_nobles_eom.class_id = 133) "
+		+ "AND olympiad_nobles_eom.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " " + "ORDER BY olympiad_nobles_eom.olympiad_points DESC, olympiad_nobles_eom.competitions_done DESC, olympiad_nobles_eom.competitions_won DESC LIMIT 10";
+	private static final String GET_EACH_CLASS_LEADER_CURRENT_SOULHOUND = "SELECT characters.char_name from olympiad_nobles, characters " + "WHERE characters.charId = olympiad_nobles.charId AND (olympiad_nobles.class_id = ? OR olympiad_nobles.class_id = 133) "
+		+ "AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " " + "ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10";
 	
 	private static final String OLYMPIAD_DELETE_ALL = "TRUNCATE olympiad_nobles";
 	private static final String OLYMPIAD_MONTH_CLEAR = "TRUNCATE olympiad_nobles_eom";
@@ -540,8 +550,8 @@ public class Olympiad extends ListenersContainer
 				saveOlympiadStatus();
 				
 				init();
-			} , getMillisToCompEnd());
-		} , getMillisToCompBegin());
+			}, getMillisToCompEnd());
+		}, getMillisToCompBegin());
 	}
 	
 	private long getMillisToOlympiadEnd()
@@ -656,7 +666,7 @@ public class Olympiad extends ListenersContainer
 			
 			Calendar nextChange = Calendar.getInstance();
 			_nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
-		} , getMillisToWeekChange(), WEEKLY_PERIOD);
+		}, getMillisToWeekChange(), WEEKLY_PERIOD);
 	}
 	
 	protected synchronized void addWeeklyPoints()

+ 1 - 1
src/main/java/com/l2jserver/gameserver/model/olympiad/OlympiadGameTask.java

@@ -173,7 +173,7 @@ public final class OlympiadGameTask implements Runnable
 			int delay = 1; // schedule next call after 1s
 			switch (_state)
 			{
-			// Game created
+				// Game created
 				case BEGIN:
 				{
 					_state = GameState.TELEPORT_TO_ARENA;

+ 4 - 4
src/main/java/com/l2jserver/gameserver/model/quest/Quest.java

@@ -92,7 +92,7 @@ public class Quest extends AbstractScript implements IIdentifiable
 	protected boolean _onEnterWorld = false;
 	private boolean _isCustom = false;
 	
-	public int[] questItemIds = null;
+	public int[] _questItemIds = null;
 	
 	private static final String DEFAULT_NO_QUEST_MSG = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>";
 	private static final String DEFAULT_ALREADY_COMPLETED_MSG = "<html><body>This quest has already been completed.</body></html>";
@@ -2804,7 +2804,7 @@ public class Quest extends AbstractScript implements IIdentifiable
 	 */
 	public int[] getRegisteredItemIds()
 	{
-		return questItemIds;
+		return _questItemIds;
 	}
 	
 	/**
@@ -2813,7 +2813,7 @@ public class Quest extends AbstractScript implements IIdentifiable
 	 */
 	public void registerQuestItems(int... items)
 	{
-		questItemIds = items;
+		_questItemIds = items;
 	}
 	
 	/**
@@ -2822,7 +2822,7 @@ public class Quest extends AbstractScript implements IIdentifiable
 	 */
 	public void removeRegisteredQuestItems(L2PcInstance player)
 	{
-		takeItems(player, -1, questItemIds);
+		takeItems(player, -1, _questItemIds);
 	}
 	
 	@Override

+ 0 - 1
src/main/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java

@@ -691,7 +691,6 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
 					case 0xcf: // RequestProcureCrop
 						// msg = new RequestBuyProcure();
 						break;
-						
 					case 0xd0:
 						int id2 = -1;
 						if (buf.remaining() >= 2)

+ 1 - 2
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeNicknameColor.java

@@ -39,8 +39,7 @@ public class RequestChangeNicknameColor extends L2GameClientPacket
 		0xA0A601, // Peacock Green
 		0x7898AF, // Yellow Ochre
 		0x486295, // Chocolate
-		0x999999
-	// Silver
+		0x999999 // Silver
 	};
 	
 	private int _colorNum, _itemObjectId;

+ 3 - 1
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestExOustFromMPCC.java

@@ -44,7 +44,9 @@ public final class RequestExOustFromMPCC extends L2GameClientPacket
 		L2PcInstance target = L2World.getInstance().getPlayer(_name);
 		L2PcInstance activeChar = getClient().getActiveChar();
 		
-		if ((target != null) && target.isInParty() && activeChar.isInParty() && activeChar.getParty().isInCommandChannel() && target.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getLeader().equals(activeChar) && activeChar.getParty().getCommandChannel().equals(target.getParty().getCommandChannel()))
+		if ((target != null) && target.isInParty() && activeChar.isInParty() && activeChar.getParty().isInCommandChannel() && //
+			target.getParty().isInCommandChannel() && activeChar.getParty().getCommandChannel().getLeader().equals(activeChar) && //
+			activeChar.getParty().getCommandChannel().equals(target.getParty().getCommandChannel()))
 		{
 			if (activeChar.equals(target))
 			{

+ 2 - 1
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java

@@ -74,7 +74,8 @@ public final class RequestGetItemFromPet extends L2GameClientPacket
 		
 		if (_amount > item.getCount())
 		{
-			Util.handleIllegalPlayerAction(player, getClass().getSimpleName() + ": Character " + player.getName() + " of account " + player.getAccountName() + " tried to get item with oid " + _objectId + " from pet but has invalid count " + _amount + " item count: " + item.getCount(), Config.DEFAULT_PUNISH);
+			Util.handleIllegalPlayerAction(player, getClass().getSimpleName() + ": Character " + player.getName() + " of account " + player.getAccountName() + " tried to get item with oid " + _objectId + " from pet but has invalid count " + _amount + " item count: "
+				+ item.getCount(), Config.DEFAULT_PUNISH);
 			return;
 		}
 		

+ 2 - 1
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestGiveItemToPet.java

@@ -83,7 +83,8 @@ public final class RequestGiveItemToPet extends L2GameClientPacket
 		
 		if (_amount > item.getCount())
 		{
-			Util.handleIllegalPlayerAction(player, getClass().getSimpleName() + ": Character " + player.getName() + " of account " + player.getAccountName() + " tried to get item with oid " + _objectId + " from pet but has invalid count " + _amount + " item count: " + item.getCount(), Config.DEFAULT_PUNISH);
+			Util.handleIllegalPlayerAction(player, getClass().getSimpleName() + ": Character " + player.getName() + " of account " + player.getAccountName() + //
+				" tried to get item with oid " + _objectId + " from pet but has invalid count " + _amount + " item count: " + item.getCount(), Config.DEFAULT_PUNISH);
 			return;
 		}
 		

+ 3 - 5
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestPreviewItem.java

@@ -134,11 +134,9 @@ public final class RequestPreviewItem extends L2GameClientPacket
 		}
 		
 		// Check current target of the player and the INTERACTION_DISTANCE
-		L2Object target = activeChar.getTarget();
-		if (!activeChar.isGM() && ((target == null // No target (i.e. GM Shop)
-			) || !((target instanceof L2MerchantInstance)) // Target not a merchant
-		|| !activeChar.isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false) // Distance is too far
-		))
+		final L2Object target = activeChar.getTarget();
+		if (!activeChar.isGM() && ((target == null) || !(target instanceof L2MerchantInstance) || //
+			!activeChar.isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false)))
 		{
 			return;
 		}

+ 1 - 2
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestReplyStartPledgeWar.java

@@ -35,8 +35,7 @@ public final class RequestReplyStartPledgeWar extends L2GameClientPacket
 	@Override
 	protected void readImpl()
 	{
-		@SuppressWarnings("unused")
-		String _reqName = readS();
+		readS();
 		_answer = readD();
 	}
 	

+ 1 - 2
src/main/java/com/l2jserver/gameserver/network/clientpackets/RequestReplyStopPledgeWar.java

@@ -35,8 +35,7 @@ public final class RequestReplyStopPledgeWar extends L2GameClientPacket
 	@Override
 	protected void readImpl()
 	{
-		@SuppressWarnings("unused")
-		String _reqName = readS();
+		readS();
 		_answer = readD();
 	}
 	

+ 16 - 7
src/main/java/com/l2jserver/gameserver/network/serverpackets/CharCreateFail.java

@@ -20,13 +20,22 @@ package com.l2jserver.gameserver.network.serverpackets;
 
 public class CharCreateFail extends L2GameServerPacket
 {
-	public static final int REASON_CREATION_FAILED = 0x00; // "Your character creation has failed."
-	public static final int REASON_TOO_MANY_CHARACTERS = 0x01; // "You cannot create another character. Please delete the existing character and try again." Removes all settings that were selected (race, class, etc).
-	public static final int REASON_NAME_ALREADY_EXISTS = 0x02; // "This name already exists."
-	public static final int REASON_16_ENG_CHARS = 0x03; // "Your title cannot exceed 16 characters in length. Please try again."
-	public static final int REASON_INCORRECT_NAME = 0x04; // "Incorrect name. Please try again."
-	public static final int REASON_CREATE_NOT_ALLOWED = 0x05; // "Characters cannot be created from this server."
-	public static final int REASON_CHOOSE_ANOTHER_SVR = 0x06; // "Unable to create character. You are unable to create a new character on the selected server. A restriction is in place which restricts users from creating characters on different servers where no previous character exists. Please choose another server."
+	/** Your character creation has failed. */
+	public static final int REASON_CREATION_FAILED = 0x00;
+	/** You cannot create another character. Please delete the existing character and try again." Removes all settings that were selected (race, class, etc). */
+	public static final int REASON_TOO_MANY_CHARACTERS = 0x01;
+	/** This name already exists. */
+	public static final int REASON_NAME_ALREADY_EXISTS = 0x02;
+	/** Your title cannot exceed 16 characters in length. Please try again. */
+	public static final int REASON_16_ENG_CHARS = 0x03;
+	/** Incorrect name. Please try again. */
+	public static final int REASON_INCORRECT_NAME = 0x04;
+	/** Characters cannot be created from this server. */
+	public static final int REASON_CREATE_NOT_ALLOWED = 0x05;
+	/**
+	 * Unable to create character. You are unable to create a new character on the selected server. A restriction is in place which restricts users from creating characters on different servers where no previous character exists. Please choose another server.
+	 */
+	public static final int REASON_CHOOSE_ANOTHER_SVR = 0x06;
 	
 	private final int _error;
 	

+ 2 - 1
src/main/java/com/l2jserver/gameserver/network/serverpackets/ExChangeClientEffectInfo.java

@@ -29,7 +29,8 @@ public class ExChangeClientEffectInfo extends L2GameServerPacket
 	private final int _type, _key, _value;
 	
 	/**
-	 * @param type <ul>
+	 * @param type
+	 *            <ul>
 	 *            <li>0 - ChangeZoneState</li>
 	 *            <li>1 - SetL2Fog</li>
 	 *            <li>2 - postEffectData</li>

+ 2 - 1
src/main/java/com/l2jserver/gameserver/pathfinding/cellnodes/CellPathFinding.java

@@ -387,7 +387,8 @@ public class CellPathFinding extends PathFinding
 		StringUtil.append(stat, "LOS postfilter uses:", String.valueOf(_postFilterUses), "/", String.valueOf(_postFilterPlayableUses));
 		if (_postFilterUses > 0)
 		{
-			StringUtil.append(stat, " total/avg(ms):", String.valueOf(_postFilterElapsed), "/", String.format("%1.2f", (double) _postFilterElapsed / _postFilterUses), " passes total/avg:", String.valueOf(_postFilterPasses), "/", String.format("%1.1f", (double) _postFilterPasses / _postFilterUses), Config.EOL);
+			StringUtil.append(stat, " total/avg(ms):", String.valueOf(_postFilterElapsed), "/", String.format("%1.2f", (double) _postFilterElapsed / _postFilterUses), //
+				" passes total/avg:", String.valueOf(_postFilterPasses), "/", String.format("%1.1f", (double) _postFilterPasses / _postFilterUses), Config.EOL);
 		}
 		StringUtil.append(stat, "Pathfind success/fail:", String.valueOf(_findSuccess), "/", String.valueOf(_findFails));
 		result[result.length - 1] = stat.toString();

+ 4 - 1
src/main/java/com/l2jserver/loginserver/FloodProtectedListener.java

@@ -65,7 +65,10 @@ public abstract class FloodProtectedListener extends Thread
 					if (fConnection != null)
 					{
 						fConnection.connectionNumber += 1;
-						if (((fConnection.connectionNumber > Config.FAST_CONNECTION_LIMIT) && ((System.currentTimeMillis() - fConnection.lastConnection) < Config.NORMAL_CONNECTION_TIME)) || ((System.currentTimeMillis() - fConnection.lastConnection) < Config.FAST_CONNECTION_TIME) || (fConnection.connectionNumber > Config.MAX_CONNECTION_PER_IP))
+						if (((fConnection.connectionNumber > Config.FAST_CONNECTION_LIMIT) && //
+							((System.currentTimeMillis() - fConnection.lastConnection) < Config.NORMAL_CONNECTION_TIME)) || //
+							((System.currentTimeMillis() - fConnection.lastConnection) < Config.FAST_CONNECTION_TIME) || //
+							(fConnection.connectionNumber > Config.MAX_CONNECTION_PER_IP))
 						{
 							fConnection.lastConnection = System.currentTimeMillis();
 							connection.close();

+ 1 - 3
src/main/java/com/l2jserver/loginserver/network/clientpackets/RequestAuthLogin.java

@@ -40,9 +40,7 @@ import com.l2jserver.loginserver.network.serverpackets.ServerList;
 
 /**
  * <pre>
- * Format: x
- * 0 (a leading null)
- * x: the rsa encrypted block with the login an password.
+ * Format: x 0 (a leading null) x: the rsa encrypted block with the login an password.
  * 
  * <pre>
  */

+ 1 - 0
src/main/java/com/l2jserver/loginserver/network/gameserverpackets/GameServerAuth.java

@@ -42,6 +42,7 @@ import com.l2jserver.util.network.BaseRecievePacket;
  * d hexid size
  * b hexid
  * </pre>
+ * 
  * @author -Wooden-
  */
 public class GameServerAuth extends BaseRecievePacket

+ 7 - 19
src/main/java/com/l2jserver/tools/gsregistering/BaseGameServerRegister.java

@@ -228,13 +228,13 @@ public abstract class BaseGameServerRegister
 			"",
 			bundle.getString("credits"),
 			bundle.getString("bugReports") + " http://www.l2jserver.com"
-		
-		/*
-		 * "-b, --fallback\t\t\t\tIf an register operation fails due to ID already being in use it will then try to register first available ID", "-c, --cmd\t\t\t\tForces application to run in command-line mode even if the GUI is supported.",
-		 * "-f, --force\t\t\t\tForces GameServer register operations to overwrite a server if necessary", "-h, --help\t\t\t\tPrints this help message", "-l, --language <locale>\t\t\t\tAsks the application to use the specified locale, overriding auto-detection",
-		 * "-r, --register <id> <hexid_dest_dir>\tRegister GameServer with ID <id> and output hexid on <hexid_dest_dir>", "\t\t\t\t\tUse a negative value on <id> to register the first available ID", "\t\t\t\t\tFails if <id> already in use, unless --force is used (overwrites)", "",
-		 * "-u, --unregister <id>|all\t\tRemoves GameServer denoted by <id>, use \"all\" for removing all registered GameServers", "", "Copyright (C) L2J Team 2008-2012.", "Report bugs: http://www.l2jserver.com"
-		 */
+			
+			/*
+			 * "-b, --fallback\t\t\t\tIf an register operation fails due to ID already being in use it will then try to register first available ID", "-c, --cmd\t\t\t\tForces application to run in command-line mode even if the GUI is supported.",
+			 * "-f, --force\t\t\t\tForces GameServer register operations to overwrite a server if necessary", "-h, --help\t\t\t\tPrints this help message", "-l, --language <locale>\t\t\t\tAsks the application to use the specified locale, overriding auto-detection",
+			 * "-r, --register <id> <hexid_dest_dir>\tRegister GameServer with ID <id> and output hexid on <hexid_dest_dir>", "\t\t\t\t\tUse a negative value on <id> to register the first available ID", "\t\t\t\t\tFails if <id> already in use, unless --force is used (overwrites)", "",
+			 * "-u, --unregister <id>|all\t\tRemoves GameServer denoted by <id>, use \"all\" for removing all registered GameServers", "", "Copyright (C) L2J Team 2008-2012.", "Report bugs: http://www.l2jserver.com"
+			 */
 		};
 		
 		for (String str : help)
@@ -484,18 +484,6 @@ public abstract class BaseGameServerRegister
 			_fallback = fallback;
 		}
 		
-		/**
-		 * Sets the actions.
-		 * @param force the force.
-		 * @param fallback the fallback.
-		 */
-		@SuppressWarnings("unused")
-		public void setActions(boolean force, boolean fallback)
-		{
-			_force = force;
-			_fallback = fallback;
-		}
-		
 		@Override
 		public void run()
 		{

+ 1 - 1
src/main/java/com/l2jserver/util/PrimeFinder.java

@@ -49,7 +49,7 @@ public final class PrimeFinder
 	 * desired capacity, which in turn avoids wasting memory.<br>
 	 * For example, the list includes<br>
 	 * 1039,1117,1201,1277,1361,1439,1523,1597,1759,1907,2081.<br>
-	 * So if you need a prime >= 1040, you will find a prime <= 1040*1.11=1154.<br>
+	 * So if you need a prime >= 1040, you will find a prime &lt;= 1040*1.11=1154.<br>
 	 * Chunks are chosen such that they are optimized for a hashtable growthfactor of 2.0;<br>
 	 * If your hashtable has such a growthfactor then, after initially<br>
 	 * "rounding to a prime" upon hashtable construction, it will<br>

+ 8 - 5
src/main/java/com/l2jserver/util/StringUtil.java

@@ -22,9 +22,9 @@ import com.l2jserver.Config;
 
 /**
  * String utilities optimized for the best performance.<br>
- * <h1>How to Use It</h1> <h2>concat() or append()</h2> If concatenating strings<br>
- * in single call, use StringUtil.concat(), otherwise use StringUtil.append()<br>
- * and its variants.<br>
+ * <h1>How to Use It</h1>
+ * <h2>concat() or append()</h2><br>
+ * If concatenating strings in single call, use StringUtil.concat(), otherwise use StringUtil.append() and its variants.<br>
  * <br>
  * <h2>Minimum Calls</h2><br>
  * Bad:
@@ -136,8 +136,10 @@ import com.l2jserver.Config;
  * StringUtil.append(sbString, &quot;text 3&quot;, String.valueOf(npcId), &quot;text 4&quot;);
  * </pre>
  * 
- * Why?</br> In first case, new memory has to be allocated for the second string. In second case already allocated memory is reused, but only in case the new string is not longer than the previously allocated string. Anyway, the second way is better because the string either fits in the memory and
- * some memory is saved, or it does not fit in the memory, and in that case it works as in the first case. <h2>Primitives to Strings</h2> To convert primitives to string, use String.valueOf().<br>
+ * Why?</br>
+ * In first case, new memory has to be allocated for the second string. In second case already allocated memory is reused, but only in case the new string is not longer than the previously allocated string. Anyway, the second way is better because the string either fits in the memory and some memory
+ * is saved, or it does not fit in the memory, and in that case it works as in the first case.
+ * <h2>Primitives to Strings</h2> To convert primitives to string, use String.valueOf().<br>
  * <br>
  * <h2>How much faster is it?</h2><br>
  * Here are some results of my tests. Count is number of strings concatenated. Don't take the numbers as 100% true as the numbers are affected by other programs running on my computer at the same time. Anyway, from the results it is obvious that using StringBuilder with predefined size is the
@@ -182,6 +184,7 @@ import com.l2jserver.Config;
  * StringBuilder: 3081
  * StringBuilder with size: 2139
  * </pre>
+ * 
  * @author fordfrog
  */
 public final class StringUtil

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.