From 1eda55a3f128e2b9beb970797ecd6010e7d32c5b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 11 May 2024 11:01:49 -0400 Subject: [PATCH] Serialization update --- src/engine/net/client/msg/ManageNPCMsg.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/engine/net/client/msg/ManageNPCMsg.java b/src/engine/net/client/msg/ManageNPCMsg.java index fcef1d65..37bc04f7 100644 --- a/src/engine/net/client/msg/ManageNPCMsg.java +++ b/src/engine/net/client/msg/ManageNPCMsg.java @@ -9,8 +9,9 @@ package engine.net.client.msg; +import engine.gameManager.ForgeManager; import engine.gameManager.NPCManager; -import engine.mbEnums; +import engine.loot.WorkOrder; import engine.mbEnums.GameObjectType; import engine.mbEnums.MinionType; import engine.mbEnums.ProtectionState; @@ -457,13 +458,11 @@ public class ManageNPCMsg extends ClientNetMsg { else writer.put((byte) 0); - writer.putInt(mbEnums.toInt(item.flags)); - // if ((item.prefixToken == 0 && item.suffixToken == 0)) - // writer.putInt(0); - // else - // writer.putInt(-1497023830); ItemFlag.Magic? + writer.putInt(-1497023830); //???? Magic Number - if (item.flags.contains(mbEnums.ItemFlags.Identified)) { + WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(item); + + if (item.isComplete() || (workOrder.prefixToken != 0 && workOrder.suffixToken != 0)) { writer.putInt(item.prefixToken); writer.putInt(item.suffixToken); } else {