mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
Added some medic specials, minor combat fixes
This commit is contained in:
@@ -64,7 +64,7 @@ import engine.resources.service.INetworkRemoteEvent;
|
||||
public class PlayerService implements INetworkDispatch {
|
||||
|
||||
private NGECore core;
|
||||
private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(2);
|
||||
private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||
|
||||
public PlayerService(final NGECore core) {
|
||||
this.core = core;
|
||||
@@ -106,9 +106,10 @@ public class PlayerService implements INetworkDispatch {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if(creature.getAction() < creature.getMaxAction() && creature.getPosture() != 14)
|
||||
creature.setAction(creature.getAction() + 200);
|
||||
|
||||
synchronized(creature.getMutex()) {
|
||||
if(creature.getAction() < creature.getMaxAction() && creature.getPosture() != 14)
|
||||
creature.setAction(creature.getAction() + 200);
|
||||
}
|
||||
}
|
||||
|
||||
}, 0, 1000, TimeUnit.MILLISECONDS);
|
||||
@@ -118,12 +119,14 @@ public class PlayerService implements INetworkDispatch {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if(creature.getHealth() < creature.getMaxHealth() && creature.getCombatFlag() == 0 && creature.getPosture() != 13 && creature.getPosture() != 14)
|
||||
creature.setHealth(creature.getHealth() + 300);
|
||||
synchronized(creature.getMutex()) {
|
||||
if(creature.getHealth() < creature.getMaxHealth() && creature.getCombatFlag() == 0 && creature.getPosture() != 13 && creature.getPosture() != 14)
|
||||
creature.setHealth(creature.getHealth() + 300);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}, 0, 1100, TimeUnit.MILLISECONDS);
|
||||
}, 0, 1000, TimeUnit.MILLISECONDS);
|
||||
|
||||
/*scheduler.scheduleAtFixedRate(new Runnable() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user