Dropped Transform method allowAllSkills.
This commit is contained in:
@@ -433,14 +433,6 @@
|
||||
</xs:attribute>
|
||||
<xs:attribute name="setName" type="xs:string" use="optional" />
|
||||
<xs:attribute name="setTitle" type="xs:string" use="optional" />
|
||||
<xs:attribute name="allow_all_skills" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:nonNegativeInteger">
|
||||
<xs:minInclusive value="0" />
|
||||
<xs:maxInclusive value="1" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
|
@@ -8330,12 +8330,6 @@ public final class L2PcInstance extends L2Playable
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isTransformed() && !hasTransformSkill(skill))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If Alternate rule Karma punishment is set to true, forbid skill Return to player with Karma
|
||||
if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT && (getReputation() < 0) && skill.hasEffectType(L2EffectType.TELEPORT))
|
||||
{
|
||||
@@ -11613,11 +11607,6 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public boolean hasTransformSkill(Skill skill)
|
||||
{
|
||||
if (checkTransformed(Transform::allowAllSkills))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return (_transformSkills != null) && (_transformSkills.get(skill.getId()) == skill);
|
||||
}
|
||||
|
||||
@@ -11660,37 +11649,34 @@ public final class L2PcInstance extends L2Playable
|
||||
final Map<Integer, Skill> transformSkills = _transformSkills;
|
||||
if (transformSkills != null)
|
||||
{
|
||||
if (!checkTransformed(Transform::allowAllSkills))
|
||||
// Include transformation skills and those skills that are allowed during transformation.
|
||||
currentSkills = currentSkills.stream().filter(Skill::allowOnTransform).collect(Collectors.toList());
|
||||
|
||||
// Revelation skills.
|
||||
if (isDualClassActive())
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
addSkill(SkillData.getInstance().getSkill(revelationSkill, 1), false);
|
||||
}
|
||||
else if (!isSubClassActive())
|
||||
revelationSkill = getVariables().getInt(PlayerVariables.REVELATION_SKILL_2_DUAL_CLASS, 0);
|
||||
if (revelationSkill != 0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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.
|
||||
|
@@ -53,7 +53,6 @@ public final class Transform implements IIdentifiable
|
||||
private final boolean _canAttack;
|
||||
private final String _name;
|
||||
private final String _title;
|
||||
private final boolean _allowAllSkills;
|
||||
|
||||
private TransformTemplate _maleTemplate;
|
||||
private TransformTemplate _femaleTemplate;
|
||||
@@ -68,7 +67,6 @@ public final class Transform implements IIdentifiable
|
||||
_spawnHeight = set.getInt("spawn_height", 0);
|
||||
_name = set.getString("setName", null);
|
||||
_title = set.getString("setTitle", null);
|
||||
_allowAllSkills = set.getInt("allow_all_skills", 1) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,14 +146,6 @@ public final class Transform implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Allow all skills for this transformation.
|
||||
*/
|
||||
public boolean allowAllSkills()
|
||||
{
|
||||
return _allowAllSkills;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if transform type is mode change, {@code false} otherwise
|
||||
*/
|
||||
|
Reference in New Issue
Block a user