Fix hiding player attacks in client, add option to hide cast as well (#896)

Tiny bit of refactoring as well
This commit is contained in:
Lucwousin
2019-07-05 23:10:02 +02:00
committed by Kyleeld
parent a8cf657e4c
commit 2367f7ee18
19 changed files with 187 additions and 69 deletions

View File

@@ -68,13 +68,14 @@ public final class TilePaint {
signature = "(IIB)V",
garbageValue = "0"
)
static final void method3061(int var0, int var1) {
@Export("updateItemPile")
static final void updateItemPile(int var0, int var1) {
NodeDeque var2 = Client.groundItems[SoundSystem.plane][var0][var1];
if (var2 == null) {
class65.scene.removeGroundItemPile(SoundSystem.plane, var0, var1);
} else {
long var3 = -99999999L;
GroundItem var5 = null;
long highestValue = -99999999L;
GroundItem highestValuedItem = null;
GroundItem var6;
for (var6 = (GroundItem)var2.last(); var6 != null; var6 = (GroundItem)var2.previous()) {
@@ -84,21 +85,21 @@ public final class TilePaint {
var8 *= (long)(var6.quantity + 1);
}
if (var8 > var3) {
var3 = var8;
var5 = var6;
if (var8 > highestValue) {
highestValue = var8;
highestValuedItem = var6;
}
}
if (var5 == null) {
if (highestValuedItem == null) {
class65.scene.removeGroundItemPile(SoundSystem.plane, var0, var1);
} else {
var2.addLast(var5);
var2.addLast(highestValuedItem);
GroundItem var11 = null;
GroundItem var12 = null;
for (var6 = (GroundItem)var2.last(); var6 != null; var6 = (GroundItem)var2.previous()) {
if (var5.id != var6.id) {
if (highestValuedItem.id != var6.id) {
if (var11 == null) {
var11 = var6;
}
@@ -109,8 +110,8 @@ public final class TilePaint {
}
}
long var9 = FontName.method5637(var0, var1, 3, false, 0);
class65.scene.newGroundItemPile(SoundSystem.plane, var0, var1, class32.getTileHeight(var0 * 128 + 64, var1 * 128 + 64, SoundSystem.plane), var5, var9, var11, var12);
long var9 = FontName.calculateTag(var0, var1, 3, false, 0);
class65.scene.newGroundItemPile(SoundSystem.plane, var0, var1, class32.getTileHeight(var0 * 128 + 64, var1 * 128 + 64, SoundSystem.plane), highestValuedItem, var9, var11, var12);
}
}