From fe6e221a1b3d1f1ed2722e43364e2712cf00d24a Mon Sep 17 00:00:00 2001 From: Jackson <9527380+Jaksuhn@users.noreply.github.com> Date: Sat, 24 Aug 2024 10:52:11 +0200 Subject: [PATCH] moveitemslot fix --- SomethingNeedDoing/Misc/Changelog.cs | 4 ++++ SomethingNeedDoing/Misc/Commands/InventoryCommands.cs | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SomethingNeedDoing/Misc/Changelog.cs b/SomethingNeedDoing/Misc/Changelog.cs index 5c8abf96..36c8cd30 100644 --- a/SomethingNeedDoing/Misc/Changelog.cs +++ b/SomethingNeedDoing/Misc/Changelog.cs @@ -18,6 +18,10 @@ static void DisplayChangelog(string date, string changes, bool separator = true) } using var font = ImRaii.PushFont(UiBuilder.MonoFont); + DisplayChangelog( + "2024-08-24", + "- Fixed MoveItemToContainer()\n"); + DisplayChangelog( "2024-08-23", "- Added GetFateStartTimeEpoch()\n" + diff --git a/SomethingNeedDoing/Misc/Commands/InventoryCommands.cs b/SomethingNeedDoing/Misc/Commands/InventoryCommands.cs index 0cbfb218..f47a5f99 100644 --- a/SomethingNeedDoing/Misc/Commands/InventoryCommands.cs +++ b/SomethingNeedDoing/Misc/Commands/InventoryCommands.cs @@ -62,9 +62,7 @@ public unsafe int GetFreeSlotsInContainer(uint container) } public unsafe void MoveItemToContainer(uint itemID, uint srcContainer, uint dstContainer) - { - InventoryManager.Instance()->MoveItemSlot((InventoryType)srcContainer, (ushort)GetItemInInventory(itemID, (InventoryType)srcContainer)->Slot, (InventoryType)dstContainer, GetFirstAvailableSlot((InventoryType)dstContainer)); - } + => InventoryManager.Instance()->MoveItemSlot((InventoryType)srcContainer, (ushort)GetItemInInventory(itemID, (InventoryType)srcContainer)->Slot, (InventoryType)dstContainer, GetFirstAvailableSlot((InventoryType)dstContainer), 1); private static unsafe InventoryItem* GetItemInInventory(uint itemId, InventoryType inv, bool mustBeHQ = false) {