Checks for passive skill condition scope.

This commit is contained in:
MobiusDevelopment
2022-09-10 21:12:01 +00:00
parent 94872de9fc
commit fd4848b02a
36 changed files with 312 additions and 20 deletions

View File

@@ -405,6 +405,18 @@ public class SkillData implements IXmlReader
final Function<StatSet, ISkillCondition> conditionFunction = SkillConditionHandler.getInstance().getHandlerFactory(conditionName);
if (conditionFunction != null)
{
if (skill.isPassive())
{
if (skillConditionScope != SkillConditionScope.PASSIVE)
{
LOGGER.warning(getClass().getSimpleName() + ": Non passive condition for passive Skill Id[" + statSet.getInt(".id") + "] Level[" + level + "] SubLevel[" + subLevel + "]");
}
}
else if (skillConditionScope == SkillConditionScope.PASSIVE)
{
LOGGER.warning(getClass().getSimpleName() + ": Passive condition for non passive Skill Id[" + statSet.getInt(".id") + "] Level[" + level + "] SubLevel[" + subLevel + "]");
}
skill.addCondition(skillConditionScope, conditionFunction.apply(params));
}
else