Skip to content

Disappear item if dropping to same original slot #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cuong-tran opened this issue Jul 26, 2023 · 0 comments
Open

Disappear item if dropping to same original slot #1

cuong-tran opened this issue Jul 26, 2023 · 0 comments

Comments

@cuong-tran
Copy link

cuong-tran commented Jul 26, 2023

The code in InventoryUIController.OnPointerUp calls to closestSlot.HoldItem first then call m_OriginalSlot.DropItem. This would remove the item if closestSlot happens to be same as m_OriginalSlot.

//Set the new inventory slot with the data
closestSlot.HoldItem(GameController.GetItemByGuid(m_OriginalSlot.ItemGuid));
                
//Clear the original slot
m_OriginalSlot.DropItem();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant