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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user