Fixed revelation skills exclude NPE.

This commit is contained in:
MobiusDev
2017-10-29 19:34:03 +00:00
parent 4d88174b71
commit cba3a349a6
4 changed files with 20 additions and 4 deletions

View File

@@ -1404,7 +1404,11 @@ public final class SkillTreesData implements IGameXmlReader
*/ */
public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl) public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl)
{ {
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl)); if (_revelationSkillTree.get(type) != null)
{
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl));
}
return null;
} }
/** /**

View File

@@ -1404,7 +1404,11 @@ public final class SkillTreesData implements IGameXmlReader
*/ */
public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl) public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl)
{ {
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl)); if (_revelationSkillTree.get(type) != null)
{
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl));
}
return null;
} }
/** /**

View File

@@ -1404,7 +1404,11 @@ public final class SkillTreesData implements IGameXmlReader
*/ */
public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl) public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl)
{ {
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl)); if (_revelationSkillTree.get(type) != null)
{
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl));
}
return null;
} }
/** /**

View File

@@ -1404,7 +1404,11 @@ public final class SkillTreesData implements IGameXmlReader
*/ */
public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl) public L2SkillLearn getRevelationSkill(SubclassType type, int id, int lvl)
{ {
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl)); if (_revelationSkillTree.get(type) != null)
{
return _revelationSkillTree.get(type).get(SkillData.getSkillHashCode(id, lvl));
}
return null;
} }
/** /**