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:
|
||||
/* Magic */
|
||||
case MAGIC_CHARGING_ORBS:
|
||||
resetTimers();
|
||||
notifyIdle = true;
|
||||
lastAnimating = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -366,6 +366,7 @@ public class IdleNotifierPlugin extends Plugin
|
||||
&& opponent.getCombatLevel() > 0
|
||||
&& opponent.getHealth() != -1)
|
||||
{
|
||||
resetTimers();
|
||||
lastOpponent = opponent;
|
||||
}
|
||||
else if (opponent == null)
|
||||
@@ -461,4 +462,15 @@ public class IdleNotifierPlugin extends Plugin
|
||||
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