Search in sources :

Example 1 with RETAIN_CONDITIONS

use of main.content.CONTENT_CONSTS.RETAIN_CONDITIONS in project Eidolons by IDemiurge.

the class AddBuffEffect method initRetainConditions.

private void initRetainConditions() {
    if (ref.getActive() == null) {
        return;
    }
    String prop = ref.getActive().getProperty(PROPS.RETAIN_CONDITIONS, false);
    for (String s : StringMaster.open(prop)) {
        RETAIN_CONDITIONS template = new EnumMaster<RETAIN_CONDITIONS>().retrieveEnumConst(RETAIN_CONDITIONS.class, s);
        Condition condition;
        if (template != null) {
            condition = DC_ConditionMaster.getRetainConditionsFromTemplate(template, ref);
        } else {
            condition = ConditionMaster.toConditions(s);
        }
        if (condition != null) {
            getRetainConditions().add(condition);
        }
    }
}
Also used : RETAIN_CONDITIONS(main.content.CONTENT_CONSTS.RETAIN_CONDITIONS) Condition(main.elements.conditions.Condition)

Aggregations

RETAIN_CONDITIONS (main.content.CONTENT_CONSTS.RETAIN_CONDITIONS)1 Condition (main.elements.conditions.Condition)1