Browse Source

cannot use movement speed buffs while flying

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
7fee52c861
  1. 10
      src/engine/gameManager/PowersManager.java

10
src/engine/gameManager/PowersManager.java

@ -267,6 +267,13 @@ public enum PowersManager { @@ -267,6 +267,13 @@ public enum PowersManager {
}
}
}
// get power
PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID());
if(pb.description.equals("Personal Movement Buff") && playerCharacter.isFlying()) {
ChatManager.chatSystemInfo(playerCharacter, "You cannot use movement speed buffs while flying");
earlyExit = true;
}
if (earlyExit) {
@ -288,8 +295,7 @@ public enum PowersManager { @@ -288,8 +295,7 @@ public enum PowersManager {
Logger.warn("usePowerA(): Cheat attempted? '" + msg.getPowerUsedID() + "' recycle timer not finished " + playerCharacter.getName());
return false;
}
// get power
PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID());
if (pb == null) {
ChatManager.chatSayInfo(playerCharacter,
"This power is not implemented yet.");

Loading…
Cancel
Save