use of eidolons.entity.obj.attach.DC_FeatObj in project Eidolons by IDemiurge.
the class UnitResetter method resetObjects.
public void resetObjects() {
if (ExplorationMaster.isExplorationOn()) {
if (!getEntity().isDirty()) {
return;
}
}
getEntity().setBeingReset(true);
Chronos.mark(toString() + " OBJECTS APPLY");
applyBackground();
resetAttributes();
resetMasteryScores();
if (getEntity().getSkills() != null) {
resetRanks(getEntity().getSkills(), PROPS.SKILLS);
for (DC_FeatObj feat : getEntity().getSkills()) {
feat.apply();
}
}
if (getEntity().getClasses() != null) {
resetRanks(getEntity().getClasses(), PROPS.CLASSES);
for (DC_FeatObj feat : getEntity().getClasses()) {
feat.apply();
}
}
if (getEntity().getMainWeapon() != null) {
getEntity().getMainWeapon().apply();
} else if (getEntity().getNaturalWeapon() != null) {
getEntity().getNaturalWeapon().apply();
}
if (getEntity().getOffhandWeapon() != null) {
getEntity().getOffhandWeapon().apply();
// if (checkDualWielding())
// DC_Formulas.MAIN_HAND_DUAL_ATTACK_MOD
} else if (getEntity().getOffhandNaturalWeapon() != null) {
getEntity().getOffhandNaturalWeapon().apply();
}
if (getEntity().getArmor() != null) {
getEntity().getArmor().apply();
}
resetQuickSlotsNumber();
for (DC_HeroItemObj item : getEntity().getQuickItems()) {
item.apply();
}
for (DC_HeroItemObj item : getEntity().getJewelry()) {
item.apply();
}
// Chronos.logTimeElapsedForMark(toString() + " OBJECTS APPLY");
// Chronos.mark(toString() + " activate PASSIVES");
getInitializer().initSpells(game.isSimulation());
getEntity().activatePassives();
// Chronos.logTimeElapsedForMark(toString() + " activate PASSIVES");
getEntity().setDirty(false);
getEntity().setBeingReset(false);
if (game.isSimulation() || getType().isModel()) {
// initSpellbook(); //in afterEffect()
return;
}
// Chronos.mark(toString() + " init ACTIVES");
getInitializer().initActives();
// Chronos.logTimeElapsedForMark(toString() + " init ACTIVES");
}
Aggregations