Raise hand (un)equipped events on container insert/remove (#15664)

This commit is contained in:
Menshin
2023-04-23 21:38:52 +02:00
committed by GitHub
parent 5272198729
commit c1ef48cee9
7 changed files with 56 additions and 33 deletions

View File

@@ -146,10 +146,6 @@ public abstract partial class InventorySystem
if (!_handsSystem.CanDropHeld(actor, hands.ActiveHand!, checkActionBlocker: false))
return;
var gotUnequipped = new GotUnequippedHandEvent(actor, held.Value, hands.ActiveHand!);
var didUnequip = new DidUnequipHandEvent(actor, held.Value, hands.ActiveHand!);
RaiseLocalEvent(held.Value, gotUnequipped, false);
RaiseLocalEvent(actor, didUnequip, true);
RaiseLocalEvent(held.Value, new HandDeselectedEvent(actor), false);
TryEquip(actor, actor, held.Value, ev.Slot, predicted: true, inventory: inventory, force: true);