cant change altitude while stunned

This commit is contained in:
2025-01-09 18:02:04 -06:00
parent 386cdc8c18
commit 3e6655a199
2 changed files with 4 additions and 2 deletions
@@ -9,6 +9,7 @@
package engine.net.client.handlers;
import engine.Enum;
import engine.Enum.DispatchChannel;
import engine.exception.MsgSendException;
import engine.net.DispatchMessage;
@@ -42,6 +43,9 @@ public class ChangeAltitudeHandler extends AbstractClientMsgHandler {
if (!AbstractCharacter.CanFly(pc))
return false;
if(pc.getBonuses().getBool(Enum.ModType.Stunned, Enum.SourceType.None))
return false;
if (pc.isSwimming())
return false;
if (pc.region != null && !pc.region.isOutside())
@@ -499,8 +499,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
if(flyer.effects.containsKey("MoveBuff")){
canFly = false;
}
if(flyer.bonuses.getBool(ModType.Stunned, SourceType.None))
canFly = false;
return canFly;