From 040f4997affd6e39b8ded9e1d54945751004b1f8 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 12 Dec 2022 21:03:46 +0000 Subject: [PATCH] Fixed Creature beginCast negative time schedules. --- .../java/org/l2jmobius/gameserver/model/actor/Creature.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/actor/Creature.java | 4 ++-- .../java/org/l2jmobius/gameserver/model/actor/Creature.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java index 8a47380b43..9b624ebc98 100644 --- a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -1887,7 +1887,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe // Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime) // For client animation reasons (party buffs especially) 400 ms before! - _skillCast2 = ThreadPool.schedule(mut, skillTime - 400); + _skillCast2 = ThreadPool.schedule(mut, Math.max(0, skillTime - 400)); } else { @@ -1900,7 +1900,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe // Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime) // For client animation reasons (party buffs especially) 400 ms before! - _skillCast = ThreadPool.schedule(mut, skillTime - 400); + _skillCast = ThreadPool.schedule(mut, Math.max(0, skillTime - 400)); } } else diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java index 5dc71532ab..46ffe63914 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -2047,7 +2047,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe // Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime) // For client animation reasons (party buffs especially) 400 ms before! - _skillCast2 = ThreadPool.schedule(mut, skillTime - 400); + _skillCast2 = ThreadPool.schedule(mut, Math.max(0, skillTime - 400)); } else { @@ -2060,7 +2060,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe // Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime) // For client animation reasons (party buffs especially) 400 ms before! - _skillCast = ThreadPool.schedule(mut, skillTime - 400); + _skillCast = ThreadPool.schedule(mut, Math.max(0, skillTime - 400)); } } else diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java index cc3bc5df8e..272d1d052b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -2049,7 +2049,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe // Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime) // For client animation reasons (party buffs especially) 400 ms before! - _skillCast2 = ThreadPool.schedule(mut, skillTime - 400); + _skillCast2 = ThreadPool.schedule(mut, Math.max(0, skillTime - 400)); } else { @@ -2062,7 +2062,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe // Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime) // For client animation reasons (party buffs especially) 400 ms before! - _skillCast = ThreadPool.schedule(mut, skillTime - 400); + _skillCast = ThreadPool.schedule(mut, Math.max(0, skillTime - 400)); } } else