Commit 58115566 authored by logictc's avatar logictc Committed by Melledy
Browse files

don't take effect if energyUsage is false

parent af381dcf
...@@ -360,7 +360,9 @@ public class Avatar { ...@@ -360,7 +360,9 @@ public class Avatar {
} }
public void setCurrentEnergy() { public void setCurrentEnergy() {
this.setCurrentEnergy(this.currentEnergy); if (GAME_OPTIONS.energyUsage) {
this.setCurrentEnergy(this.currentEnergy);
}
} }
public void setCurrentEnergy(float currentEnergy) { public void setCurrentEnergy(float currentEnergy) {
...@@ -378,9 +380,11 @@ public class Avatar { ...@@ -378,9 +380,11 @@ public class Avatar {
} }
public void setCurrentEnergy(FightProperty curEnergyProp, float currentEnergy) { public void setCurrentEnergy(FightProperty curEnergyProp, float currentEnergy) {
this.setFightProperty(curEnergyProp, currentEnergy); if (GAME_OPTIONS.energyUsage) {
this.currentEnergy = currentEnergy; this.setFightProperty(curEnergyProp, currentEnergy);
this.save(); this.currentEnergy = currentEnergy;
this.save();
}
} }
public Int2FloatOpenHashMap getFightProperties() { public Int2FloatOpenHashMap getFightProperties() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment