Browse Source

BETA: Upgrading DocumentParser, implementing getCurrecntDocument():
* JavaDocs for almost all classes that extends DocumentParser.
* Format and cleanup for almost all classes that extends DocumentParser.
* Fixed typos in variable names at FishData.

Zoey76 13 năm trước cách đây
mục cha
commit
d06db8499b
17 tập tin đã thay đổi với 319 bổ sung118 xóa
  1. 69 26
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/AdminTable.java
  2. 11 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ArmorSetsData.java
  3. 13 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ClassListData.java
  4. 13 5
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/EnchantItemData.java
  5. 12 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ExperienceTable.java
  6. 35 33
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/FishData.java
  7. 11 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/FishingRodsData.java
  8. 15 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/HennaData.java
  9. 10 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/HitConditionBonus.java
  10. 12 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/InitialEquipmentData.java
  11. 23 6
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/PetDataTable.java
  12. 40 6
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/SkillTreesData.java
  13. 10 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/StaticObjects.java
  14. 39 8
      L2J_Server_BETA/java/com/l2jserver/gameserver/engines/DocumentParser.java
  15. 2 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/InstanceManager.java
  16. 2 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/MapRegionManager.java
  17. 2 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/ZoneManager.java

+ 69 - 26
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/AdminTable.java

@@ -24,7 +24,6 @@ import java.util.logging.Level;
 
 import javolution.util.FastMap;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -48,6 +47,9 @@ public class AdminTable extends DocumentParser
 	private static final FastMap<L2PcInstance, Boolean> _gmList = new FastMap<L2PcInstance, Boolean>();
 	private int _highestLevel = 0;
 	
+	/**
+	 * Instantiates a new admin table.
+	 */
 	protected AdminTable()
 	{
 		_gmList.shared();
@@ -66,14 +68,14 @@ public class AdminTable extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		Node attr;
 		StatsSet set;
 		L2AccessLevel level;
 		L2AdminCommandAccessRight command;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -113,11 +115,9 @@ public class AdminTable extends DocumentParser
 	}
 	
 	/**
-	 * Returns the access level by characterAccessLevel<br>
-	 * <br>
-	 * @param accessLevelNum as int<br>
-	 * <br>
-	 * @return AccessLevel: AccessLevel instance by char access level<br>
+	 * Returns the access level by characterAccessLevel.
+	 * @param accessLevelNum as int
+	 * @return the access level instance by char access level
 	 */
 	public L2AccessLevel getAccessLevel(int accessLevelNum)
 	{
@@ -132,20 +132,34 @@ public class AdminTable extends DocumentParser
 		return _accessLevels.get(accessLevelNum);
 	}
 	
+	/**
+	 * Gets the master access level.
+	 * @return the master access level
+	 */
 	public L2AccessLevel getMasterAccessLevel()
 	{
 		return _accessLevels.get(_highestLevel);
 	}
 	
+	/**
+	 * Checks for access level.
+	 * @param id the id
+	 * @return {@code true}, if successful, {@code false} otherwise
+	 */
 	public boolean hasAccessLevel(int id)
 	{
 		return _accessLevels.containsKey(id);
 	}
 	
+	/**
+	 * Checks for access.
+	 * @param adminCommand the admin command
+	 * @param accessLevel the access level
+	 * @return {@code true}, if successful, {@code false} otherwise
+	 */
 	public boolean hasAccess(String adminCommand, L2AccessLevel accessLevel)
 	{
 		L2AdminCommandAccessRight acar = _adminCommandAccessRights.get(adminCommand);
-		
 		if (acar == null)
 		{
 			// Trying to avoid the spam for next time when the gm would try to use the same command
@@ -161,10 +175,14 @@ public class AdminTable extends DocumentParser
 				return false;
 			}
 		}
-		
 		return acar.hasAccess(accessLevel);
 	}
 	
+	/**
+	 * Require confirm.
+	 * @param command the command
+	 * @return {@code true}, if the command require confirmation, {@code false} otherwise
+	 */
 	public boolean requireConfirm(String command)
 	{
 		L2AdminCommandAccessRight acar = _adminCommandAccessRights.get(command);
@@ -176,10 +194,14 @@ public class AdminTable extends DocumentParser
 		return acar.getRequireConfirm();
 	}
 	
+	/**
+	 * Gets the all GMs.
+	 * @param includeHidden the include hidden
+	 * @return the all GMs
+	 */
 	public List<L2PcInstance> getAllGms(boolean includeHidden)
 	{
-		List<L2PcInstance> tmpGmList = new ArrayList<>();
-		
+		final List<L2PcInstance> tmpGmList = new ArrayList<>();
 		for (Entry<L2PcInstance, Boolean> entry : _gmList.entrySet())
 		{
 			if (includeHidden || !entry.getValue())
@@ -187,14 +209,17 @@ public class AdminTable extends DocumentParser
 				tmpGmList.add(entry.getKey());
 			}
 		}
-		
 		return tmpGmList;
 	}
 	
+	/**
+	 * Gets the all GM names.
+	 * @param includeHidden the include hidden
+	 * @return the all GM names
+	 */
 	public List<String> getAllGmNames(boolean includeHidden)
 	{
-		List<String> tmpGmList = new ArrayList<>();
-		
+		final List<String> tmpGmList = new ArrayList<>();
 		for (Entry<L2PcInstance, Boolean> entry : _gmList.entrySet())
 		{
 			if (!entry.getValue())
@@ -206,14 +231,13 @@ public class AdminTable extends DocumentParser
 				tmpGmList.add(entry.getKey().getName() + " (invis)");
 			}
 		}
-		
 		return tmpGmList;
 	}
 	
 	/**
-	 * Add a L2PcInstance player to the Set _gmList
-	 * @param player
-	 * @param hidden
+	 * Add a L2PcInstance player to the Set _gmList.
+	 * @param player the player
+	 * @param hidden the hidden
 	 */
 	public void addGm(L2PcInstance player, boolean hidden)
 	{
@@ -224,19 +248,22 @@ public class AdminTable extends DocumentParser
 		_gmList.put(player, hidden);
 	}
 	
+	/**
+	 * Delete a GM.
+	 * @param player the player
+	 */
 	public void deleteGm(L2PcInstance player)
 	{
 		if (Config.DEBUG)
 		{
 			_log.fine("deleted gm: " + player.getName());
 		}
-		
 		_gmList.remove(player);
 	}
 	
 	/**
-	 * GM will be displayed on clients gmlist
-	 * @param player
+	 * GM will be displayed on clients GM list.
+	 * @param player the player
 	 */
 	public void showGm(L2PcInstance player)
 	{
@@ -247,8 +274,8 @@ public class AdminTable extends DocumentParser
 	}
 	
 	/**
-	 * GM will no longer be displayed on clients gmlist
-	 * @param player
+	 * GM will no longer be displayed on clients GM list.
+	 * @param player the player
 	 */
 	public void hideGm(L2PcInstance player)
 	{
@@ -258,6 +285,11 @@ public class AdminTable extends DocumentParser
 		}
 	}
 	
+	/**
+	 * Checks if is GM online.
+	 * @param includeHidden the include hidden
+	 * @return true, if is GM online
+	 */
 	public boolean isGmOnline(boolean includeHidden)
 	{
 		for (Entry<L2PcInstance, Boolean> entry : _gmList.entrySet())
@@ -267,10 +299,13 @@ public class AdminTable extends DocumentParser
 				return true;
 			}
 		}
-		
 		return false;
 	}
 	
+	/**
+	 * Send list to player.
+	 * @param player the player
+	 */
 	public void sendListToPlayer(L2PcInstance player)
 	{
 		if (isGmOnline(player.isGM()))
@@ -290,6 +325,10 @@ public class AdminTable extends DocumentParser
 		}
 	}
 	
+	/**
+	 * Broadcast to GMs.
+	 * @param packet the packet
+	 */
 	public void broadcastToGMs(L2GameServerPacket packet)
 	{
 		for (L2PcInstance gm : getAllGms(true))
@@ -298,6 +337,10 @@ public class AdminTable extends DocumentParser
 		}
 	}
 	
+	/**
+	 * Broadcast message to GMs.
+	 * @param message the message
+	 */
 	public void broadcastMessageToGMs(String message)
 	{
 		for (L2PcInstance gm : getAllGms(true))
@@ -306,8 +349,8 @@ public class AdminTable extends DocumentParser
 		}
 	}
 	
-
 	/**
+	 * Gets the single instance of AdminTable.
 	 * @return AccessLevels: the one and only instance of this class<br>
 	 */
 	public static AdminTable getInstance()

+ 11 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ArmorSetsData.java

@@ -18,7 +18,6 @@ import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -34,6 +33,9 @@ public final class ArmorSetsData extends DocumentParser
 {
 	private static final Map<Integer, L2ArmorSet> _armorSets = new HashMap<>();
 	
+	/**
+	 * Instantiates a new armor sets data.
+	 */
 	protected ArmorSetsData()
 	{
 		load();
@@ -48,11 +50,11 @@ public final class ArmorSetsData extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		L2ArmorSet set;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -157,6 +159,7 @@ public final class ArmorSetsData extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is armor set.
 	 * @param chestId the chest Id to verify.
 	 * @return {@code true} if the chest Id belongs to a registered armor set, {@code false} otherwise.
 	 */
@@ -166,6 +169,7 @@ public final class ArmorSetsData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the sets the.
 	 * @param chestId the chest Id identifying the armor set.
 	 * @return the armor set associated to the give chest Id.
 	 */
@@ -174,6 +178,10 @@ public final class ArmorSetsData extends DocumentParser
 		return _armorSets.get(chestId);
 	}
 	
+	/**
+	 * Gets the single instance of ArmorSetsData.
+	 * @return single instance of ArmorSetsData
+	 */
 	public static ArmorSetsData getInstance()
 	{
 		return SingletonHolder._instance;

+ 13 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ClassListData.java

@@ -17,7 +17,6 @@ package com.l2jserver.gameserver.datatables;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -34,6 +33,9 @@ public final class ClassListData extends DocumentParser
 {
 	private static final Map<ClassId, ClassInfo> _classData = new HashMap<>();
 	
+	/**
+	 * Instantiates a new class list data.
+	 */
 	protected ClassListData()
 	{
 		load();
@@ -48,7 +50,7 @@ public final class ClassListData extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		Node attr;
@@ -56,7 +58,7 @@ public final class ClassListData extends DocumentParser
 		String className;
 		String classServName;
 		ClassId parentClassId;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equals(n.getNodeName()))
 			{
@@ -81,6 +83,7 @@ public final class ClassListData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the class list.
 	 * @return the complete class list.
 	 */
 	public Map<ClassId, ClassInfo> getClassList()
@@ -89,6 +92,7 @@ public final class ClassListData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the class info.
 	 * @param classId the class Id.
 	 * @return the class info related to the given {@code classId}.
 	 */
@@ -98,6 +102,7 @@ public final class ClassListData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the class info.
 	 * @param classId the class Id as integer.
 	 * @return the class info related to the given {@code classId}.
 	 */
@@ -108,6 +113,7 @@ public final class ClassListData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the class info.
 	 * @param classServName the server side class name.
 	 * @return the class info related to the given {@code classServName}.
 	 */
@@ -123,6 +129,10 @@ public final class ClassListData extends DocumentParser
 		return null;
 	}
 	
+	/**
+	 * Gets the single instance of ClassListData.
+	 * @return single instance of ClassListData
+	 */
 	public static ClassListData getInstance()
 	{
 		return SingletonHolder._instance;

+ 13 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/EnchantItemData.java

@@ -19,7 +19,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -37,6 +36,9 @@ public class EnchantItemData extends DocumentParser
 	public static final Map<Integer, EnchantScroll> _scrolls = new HashMap<>();
 	public static final Map<Integer, EnchantItem> _supports = new HashMap<>();
 	
+	/**
+	 * Instantiates a new enchant item data.
+	 */
 	public EnchantItemData()
 	{
 		load();
@@ -53,11 +55,11 @@ public class EnchantItemData extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		StatsSet set;
 		Node att;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -114,7 +116,8 @@ public class EnchantItemData extends DocumentParser
 	}
 	
 	/**
-	 * @param scroll
+	 * Gets the enchant scroll.
+	 * @param scroll the scroll
 	 * @return enchant template for scroll
 	 */
 	public final EnchantScroll getEnchantScroll(L2ItemInstance scroll)
@@ -123,7 +126,8 @@ public class EnchantItemData extends DocumentParser
 	}
 	
 	/**
-	 * @param item
+	 * Gets the support item.
+	 * @param item the item
 	 * @return enchant template for support item
 	 */
 	public final EnchantItem getSupportItem(L2ItemInstance item)
@@ -131,6 +135,10 @@ public class EnchantItemData extends DocumentParser
 		return _supports.get(item.getItemId());
 	}
 	
+	/**
+	 * Gets the single instance of EnchantItemData.
+	 * @return single instance of EnchantItemData
+	 */
 	public static final EnchantItemData getInstance()
 	{
 		return SingletonHolder._instance;

+ 12 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ExperienceTable.java

@@ -17,7 +17,6 @@ package com.l2jserver.gameserver.datatables;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -34,6 +33,9 @@ public final class ExperienceTable extends DocumentParser
 	private byte MAX_LEVEL;
 	private byte MAX_PET_LEVEL;
 	
+	/**
+	 * Instantiates a new experience table.
+	 */
 	protected ExperienceTable()
 	{
 		load();
@@ -50,9 +52,9 @@ public final class ExperienceTable extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
-		final Node table = doc.getFirstChild();
+		final Node table = getCurrentDocument().getFirstChild();
 		final NamedNodeMap tableAttr = table.getAttributes();
 		
 		MAX_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxLevel").getNodeValue()) + 1);
@@ -70,6 +72,7 @@ public final class ExperienceTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the exp for level.
 	 * @param level the level required.
 	 * @return the experience points required to reach the given level.
 	 */
@@ -79,6 +82,7 @@ public final class ExperienceTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the max level.
 	 * @return the maximum level acquirable by a player.
 	 */
 	public byte getMaxLevel()
@@ -87,6 +91,7 @@ public final class ExperienceTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the max pet level.
 	 * @return the maximum level acquirable by a pet.
 	 */
 	public byte getMaxPetLevel()
@@ -94,6 +99,10 @@ public final class ExperienceTable extends DocumentParser
 		return MAX_PET_LEVEL;
 	}
 	
+	/**
+	 * Gets the single instance of ExperienceTable.
+	 * @return single instance of ExperienceTable
+	 */
 	public static ExperienceTable getInstance()
 	{
 		return SingletonHolder._instance;

+ 35 - 33
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/FishData.java

@@ -19,7 +19,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -33,10 +32,13 @@ import com.l2jserver.gameserver.model.fishing.L2Fish;
  */
 public final class FishData extends DocumentParser
 {
-	private static final Map<Integer, L2Fish> _fishsNormal = new HashMap<>();
-	private static final Map<Integer, L2Fish> _fishsEasy = new HashMap<>();
-	private static final Map<Integer, L2Fish> _fishsHard = new HashMap<>();
+	private static final Map<Integer, L2Fish> _fishNormal = new HashMap<>();
+	private static final Map<Integer, L2Fish> _fishEasy = new HashMap<>();
+	private static final Map<Integer, L2Fish> _fishHard = new HashMap<>();
 	
+	/**
+	 * Instantiates a new fish data.
+	 */
 	protected FishData()
 	{
 		load();
@@ -45,21 +47,21 @@ public final class FishData extends DocumentParser
 	@Override
 	public void load()
 	{
-		_fishsEasy.clear();
-		_fishsNormal.clear();
-		_fishsHard.clear();
+		_fishEasy.clear();
+		_fishNormal.clear();
+		_fishHard.clear();
 		parseDatapackFile("data/stats/items/fishing/fishes.xml");
-		_log.info(getClass().getSimpleName() + ": Loaded " + (_fishsEasy.size() + _fishsNormal.size() + _fishsHard.size()) + " Fishes.");
+		_log.info(getClass().getSimpleName() + ": Loaded " + (_fishEasy.size() + _fishNormal.size() + _fishHard.size()) + " Fishes.");
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		Node att;
 		L2Fish fish;
 		StatsSet set;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -67,7 +69,6 @@ public final class FishData extends DocumentParser
 				{
 					if ("fish".equalsIgnoreCase(d.getNodeName()))
 					{
-						
 						attrs = d.getAttributes();
 						
 						set = new StatsSet();
@@ -81,17 +82,17 @@ public final class FishData extends DocumentParser
 						{
 							case 0:
 							{
-								_fishsEasy.put(fish.getFishId(), fish);
+								_fishEasy.put(fish.getFishId(), fish);
 								break;
 							}
 							case 1:
 							{
-								_fishsNormal.put(fish.getFishId(), fish);
+								_fishNormal.put(fish.getFishId(), fish);
 								break;
 							}
 							case 2:
 							{
-								_fishsHard.put(fish.getFishId(), fish);
+								_fishHard.put(fish.getFishId(), fish);
 								break;
 							}
 						}
@@ -102,6 +103,7 @@ public final class FishData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the fish.
 	 * @param level the fish Level
 	 * @param group the fish Group
 	 * @param grade the fish Grade
@@ -109,52 +111,52 @@ public final class FishData extends DocumentParser
 	 */
 	public List<L2Fish> getFish(int level, int group, int grade)
 	{
-		ArrayList<L2Fish> result = new ArrayList<L2Fish>();
-		Map<Integer, L2Fish> _Fishs = null;
+		final ArrayList<L2Fish> result = new ArrayList<L2Fish>();
+		Map<Integer, L2Fish> fish = null;
 		switch (grade)
 		{
 			case 0:
 			{
-				_Fishs = _fishsEasy;
+				fish = _fishEasy;
 				break;
 			}
 			case 1:
 			{
-				_Fishs = _fishsNormal;
+				fish = _fishNormal;
 				break;
 			}
 			case 2:
 			{
-				_Fishs = _fishsHard;
+				fish = _fishHard;
 				break;
 			}
-		}
-		if (_Fishs == null)
-		{
-			// the fish list is empty
-			_log.warning(getClass().getSimpleName() + ": Fish are not defined !");
-			return null;
-		}
-		for (L2Fish f : _Fishs.values())
-		{
-			if (f.getFishLevel() != level)
+			default:
 			{
-				continue;
+				_log.warning(getClass().getSimpleName() + ": Unmanaged fish grade!");
+				return result;
 			}
-			if (f.getFishGroup() != group)
+		}
+		
+		for (L2Fish f : fish.values())
+		{
+			if ((f.getFishLevel() != level) || (f.getFishGroup() != group))
 			{
 				continue;
 			}
-			
 			result.add(f);
 		}
+		
 		if (result.isEmpty())
 		{
-			_log.warning(getClass().getSimpleName() + ": Cant Find Any Fish!? - Lvl: " + level + " Group: " + group + " Grade: " + grade);
+			_log.warning(getClass().getSimpleName() + ": Cannot find any fish for level: " + level + " group: " + group + " and grade: " + grade + "!");
 		}
 		return result;
 	}
 	
+	/**
+	 * Gets the single instance of FishData.
+	 * @return single instance of FishData
+	 */
 	public static FishData getInstance()
 	{
 		return SingletonHolder._instance;

+ 11 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/FishingRodsData.java

@@ -17,7 +17,6 @@ package com.l2jserver.gameserver.datatables;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -33,6 +32,9 @@ public final class FishingRodsData extends DocumentParser
 {
 	private static final Map<Integer, L2FishingRod> _fishingRods = new HashMap<>();
 	
+	/**
+	 * Instantiates a new fishing rods data.
+	 */
 	protected FishingRodsData()
 	{
 		load();
@@ -47,13 +49,13 @@ public final class FishingRodsData extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		Node att;
 		L2FishingRod fishingRod;
 		StatsSet set;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -79,7 +81,8 @@ public final class FishingRodsData extends DocumentParser
 	}
 	
 	/**
-	 * @param itemId
+	 * Gets the fishing rod.
+	 * @param itemId the item id
 	 * @return A fishing Rod by Item Id
 	 */
 	public L2FishingRod getFishingRod(int itemId)
@@ -87,6 +90,10 @@ public final class FishingRodsData extends DocumentParser
 		return _fishingRods.get(itemId);
 	}
 	
+	/**
+	 * Gets the single instance of FishingRodsData.
+	 * @return single instance of FishingRodsData
+	 */
 	public static FishingRodsData getInstance()
 	{
 		return SingletonHolder._instance;

+ 15 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/HennaData.java

@@ -19,7 +19,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -39,6 +38,9 @@ public final class HennaData extends DocumentParser
 {
 	private static final Map<Integer, L2Henna> _hennaList = new HashMap<>();
 	
+	/**
+	 * Instantiates a new henna data.
+	 */
 	protected HennaData()
 	{
 		load();
@@ -53,9 +55,9 @@ public final class HennaData extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equals(n.getNodeName()))
 			{
@@ -70,6 +72,10 @@ public final class HennaData extends DocumentParser
 		}
 	}
 	
+	/**
+	 * Parses the henna.
+	 * @param d the d
+	 */
 	private void parseHenna(Node d)
 	{
 		final StatsSet set = new StatsSet();
@@ -127,6 +133,7 @@ public final class HennaData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the henna.
 	 * @param id of the dye.
 	 * @return the dye with that id.
 	 */
@@ -136,6 +143,7 @@ public final class HennaData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the henna list.
 	 * @param classId the player's class Id.
 	 * @return the list with all the allowed dyes.
 	 */
@@ -152,6 +160,10 @@ public final class HennaData extends DocumentParser
 		return list;
 	}
 	
+	/**
+	 * Gets the single instance of HennaData.
+	 * @return single instance of HennaData
+	 */
 	public static HennaData getInstance()
 	{
 		return SingletonHolder._instance;

+ 10 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/HitConditionBonus.java

@@ -14,7 +14,6 @@
  */
 package com.l2jserver.gameserver.datatables;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -37,6 +36,9 @@ public final class HitConditionBonus extends DocumentParser
 	private int darkBonus = 0;
 	private int rainBonus = 0;
 	
+	/**
+	 * Instantiates a new hit condition bonus.
+	 */
 	protected HitConditionBonus()
 	{
 		load();
@@ -60,9 +62,9 @@ public final class HitConditionBonus extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
-		final Node n = doc.getFirstChild();
+		final Node n = getCurrentDocument().getFirstChild();
 		NamedNodeMap attrs;
 		for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
 		{
@@ -95,6 +97,7 @@ public final class HitConditionBonus extends DocumentParser
 	}
 	
 	/**
+	 * Gets the condition bonus.
 	 * @param attacker the attacking character.
 	 * @param target the attacked character.
 	 * @return the bonus of the attacker against the target.
@@ -138,6 +141,10 @@ public final class HitConditionBonus extends DocumentParser
 		return Math.max(mod / 100, 0);
 	}
 	
+	/**
+	 * Gets the single instance of HitConditionBonus.
+	 * @return single instance of HitConditionBonus
+	 */
 	public static HitConditionBonus getInstance()
 	{
 		return SingletonHolder._instance;

+ 12 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/InitialEquipmentData.java

@@ -19,7 +19,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -40,6 +39,9 @@ public final class InitialEquipmentData extends DocumentParser
 	private static final String filePathEvent = "data/stats/initialEquipmentEvent.xml";
 	private final Map<ClassId, List<PcItemTemplate>> _initialEquipmentList = new HashMap<>();
 	
+	/**
+	 * Instantiates a new initial equipment data.
+	 */
 	protected InitialEquipmentData()
 	{
 		load();
@@ -54,9 +56,9 @@ public final class InitialEquipmentData extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -72,6 +74,7 @@ public final class InitialEquipmentData extends DocumentParser
 	}
 	
 	/**
+	 * Parses the equipment.
 	 * @param d parse an initial equipment and add it to {@link #_initialEquipmentList}
 	 */
 	private void parseEquipment(Node d)
@@ -98,6 +101,7 @@ public final class InitialEquipmentData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the equipment list.
 	 * @param cId the class Id for the required initial equipment.
 	 * @return the initial equipment for the given class Id.
 	 */
@@ -107,6 +111,7 @@ public final class InitialEquipmentData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the equipment list.
 	 * @param cId the class Id for the required initial equipment.
 	 * @return the initial equipment for the given class Id.
 	 */
@@ -115,6 +120,10 @@ public final class InitialEquipmentData extends DocumentParser
 		return _initialEquipmentList.get(ClassId.getClassId(cId));
 	}
 	
+	/**
+	 * Gets the single instance of InitialEquipmentData.
+	 * @return single instance of InitialEquipmentData
+	 */
 	public static InitialEquipmentData getInstance()
 	{
 		return SingletonHolder._instance;

+ 23 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/PetDataTable.java

@@ -17,7 +17,6 @@ package com.l2jserver.gameserver.datatables;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -27,7 +26,7 @@ import com.l2jserver.gameserver.model.L2PetLevelData;
 import com.l2jserver.gameserver.model.StatsSet;
 
 /**
- * This class parse and hold all pet parameters.
+ * This class parse and hold all pet parameters.<br>
  * TODO: Unhardcode where is possible boolean methods and load and use all pet parameters.
  * @author Zoey76 (rework)
  */
@@ -35,6 +34,9 @@ public final class PetDataTable extends DocumentParser
 {
 	private static final Map<Integer, L2PetData> _pets = new HashMap<>();
 	
+	/**
+	 * Instantiates a new pet data table.
+	 */
 	protected PetDataTable()
 	{
 		load();
@@ -49,10 +51,10 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
-		Node n = doc.getFirstChild();
+		Node n = getCurrentDocument().getFirstChild();
 		for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
 		{
 			if (d.getNodeName().equals("pet"))
@@ -121,6 +123,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the pet level data.
 	 * @param petId the pet Id.
 	 * @param petLevel the pet level.
 	 * @return the pet's parameters for the given Id and level.
@@ -136,8 +139,9 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the pet data.
 	 * @param petId the pet Id.
-	 * @return 
+	 * @return the pet data
 	 */
 	public L2PetData getPetData(int petId)
 	{
@@ -149,8 +153,9 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the pet min level.
 	 * @param petId the pet Id.
-	 * @return
+	 * @return the pet min level
 	 */
 	public int getPetMinLevel(int petId)
 	{
@@ -158,6 +163,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is wolf.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a wolf, {@code false} otherwise.
 	 */
@@ -167,6 +173,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is evolved wolf.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from an evolved wolf, {@code false} otherwise.
 	 */
@@ -176,6 +183,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is sin eater.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a Sin Eater, {@code false} otherwise.
 	 */
@@ -185,6 +193,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is hatchling.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a hatchling, {@code false} otherwise.
 	 */
@@ -194,6 +203,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is strider.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a strider, {@code false} otherwise.
 	 */
@@ -203,6 +213,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is wyvern.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a wyvern, {@code false} otherwise.
 	 */
@@ -212,6 +223,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is baby.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a baby pet, {@code false} otherwise.
 	 */
@@ -221,6 +233,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is improved baby.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from an improved baby pet, {@code false} otherwise.
 	 */
@@ -230,6 +243,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is pet food.
 	 * @param itemId the item Id to verify.
 	 * @return {@code true} if the given Id is from a pet's food, {@code false} otherwise.
 	 */
@@ -252,6 +266,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the pet items by npc.
 	 * @param npcId the NPC Id to get its summoning item.
 	 * @return an array containing the list of summoning items for the given NPC Id.
 	 */
@@ -353,6 +368,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is mountable.
 	 * @param npcId the NPC Id to verify.
 	 * @return {@code true} if the given Id is from a mountable pet, {@code false} otherwise.
 	 */
@@ -372,6 +388,7 @@ public final class PetDataTable extends DocumentParser
 	}
 	
 	/**
+	 * Gets the single instance of PetDataTable.
 	 * @return this class unique instance.
 	 */
 	public static PetDataTable getInstance()

+ 40 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/SkillTreesData.java

@@ -26,7 +26,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -98,6 +97,9 @@ public final class SkillTreesData extends DocumentParser
 	 */
 	private static final Map<ClassId, ClassId> _parentClassMap = new HashMap<>();
 	
+	/**
+	 * Instantiates a new skill trees data.
+	 */
 	protected SkillTreesData()
 	{
 		load();
@@ -134,10 +136,9 @@ public final class SkillTreesData extends DocumentParser
 	
 	/**
 	 * Parse a skill tree file and store it into the correct skill tree.
-	 * @param doc the document to be parsed.
 	 */
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		Node attr;
@@ -145,7 +146,7 @@ public final class SkillTreesData extends DocumentParser
 		int cId = -1;
 		int parentClassId = -1;
 		ClassId classId = null;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -337,12 +338,13 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the transfer skill tree.<br>
+	 * If new classes are implemented over 3rd class, we use a recursive call.
 	 * @param classId the transfer skill tree ID.
 	 * @return the complete Transfer Skill Tree for a given {@code classId}.
 	 */
 	public Map<Integer, L2SkillLearn> getTransferSkillTree(ClassId classId)
 	{
-		// If new classes are implemented over 3rd class, we use a recursive call.
 		if (classId.level() >= 3)
 		{
 			return getTransferSkillTree(classId.getParent());
@@ -351,6 +353,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the common skill tree.
 	 * @return the complete Common Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getCommonSkillTree()
@@ -359,6 +362,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the collect skill tree.
 	 * @return the complete Collect Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getCollectSkillTree()
@@ -367,6 +371,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the fishing skill tree.
 	 * @return the complete Fishing Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getFishingSkillTree()
@@ -375,6 +380,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the pledge skill tree.
 	 * @return the complete Pledge Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getPledgeSkillTree()
@@ -383,6 +389,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the sub class skill tree.
 	 * @return the complete Sub-Class Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getSubClassSkillTree()
@@ -391,6 +398,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the sub pledge skill tree.
 	 * @return the complete Sub-Pledge Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getSubPledgeSkillTree()
@@ -399,6 +407,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the transform skill tree.
 	 * @return the complete Transform Skill Tree.
 	 */
 	public Map<Integer, L2SkillLearn> getTransformSkillTree()
@@ -407,6 +416,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the noble skill tree.
 	 * @return the complete Noble Skill Tree.
 	 */
 	public Map<Integer, L2Skill> getNobleSkillTree()
@@ -421,6 +431,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the hero skill tree.
 	 * @return the complete Hero Skill Tree.
 	 */
 	public Map<Integer, L2Skill> getHeroSkillTree()
@@ -435,6 +446,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the gM skill tree.
 	 * @return the complete Game Master Skill Tree.
 	 */
 	public Map<Integer, L2Skill> getGMSkillTree()
@@ -449,6 +461,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the gM aura skill tree.
 	 * @return the complete Game Master Aura Skill Tree.
 	 */
 	public Map<Integer, L2Skill> getGMAuraSkillTree()
@@ -463,6 +476,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available skills.
 	 * @param player the learning skill player.
 	 * @param classId the learning skill class ID.
 	 * @param includeByFs if {@code true} skills from Forgotten Scroll will be included.
@@ -502,6 +516,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available auto get skills.
 	 * @param player the player requesting the Auto-Get skills.
 	 * @return all the available Auto-Get skills for a given {@code player}.
 	 */
@@ -545,7 +560,7 @@ public final class SkillTreesData extends DocumentParser
 	
 	/**
 	 * Dwarvens will get additional dwarven only fishing skills.
-	 * @param player
+	 * @param player the player
 	 * @return all the available Fishing skills for a given {@code player}.
 	 */
 	public List<L2SkillLearn> getAvailableFishingSkills(L2PcInstance player)
@@ -606,6 +621,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available transfer skills.
 	 * @param player the transfer skill learning player.
 	 * @return all the available Transfer skills for a given {@code player}.
 	 */
@@ -666,6 +682,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available pledge skills.
 	 * @param clan the pledge skill learning clan.
 	 * @return all the available Pledge skills for a given {@code clan}.
 	 */
@@ -694,6 +711,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available sub pledge skills.
 	 * @param clan the sub-pledge skill learning clan.
 	 * @return all the available Sub-Pledge skills for a given {@code clan}.
 	 */
@@ -711,6 +729,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available sub class skills.
 	 * @param player the sub-class skill learning player.
 	 * @return all the available Sub-Class skills for a given {@code player}.
 	 */
@@ -747,6 +766,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the available residential skills.
 	 * @param residenceId the id of the Castle, Fort, Territory.
 	 * @return all the available Residential skills for a given {@code residenceId}.
 	 */
@@ -805,6 +825,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the transform skill.
 	 * @param id the transformation skill ID.
 	 * @param lvl the transformation skill level.
 	 * @return the transform skill from the Transform Skill Tree for a given {@code id} and {@code lvl}.
@@ -815,6 +836,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the class skill.
 	 * @param id the class skill ID.
 	 * @param lvl the class skill level.
 	 * @param classId the class skill tree ID.
@@ -826,6 +848,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the fishing skill.
 	 * @param id the fishing skill ID.
 	 * @param lvl the fishing skill level.
 	 * @return Fishing skill from the Fishing Skill Tree for a given {@code id} and {@code lvl}.
@@ -836,6 +859,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the pledge skill.
 	 * @param id the pledge skill ID.
 	 * @param lvl the pledge skill level.
 	 * @return the pledge skill from the Pledge Skill Tree for a given {@code id} and {@code lvl}.
@@ -846,6 +870,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the sub pledge skill.
 	 * @param id the sub-pledge skill ID.
 	 * @param lvl the sub-pledge skill level.
 	 * @return the sub-pledge skill from the Sub-Pledge Skill Tree for a given {@code id} and {@code lvl}.
@@ -856,6 +881,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the transfer skill.
 	 * @param id the transfer skill ID.
 	 * @param lvl the transfer skill level.
 	 * @param classId the transfer skill tree ID.
@@ -875,6 +901,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the sub class skill.
 	 * @param id the sub-class skill ID.
 	 * @param lvl the sub-class skill level.
 	 * @return the sub-class skill from the Sub-Class Skill Tree for a given {@code id} and {@code lvl}.
@@ -885,6 +912,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the common skill.
 	 * @param id the common skill Id.
 	 * @param lvl the common skill level.
 	 * @return the common skill from the Common Skill Tree for a given {@code id} and {@code lvl}.
@@ -895,6 +923,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the collect skill.
 	 * @param id the collect skill ID.
 	 * @param lvl the collect skill level.
 	 * @return the collect skill from the Collect Skill Tree for a given {@code id} and {@code lvl}.
@@ -905,6 +934,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the min level for new skill.
 	 * @param player the player that requires the minimum level.
 	 * @param skillTree the skill tree to search the minimum get level.
 	 * @return the minimum level for a new skill for a given {@code player} and {@code skillTree}.
@@ -933,6 +963,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is hero skill.
 	 * @param skillId the Id of the skill to check.
 	 * @param skillLevel the level of the skill to check, if it's -1 only Id will be checked.
 	 * @return {@code true} if the skill is present in the Hero Skill Tree, {@code false} otherwise.
@@ -955,6 +986,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Checks if is GM skill.
 	 * @param skillId skillId the Id of the skill to check.
 	 * @param skillLevel skillLevel the level of the skill to check, if it's -1 only Id will be checked.
 	 * @return {@code true} if the skill is present in the Game Master Skill Trees, {@code false} otherwise.
@@ -980,6 +1012,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Adds the skills.
 	 * @param gmchar the player to add the Game Master skills.
 	 * @param auraSkills if {@code true} it will add "GM Aura" skills, else will add the "GM regular" skills.
 	 */
@@ -1197,6 +1230,7 @@ public final class SkillTreesData extends DocumentParser
 	}
 	
 	/**
+	 * Gets the single instance of SkillTreesData.
 	 * @return the only instance of this class.
 	 */
 	public static SkillTreesData getInstance()

+ 10 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/StaticObjects.java

@@ -18,7 +18,6 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -36,6 +35,9 @@ public final class StaticObjects extends DocumentParser
 {
 	private static final Map<Integer, L2StaticObjectInstance> _staticObjects = new HashMap<>();
 	
+	/**
+	 * Instantiates a new static objects.
+	 */
 	protected StaticObjects()
 	{
 		load();
@@ -50,12 +52,12 @@ public final class StaticObjects extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		Node att;
 		StatsSet set;
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
@@ -92,6 +94,7 @@ public final class StaticObjects extends DocumentParser
 	}
 	
 	/**
+	 * Gets the static objects.
 	 * @return a collection of static objects.
 	 */
 	public Collection<L2StaticObjectInstance> getStaticObjects()
@@ -99,6 +102,10 @@ public final class StaticObjects extends DocumentParser
 		return _staticObjects.values();
 	}
 	
+	/**
+	 * Gets the single instance of StaticObjects.
+	 * @return single instance of StaticObjects
+	 */
 	public static StaticObjects getInstance()
 	{
 		return SingletonHolder._instance;

+ 39 - 8
L2J_Server_BETA/java/com/l2jserver/gameserver/engines/DocumentParser.java

@@ -44,6 +44,9 @@ public abstract class DocumentParser
 	private static final XMLFilter xmlFilter = new XMLFilter();
 	
 	private File _currentFile;
+	
+	private Document _currentDocument;
+	
 	/**
 	 * This method can be used to load/reload the data.<br>
 	 * It's highly recommended to clear the data storage, either the list or map.
@@ -61,8 +64,8 @@ public abstract class DocumentParser
 	
 	/**
 	 * Parses a single XML file.<br>
-	 * If the file was successfully parsed, call {@link #parseDocument(Document)} for the parsed document.
-	 * Validation is enforced.
+	 * If the file was successfully parsed, call {@link #parseDocument(Document)} for the parsed document.<br>
+	 * <b>Validation is enforced.</b>
 	 * @param f the XML file to parse.
 	 */
 	protected void parseFile(File f)
@@ -77,28 +80,41 @@ public abstract class DocumentParser
 		dbf.setNamespaceAware(true);
 		dbf.setValidating(true);
 		dbf.setIgnoringComments(true);
-		Document doc = null;
+		_currentDocument = null;
 		_currentFile = f;
 		try
 		{
 			dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
 			final DocumentBuilder db = dbf.newDocumentBuilder();
 			db.setErrorHandler(new XMLErrorHandler());
-			doc = db.parse(f);
+			_currentDocument = db.parse(f);
 		}
 		catch (Exception e)
 		{
 			_log.warning(getClass().getSimpleName() + ": Could not parse " + f.getName() + " file: " + e.getMessage());
 			return;
 		}
-		parseDocument(doc);
+		parseDocument();
 	}
 	
+	/**
+	 * Gets the current file.
+	 * @return the current file
+	 */
 	public File getCurrentFile()
 	{
 		return _currentFile;
 	}
 	
+	/**
+	 * Gets the current document.
+	 * @return the current document
+	 */
+	protected Document getCurrentDocument()
+	{
+		return _currentDocument;
+	}
+	
 	/**
 	 * Wrapper for {@link #parseDirectory(File)}.
 	 * @param path the path to the directory where the XML files are.
@@ -131,13 +147,22 @@ public abstract class DocumentParser
 	}
 	
 	/**
-	 * Abstract method that when implemented will parse a document.<br>
-	 * Is expected to be call from {@link #parseFile(File)}.
+	 * Overridable method that could parse a custom document.<br>
 	 * @param doc the document to parse.
 	 */
-	protected abstract void parseDocument(Document doc);
+	protected void parseDocument(Document doc)
+	{
+		// Do nothing, to be overridden in sub-classes.
+	}
+	
+	/**
+	 * Abstract method that when implemented will parse the current document.<br>
+	 * Is expected to be call from {@link #parseFile(File)}.
+	 */
+	protected abstract void parseDocument();
 	
 	/**
+	 * Parses the int.
 	 * @param n the named node map.
 	 * @param name the attribute name.
 	 * @return a parsed integer.
@@ -148,6 +173,7 @@ public abstract class DocumentParser
 	}
 	
 	/**
+	 * Parses the integer.
 	 * @param n the named node map.
 	 * @param name the attribute name.
 	 * @return a parsed integer object.
@@ -158,6 +184,7 @@ public abstract class DocumentParser
 	}
 	
 	/**
+	 * Parses the int.
 	 * @param n the node to parse.
 	 * @return the parsed integer.
 	 */
@@ -167,6 +194,7 @@ public abstract class DocumentParser
 	}
 	
 	/**
+	 * Parses the integer.
 	 * @param n the node to parse.
 	 * @return the parsed integer object.
 	 */
@@ -176,6 +204,7 @@ public abstract class DocumentParser
 	}
 	
 	/**
+	 * Parses the long.
 	 * @param n the named node map.
 	 * @param name the attribute name.
 	 * @return a parsed integer.
@@ -186,6 +215,7 @@ public abstract class DocumentParser
 	}
 	
 	/**
+	 * Parses the double.
 	 * @param n the named node map.
 	 * @param name the attribute name.
 	 * @return a parsed double.
@@ -196,6 +226,7 @@ public abstract class DocumentParser
 	}
 	
 	/**
+	 * Parses the boolean.
 	 * @param n the named node map.
 	 * @param name the attribute name.
 	 * @return {@code true} if the attribute exists and it's value is {@code true}, {@code false} otherwise.

+ 2 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/InstanceManager.java

@@ -23,7 +23,6 @@ import java.util.Map;
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -223,9 +222,9 @@ public class InstanceManager extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equals(n.getNodeName()))
 			{

+ 2 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/MapRegionManager.java

@@ -19,7 +19,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -77,7 +76,7 @@ public class MapRegionManager extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		NamedNodeMap attrs;
 		String name;
@@ -86,7 +85,7 @@ public class MapRegionManager extends DocumentParser
 		int castle;
 		int bbs;
 		
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{

+ 2 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/ZoneManager.java

@@ -26,7 +26,6 @@ import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
@@ -104,7 +103,7 @@ public class ZoneManager extends DocumentParser
 	}
 	
 	@Override
-	protected void parseDocument(Document doc)
+	protected void parseDocument()
 	{
 		// Get the world regions
 		L2WorldRegion[][] worldRegions = L2World.getInstance().getAllWorldRegions();
@@ -116,7 +115,7 @@ public class ZoneManager extends DocumentParser
 		String zoneType, zoneShape;
 		List<int[]> rs = new ArrayList<>();
 		
-		for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
+		for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{