summaryrefslogtreecommitdiff
path: root/src/ItemManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ItemManager.cpp')
-rw-r--r--src/ItemManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ItemManager.cpp b/src/ItemManager.cpp
index 480e96cd..1a4495f6 100644
--- a/src/ItemManager.cpp
+++ b/src/ItemManager.cpp
@@ -292,3 +292,8 @@ THUMB void ItemManager::SetShipPartCount(ShipPart part, ShipType type, s8 count)
THUMB s8 ItemManager::GetTreasureCount(Treasure treasure) const {
return this->mTreasure[treasure];
}
+
+THUMB void ItemManager::SetTreasureCount(Treasure treasure, s8 count) {
+ if (count > 99) count = 99;
+ this->mTreasure[treasure] = count;
+}