Browse Source

All skill trees should keep order

Zoey76 9 years ago
parent
commit
aa040ada26

+ 14 - 14
L2J_Server/java/com/l2jserver/gameserver/data/xml/impl/SkillTreesData.java

@@ -76,22 +76,22 @@ import com.l2jserver.util.data.xml.IXmlReader;
  */
 public final class SkillTreesData implements IXmlReader
 {
-	// ClassId, FastMap of Skill Hash Code, L2SkillLearn
-	private final Map<ClassId, Map<Integer, L2SkillLearn>> _classSkillTrees = new HashMap<>();
-	private final Map<ClassId, Map<Integer, L2SkillLearn>> _transferSkillTrees = new HashMap<>();
+	// ClassId, Map of Skill Hash Code, L2SkillLearn
+	private final Map<ClassId, Map<Integer, L2SkillLearn>> _classSkillTrees = new LinkedHashMap<>();
+	private final Map<ClassId, Map<Integer, L2SkillLearn>> _transferSkillTrees = new LinkedHashMap<>();
 	// Skill Hash Code, L2SkillLearn
-	private final Map<Integer, L2SkillLearn> _collectSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _fishingSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _pledgeSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _subClassSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _subPledgeSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _transformSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _commonSkillTree = new HashMap<>();
+	private final Map<Integer, L2SkillLearn> _collectSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _fishingSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _pledgeSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _subClassSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _subPledgeSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _transformSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _commonSkillTree = new LinkedHashMap<>();
 	// Other skill trees
-	private final Map<Integer, L2SkillLearn> _nobleSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _heroSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _gameMasterSkillTree = new HashMap<>();
-	private final Map<Integer, L2SkillLearn> _gameMasterAuraSkillTree = new HashMap<>();
+	private final Map<Integer, L2SkillLearn> _nobleSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _heroSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _gameMasterSkillTree = new LinkedHashMap<>();
+	private final Map<Integer, L2SkillLearn> _gameMasterAuraSkillTree = new LinkedHashMap<>();
 	
 	// Checker, sorted arrays of hash codes
 	private Map<Integer, int[]> _skillsByClassIdHashCodes; // Occupation skills

+ 1 - 1
L2J_Server/java/com/l2jserver/gameserver/model/entity/TvTEventTeam.java

@@ -135,7 +135,7 @@ public class TvTEventTeam
 	}
 	
 	/**
-	 * Returns name and instance of all participated players in FastMap<br>
+	 * Returns name and instance of all participated players in Map<br>
 	 * <br>
 	 * @return Map<String, L2PcInstance>: map of players in this team<br>
 	 */

+ 2 - 2
L2J_Server/java/com/l2jserver/gameserver/model/quest/QuestState.java

@@ -222,8 +222,8 @@ public final class QuestState
 	 * <ul>
 	 * <li>Initialize class variable "vars" if is null.</li>
 	 * <li>Initialize parameter "val" if is null</li>
-	 * <li>Add/Update couple (var,val) in class variable FastMap "vars"</li>
-	 * <li>If the key represented by "var" exists in FastMap "vars", the couple (var,val) is updated in the database.<br>
+	 * <li>Add/Update couple (var,val) in class variable Map "vars"</li>
+	 * <li>If the key represented by "var" exists in Map "vars", the couple (var,val) is updated in the database.<br>
 	 * The key is known as existing if the preceding value of the key (given as result of function put()) is not null.<br>
 	 * If the key doesn't exist, the couple is added/created in the database</li>
 	 * <ul>