Fixed crash when removing items from the Bag

This commit is contained in:
Maruno17
2021-10-19 08:39:15 +01:00
parent f6a5ea86db
commit 50065754a0

View File

@@ -106,7 +106,7 @@ class PokemonBag
def remove(item, qty = 1)
item_data = GameData::Item.try_get(item)
return false if !item_data
pocket = item.pocket
pocket = item_data.pocket
return ItemStorageHelper.remove(@pockets[pocket], item.id, qty)
end