From 29388cec9661aa0bbb2e98b802c85d4dfdcfd407 Mon Sep 17 00:00:00 2001 From: PhlexPlexico Date: Tue, 27 Feb 2024 07:42:20 -0600 Subject: [PATCH] Adjust bottle fixes to ensure we don't set ext data on default items. (#49) --- code/source/rnd/item_override.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/source/rnd/item_override.cpp b/code/source/rnd/item_override.cpp index 156b274b..7b429b42 100644 --- a/code/source/rnd/item_override.cpp +++ b/code/source/rnd/item_override.cpp @@ -672,8 +672,14 @@ namespace rnd { override = ItemOverride_Lookup(fromActor, (u16)gctx->scene, getItemId); if (override.key.all != 0) { // Override the stored get item if we are a bottled item. - if (override.value.getItemId == 0x59 || override.value.getItemId == 0x60 || override.value.getItemId == 0x6A || - override.value.getItemId == 0x6E || override.value.getItemId == 0x6F) { + // If we're in the default spot to retrieve these items, set stored to NONE to avoid + // This should avoid ext data being set before getting an actual bottle. + if (storedGetItemId == 0x59 || storedGetItemId == 0x60 || storedGetItemId == 0x6A || storedGetItemId == 0x6E || + storedGetItemId == 0x6F) { + storedGetItemId = GetItemID::GI_NONE; + } else if (override.value.getItemId == 0x59 || override.value.getItemId == 0x60 || + override.value.getItemId == 0x6A || override.value.getItemId == 0x6E || + override.value.getItemId == 0x6F) { storedGetItemId = (GetItemID) override.value.getItemId; } }