Add startUp method for attack indicators plugin
Add startup method that will load attack style settings from config and client (in case attack indicators is started after game loads) Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -91,6 +91,25 @@ public class AttackIndicatorPlugin extends Plugin
|
|||||||
return overlay;
|
return overlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void startUp() throws Exception
|
||||||
|
{
|
||||||
|
if (client.getGameState() == GameState.LOGGED_IN)
|
||||||
|
{
|
||||||
|
updateWarnedSkills(config.warnForAttack(), Skill.ATTACK);
|
||||||
|
updateWarnedSkills(config.warnForStrength(), Skill.STRENGTH);
|
||||||
|
updateWarnedSkills(config.warnForDefensive(), Skill.DEFENCE);
|
||||||
|
updateWarnedSkills(config.warnForRanged(), Skill.RANGED);
|
||||||
|
updateWarnedSkills(config.warnForMagic(), Skill.MAGIC);
|
||||||
|
updateAttackStyle(
|
||||||
|
client.getSetting(Varbits.EQUIPPED_WEAPON_TYPE),
|
||||||
|
client.getSetting(Varbits.ATTACK_STYLE),
|
||||||
|
client.getSetting(Varbits.DEFENSIVE_CASTING_MODE));
|
||||||
|
updateWarning(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public AttackStyle getAttackStyle()
|
public AttackStyle getAttackStyle()
|
||||||
{
|
{
|
||||||
return attackStyle;
|
return attackStyle;
|
||||||
|
|||||||
Reference in New Issue
Block a user