Browse Source

catch exceptin for missing tokens

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
d21bf0185b
  1. 23
      src/engine/objects/MobEquipment.java

23
src/engine/objects/MobEquipment.java

@ -276,20 +276,23 @@ public class MobEquipment extends AbstractGameObject { @@ -276,20 +276,23 @@ public class MobEquipment extends AbstractGameObject {
if (itemBase != null)
for (Integer token : itemBase.getBakedInStats().keySet()) {
try {
EffectsBase effect = PowersManager.getEffectByToken(token);
EffectsBase effect = PowersManager.getEffectByToken(token);
AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effect.getIDString());
if (apa.getEffectsBase() != null)
if (apa.getEffectsBase().getValue() > 0) {
//System.out.println(apa.getEffectsBase().getValue());
value += apa.getEffectsBase().getValue();
}
AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effect.getIDString());
if (apa.getEffectsBase() != null)
if (apa.getEffectsBase().getValue() > 0) {
//System.out.println(apa.getEffectsBase().getValue());
value += apa.getEffectsBase().getValue();
}
if (apa.getEffectsBase2() != null)
value += apa.getEffectsBase2().getValue();
if (apa.getEffectsBase2() != null)
value += apa.getEffectsBase2().getValue();
}
}catch(Exception e){
}
}
this.magicValue = (int) value;
}

Loading…
Cancel
Save