diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2024-01-08 09:25:47 -0600 |
|---|---|---|
| committer | Garrett Cox <garrettjcox@gmail.com> | 2024-02-02 15:39:01 -0600 |
| commit | 596ea5ebbb3e5a5dfab72fb7bee6d4802d8b13d4 (patch) | |
| tree | 4161db9bf2f0ad30895e9195e3bbaa7db56785cc /soh/src/code/z_parameter.c | |
| parent | fe9dcf1fc3f82711f03f932e3f153dc4ba3cf7df (diff) | |
Vanilla Behavior Overhaul
Co-authored-by: jordanpg <jordanpg@users.noreply.github.com>
Diffstat (limited to 'soh/src/code/z_parameter.c')
| -rw-r--r-- | soh/src/code/z_parameter.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 828e98368..bc253ef3a 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2128,7 +2128,9 @@ u8 Item_Give(PlayState* play, u8 item) { AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS); } } - item = ITEM_STICK; + // [SOH] This results in the same behavior as the original code, but also allows us to get an accurate ReceivedItemEntry hook + INV_CONTENT(ITEM_STICK) = ITEM_STICK; + return Return_Item(item, MOD_NONE, returnItem); } else if (item == ITEM_NUT) { if (gSaveContext.inventory.items[slot] == ITEM_NONE) { Inventory_ChangeUpgrade(UPG_NUTS, 1); @@ -2152,7 +2154,9 @@ u8 Item_Give(PlayState* play, u8 item) { AMMO(ITEM_NUT) = CUR_CAPACITY(UPG_NUTS); } } - item = ITEM_NUT; + // [SOH] This results in the same behavior as the original code, but also allows us to get an accurate ReceivedItemEntry hook + INV_CONTENT(ITEM_NUT) = ITEM_NUT; + return Return_Item(item, MOD_NONE, returnItem); } else if (item == ITEM_BOMB) { // "Bomb Bomb Bomb Bomb Bomb Bomb Bomb" osSyncPrintf(" 爆弾 爆弾 爆弾 爆弾 爆弾 爆弾 爆弾 \n"); |
