Skip to content

Commit

Permalink
moveitemslot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Aug 24, 2024
1 parent 086dc28 commit fe6e221
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions SomethingNeedDoing/Misc/Changelog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down
4 changes: 1 addition & 3 deletions SomethingNeedDoing/Misc/Commands/InventoryCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit fe6e221

Please sign in to comment.