Fix player attack options and player indicators (#1685)
* Fix player attack options and player indicators * player attack options * buying checkstyle bypass method
This commit is contained in:
@@ -49,6 +49,7 @@ public class VReturn extends Instruction implements ReturnInstruction
|
||||
public InstructionContext execute(Frame frame)
|
||||
{
|
||||
InstructionContext ins = new InstructionContext(this, frame);
|
||||
|
||||
|
||||
frame.stop();
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ import net.runelite.mapping.Import;
|
||||
import net.runelite.rs.api.RSClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import net.runelite.injector.raw.HidePlayerAttacks;
|
||||
|
||||
// import net.runelite.injector.raw.DrawMenu;
|
||||
// import net.runelite.injector.raw.HidePlayerAttacks;
|
||||
|
||||
public class Inject
|
||||
{
|
||||
@@ -319,7 +319,7 @@ public class Inject
|
||||
new RenderDraw(this).inject();
|
||||
// new DrawMenu(this).inject();
|
||||
new Occluder(this).inject();
|
||||
// new HidePlayerAttacks(this).inject();
|
||||
new HidePlayerAttacks(this).inject();
|
||||
}
|
||||
|
||||
private java.lang.Class injectInterface(ClassFile cf, ClassFile other)
|
||||
|
||||
@@ -160,6 +160,7 @@ public class HidePlayerAttacks
|
||||
// add option n such
|
||||
|
||||
Instructions ins = addPlayerOptions.getCode().getInstructions();
|
||||
log.info(String.valueOf(ins.getInstructions().size()));
|
||||
ListIterator<Instruction> iterator = ins.getInstructions().listIterator();
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
@@ -169,22 +170,18 @@ public class HidePlayerAttacks
|
||||
continue;
|
||||
}
|
||||
|
||||
i = iterator.next();
|
||||
while (!(i instanceof BiPush) || (byte) ((BiPush) i).getConstant() != 8)
|
||||
{
|
||||
i = iterator.next();
|
||||
}
|
||||
|
||||
i = iterator.next();
|
||||
if (!(i instanceof IAnd))
|
||||
{
|
||||
throw new InjectionException("Yikes I didn't expect this");
|
||||
continue;
|
||||
/*log.info(i.getClass().getName() + i.getClass().getSuperclass() + i.getType().getName() +
|
||||
i.getType().getInstructionClass() + i.getInstructions() + i.toString());
|
||||
throw new InjectionException("Yikes I didn't expect this");**/
|
||||
}
|
||||
|
||||
i = iterator.next();
|
||||
if (!(i instanceof IfICmpNe))
|
||||
{
|
||||
throw new InjectionException("Yikes I didn't expect this");
|
||||
continue;
|
||||
}
|
||||
|
||||
Label target = ((IfICmpNe) i).getJumps().get(0);
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -124,10 +123,12 @@ public class PlayerIndicatorsOverlay extends Overlay
|
||||
{
|
||||
if (clanManager.getRank(actor.getName()) != null)
|
||||
{
|
||||
OverlayUtil.renderActorTextAndImage(graphics, actor, builtString, color,
|
||||
ImageUtil.resizeImage(Objects.requireNonNull(clanManager
|
||||
.getClanImage(clanManager.getRank(actor.getName()))), y, y), 0, ACTOR_HORIZONTAL_TEXT_MARGIN);
|
||||
return;
|
||||
final BufferedImage clanRankImage = clanManager.getClanImage(clanManager.getRank(actor.getName()));
|
||||
if (clanRankImage != null)
|
||||
{
|
||||
OverlayUtil.renderActorTextAndImage(graphics, actor, builtString, color,
|
||||
ImageUtil.resizeImage(clanRankImage, y, y), 0, ACTOR_HORIZONTAL_TEXT_MARGIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class WildernessLocationsMapOverlay extends Overlay
|
||||
{
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setPriority(OverlayPriority.HIGH);
|
||||
setLayer(OverlayLayer.ALWAYS_ON_TOP);
|
||||
setLayer(OverlayLayer.ABOVE_MAP);
|
||||
this.client = client;
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user