qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
51 stars 370 forks source link

[BUG] Putting weapon in trunk while holding #513

Open ern11 opened 1 month ago

ern11 commented 1 month ago

Summary

When equipping a weapon such as a gun, then opening a trunk and transferring the weapon to the trunk, it does not leave your hand and you can continue to use it or reload it until equipping another item to remove it from your hand

Reproduction

  1. Have a weapon in inventory hotbar and equip
  2. Open trunk
  3. Drag weapon you have in your hand to the trunk from your player inventory
  4. Close trunk and weapon remains in hand

Expected behavior

Expected that the weapon will be unequipped from hand after dragging it into the trunk

Actual behavior

Weapon remains in hand even after it has left the inventory

Additional context

This was done after updating latest qb-inventory and qb-weapons scripts

Last Updated

Today

Custom Resources

n/a

Resource Rename

n/a

GhzGarage commented 1 month ago

I made a commit here, it's still limited as it just checks if the weapon matches. I'm going to continue working on this but i wanted to get a fix out even if it is somewhat annoying for the time being https://github.com/qbcore-framework/qb-inventory/commit/334c179d7cb8f4494b6a9f02358067a003f15ad4