2 * Decompiled with CFR 0.151.
4 * Could not load the following classes:
5 * com.wurmonline.client.comm.SimpleServerConnectionClass
7 package net
.encode
.wurmesp
.feature
.hook
;
9 import com
.wurmonline
.client
.comm
.SimpleServerConnectionClass
;
10 import java
.lang
.reflect
.Method
;
11 import java
.nio
.ByteBuffer
;
12 import java
.util
.logging
.Level
;
13 import net
.encode
.wurmesp
.WurmEspMod
;
15 public class CmdShowDeedPlan
17 public CmdShowDeedPlan() {
18 this.prepareHook("com.wurmonline.client.comm.SimpleServerConnectionClass", "reallyHandleCmdShowDeedPlan", "(Ljava/nio/ByteBuffer;)V", () -> (proxy
, method
, args
) -> {
19 if (WurmEspMod
.deedsize
) {
20 ByteBuffer bb
= (ByteBuffer
)args
[0];
24 int qId
= bb
.getInt();
25 SimpleServerConnectionClass simpleServerConnectionClass
= (SimpleServerConnectionClass
)proxy
;
26 Method readStringByteLengthMethod
= simpleServerConnectionClass
.getClass().getDeclaredMethod("readStringByteLength", ByteBuffer
.class);
27 readStringByteLengthMethod
.setAccessible(true);
28 Object
[] readStringByteLengthArgs
= new Object
[]{bb
};
29 String deedName
= (String
)readStringByteLengthMethod
.invoke(simpleServerConnectionClass
, readStringByteLengthArgs
);
30 int tokenX
= bb
.getInt();
31 int tokenY
= bb
.getInt();
32 int startX
= bb
.getInt();
33 int startY
= bb
.getInt();
34 int endX
= bb
.getInt();
35 int endY
= bb
.getInt();
36 int perimSize
= bb
.getInt();
37 WurmEspMod
.tilesHighlightManager
.addData(startX
, startY
, endX
, endY
);
38 WurmEspMod
.tileshighlight
= true;
42 method
.invoke(proxy
, args
);
46 WurmEspMod
.logger
.log(Level
.INFO
, "[WurmEspMod] SimpleServerConnectionClass.reallyHandleCmdShowDeedPlan hooked");