From a41ce23938423313ed0d5859dea6730a4e2915f1 Mon Sep 17 00:00:00 2001 From: Aetias Date: Tue, 30 Apr 2024 18:17:31 +0200 Subject: Decomp `ItemManager::SetPotion` --- src/00_Core/Item/ItemManager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/00_Core/Item/ItemManager.cpp') diff --git a/src/00_Core/Item/ItemManager.cpp b/src/00_Core/Item/ItemManager.cpp index 617ec311..877d43de 100644 --- a/src/00_Core/Item/ItemManager.cpp +++ b/src/00_Core/Item/ItemManager.cpp @@ -853,3 +853,12 @@ ARM void ItemManager::func_ov00_020ae4dc(s32 param1) { mUnk_0ba = newValue; } } + +ARM void ItemManager::SetPotion(u32 index, Potion potion) { + mPotions[index] = potion; + if (potion == Potion_None) { + RESET_FLAG(mItemFlags.flags, index + ItemFlag_PotionA); + } else { + SET_FLAG(mItemFlags.flags, index + ItemFlag_PotionA); + } +} -- cgit v1.2.3