Browse Source

fly speed changes

lakebane-strongholds
FatBoy-DOTC 2 months ago
parent
commit
277f8bfd69
  1. 9
      src/engine/objects/AbstractCharacter.java
  2. 3
      src/engine/objects/PlayerCharacter.java

9
src/engine/objects/AbstractCharacter.java

@ -499,14 +499,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive()) { if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive()) {
canFly = true; canFly = true;
float moveSpeedBuffValue = bonus.getFloatPercentAll(ModType.Speed, SourceType.Buff);
if(moveSpeedBuffValue > 0)
canFly = false;
float moveSpeedBuffValue2 = bonus.getFloatPercentAll(ModType.Speed, SourceType.BUFF);
if(moveSpeedBuffValue2 > 0)
canFly = false;
} }
return canFly; return canFly;
} }

3
src/engine/objects/PlayerCharacter.java

@ -4896,7 +4896,8 @@ public class PlayerCharacter extends AbstractCharacter {
} }
if(this.isFlying()){ if(this.isFlying()){
if (!AbstractCharacter.CanFly(this)) { //if (!AbstractCharacter.CanFly(this)) {
if(this.effects.containsKey("MoveBuff")){
GroundPlayer(this); GroundPlayer(this);
//ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff"); //ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff");
} }

Loading…
Cancel
Save