Merge pull request #5454 from Abextm/varcint-setter
runelite-mixins: Add setter for varcint
This commit is contained in:
@@ -648,13 +648,15 @@ public interface Client extends GameEngine
|
||||
String getVar(VarClientStr varClientStr);
|
||||
|
||||
/**
|
||||
* Sets the given variable
|
||||
*
|
||||
* @param varClientStr
|
||||
* @param value
|
||||
* Sets a VarClientString to the passed value
|
||||
*/
|
||||
void setVar(VarClientStr varClientStr, String value);
|
||||
|
||||
/**
|
||||
* Sets a VarClientInt to the passed value
|
||||
*/
|
||||
void setVar(VarClientInt varClientStr, int value);
|
||||
|
||||
/**
|
||||
* Sets the value of a given variable.
|
||||
*
|
||||
|
||||
@@ -134,6 +134,14 @@ public abstract class VarbitMixin implements RSClient
|
||||
vars[varClientStr.getIndex()] = value;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setVar(VarClientInt varClientInt, int value)
|
||||
{
|
||||
int[] vars = getIntVarcs();
|
||||
vars[varClientInt.getIndex()] = value;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public int[] getIntVarcs()
|
||||
|
||||
Reference in New Issue
Block a user