Browse Source

random extra spell cooldown to stagger

master
FatBoy-DOTC 1 year ago
parent
commit
a79562de01
  1. 8
      src/engine/mobileAI/MobAI.java

8
src/engine/mobileAI/MobAI.java

@ -429,8 +429,8 @@ public class MobAI {
msg.setUnknown04(2); msg.setUnknown04(2);
PowersManager.finishUseMobPower(msg, mob, 0, 0); PowersManager.finishUseMobPower(msg, mob, 0, 0);
int randomCooldown = ThreadLocalRandom.current().nextInt(1,10);
mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))); mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))) + (randomCooldown * 1000);
return true; return true;
} }
} catch (Exception e) { } catch (Exception e) {
@ -528,8 +528,8 @@ public class MobAI {
msg.setUnknown04(2); msg.setUnknown04(2);
PowersManager.finishUseMobPower(msg, mob, 0, 0); PowersManager.finishUseMobPower(msg, mob, 0, 0);
int randomCooldown = ThreadLocalRandom.current().nextInt(1,10);
mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))); mob.nextCastTime = System.currentTimeMillis() + (long) ((mobPower.getCooldown() + (MobAIThread.AI_POWER_DIVISOR * 1000))) + (randomCooldown * 1000);
return true; return true;
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save