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);
|
String getVar(VarClientStr varClientStr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the given variable
|
* Sets a VarClientString to the passed value
|
||||||
*
|
|
||||||
* @param varClientStr
|
|
||||||
* @param value
|
|
||||||
*/
|
*/
|
||||||
void setVar(VarClientStr varClientStr, String 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.
|
* Sets the value of a given variable.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -134,6 +134,14 @@ public abstract class VarbitMixin implements RSClient
|
|||||||
vars[varClientStr.getIndex()] = value;
|
vars[varClientStr.getIndex()] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public void setVar(VarClientInt varClientInt, int value)
|
||||||
|
{
|
||||||
|
int[] vars = getIntVarcs();
|
||||||
|
vars[varClientInt.getIndex()] = value;
|
||||||
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Override
|
@Override
|
||||||
public int[] getIntVarcs()
|
public int[] getIntVarcs()
|
||||||
|
|||||||
Reference in New Issue
Block a user