Decomp ItemManager::GiveAmmo

This commit is contained in:
Aetias
2024-02-17 00:53:22 +01:00
parent ef2226c84d
commit 3a25fcc17d
8 changed files with 19 additions and 36 deletions
+6
View File
@@ -267,3 +267,9 @@ u16 ItemManager::GetAmmo(ItemFlag equipId) const {
return (*this->mAmmo)[equipId];
}
#pragma interworking off
void ItemManager::GiveAmmo(ItemFlag equipId, u16 amount) {
(*this->mAmmo)[equipId] += amount;
if ((*this->mAmmo)[equipId] <= this->GetMaxAmmo(equipId)) return;
(*this->mAmmo)[equipId] = this->GetMaxAmmo(equipId);
}