|
|
@ -292,33 +292,36 @@ public enum PowersManager { |
|
|
|
|
|
|
|
|
|
|
|
//check for movement buffs while flying
|
|
|
|
//check for movement buffs while flying
|
|
|
|
if(playerCharacter.isFlying()) { |
|
|
|
if(playerCharacter.isFlying()) { |
|
|
|
for(ActionsBase ab : pb.getActions()){ |
|
|
|
boolean whileFlying = true; |
|
|
|
for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){ |
|
|
|
switch(pb.token){ |
|
|
|
if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){ |
|
|
|
case 429005674: |
|
|
|
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); |
|
|
|
case 429505739: |
|
|
|
//refund stamina
|
|
|
|
case 431054700: |
|
|
|
float amount = playerCharacter.getStamina() + pb.cost; |
|
|
|
case 428005600: |
|
|
|
playerCharacter.setStamina(amount, playerCharacter); |
|
|
|
case 431610080: |
|
|
|
|
|
|
|
case 427935608: |
|
|
|
// Update all surrounding clients.
|
|
|
|
case 427857146: |
|
|
|
TargetedActionMsg cmm = new TargetedActionMsg(playerCharacter); |
|
|
|
case 427988218: |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); |
|
|
|
case 431854842: |
|
|
|
return true; |
|
|
|
case 421074170: |
|
|
|
} |
|
|
|
case 429611355: |
|
|
|
} |
|
|
|
case 428955899: |
|
|
|
for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){ |
|
|
|
case 1794395699: |
|
|
|
if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){ |
|
|
|
case 429428796: |
|
|
|
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); |
|
|
|
case 1514898036: |
|
|
|
//refund stamina
|
|
|
|
whileFlying = false; |
|
|
|
float amount = playerCharacter.getStamina() + pb.cost; |
|
|
|
break; |
|
|
|
playerCharacter.setStamina(amount, playerCharacter); |
|
|
|
} |
|
|
|
|
|
|
|
if(!whileFlying) { |
|
|
|
// Update all surrounding clients.
|
|
|
|
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); |
|
|
|
TargetedActionMsg cmm = new TargetedActionMsg(playerCharacter); |
|
|
|
//refund stamina
|
|
|
|
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); |
|
|
|
float amount = playerCharacter.getStamina() + pb.cost; |
|
|
|
return true; |
|
|
|
playerCharacter.setStamina(amount, playerCharacter); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// Update all surrounding clients.
|
|
|
|
|
|
|
|
TargetedActionMsg cmm = new TargetedActionMsg(playerCharacter); |
|
|
|
|
|
|
|
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|