Merge branch 'master' into an-not-taters
This commit is contained in:
@@ -70,8 +70,11 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
private int attackStyleVarbit = -1;
|
private int attackStyleVarbit = -1;
|
||||||
private int equippedWeaponTypeVarbit = -1;
|
private int equippedWeaponTypeVarbit = -1;
|
||||||
private int castingModeVarbit = -1;
|
private int castingModeVarbit = -1;
|
||||||
|
@Getter
|
||||||
|
@Nullable
|
||||||
private AttackStyle attackStyle;
|
private AttackStyle attackStyle;
|
||||||
private final Set<Skill> warnedSkills = new HashSet<>();
|
private final Set<Skill> warnedSkills = new HashSet<>();
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean warnedSkillSelected = false;
|
private boolean warnedSkillSelected = false;
|
||||||
private final Table<WeaponType, WidgetInfo, Boolean> widgetsToHide = HashBasedTable.create();
|
private final Table<WeaponType, WidgetInfo, Boolean> widgetsToHide = HashBasedTable.create();
|
||||||
|
|
||||||
@@ -105,6 +108,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
private boolean warnForRanged;
|
private boolean warnForRanged;
|
||||||
private boolean warnForMagic;
|
private boolean warnForMagic;
|
||||||
private boolean hideAutoRetaliate;
|
private boolean hideAutoRetaliate;
|
||||||
|
@VisibleForTesting
|
||||||
boolean removeWarnedStyles;
|
boolean removeWarnedStyles;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -144,18 +148,8 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
hideWidget(client.getWidget(WidgetInfo.COMBAT_AUTO_RETALIATE), false);
|
hideWidget(client.getWidget(WidgetInfo.COMBAT_AUTO_RETALIATE), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public AttackStyle getAttackStyle()
|
|
||||||
{
|
|
||||||
return attackStyle;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isWarnedSkillSelected()
|
|
||||||
{
|
|
||||||
return warnedSkillSelected;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
@VisibleForTesting
|
||||||
void onWidgetHiddenChanged(WidgetHiddenChanged event)
|
void onWidgetHiddenChanged(WidgetHiddenChanged event)
|
||||||
{
|
{
|
||||||
if (event.getWidget().isSelfHidden() || TO_GROUP(event.getWidget().getId()) != COMBAT_GROUP_ID)
|
if (event.getWidget().isSelfHidden() || TO_GROUP(event.getWidget().getId()) != COMBAT_GROUP_ID)
|
||||||
@@ -204,6 +198,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
@VisibleForTesting
|
||||||
void onVarbitChanged(VarbitChanged event)
|
void onVarbitChanged(VarbitChanged event)
|
||||||
{
|
{
|
||||||
int currentAttackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE);
|
int currentAttackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE);
|
||||||
@@ -230,6 +225,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
@VisibleForTesting
|
||||||
void onConfigChanged(ConfigChanged event)
|
void onConfigChanged(ConfigChanged event)
|
||||||
{
|
{
|
||||||
if (event.getGroup().equals("attackIndicator"))
|
if (event.getGroup().equals("attackIndicator"))
|
||||||
|
|||||||
@@ -222,24 +222,24 @@ public class DeathIndicatorPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
private void onPlayerDeath(PlayerDeath death)
|
private void onPlayerDeath(PlayerDeath death)
|
||||||
{
|
{
|
||||||
if (client.isInInstancedRegion() || death.getPlayer().getWorldLocation().getRegionID() == 13362)
|
if (client.isInInstancedRegion())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (death.getPlayer() != client.getLocalPlayer())
|
final Player player = death.getPlayer();
|
||||||
|
|
||||||
|
if (config.permaBones() && player.getWorldLocation().getRegionID() != 13362)
|
||||||
|
{
|
||||||
|
newBoneFor(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player != client.getLocalPlayer())
|
||||||
{
|
{
|
||||||
newBoneFor(death.getPlayer());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player lp = client.getLocalPlayer();
|
lastDeath = player.getWorldLocation();
|
||||||
if (config.permaBones())
|
|
||||||
{
|
|
||||||
newBoneFor(lp);
|
|
||||||
}
|
|
||||||
|
|
||||||
lastDeath = lp.getWorldLocation();
|
|
||||||
lastDeathWorld = client.getWorld();
|
lastDeathWorld = client.getWorld();
|
||||||
lastDeathTime = Instant.now();
|
lastDeathTime = Instant.now();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user