Fix idle animation plugin timer cancelling
- Cancel animation idle timer when combat begins - Cancel combat idle timer when animation begins Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -240,8 +240,8 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
case HERBLORE_MAKE_TAR:
|
case HERBLORE_MAKE_TAR:
|
||||||
/* Magic */
|
/* Magic */
|
||||||
case MAGIC_CHARGING_ORBS:
|
case MAGIC_CHARGING_ORBS:
|
||||||
|
resetTimers();
|
||||||
notifyIdle = true;
|
notifyIdle = true;
|
||||||
lastAnimating = null;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -366,6 +366,7 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
&& opponent.getCombatLevel() > 0
|
&& opponent.getCombatLevel() > 0
|
||||||
&& opponent.getHealth() != -1)
|
&& opponent.getHealth() != -1)
|
||||||
{
|
{
|
||||||
|
resetTimers();
|
||||||
lastOpponent = opponent;
|
lastOpponent = opponent;
|
||||||
}
|
}
|
||||||
else if (opponent == null)
|
else if (opponent == null)
|
||||||
@@ -461,4 +462,15 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
notifier.notify(message);
|
notifier.notify(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void resetTimers()
|
||||||
|
{
|
||||||
|
// Reset animation idle timer
|
||||||
|
notifyIdle = false;
|
||||||
|
lastAnimating = null;
|
||||||
|
|
||||||
|
// Reset combat idle timer
|
||||||
|
lastOpponent = null;
|
||||||
|
lastInteracting = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user