diff --git a/src/GameLogic/PlayerActions/Items/ItemStackAction.cs b/src/GameLogic/PlayerActions/Items/ItemStackAction.cs index e9c5fa6..413b934 100644 --- a/src/GameLogic/PlayerActions/Items/ItemStackAction.cs +++ b/src/GameLogic/PlayerActions/Items/ItemStackAction.cs @@ -52,6 +52,7 @@ public class ItemStackAction foreach (var jewel in jewels) { await player.Inventory.RemoveItemAsync(jewel).ConfigureAwait(false); + await player.PersistenceContext.DeleteAsync(jewel).ConfigureAwait(false); await player.InvokeViewPlugInAsync(p => p.RemoveItemAsync(jewel.ItemSlot)).ConfigureAwait(false); } @@ -118,6 +119,7 @@ public class ItemStackAction } await player.Inventory.RemoveItemAsync(stacked).ConfigureAwait(false); + await player.PersistenceContext.DeleteAsync(stacked).ConfigureAwait(false); await player.InvokeViewPlugInAsync(p => p.RemoveItemAsync(slot)).ConfigureAwait(false); foreach (var freeSlot in freeSlots) { diff --git a/src/GameLogic/PlayerActions/Items/SellItemToNpcAction.cs b/src/GameLogic/PlayerActions/Items/SellItemToNpcAction.cs index 6a835b2..f80c358 100644 --- a/src/GameLogic/PlayerActions/Items/SellItemToNpcAction.cs +++ b/src/GameLogic/PlayerActions/Items/SellItemToNpcAction.cs @@ -63,6 +63,7 @@ public class SellItemToNpcAction { player.Logger.LogDebug("Sold Item {0} for price: {1}", item, sellingPrice); await player.Inventory!.RemoveItemAsync(item).ConfigureAwait(false); + await player.PersistenceContext.DeleteAsync(item).ConfigureAwait(false); await player.InvokeViewPlugInAsync(p => p.ItemSoldToNpcAsync(true)).ConfigureAwait(false); player.GameContext.PlugInManager.GetPlugInPoint()?.ItemSold(player, item, player.OpenedNpc!);