fix npc changed event

This commit is contained in:
ThatGamerBlue
2021-02-14 20:46:30 +00:00
parent 49973adb21
commit d1e027c4cb

View File

@@ -111,7 +111,18 @@ public abstract class RSNPCMixin implements RSNPC
}
else if (this.getId() != -1)
{
client.getCallbacks().post(new NpcChanged(this, composition));
RSNPCComposition oldComposition = getComposition();
if (oldComposition == null)
{
return;
}
if (composition.getId() == oldComposition.getId())
{
return;
}
client.getCallbacks().postDeferred(new NpcChanged(this, oldComposition));
}
}