Browse Source

combat bug fix

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
b53f2c2824
  1. 13
      src/engine/InterestManagement/InterestManager.java
  2. 22
      src/engine/objects/PlayerCharacter.java

13
src/engine/InterestManagement/InterestManager.java

@ -539,19 +539,6 @@ public enum InterestManager implements Runnable {
player.getCharItemManager().updateInventory(); player.getCharItemManager().updateInventory();
} }
player.isBoxed = false; 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
src/engine/objects/PlayerCharacter.java

@ -4817,6 +4817,10 @@ public class PlayerCharacter extends AbstractCharacter {
this.safeZone = this.isInSafeZone(); this.safeZone = this.isInSafeZone();
if(this.isBoxed == false){
this. isBoxed = checkIfBoxed(this);
}
if(this.isBoxed && this.containsEffect(1672601862) == false) {//Deathshroud if(this.isBoxed && this.containsEffect(1672601862) == false) {//Deathshroud
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); 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 @Override
public void updateFlight() { public void updateFlight() {

Loading…
Cancel
Save