combat bug fix

This commit is contained in:
2024-03-02 16:35:00 -06:00
parent b9a87ba407
commit b53f2c2824
2 changed files with 22 additions and 13 deletions
@@ -539,19 +539,6 @@ public enum InterestManager implements Runnable {
player.getCharItemManager().updateInventory();
}
player.isBoxed = false;
for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){
if(pc.isActive() == false)
continue;
if(pc.isEnteredWorld() == false)
continue;
if(origin.machineID.equals(pc.getClientConnection().machineID)){
//add deatshroud effect
if(pc.isBoxed == true)
continue;
player.isBoxed = true;
return;
}
}
}
+22
View File
@@ -4817,6 +4817,10 @@ public class PlayerCharacter extends AbstractCharacter {
this.safeZone = this.isInSafeZone();
if(this.isBoxed == false){
this. isBoxed = checkIfBoxed(this);
}
if(this.isBoxed && this.containsEffect(1672601862) == false) {//Deathshroud
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
}
@@ -4832,6 +4836,24 @@ public class PlayerCharacter extends AbstractCharacter {
}
}
public static boolean checkIfBoxed(PlayerCharacter player){
for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){
if(pc.isBoxed)
continue;
if(!pc.isActive)
continue;
if(!pc.enteredWorld)
continue;
if(pc.getClientConnection().machineID.equals(player.getClientConnection().machineID) && pc.isBoxed == true)
continue;
return true;
}
return false;
}
@Override
public void updateFlight() {