PlayerCombatStats proper delays
This commit is contained in:
@@ -5108,13 +5108,6 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.isAlive() && this.isActive && this.enteredWorld) {
|
|
||||||
if (this.combatStats == null) {
|
|
||||||
this.combatStats = new PlayerCombatStats(this);
|
|
||||||
}
|
|
||||||
PlayerCombatStats cStats = this.combatStats;
|
|
||||||
cStats.update();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(e);
|
Logger.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.gameManager.SessionManager;
|
|||||||
import engine.gameManager.SimulationManager;
|
import engine.gameManager.SimulationManager;
|
||||||
import engine.objects.Bane;
|
import engine.objects.Bane;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
|
import engine.objects.PlayerCombatStats;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
public class UpdateThread implements Runnable {
|
public class UpdateThread implements Runnable {
|
||||||
@@ -32,6 +33,17 @@ public class UpdateThread implements Runnable {
|
|||||||
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()){
|
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()){
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.doRegen();
|
player.doRegen();
|
||||||
|
try {
|
||||||
|
if (player.isAlive() && player.isActive() && player.isEnteredWorld()) {
|
||||||
|
if (player.combatStats == null) {
|
||||||
|
player.combatStats = new PlayerCombatStats(player);
|
||||||
|
}
|
||||||
|
PlayerCombatStats cStats = player.combatStats;
|
||||||
|
cStats.update();
|
||||||
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user