forked from MagicBane/Server
combat bug fix
This commit is contained in:
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user