Skip to content

Commit

Permalink
project(mixins): Server varps
Browse files Browse the repository at this point in the history
  • Loading branch information
Owain94 committed Jun 23, 2022
1 parent f78b07a commit 795a8ef
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
runelite.title=OpenOSRS
runelite.version[email protected]@
runescape.version[email protected]@
runelite.commit=nogit
runelite.dirty=false
runelite.discord.appid=627741263881568257
runelite.discord.invite=https://discord.gg/OpenOSRS
runelite.github.link=https://github.com/open-osrs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,29 @@ public Widget getWidget(int groupId, int childId)
return childWidgets[childId];
}

@Inject
@Override
public int getServerVarpValue(int varpId)
{
int[] varps = this.getServerVarps();
return varps[varpId];
}

@Inject
@Override
public int getServerVar(VarPlayer varPlayer)
{
int[] varps = getServerVarps();
return varps[varPlayer.getId()];
}

@Inject
@Override
public int getServerVarbitValue(int varbit)
{
return this.getVarbitValue(this.getServerVarps(), varbit);
}

@Inject
@Override
public int getVar(VarPlayer varPlayer)
Expand Down
4 changes: 4 additions & 0 deletions runescape-api/src/main/java/net/runelite/rs/api/RSClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public interface RSClient extends RSGameEngine, Client
@Override
byte[][][] getTileSettings();

@Import("Varps_temp")
@Override
int[] getServerVarps();

@Import("Varps_main")
@Override
int[] getVarps();
Expand Down

0 comments on commit 795a8ef

Please sign in to comment.