project: add missing stuff

This commit is contained in:
Kyle
2021-03-03 00:35:29 +00:00
parent 94212d6d9c
commit be1258822a
2 changed files with 23 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ import static net.runelite.api.SkullIcon.*;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.events.OverheadPrayerChanged;
import net.runelite.api.events.PlayerChanged;
import net.runelite.api.events.PlayerCompositionChanged;
import net.runelite.api.events.PlayerSkullChanged;
import net.runelite.api.mixins.Copy;
import net.runelite.api.mixins.FieldHook;
@@ -268,4 +269,19 @@ public abstract class RSPlayerMixin implements RSPlayer
{
client.getCallbacks().post(new PlayerChanged(this));
}
@Copy("read")
@Replace("read")
@SuppressWarnings("InfiniteRecursion")
public void copy$read(RSBuffer buffer)
{
final long appearanceHash = getPlayerComposition() == null ? 0 : getPlayerComposition().getHash();
this.copy$read(buffer);
if (client.isComparingAppearance() && getPlayerComposition().getHash() != appearanceHash)
{
client.getCallbacks().post(new PlayerCompositionChanged(this));
}
}
}