attack indicator plugin: process hidden styles on startup/shutdown and config changes
This commit is contained in:
@@ -103,9 +103,17 @@ public class AttackIndicatorPlugin extends Plugin
|
|||||||
client.getSetting(Setting.ATTACK_STYLE),
|
client.getSetting(Setting.ATTACK_STYLE),
|
||||||
client.getSetting(Varbits.DEFENSIVE_CASTING_MODE));
|
client.getSetting(Varbits.DEFENSIVE_CASTING_MODE));
|
||||||
updateWarning(false);
|
updateWarning(false);
|
||||||
|
processWidgets();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void shutDown()
|
||||||
|
{
|
||||||
|
hideWarnedStyles(false);
|
||||||
|
processWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
public AttackStyle getAttackStyle()
|
public AttackStyle getAttackStyle()
|
||||||
{
|
{
|
||||||
return attackStyle;
|
return attackStyle;
|
||||||
@@ -129,6 +137,14 @@ public class AttackIndicatorPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide or unhide widgets depending on widgetsToHide
|
||||||
|
*/
|
||||||
|
private void processWidgets()
|
||||||
|
{
|
||||||
WeaponType equippedWeaponType = WeaponType.getWeaponType(equippedWeaponTypeVarbit);
|
WeaponType equippedWeaponType = WeaponType.getWeaponType(equippedWeaponTypeVarbit);
|
||||||
|
|
||||||
if (widgetsToHide.containsRow(equippedWeaponType))
|
if (widgetsToHide.containsRow(equippedWeaponType))
|
||||||
@@ -214,6 +230,7 @@ public class AttackIndicatorPlugin extends Plugin
|
|||||||
break;
|
break;
|
||||||
case "removeWarnedStyles":
|
case "removeWarnedStyles":
|
||||||
hideWarnedStyles(enabled);
|
hideWarnedStyles(enabled);
|
||||||
|
processWidgets();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +257,6 @@ public class AttackIndicatorPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
warnedSkills.remove(skill);
|
|
||||||
warnedSkills.add(skill);
|
warnedSkills.add(skill);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user