project: Injector add CheckCast support for copy classes
This commit is contained in:
@@ -47,6 +47,13 @@ public class CheckCast extends Instruction implements TypeInstruction
|
|||||||
super(instructions, InstructionType.CHECKCAST);
|
super(instructions, InstructionType.CHECKCAST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CheckCast(Instructions instructions, Type type)
|
||||||
|
{
|
||||||
|
super(instructions, InstructionType.CHECKCAST);
|
||||||
|
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
public CheckCast(Instructions instructions, InstructionType type)
|
public CheckCast(Instructions instructions, InstructionType type)
|
||||||
{
|
{
|
||||||
super(instructions, type);
|
super(instructions, type);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import net.runelite.asm.Type;
|
|||||||
import net.runelite.asm.attributes.Code;
|
import net.runelite.asm.attributes.Code;
|
||||||
import net.runelite.asm.attributes.code.Instruction;
|
import net.runelite.asm.attributes.code.Instruction;
|
||||||
import net.runelite.asm.attributes.code.Instructions;
|
import net.runelite.asm.attributes.code.Instructions;
|
||||||
|
import net.runelite.asm.attributes.code.instructions.CheckCast;
|
||||||
import net.runelite.asm.attributes.code.instructions.GetField;
|
import net.runelite.asm.attributes.code.instructions.GetField;
|
||||||
import net.runelite.asm.attributes.code.instructions.GetStatic;
|
import net.runelite.asm.attributes.code.instructions.GetStatic;
|
||||||
import net.runelite.asm.attributes.code.instructions.InvokeSpecial;
|
import net.runelite.asm.attributes.code.instructions.InvokeSpecial;
|
||||||
@@ -228,6 +229,11 @@ public class CopyRuneLiteClasses extends AbstractInjector
|
|||||||
iterator.set(new New(ins, inject.toVanilla(deobClass)));
|
iterator.set(new New(ins, inject.toVanilla(deobClass)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (i instanceof CheckCast)
|
||||||
|
{
|
||||||
|
CheckCast clazz = ((CheckCast) i);
|
||||||
|
iterator.set(new CheckCast(ins, getObfuscatedSignature(clazz.getType_())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class RuneLiteIterableLinkDeque implements Iterator<Link>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Link next()
|
public FriendLoginUpdate next()
|
||||||
{
|
{
|
||||||
if (this.link == this.linkDeque.sentinel)
|
if (this.link == this.linkDeque.sentinel)
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,7 @@ public class RuneLiteIterableLinkDeque implements Iterator<Link>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Link friendLoginUpdate = this.link;
|
FriendLoginUpdate friendLoginUpdate = (FriendLoginUpdate) this.link;
|
||||||
this.link = this.link.previous;
|
this.link = this.link.previous;
|
||||||
|
|
||||||
return friendLoginUpdate;
|
return friendLoginUpdate;
|
||||||
|
|||||||
Reference in New Issue
Block a user