MoveLifeHandler & Puppets disrupting mobbuffs patch

Cleared an issue presented recently that would try to "apply a mobskill" when it should be doing a routine check, this resulting on the mob skill not being usable at all (since it'd be in cooldown).
Fixed an issue on where casting puppets on the field would disrupt current mob buffs for the caster bowman.
This commit is contained in:
ronancpl
2019-05-03 16:05:54 -03:00
parent 383495a7e9
commit 618d53c707
3 changed files with 25 additions and 15 deletions

View File

@@ -95,7 +95,7 @@ public final class MoveLifeHandler extends AbstractMovementPacketHandler {
if (castPos != -1) {
toUse = MobSkillFactory.getMobSkill(useSkillId, useSkillLevel);
if (monster.canUseSkill(toUse)) {
if (monster.canUseSkill(toUse, true)) {
int animationTime = MapleMonsterInformationProvider.getInstance().getMobSkillAnimationTime(toUse);
if(animationTime > 0 && toUse.getSkillId() != 129) {
toUse.applyDelayedEffect(player, monster, true, animationTime);
@@ -126,7 +126,7 @@ public final class MoveLifeHandler extends AbstractMovementPacketHandler {
nextSkillLevel = skillToUse.getRight();
nextUse = MobSkillFactory.getMobSkill(nextSkillId, nextSkillLevel);
if (!(nextUse != null && monster.canUseSkill(nextUse) && nextUse.getHP() >= (int) (((float) monster.getHp() / monster.getMaxHp()) * 100) && mobMp >= nextUse.getMpCon())) {
if (!(nextUse != null && monster.canUseSkill(nextUse, false) && nextUse.getHP() >= (int) (((float) monster.getHp() / monster.getMaxHp()) * 100) && mobMp >= nextUse.getMpCon())) {
// thanks OishiiKawaiiDesu for noticing mobs trying to cast skills they are not supposed to be able
nextSkillId = 0;