Merge branch 'master' into an-not-taters

This commit is contained in:
Lucwousin
2019-11-21 10:21:38 +01:00
committed by GitHub
2 changed files with 17 additions and 21 deletions

View File

@@ -70,8 +70,11 @@ public class AttackStylesPlugin extends Plugin
private int attackStyleVarbit = -1;
private int equippedWeaponTypeVarbit = -1;
private int castingModeVarbit = -1;
@Getter
@Nullable
private AttackStyle attackStyle;
private final Set<Skill> warnedSkills = new HashSet<>();
@Getter(AccessLevel.PACKAGE)
private boolean warnedSkillSelected = false;
private final Table<WeaponType, WidgetInfo, Boolean> widgetsToHide = HashBasedTable.create();
@@ -105,6 +108,7 @@ public class AttackStylesPlugin extends Plugin
private boolean warnForRanged;
private boolean warnForMagic;
private boolean hideAutoRetaliate;
@VisibleForTesting
boolean removeWarnedStyles;
@Override
@@ -144,18 +148,8 @@ public class AttackStylesPlugin extends Plugin
hideWidget(client.getWidget(WidgetInfo.COMBAT_AUTO_RETALIATE), false);
}
@Nullable
public AttackStyle getAttackStyle()
{
return attackStyle;
}
boolean isWarnedSkillSelected()
{
return warnedSkillSelected;
}
@Subscribe
@VisibleForTesting
void onWidgetHiddenChanged(WidgetHiddenChanged event)
{
if (event.getWidget().isSelfHidden() || TO_GROUP(event.getWidget().getId()) != COMBAT_GROUP_ID)
@@ -204,6 +198,7 @@ public class AttackStylesPlugin extends Plugin
}
@Subscribe
@VisibleForTesting
void onVarbitChanged(VarbitChanged event)
{
int currentAttackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE);
@@ -230,6 +225,7 @@ public class AttackStylesPlugin extends Plugin
}
@Subscribe
@VisibleForTesting
void onConfigChanged(ConfigChanged event)
{
if (event.getGroup().equals("attackIndicator"))

View File

@@ -222,24 +222,24 @@ public class DeathIndicatorPlugin extends Plugin
@Subscribe
private void onPlayerDeath(PlayerDeath death)
{
if (client.isInInstancedRegion() || death.getPlayer().getWorldLocation().getRegionID() == 13362)
if (client.isInInstancedRegion())
{
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;
}
Player lp = client.getLocalPlayer();
if (config.permaBones())
{
newBoneFor(lp);
}
lastDeath = lp.getWorldLocation();
lastDeath = player.getWorldLocation();
lastDeathWorld = client.getWorld();
lastDeathTime = Instant.now();
}