From f01512b8cb16f752b491e8d00d6f5e4e624f05ee Mon Sep 17 00:00:00 2001 From: Noodleeater Date: Sat, 20 Feb 2021 22:01:53 +0000 Subject: [PATCH] Added rl api to get animation information form actor --- .../src/main/java/net/runelite/api/Actor.java | 17 +++++++++++++++++ .../java/net/runelite/api/DynamicObject.java | 10 ++++++++++ 2 files changed, 27 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/Actor.java b/runelite-api/src/main/java/net/runelite/api/Actor.java index 4a0a3eade0..e021795768 100644 --- a/runelite-api/src/main/java/net/runelite/api/Actor.java +++ b/runelite-api/src/main/java/net/runelite/api/Actor.java @@ -109,6 +109,16 @@ public interface Actor extends Renderable, Locatable void setPoseAnimation(int animation); + /** + * Get the index of the PoseFrame (the index as it appears in the sequenceDefinition "frames" array). + */ + int getPoseFrame(); + + /** + * Get the number of cycles the pose frame has been displayed for. + */ + int getPoseFrameCycle(); + /** * Gets the orientation of the actor. * @@ -169,8 +179,15 @@ public interface Actor extends Renderable, Locatable void setGraphic(int graphic); + int getSpotAnimationFrame(); + void setSpotAnimFrame(int spotAnimFrame); + /** + * Get the number of cycles the SpotAnimation frame has been displayed for. + */ + int getSpotAnimationFrameCycle(); + /** * Gets the canvas area of the current tile the actor is standing on. * diff --git a/runelite-api/src/main/java/net/runelite/api/DynamicObject.java b/runelite-api/src/main/java/net/runelite/api/DynamicObject.java index a1914605e3..f34c20c8f0 100644 --- a/runelite-api/src/main/java/net/runelite/api/DynamicObject.java +++ b/runelite-api/src/main/java/net/runelite/api/DynamicObject.java @@ -3,4 +3,14 @@ package net.runelite.api; public interface DynamicObject extends Renderable { int getAnimationID(); + + /** + * Get the index of the AnimFrame (the index as it appears in the sequenceDefinition "frames" array). + */ + int getAnimFrame(); + + /** + * Get the number of cycles that have elapsed in the whole animation. + */ + int getAnimCycleCount(); }