From ac691d31401362d2be0222806d09e6f007df2590 Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 2 Mar 2026 21:05:46 +0000 Subject: [PATCH] feat: add item appraisal requests to LiveInventoryTracker RequestId() is called for armor, weapons, jewelry, and other items that need full ID data when picked up via OnCreateObject or OnChangeObject. Adds ObjectClassNeedsIdent helper matching MossyInventory's logic. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- MosswartMassacre/LiveInventoryTracker.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/MosswartMassacre/LiveInventoryTracker.cs b/MosswartMassacre/LiveInventoryTracker.cs index 9dd54a9..4b3546b 100644 --- a/MosswartMassacre/LiveInventoryTracker.cs +++ b/MosswartMassacre/LiveInventoryTracker.cs @@ -51,6 +51,12 @@ namespace MosswartMassacre _trackedItemIds.Add(item.Id); var mwo = MyWorldObjectCreator.Create(item); _ = WebSocket.SendInventoryDeltaAsync("add", mwo); + + // Request appraisal if item needs full ID data (spells, combat stats, etc.) + if (!item.HasIdData && ObjectClassNeedsIdent(item.ObjectClass, item.Name)) + { + CoreManager.Current.Actions.RequestId(item.Id); + } } catch (Exception ex) { @@ -96,6 +102,12 @@ namespace MosswartMassacre _trackedItemIds.Add(item.Id); var mwo = MyWorldObjectCreator.Create(item); _ = WebSocket.SendInventoryDeltaAsync("add", mwo); + + // Request appraisal if item needs full ID data + if (!item.HasIdData && ObjectClassNeedsIdent(item.ObjectClass, item.Name)) + { + CoreManager.Current.Actions.RequestId(item.Id); + } } else { @@ -115,6 +127,18 @@ namespace MosswartMassacre _trackedItemIds.Clear(); } + private static bool ObjectClassNeedsIdent(ObjectClass oc, string name) + { + return oc == ObjectClass.Armor + || oc == ObjectClass.Clothing + || oc == ObjectClass.MeleeWeapon + || oc == ObjectClass.MissileWeapon + || oc == ObjectClass.WandStaffOrb + || oc == ObjectClass.Jewelry + || (oc == ObjectClass.Gem && !string.IsNullOrEmpty(name) && name.Contains("Aetheria")) + || (oc == ObjectClass.Misc && !string.IsNullOrEmpty(name) && name.Contains("Essence")); + } + private static bool IsPlayerInventory(WorldObject item) { try