use of net.runelite.api.mixins.FieldHook in project runelite by runelite.
the class RSActorMixin method animationChanged.
@FieldHook("animation")
@Inject
public void animationChanged(int idx) {
AnimationChanged animationChange = new AnimationChanged();
animationChange.setActor(this);
eventBus.post(animationChange);
}
use of net.runelite.api.mixins.FieldHook in project runelite by runelite.
the class RSClientMixin method cachedNPCsChanged.
@FieldHook("cachedNPCs")
@Inject
public static void cachedNPCsChanged(int idx) {
RSNPC[] cachedNPCs = client.getCachedNPCs();
if (idx < 0 || idx >= cachedNPCs.length) {
return;
}
RSNPC npc = cachedNPCs[idx];
if (npc != null) {
npc.setIndex(idx);
}
}
use of net.runelite.api.mixins.FieldHook in project runelite by runelite.
the class RSClientMixin method settingsChanged.
@FieldHook("clientVarps")
@Inject
public static void settingsChanged(int idx) {
VarbitChanged varbitChanged = new VarbitChanged();
eventBus.post(varbitChanged);
}
use of net.runelite.api.mixins.FieldHook in project runelite by runelite.
the class RSClientMixin method mapRegionsChanged.
@FieldHook("mapRegions")
@Inject
public static void mapRegionsChanged(int idx) {
MapRegionChanged regionChanged = new MapRegionChanged();
regionChanged.setIndex(idx);
eventBus.post(regionChanged);
}
use of net.runelite.api.mixins.FieldHook in project runelite by runelite.
the class RSClientMixin method playerOptionsChanged.
@FieldHook("playerOptions")
@Inject
public static void playerOptionsChanged(int idx) {
// Reset the menu type
MenuAction[] playerActions = { PLAYER_FIRST_OPTION, PLAYER_SECOND_OPTION, PLAYER_THIRD_OPTION, PLAYER_FOURTH_OPTION, PLAYER_FIFTH_OPTION, PLAYER_SIXTH_OPTION, PLAYER_SEVENTH_OPTION, PLAYER_EIGTH_OPTION };
if (idx >= 0 && idx < playerActions.length) {
MenuAction playerAction = playerActions[idx];
client.getPlayerMenuTypes()[idx] = playerAction.getId();
}
PlayerMenuOptionsChanged optionsChanged = new PlayerMenuOptionsChanged();
optionsChanged.setIndex(idx);
eventBus.post(optionsChanged);
}
Aggregations