attack styles: Fix style hiding after autocast selection
In side stones view, going through the spell autocast selection process will cause the combat widget to become unloaded and reloaded, rather than triggering the previous code path where the widget would change hidden state. This commit adds a second subscriber to handle this path as well. Fixes runelite/runelite#6557
This commit is contained in:
@@ -41,6 +41,7 @@ import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.api.events.WidgetHiddenChanged;
|
||||
import net.runelite.api.events.WidgetLoaded;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import static net.runelite.api.widgets.WidgetID.COMBAT_GROUP_ID;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
@@ -148,6 +149,17 @@ public class AttackStylesPlugin extends Plugin
|
||||
processWidgets();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onWidgetLoaded(WidgetLoaded event)
|
||||
{
|
||||
if (event.getGroupId() != COMBAT_GROUP_ID)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
processWidgets();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide or unhide widgets depending on widgetsToHide
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user