Browse Source

error message for flying with movement buff

lakebane-strongholds
FatBoy-DOTC 2 months ago
parent
commit
25d70cca4f
  1. 2
      src/engine/gameManager/PowersManager.java
  2. 1
      src/engine/objects/PlayerCharacter.java

2
src/engine/gameManager/PowersManager.java

@ -295,11 +295,13 @@ public enum PowersManager {
for(ActionsBase ab : pb.getActions()){ for(ActionsBase ab : pb.getActions()){
for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){ for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){
if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){ if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff");
return true; return true;
} }
} }
for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){ for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){
if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){ if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff");
return true; return true;
} }
} }

1
src/engine/objects/PlayerCharacter.java

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

Loading…
Cancel
Save