From a01ebd5e0846c5dadaf3163ff0d4f733a2218e41 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 14 May 2026 17:04:20 +0200 Subject: [PATCH] fix(B.5): block pickup of creatures client-side; show 'Can't pick that up' toast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Visual test surfaced a UX bug: when the user single-clicked an NPC last before pressing F, _selectedGuid carried over to SendPickUp and the client sent PutItemInContainer(itemGuid = NPC's serverGuid, ...). ACE responded with WeenieError 0x0029 (Stuck — "You cannot pick that up!") AND triggered the NPC's emote chain, producing the confusing "NPCs talk to me when I press F" symptom. F is only for ground items. Use (double-click) is the right action for NPCs and is unaffected. Guard SendPickUp with the existing IsLiveCreatureTarget predicate and show a toast instead. Same defensive pattern as the 'Not in world' / 'Nothing selected' guards already present in SendUse / SendPickUp / OnInputAction. --- src/AcDream.App/Rendering/GameWindow.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index c6fc8e8..b78148d 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -8896,6 +8896,21 @@ public sealed class GameWindow : IDisposable _debugVm?.AddToast("Not in world"); return; } + + // B.5 polish (2026-05-14): block client-side when the selected + // entity is a creature/NPC — ACE's HandleActionPutItemInContainer + // would otherwise reject with WeenieError.Stuck (0x0029, "You + // cannot pick that up!") AND trigger the NPC's emote chain, + // which surfaces as "the NPC talks to me when I press F" if the + // user single-clicked an NPC last before the F press. Use + // (double-click) is the right action for NPCs; F is only for + // ground items. + if (IsLiveCreatureTarget(itemGuid)) + { + _debugVm?.AddToast("Can't pick that up"); + return; + } + var seq = _liveSession.NextGameActionSequence(); var body = AcDream.Core.Net.Messages.InteractRequests.BuildPickUp( seq, itemGuid, _playerServerGuid, placement: 0);