Merge multiple varbitChanged events in AttackStyles to one (#6258)

There's no good reason for this plugin to have 3 separate events for a Varbit changing.
This commit is contained in:
Hydrox6
2018-10-30 16:31:47 +00:00
committed by Tomas Slusny
parent efe25c54cd
commit 0432ce4ca9
2 changed files with 4 additions and 12 deletions

View File

@@ -178,7 +178,7 @@ public class AttackStylesPlugin extends Plugin
}
@Subscribe
public void onAttackStyleChange(VarbitChanged event)
public void onVarbitChanged(VarbitChanged event)
{
if (attackStyleVarbit == -1 || attackStyleVarbit != client.getVar(VarPlayer.ATTACK_STYLE))
{
@@ -187,11 +187,7 @@ public class AttackStylesPlugin extends Plugin
client.getVar(Varbits.DEFENSIVE_CASTING_MODE));
updateWarning(false);
}
}
@Subscribe
public void onEquippedWeaponTypeChange(VarbitChanged event)
{
if (equippedWeaponTypeVarbit == -1 || equippedWeaponTypeVarbit != client.getVar(Varbits.EQUIPPED_WEAPON_TYPE))
{
equippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE);
@@ -199,11 +195,7 @@ public class AttackStylesPlugin extends Plugin
client.getVar(Varbits.DEFENSIVE_CASTING_MODE));
updateWarning(true);
}
}
@Subscribe
public void onCastingModeChange(VarbitChanged event)
{
if (castingModeVarbit == -1 || castingModeVarbit != client.getVar(Varbits.DEFENSIVE_CASTING_MODE))
{
castingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE);