feat(Core/Player): implement GetFreeInventorySpace() (#4297)

This commit is contained in:
Kitzunu
2021-01-16 17:33:30 +01:00
committed by GitHub
parent e7052d15f8
commit 43f59c4c82
3 changed files with 41 additions and 17 deletions

View File

@@ -1242,6 +1242,7 @@ public:
[[nodiscard]] Item* GetItemByPos(uint16 pos) const;
[[nodiscard]] Item* GetItemByPos(uint8 bag, uint8 slot) const;
[[nodiscard]] Bag* GetBagByPos(uint8 slot) const;
[[nodiscard]] uint32 GetFreeInventorySpace() const;
[[nodiscard]] inline Item* GetUseableItemByPos(uint8 bag, uint8 slot) const //Does additional check for disarmed weapons
{
if (!CanUseAttackType(GetAttackBySlot(slot)))