Fixed Creature beginCast negative time schedules.

This commit is contained in:
MobiusDevelopment 2022-12-12 21:03:46 +00:00
parent c3db23c376
commit 040f4997af
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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