From 45d59101b22ffcb53ce446c6c745c7b45786dc7c Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 20 Jun 2020 13:00:57 +0100 Subject: [PATCH] Add outer class/method support to ClassNodeRemapper Signed-off-by: Graham --- asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt b/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt index 2058ea0c..cab9ad9e 100644 --- a/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt +++ b/asm/src/main/java/dev/openrs2/asm/ClassNodeRemapper.kt @@ -20,6 +20,14 @@ fun ClassNode.remap(remapper: ExtendedRemapper) { superName = remapper.mapType(superName) interfaces = interfaces?.map(remapper::mapType) + val originalOuterClass = outerClass + outerClass = remapper.mapType(originalOuterClass) + + if (outerMethod != null) { + outerMethod = remapper.mapMethodName(originalOuterClass, outerMethod, outerMethodDesc) + outerMethodDesc = remapper.mapMethodDesc(outerMethodDesc) + } + for (field in fields) { field.remap(remapper, originalName) }