mob cast delay cached

This commit is contained in:
FatBoy committed 2023-08-08 10:54:36 -05:00
1 parent 2ce13ac463
commit ec43c54aff
2 files changed
+9 -6

No files matched your search

+4 -5
View File
@@ -423,8 +423,8 @@ public class MobAI {
msg.setUnknown04(2);
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))) + (randomCooldown * 1000);
long randomCooldown = (long)(ThreadLocalRandom.current().nextInt(10,15) * MobAIThread.AI_CAST_FREQUENCY);
mob.nextCastTime = System.currentTimeMillis() + randomCooldown;
return true;
}
} catch (Exception e) {
@@ -519,9 +519,8 @@ public class MobAI {
msg.setUnknown04(2);
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))) + (randomCooldown * 1000);
long randomCooldown = (long)(ThreadLocalRandom.current().nextInt(10,15) * MobAIThread.AI_CAST_FREQUENCY);
mob.nextCastTime = System.currentTimeMillis() + randomCooldown;
return true;
}
} catch (Exception e) {