|
|
@ -5122,23 +5122,23 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
|
|
|
|
|
|
|
|
if (this.updateLock.writeLock().tryLock()) { |
|
|
|
if (this.updateLock.writeLock().tryLock()) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (!this.timestamps.contains("STAMHEALTICK")) { |
|
|
|
//if (!this.timestamps.contains("STAMHEALTICK")) {
|
|
|
|
this.timestamps.put("STAMHEALTICK", System.currentTimeMillis()); |
|
|
|
// this.timestamps.put("STAMHEALTICK", System.currentTimeMillis());
|
|
|
|
} |
|
|
|
//}
|
|
|
|
if (this.containsEffect(441156455)) { |
|
|
|
//if (this.containsEffect(441156455)) {
|
|
|
|
long length = System.currentTimeMillis() - this.timestamps.get("STAMHEALTICK"); |
|
|
|
// long length = System.currentTimeMillis() - this.timestamps.get("STAMHEALTICK").longValue();
|
|
|
|
if (length > 10000 ) { |
|
|
|
// if (length > 10000 ) {
|
|
|
|
float stamIncrease = 0.65f; |
|
|
|
// float stamIncrease = 6.5f;
|
|
|
|
if (this.stamina.get() + stamIncrease > this.staminaMax) |
|
|
|
// if (this.stamina.get() + stamIncrease > this.staminaMax)
|
|
|
|
this.stamina.compareAndSet(this.stamina.get(), this.staminaMax); |
|
|
|
// this.stamina.compareAndSet(this.stamina.get(), this.staminaMax);
|
|
|
|
else |
|
|
|
// else
|
|
|
|
this.stamina.compareAndSet(this.stamina.get(), this.stamina.get() + stamIncrease); |
|
|
|
// this.stamina.compareAndSet(this.stamina.get(), this.stamina.get() + stamIncrease);
|
|
|
|
this.timestamps.put("STAMHEALTICK", System.currentTimeMillis()); |
|
|
|
// this.timestamps.put("STAMHEALTICK", System.currentTimeMillis());
|
|
|
|
ChatManager.chatSystemInfo(this, "Healed 7 Stamina"); |
|
|
|
// ChatManager.chatSystemInfo(this, "Healed 7 Stamina");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} else { |
|
|
|
//} else {
|
|
|
|
this.timestamps.put("STAMHEALTICK", System.currentTimeMillis()); |
|
|
|
// this.timestamps.put("STAMHEALTICK", System.currentTimeMillis());
|
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.isAlive() && this.isEnteredWorld()) { |
|
|
|
if (!this.isAlive() && this.isEnteredWorld()) { |
|
|
|
if (!this.timestamps.containsKey("DeathTime")) { |
|
|
|
if (!this.timestamps.containsKey("DeathTime")) { |
|
|
|