180 lines
4.7 KiB
Java
180 lines
4.7 KiB
Java
import net.runelite.mapping.Export;
|
|
import net.runelite.mapping.Implements;
|
|
import net.runelite.mapping.ObfuscatedGetter;
|
|
import net.runelite.mapping.ObfuscatedName;
|
|
import net.runelite.mapping.ObfuscatedSignature;
|
|
|
|
@ObfuscatedName("cf")
|
|
@Implements("GraphicsObject")
|
|
public final class GraphicsObject extends Renderable {
|
|
@ObfuscatedName("z")
|
|
@ObfuscatedGetter(
|
|
intValue = -1860444775
|
|
)
|
|
@Export("loginBoxCenter")
|
|
static int loginBoxCenter;
|
|
@ObfuscatedName("f")
|
|
@ObfuscatedGetter(
|
|
intValue = -1442514319
|
|
)
|
|
@Export("id")
|
|
int id;
|
|
@ObfuscatedName("o")
|
|
@ObfuscatedGetter(
|
|
intValue = -255937363
|
|
)
|
|
@Export("cycleStart")
|
|
int cycleStart;
|
|
@ObfuscatedName("u")
|
|
@ObfuscatedGetter(
|
|
intValue = -1558185979
|
|
)
|
|
@Export("plane")
|
|
int plane;
|
|
@ObfuscatedName("p")
|
|
@ObfuscatedGetter(
|
|
intValue = -799404683
|
|
)
|
|
@Export("x")
|
|
int x;
|
|
@ObfuscatedName("b")
|
|
@ObfuscatedGetter(
|
|
intValue = -1197647983
|
|
)
|
|
@Export("y")
|
|
int y;
|
|
@ObfuscatedName("e")
|
|
@ObfuscatedGetter(
|
|
intValue = 921468661
|
|
)
|
|
@Export("height")
|
|
int height;
|
|
@ObfuscatedName("k")
|
|
@ObfuscatedSignature(
|
|
descriptor = "Lkw;"
|
|
)
|
|
@Export("sequenceDefinition")
|
|
SequenceDefinition sequenceDefinition;
|
|
@ObfuscatedName("g")
|
|
@ObfuscatedGetter(
|
|
intValue = 1763592485
|
|
)
|
|
@Export("frame")
|
|
int frame;
|
|
@ObfuscatedName("h")
|
|
@ObfuscatedGetter(
|
|
intValue = 1659206025
|
|
)
|
|
@Export("frameCycle")
|
|
int frameCycle;
|
|
@ObfuscatedName("n")
|
|
@Export("isFinished")
|
|
boolean isFinished;
|
|
|
|
GraphicsObject(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
|
|
this.frame = 0; // L: 16
|
|
this.frameCycle = 0; // L: 17
|
|
this.isFinished = false; // L: 18
|
|
this.id = var1; // L: 21
|
|
this.plane = var2; // L: 22
|
|
this.x = var3; // L: 23
|
|
this.y = var4; // L: 24
|
|
this.height = var5; // L: 25
|
|
this.cycleStart = var7 + var6; // L: 26
|
|
int var8 = Varps.SpotAnimationDefinition_get(this.id).sequence; // L: 27
|
|
if (var8 != -1) { // L: 28
|
|
this.isFinished = false; // L: 29
|
|
this.sequenceDefinition = class225.SequenceDefinition_get(var8); // L: 30
|
|
} else {
|
|
this.isFinished = true; // L: 32
|
|
}
|
|
|
|
} // L: 33
|
|
|
|
@ObfuscatedName("f")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(II)V",
|
|
garbageValue = "1392688450"
|
|
)
|
|
@Export("advance")
|
|
final void advance(int var1) {
|
|
if (!this.isFinished) { // L: 36
|
|
this.frameCycle += var1; // L: 37
|
|
|
|
while (this.frameCycle > this.sequenceDefinition.frameLengths[this.frame]) { // L: 38
|
|
this.frameCycle -= this.sequenceDefinition.frameLengths[this.frame]; // L: 39
|
|
++this.frame; // L: 40
|
|
if (this.frame >= this.sequenceDefinition.frameIds.length) { // L: 41
|
|
this.isFinished = true; // L: 42
|
|
break;
|
|
}
|
|
}
|
|
|
|
}
|
|
} // L: 46
|
|
|
|
@ObfuscatedName("o")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(I)Lgv;",
|
|
garbageValue = "1835906978"
|
|
)
|
|
@Export("getModel")
|
|
protected final Model getModel() {
|
|
SpotAnimationDefinition var1 = Varps.SpotAnimationDefinition_get(this.id); // L: 49
|
|
Model var2;
|
|
if (!this.isFinished) { // L: 51
|
|
var2 = var1.getModel(this.frame);
|
|
} else {
|
|
var2 = var1.getModel(-1); // L: 52
|
|
}
|
|
|
|
return var2 == null ? null : var2; // L: 53
|
|
}
|
|
|
|
@ObfuscatedName("o")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(II)Lkc;",
|
|
garbageValue = "-2021558872"
|
|
)
|
|
@Export("getNpcDefinition")
|
|
public static NPCComposition getNpcDefinition(int var0) {
|
|
NPCComposition var1 = (NPCComposition)NPCComposition.NpcDefinition_cached.get((long)var0); // L: 62
|
|
if (var1 != null) { // L: 63
|
|
return var1;
|
|
} else {
|
|
byte[] var2 = NPCComposition.NpcDefinition_archive.takeFile(9, var0); // L: 64
|
|
var1 = new NPCComposition(); // L: 65
|
|
var1.id = var0; // L: 66
|
|
if (var2 != null) { // L: 67
|
|
var1.decode(new Buffer(var2));
|
|
}
|
|
|
|
var1.postDecode(); // L: 68
|
|
NPCComposition.NpcDefinition_cached.put(var1, (long)var0); // L: 69
|
|
return var1; // L: 70
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("kq")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(III)V",
|
|
garbageValue = "-733559314"
|
|
)
|
|
static final void method1913(int var0, int var1) {
|
|
class3 var2 = var0 >= 0 ? Client.field820[var0] : IsaacCipher.field4266; // L: 11538
|
|
if (var2 != null && var1 >= 0 && var1 < var2.method46()) { // L: 11539
|
|
class9 var3 = (class9)var2.field27.get(var1); // L: 11540
|
|
if (var3.field66 == -1) {
|
|
String var4 = var3.field65; // L: 11542
|
|
PacketWriter var5 = Client.packetWriter; // L: 11543
|
|
PacketBufferNode var6 = ObjectComposition.getPacketBufferNode(ClientPacket.field2316, var5.isaacCipher); // L: 11544
|
|
var6.packetBuffer.writeByte(3 + Friend.stringCp1252NullTerminatedByteSize(var4)); // L: 11545
|
|
var6.packetBuffer.writeByte(var0); // L: 11546
|
|
var6.packetBuffer.writeShort(var1); // L: 11547
|
|
var6.packetBuffer.writeStringCp1252NullTerminated(var4); // L: 11548
|
|
var5.addNode(var6); // L: 11549
|
|
}
|
|
}
|
|
} // L: 11541 11550
|
|
}
|