Skip to content

Commit

Permalink
Add gfx command to developer tools
Browse files Browse the repository at this point in the history
Setting the spotAnimFrame to 0 is required to play the graphic from the start
  • Loading branch information
kamielvf authored and Adam- committed May 1, 2018
1 parent eb3b2c9 commit a47962c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runelite-api/src/main/java/net/runelite/api/Actor.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ public interface Actor extends Renderable

int getGraphic();

@VisibleForDevtools
void setGraphic(int graphic);

@VisibleForDevtools
void setSpotAnimFrame(int spotAnimFrame);

int getModelHeight();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ public void onCommand(CommandExecuted commandExecuted)
localPlayer.setActionFrame(0);
break;
}
case "gfx":
{
int id = Integer.parseInt(args[0]);
Player localPlayer = client.getLocalPlayer();
localPlayer.setGraphic(id);
localPlayer.setSpotAnimFrame(0);
break;
}
}
}

Expand Down

0 comments on commit a47962c

Please sign in to comment.