[Inventory] Add GetInventorySlots() Method (#4566)

* [Inventory] Add GetInventorySlots() Method

* Update client.cpp

* Push
This commit is contained in:
Alex King
2025-01-06 00:48:39 -05:00
committed by GitHub
parent a3a498634f
commit 1ed282f6ff
27 changed files with 204 additions and 197 deletions
+4 -2
View File
@@ -1871,9 +1871,10 @@ bool Corpse::HasItem(uint32 item_id)
return false;
}
uint16 Corpse::CountItem(uint32 item_id)
uint32 Corpse::CountItem(uint32 item_id)
{
uint16 item_count = 0;
uint32 item_count = 0;
if (!database.GetItem(item_id)) {
return item_count;
}
@@ -1893,6 +1894,7 @@ uint16 Corpse::CountItem(uint32 item_id)
item_count += i->charges > 0 ? i->charges : 1;
}
}
return item_count;
}