diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/01500-01599.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/01500-01599.xml index d6aa350c10..90ebea30d3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/01500-01599.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/01500-01599.xml @@ -3934,6 +3934,7 @@ 1566 SELF SINGLE + false 10 @@ -3966,6 +3967,7 @@ 1566 SELF SINGLE + false 10 @@ -3998,6 +4000,7 @@ 1566 SELF SINGLE + false 10 @@ -4030,6 +4033,7 @@ 1566 SELF SINGLE + false 10 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/17900-17999.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/17900-17999.xml index 6a454c3569..212c8dc6e1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/17900-17999.xml +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/17900-17999.xml @@ -698,6 +698,7 @@ icon.alchemy_mix_cube P + false diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/skills.xsd b/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/skills.xsd index 1b23dc184e..e532360239 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/xsd/skills.xsd @@ -2348,9 +2348,6 @@ - - - @@ -2642,6 +2639,7 @@ + diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index 884e4273b4..cceede352d 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1695,12 +1695,6 @@ public final class SkillTreesData implements IGameXmlReader return true; } - // Exclude Revelation Skills from this check. - if (getRevelationSkill(player.isDualClassActive() ? SubclassType.DUALCLASS : SubclassType.BASECLASS, skill.getId(), Math.min(skill.getLevel(), maxLvl)) != null) - { - return true; - } - return false; } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 3025ee16b0..cb661c272f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -11705,6 +11705,34 @@ public final class L2PcInstance extends L2Playable { // Include transformation skills and those skills that are allowed during transformation. currentSkills = currentSkills.stream().filter(Skill::allowOnTransform).collect(Collectors.toList()); + + // Revelation skills. + if (isDualClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } + else if (!isSubClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } } // Include transformation skills. currentSkills.addAll(transformSkills.values()); @@ -11716,6 +11744,7 @@ public final class L2PcInstance extends L2Playable .filter(Objects::nonNull) .filter(s -> !s.isBlockActionUseSkill()) // Skills that are blocked from player use are not shown in skill list. .filter(s -> !SkillTreesData.getInstance().isAlchemySkill(s.getId(), s.getLevel())) + .filter(s -> s.isDisplayInList()) .collect(Collectors.toList()); //@formatter:on } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java index 8e4641502a..6148235551 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -209,6 +209,7 @@ public final class Skill implements IIdentifiable private final double _magicCriticalRate; private final SkillBuffType _buffType; + private final boolean _displayInList; public Skill(StatsSet set) { @@ -441,6 +442,7 @@ public final class Skill implements IIdentifiable _magicCriticalRate = set.getDouble("magicCriticalRate", 0); _buffType = isTriggeredSkill() ? SkillBuffType.TRIGGER : isToggle() ? SkillBuffType.TOGGLE : isDance() ? SkillBuffType.DANCE : isDebuff() ? SkillBuffType.DEBUFF : !isHealingPotionSkill() ? SkillBuffType.BUFF : SkillBuffType.NONE; + _displayInList = set.getBoolean("displayInList", true); } public TraitType getTraitType() @@ -1805,6 +1807,11 @@ public final class Skill implements IIdentifiable return _irreplacableBuff; } + public boolean isDisplayInList() + { + return _displayInList; + } + /** * @return if skill could not be requested for use by players. */ diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/01500-01599.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/01500-01599.xml index 76dc79ce4f..5d8e4957dd 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/01500-01599.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/01500-01599.xml @@ -3934,6 +3934,7 @@ 1566 SELF SINGLE + false 10 @@ -3966,6 +3967,7 @@ 1566 SELF SINGLE + false 10 @@ -3998,6 +4000,7 @@ 1566 SELF SINGLE + false 10 @@ -4030,6 +4033,7 @@ 1566 SELF SINGLE + false 10 diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/17900-17999.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/17900-17999.xml index 5f59f5bbbd..a41daa6f08 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/17900-17999.xml +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/17900-17999.xml @@ -698,6 +698,7 @@ icon.alchemy_mix_cube P + false diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/xsd/skills.xsd b/L2J_Mobius_2.5_Underground/dist/game/data/xsd/skills.xsd index c70b99f334..71287d5743 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_2.5_Underground/dist/game/data/xsd/skills.xsd @@ -2471,9 +2471,6 @@ - - - @@ -2765,6 +2762,7 @@ + diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index 884e4273b4..cceede352d 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1695,12 +1695,6 @@ public final class SkillTreesData implements IGameXmlReader return true; } - // Exclude Revelation Skills from this check. - if (getRevelationSkill(player.isDualClassActive() ? SubclassType.DUALCLASS : SubclassType.BASECLASS, skill.getId(), Math.min(skill.getLevel(), maxLvl)) != null) - { - return true; - } - return false; } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index b27a997a22..5caa9a5def 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -11706,6 +11706,34 @@ public final class L2PcInstance extends L2Playable { // Include transformation skills and those skills that are allowed during transformation. currentSkills = currentSkills.stream().filter(Skill::allowOnTransform).collect(Collectors.toList()); + + // Revelation skills. + if (isDualClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } + else if (!isSubClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } } // Include transformation skills. currentSkills.addAll(transformSkills.values()); @@ -11717,6 +11745,7 @@ public final class L2PcInstance extends L2Playable .filter(Objects::nonNull) .filter(s -> !s.isBlockActionUseSkill()) // Skills that are blocked from player use are not shown in skill list. .filter(s -> !SkillTreesData.getInstance().isAlchemySkill(s.getId(), s.getLevel())) + .filter(s -> s.isDisplayInList()) .collect(Collectors.toList()); //@formatter:on } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java index 8e4641502a..6148235551 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -209,6 +209,7 @@ public final class Skill implements IIdentifiable private final double _magicCriticalRate; private final SkillBuffType _buffType; + private final boolean _displayInList; public Skill(StatsSet set) { @@ -441,6 +442,7 @@ public final class Skill implements IIdentifiable _magicCriticalRate = set.getDouble("magicCriticalRate", 0); _buffType = isTriggeredSkill() ? SkillBuffType.TRIGGER : isToggle() ? SkillBuffType.TOGGLE : isDance() ? SkillBuffType.DANCE : isDebuff() ? SkillBuffType.DEBUFF : !isHealingPotionSkill() ? SkillBuffType.BUFF : SkillBuffType.NONE; + _displayInList = set.getBoolean("displayInList", true); } public TraitType getTraitType() @@ -1805,6 +1807,11 @@ public final class Skill implements IIdentifiable return _irreplacableBuff; } + public boolean isDisplayInList() + { + return _displayInList; + } + /** * @return if skill could not be requested for use by players. */ diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/01500-01599.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/01500-01599.xml index d6aa350c10..90ebea30d3 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/01500-01599.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/01500-01599.xml @@ -3934,6 +3934,7 @@ 1566 SELF SINGLE + false 10 @@ -3966,6 +3967,7 @@ 1566 SELF SINGLE + false 10 @@ -3998,6 +4000,7 @@ 1566 SELF SINGLE + false 10 @@ -4030,6 +4033,7 @@ 1566 SELF SINGLE + false 10 diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/17900-17999.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/17900-17999.xml index f71c6c789d..5d63c0e163 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/17900-17999.xml +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/17900-17999.xml @@ -698,6 +698,7 @@ icon.alchemy_mix_cube P + false diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/xsd/skills.xsd b/L2J_Mobius_3.0_Helios/dist/game/data/xsd/skills.xsd index aeead5813f..67967b59be 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_3.0_Helios/dist/game/data/xsd/skills.xsd @@ -2503,9 +2503,6 @@ - - - @@ -2803,6 +2800,7 @@ + diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index 884e4273b4..cceede352d 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1695,12 +1695,6 @@ public final class SkillTreesData implements IGameXmlReader return true; } - // Exclude Revelation Skills from this check. - if (getRevelationSkill(player.isDualClassActive() ? SubclassType.DUALCLASS : SubclassType.BASECLASS, skill.getId(), Math.min(skill.getLevel(), maxLvl)) != null) - { - return true; - } - return false; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index d79ed5dc96..cbf2114920 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -11716,6 +11716,34 @@ public final class L2PcInstance extends L2Playable { // Include transformation skills and those skills that are allowed during transformation. currentSkills = currentSkills.stream().filter(Skill::allowOnTransform).collect(Collectors.toList()); + + // Revelation skills. + if (isDualClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } + else if (!isSubClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } } // Include transformation skills. currentSkills.addAll(transformSkills.values()); @@ -11727,6 +11755,7 @@ public final class L2PcInstance extends L2Playable .filter(Objects::nonNull) .filter(s -> !s.isBlockActionUseSkill()) // Skills that are blocked from player use are not shown in skill list. .filter(s -> !SkillTreesData.getInstance().isAlchemySkill(s.getId(), s.getLevel())) + .filter(s -> s.isDisplayInList()) .collect(Collectors.toList()); //@formatter:on } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java index 8e4641502a..6148235551 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -209,6 +209,7 @@ public final class Skill implements IIdentifiable private final double _magicCriticalRate; private final SkillBuffType _buffType; + private final boolean _displayInList; public Skill(StatsSet set) { @@ -441,6 +442,7 @@ public final class Skill implements IIdentifiable _magicCriticalRate = set.getDouble("magicCriticalRate", 0); _buffType = isTriggeredSkill() ? SkillBuffType.TRIGGER : isToggle() ? SkillBuffType.TOGGLE : isDance() ? SkillBuffType.DANCE : isDebuff() ? SkillBuffType.DEBUFF : !isHealingPotionSkill() ? SkillBuffType.BUFF : SkillBuffType.NONE; + _displayInList = set.getBoolean("displayInList", true); } public TraitType getTraitType() @@ -1805,6 +1807,11 @@ public final class Skill implements IIdentifiable return _irreplacableBuff; } + public boolean isDisplayInList() + { + return _displayInList; + } + /** * @return if skill could not be requested for use by players. */ diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/01500-01599.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/01500-01599.xml index 8b9c850279..4641e0cec0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/01500-01599.xml +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/01500-01599.xml @@ -3934,6 +3934,7 @@ 1566 SELF SINGLE + false 10 @@ -3966,6 +3967,7 @@ 1566 SELF SINGLE + false 10 @@ -3998,6 +4000,7 @@ 1566 SELF SINGLE + false 10 @@ -4030,6 +4033,7 @@ 1566 SELF SINGLE + false 10 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/17900-17999.xml b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/17900-17999.xml index 84b6e4bd6b..9ac1e4bbbd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/17900-17999.xml +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/17900-17999.xml @@ -698,6 +698,7 @@ icon.alchemy_mix_cube P + false diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/skills.xsd b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/skills.xsd index e99593f9af..0aec67edb4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/skills.xsd +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/xsd/skills.xsd @@ -2477,9 +2477,6 @@ - - - @@ -2818,6 +2815,7 @@ + diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index 884e4273b4..cceede352d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1695,12 +1695,6 @@ public final class SkillTreesData implements IGameXmlReader return true; } - // Exclude Revelation Skills from this check. - if (getRevelationSkill(player.isDualClassActive() ? SubclassType.DUALCLASS : SubclassType.BASECLASS, skill.getId(), Math.min(skill.getLevel(), maxLvl)) != null) - { - return true; - } - return false; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 9d5bd80977..73fdb4daf0 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -11699,6 +11699,34 @@ public final class L2PcInstance extends L2Playable { // Include transformation skills and those skills that are allowed during transformation. currentSkills = currentSkills.stream().filter(Skill::allowOnTransform).collect(Collectors.toList()); + + // Revelation skills. + if (isDualClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } + else if (!isSubClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } } // Include transformation skills. currentSkills.addAll(transformSkills.values()); @@ -11710,6 +11738,7 @@ public final class L2PcInstance extends L2Playable .filter(Objects::nonNull) .filter(s -> !s.isBlockActionUseSkill()) // Skills that are blocked from player use are not shown in skill list. .filter(s -> !SkillTreesData.getInstance().isAlchemySkill(s.getId(), s.getLevel())) + .filter(s -> s.isDisplayInList()) .collect(Collectors.toList()); //@formatter:on } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java index 8e4641502a..6148235551 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -209,6 +209,7 @@ public final class Skill implements IIdentifiable private final double _magicCriticalRate; private final SkillBuffType _buffType; + private final boolean _displayInList; public Skill(StatsSet set) { @@ -441,6 +442,7 @@ public final class Skill implements IIdentifiable _magicCriticalRate = set.getDouble("magicCriticalRate", 0); _buffType = isTriggeredSkill() ? SkillBuffType.TRIGGER : isToggle() ? SkillBuffType.TOGGLE : isDance() ? SkillBuffType.DANCE : isDebuff() ? SkillBuffType.DEBUFF : !isHealingPotionSkill() ? SkillBuffType.BUFF : SkillBuffType.NONE; + _displayInList = set.getBoolean("displayInList", true); } public TraitType getTraitType() @@ -1805,6 +1807,11 @@ public final class Skill implements IIdentifiable return _irreplacableBuff; } + public boolean isDisplayInList() + { + return _displayInList; + } + /** * @return if skill could not be requested for use by players. */ diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java index 884e4273b4..cceede352d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/data/xml/impl/SkillTreesData.java @@ -1695,12 +1695,6 @@ public final class SkillTreesData implements IGameXmlReader return true; } - // Exclude Revelation Skills from this check. - if (getRevelationSkill(player.isDualClassActive() ? SubclassType.DUALCLASS : SubclassType.BASECLASS, skill.getId(), Math.min(skill.getLevel(), maxLvl)) != null) - { - return true; - } - return false; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 2802a6c607..ce5ecb97fd 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -11639,6 +11639,34 @@ public final class L2PcInstance extends L2Playable { // Include transformation skills and those skills that are allowed during transformation. currentSkills = currentSkills.stream().filter(Skill::allowOnTransform).collect(Collectors.toList()); + + // Revelation skills. + if (isDualClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_DUAL_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } + else if (!isSubClassActive()) + { + int revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_1_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_MAIN_CLASS, 0); + if (revelationSkill != 0) + { + addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false); + } + } } // Include transformation skills. currentSkills.addAll(transformSkills.values()); @@ -11650,6 +11678,7 @@ public final class L2PcInstance extends L2Playable .filter(Objects::nonNull) .filter(s -> !s.isBlockActionUseSkill()) // Skills that are blocked from player use are not shown in skill list. .filter(s -> !SkillTreesData.getInstance().isAlchemySkill(s.getId(), s.getLevel())) + .filter(s -> s.isDisplayInList()) .collect(Collectors.toList()); //@formatter:on } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java index 8e4641502a..6148235551 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/skills/Skill.java @@ -209,6 +209,7 @@ public final class Skill implements IIdentifiable private final double _magicCriticalRate; private final SkillBuffType _buffType; + private final boolean _displayInList; public Skill(StatsSet set) { @@ -441,6 +442,7 @@ public final class Skill implements IIdentifiable _magicCriticalRate = set.getDouble("magicCriticalRate", 0); _buffType = isTriggeredSkill() ? SkillBuffType.TRIGGER : isToggle() ? SkillBuffType.TOGGLE : isDance() ? SkillBuffType.DANCE : isDebuff() ? SkillBuffType.DEBUFF : !isHealingPotionSkill() ? SkillBuffType.BUFF : SkillBuffType.NONE; + _displayInList = set.getBoolean("displayInList", true); } public TraitType getTraitType() @@ -1805,6 +1807,11 @@ public final class Skill implements IIdentifiable return _irreplacableBuff; } + public boolean isDisplayInList() + { + return _displayInList; + } + /** * @return if skill could not be requested for use by players. */