project(mixins): Mixins
This commit is contained in:
@@ -2,6 +2,7 @@ package net.runelite.mixins;
|
|||||||
|
|
||||||
import net.runelite.api.IterableHashTable;
|
import net.runelite.api.IterableHashTable;
|
||||||
import net.runelite.api.Node;
|
import net.runelite.api.Node;
|
||||||
|
import net.runelite.api.events.PostObjectComposition;
|
||||||
import net.runelite.api.mixins.Copy;
|
import net.runelite.api.mixins.Copy;
|
||||||
import net.runelite.api.mixins.Inject;
|
import net.runelite.api.mixins.Inject;
|
||||||
import net.runelite.api.mixins.MethodHook;
|
import net.runelite.api.mixins.MethodHook;
|
||||||
@@ -36,6 +37,14 @@ public abstract class RSObjectCompositionMixin implements RSObjectComposition
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@MethodHook(value = "postDecode", end = true)
|
||||||
|
public void postDecode()
|
||||||
|
{
|
||||||
|
final PostObjectComposition event = new PostObjectComposition(this);
|
||||||
|
client.getCallbacks().post(event);
|
||||||
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Override
|
@Override
|
||||||
public int getAccessBitMask()
|
public int getAccessBitMask()
|
||||||
|
|||||||
@@ -1366,6 +1366,12 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Import("meslayerContinueWidget")
|
@Import("meslayerContinueWidget")
|
||||||
Widget getMessageContinueWidget();
|
Widget getMessageContinueWidget();
|
||||||
|
|
||||||
|
@Import("playingJingle")
|
||||||
|
boolean isPlayingJingle();
|
||||||
|
|
||||||
|
@Import("musicTrackGroupId")
|
||||||
|
int getMusicCurrentTrackId();
|
||||||
|
|
||||||
@Import("musicPlayerStatus")
|
@Import("musicPlayerStatus")
|
||||||
void setMusicPlayerStatus(int var0);
|
void setMusicPlayerStatus(int var0);
|
||||||
|
|
||||||
@@ -1579,6 +1585,9 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Import("ObjectDefinition_cached")
|
@Import("ObjectDefinition_cached")
|
||||||
RSEvictingDualNodeHashTable getObjectDefinitionCache();
|
RSEvictingDualNodeHashTable getObjectDefinitionCache();
|
||||||
|
|
||||||
|
@Import("ObjectDefinition_cached")
|
||||||
|
RSEvictingDualNodeHashTable getObjectCompositionCache();
|
||||||
|
|
||||||
@Import("ObjectDefinition_cachedModelData")
|
@Import("ObjectDefinition_cachedModelData")
|
||||||
RSEvictingDualNodeHashTable getObjectDefinitionModelDataCache();
|
RSEvictingDualNodeHashTable getObjectDefinitionModelDataCache();
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ public final class Client extends GameEngine implements Usernamed, OAuthApi {
|
|||||||
)
|
)
|
||||||
public static int field779;
|
public static int field779;
|
||||||
@ObfuscatedName("ss")
|
@ObfuscatedName("ss")
|
||||||
static boolean field746;
|
@Export("playingJingle")
|
||||||
|
static boolean playingJingle;
|
||||||
@ObfuscatedName("tz")
|
@ObfuscatedName("tz")
|
||||||
@ObfuscatedGetter(
|
@ObfuscatedGetter(
|
||||||
intValue = 599158567
|
intValue = 599158567
|
||||||
@@ -1583,7 +1584,7 @@ public final class Client extends GameEngine implements Usernamed, OAuthApi {
|
|||||||
destinationY = 0; // L: 571
|
destinationY = 0; // L: 571
|
||||||
minimapState = 0; // L: 578
|
minimapState = 0; // L: 578
|
||||||
currentTrackGroupId = -1; // L: 579
|
currentTrackGroupId = -1; // L: 579
|
||||||
field746 = false; // L: 580
|
playingJingle = false; // L: 580
|
||||||
soundEffectCount = 0; // L: 586
|
soundEffectCount = 0; // L: 586
|
||||||
soundEffectIds = new int[50]; // L: 587
|
soundEffectIds = new int[50]; // L: 587
|
||||||
queuedSoundEffectLoops = new int[50]; // L: 588
|
queuedSoundEffectLoops = new int[50]; // L: 588
|
||||||
@@ -1850,7 +1851,7 @@ public final class Client extends GameEngine implements Usernamed, OAuthApi {
|
|||||||
var2 = false; // L: 993
|
var2 = false; // L: 993
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var2 && field746 && KeyHandler.pcmPlayer0 != null) { // L: 996 997
|
if (var2 && playingJingle && KeyHandler.pcmPlayer0 != null) { // L: 996 997
|
||||||
KeyHandler.pcmPlayer0.tryDiscard();
|
KeyHandler.pcmPlayer0.tryDiscard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public final class ItemLayer {
|
|||||||
System.gc(); // L: 2932
|
System.gc(); // L: 2932
|
||||||
Actor.method2183(2); // L: 2933
|
Actor.method2183(2); // L: 2933
|
||||||
Client.currentTrackGroupId = -1; // L: 2934
|
Client.currentTrackGroupId = -1; // L: 2934
|
||||||
Client.field746 = false; // L: 2935
|
Client.playingJingle = false; // L: 2935
|
||||||
ClientPreferences.method2259(); // L: 2936
|
ClientPreferences.method2259(); // L: 2936
|
||||||
Decimator.updateGameState(10); // L: 2937
|
Decimator.updateGameState(10); // L: 2937
|
||||||
} // L: 2938
|
} // L: 2938
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ public class Players {
|
|||||||
static void method2419(int var0, int var1) {
|
static void method2419(int var0, int var1) {
|
||||||
if (class131.clientPreferences.method2321() != 0 && var0 != -1) { // L: 3622
|
if (class131.clientPreferences.method2321() != 0 && var0 != -1) { // L: 3622
|
||||||
class18.method266(Message.archive11, var0, 0, class131.clientPreferences.method2321(), false); // L: 3623
|
class18.method266(Message.archive11, var0, 0, class131.clientPreferences.method2321(), false); // L: 3623
|
||||||
Client.field746 = true; // L: 3624
|
Client.playingJingle = true; // L: 3624
|
||||||
}
|
}
|
||||||
|
|
||||||
} // L: 3626
|
} // L: 3626
|
||||||
|
|||||||
@@ -214,11 +214,11 @@ public class SoundCache {
|
|||||||
)
|
)
|
||||||
@Export("playSong")
|
@Export("playSong")
|
||||||
static void playSong(int var0) {
|
static void playSong(int var0) {
|
||||||
if (var0 == -1 && !Client.field746) { // L: 3608
|
if (var0 == -1 && !Client.playingJingle) { // L: 3608
|
||||||
class273.midiPcmStream.clear(); // L: 3610
|
class273.midiPcmStream.clear(); // L: 3610
|
||||||
class273.musicPlayerStatus = 1; // L: 3611
|
class273.musicPlayerStatus = 1; // L: 3611
|
||||||
class273.musicTrackArchive = null; // L: 3612
|
class273.musicTrackArchive = null; // L: 3612
|
||||||
} else if (var0 != -1 && var0 != Client.currentTrackGroupId && class131.clientPreferences.method2321() != 0 && !Client.field746) { // L: 3615
|
} else if (var0 != -1 && var0 != Client.currentTrackGroupId && class131.clientPreferences.method2321() != 0 && !Client.playingJingle) { // L: 3615
|
||||||
NPCComposition.method3530(2, class16.archive6, var0, 0, class131.clientPreferences.method2321(), false); // L: 3616
|
NPCComposition.method3530(2, class16.archive6, var0, 0, class131.clientPreferences.method2321(), false); // L: 3616
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,12 +96,12 @@ public class class1 implements Callable {
|
|||||||
if (var0 != class131.clientPreferences.method2321()) { // L: 12009
|
if (var0 != class131.clientPreferences.method2321()) { // L: 12009
|
||||||
if (class131.clientPreferences.method2321() == 0 && Client.currentTrackGroupId != -1) { // L: 12010
|
if (class131.clientPreferences.method2321() == 0 && Client.currentTrackGroupId != -1) { // L: 12010
|
||||||
class18.method266(class16.archive6, Client.currentTrackGroupId, 0, var0, false); // L: 12011
|
class18.method266(class16.archive6, Client.currentTrackGroupId, 0, var0, false); // L: 12011
|
||||||
Client.field746 = false; // L: 12012
|
Client.playingJingle = false; // L: 12012
|
||||||
} else if (var0 == 0) { // L: 12014
|
} else if (var0 == 0) { // L: 12014
|
||||||
class273.midiPcmStream.clear(); // L: 12016
|
class273.midiPcmStream.clear(); // L: 12016
|
||||||
class273.musicPlayerStatus = 1; // L: 12017
|
class273.musicPlayerStatus = 1; // L: 12017
|
||||||
class273.musicTrackArchive = null; // L: 12018
|
class273.musicTrackArchive = null; // L: 12018
|
||||||
Client.field746 = false; // L: 12020
|
Client.playingJingle = false; // L: 12020
|
||||||
} else if (class273.musicPlayerStatus != 0) { // L: 12023
|
} else if (class273.musicPlayerStatus != 0) { // L: 12023
|
||||||
class273.musicTrackVolume = var0;
|
class273.musicTrackVolume = var0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -139,12 +139,12 @@ public class class136 extends class144 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Client.field746 && !class307.method5789()) { // L: 3546
|
if (Client.playingJingle && !class307.method5789()) { // L: 3546
|
||||||
if (class131.clientPreferences.method2321() != 0 && Client.currentTrackGroupId != -1) { // L: 3547
|
if (class131.clientPreferences.method2321() != 0 && Client.currentTrackGroupId != -1) { // L: 3547
|
||||||
class18.method266(class16.archive6, Client.currentTrackGroupId, 0, class131.clientPreferences.method2321(), false);
|
class18.method266(class16.archive6, Client.currentTrackGroupId, 0, class131.clientPreferences.method2321(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Client.field746 = false; // L: 3548
|
Client.playingJingle = false; // L: 3548
|
||||||
}
|
}
|
||||||
|
|
||||||
} // L: 3550
|
} // L: 3550
|
||||||
|
|||||||
Reference in New Issue
Block a user