Rework clanmanmode attack option hiding (#746)
* A whole bunch of refactoring * Api/mixins/injector additions for hiding attack options * Rework clanmanmode attack hiding * Update Client.java
This commit is contained in:
@@ -199,6 +199,16 @@ public abstract class RSClientMixin implements RSClient
|
||||
printMenuActions = yes;
|
||||
}
|
||||
|
||||
@Inject
|
||||
private static boolean hideFriendAttackOptions;
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setHideFriendAttackOptions(boolean yes)
|
||||
{
|
||||
hideFriendAttackOptions = yes;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public RSClientMixin()
|
||||
{
|
||||
@@ -1570,4 +1580,10 @@ public abstract class RSClientMixin implements RSClient
|
||||
getHealthBarCache().reset();
|
||||
getHealthBarSpriteCache().reset();
|
||||
}
|
||||
|
||||
@Inject
|
||||
static boolean shouldHideAttackOptionFor(RSPlayer p)
|
||||
{
|
||||
return hideFriendAttackOptions && p.isFriended() || p.isClanMember();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user