calculate combat stats spam fix
This commit is contained in:
@@ -5060,14 +5060,16 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.updateLocation();
|
this.updateLocation();
|
||||||
this.updateMovementState();
|
if(this.isAlive() && this.isActive && this.enteredWorld) {
|
||||||
this.doRegen();
|
this.updateMovementState();
|
||||||
if (this.combatStats == null) {
|
this.doRegen();
|
||||||
this.combatStats = new PlayerCombatStats(this);
|
|
||||||
}else{
|
|
||||||
this.combatStats.update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (this.combatStats == null) {
|
||||||
|
this.combatStats = new PlayerCombatStats(this);
|
||||||
|
} else {
|
||||||
|
this.combatStats.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getStamina() < 10) {
|
if (this.getStamina() < 10) {
|
||||||
if (this.getAltitude() > 0 || this.getDesiredAltitude() > 0) {
|
if (this.getAltitude() > 0 || this.getDesiredAltitude() > 0) {
|
||||||
|
|||||||
@@ -41,62 +41,62 @@ public class PlayerCombatStats {
|
|||||||
try {
|
try {
|
||||||
this.calculateATR(true);
|
this.calculateATR(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE ATR FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE ATR FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateATR(false);
|
this.calculateATR(false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE ATR FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE ATR FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateMin(true);
|
this.calculateMin(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Min FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Min FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateMin(false);
|
this.calculateMin(false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Min FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Min FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateMax(true);
|
this.calculateMax(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Max FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Max FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateMax(false);
|
this.calculateMax(false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Max FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Max FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateAttackSpeed(true);
|
this.calculateAttackSpeed(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Attack Speed FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Attack Speed FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateAttackSpeed(false);
|
this.calculateAttackSpeed(false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Attack Speed FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Attack Speed FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateAttackRange(true);
|
this.calculateAttackRange(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Attack Range FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Attack Range FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateAttackRange(false);
|
this.calculateAttackRange(false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Attack Range FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Attack Range FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateRegen();
|
this.calculateRegen();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Regen FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Regen FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.calculateDefense();
|
this.calculateDefense();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("FAILED TO CALCULATE Defense FOR: " + this.owner.getObjectUUID());
|
//Logger.error("FAILED TO CALCULATE Defense FOR: " + this.owner.getObjectUUID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user