fix(B.5): block pickup of creatures client-side; show 'Can't pick that up' toast
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.
This commit is contained in:
parent
20ecb23396
commit
a01ebd5e08
1 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue