From 2f789da73d69b49addd3d1bdb493fb7571f2c5e5 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 17 Jun 2026 18:47:54 +0200 Subject: [PATCH] feat(D.5.2): route live UiEffects updates (0x02CE) to the item icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subscribe ObjectIntPropertyUpdated (added in Group C Task 4) in GameWindow next to the existing VitalUpdated/VitalCurrentUpdated subscriptions. Routes PublicUpdatePropertyInt(0x02CE) UiEffects (property 18) → ItemRepository. UpdateIntProperty → ItemInstance.Effects → ItemPropertiesUpdated → UiItemSlot re-composites the icon in real time. The end-to-end path is the visual- verification acceptance test (live ACE server + a draining magical item). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/AcDream.App/Rendering/GameWindow.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 385e1cb1..8439d051 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -2631,6 +2631,14 @@ public sealed class GameWindow : IDisposable LocalPlayer.OnVitalUpdate(v.VitalId, v.Ranks, v.Start, v.Xp, v.Current); _liveSession.VitalCurrentUpdated += v => LocalPlayer.OnVitalCurrent(v.VitalId, v.Current); + + // D.5.2: live PublicUpdatePropertyInt(0x02CE). Route UiEffects (18) to the item + // repository so a draining/charging item re-composites its icon in real time. + _liveSession.ObjectIntPropertyUpdated += u => + { + if (u.Property == AcDream.Core.Items.ItemRepository.UiEffectsPropertyId) + Items.UpdateIntProperty(u.Guid, u.Property, u.Value); + }; } ///