Browse Source

10 second delay min between casts & mobs no longer cast beneficial spells on players

master
FatBoy-DOTC 2 years ago
parent
commit
58c4ece887
  1. 13
      src/engine/ai/MobileFSM.java

13
src/engine/ai/MobileFSM.java

@ -1660,10 +1660,19 @@ public class MobileFSM {
PowersBase mobPower = PowersManager.getPowerByToken(powerToken); PowersBase mobPower = PowersManager.getPowerByToken(powerToken);
if (CombatUtilities.inRangeToCast2D(mob, mob.getCombatTarget(), mobPower)) { if (CombatUtilities.inRangeToCast2D(mob, mob.getCombatTarget(), mobPower)) {
//PowersManager.useMobPower(mob,(AbstractCharacter)mob.getCombatTarget(),mobPower,powerRank); //PowersManager.useMobPower(mob,(AbstractCharacter)mob.getCombatTarget(),mobPower,powerRank);
PerformActionMsg msg = PowersManager.createPowerMsg(mobPower, powerRank, mob, target); PerformActionMsg msg = new PerformActionMsg();
if(mobPower.isHarmful() == false){
msg = PowersManager.createPowerMsg(mobPower, powerRank, mob, mob);
} else {
msg = PowersManager.createPowerMsg(mobPower, powerRank, mob, target);
}
msg.setUnknown04(2); msg.setUnknown04(2);
PowersManager.finishUseMobPower(msg, mob, 0, 0); PowersManager.finishUseMobPower(msg, mob, 0, 0);
mob.nextCastTime = System.currentTimeMillis() + (mobPower.getCooldown()); if(mobPower.getCooldown() < 10000){
mob.nextCastTime = System.currentTimeMillis() + 10000;
} else {
mob.nextCastTime = System.currentTimeMillis() + (mobPower.getCooldown());
}
return true; return true;
} }
} }

Loading…
Cancel
Save