ItemService improvements (#2322)

* ItemService improvements

* Move Poe increment to item
This commit is contained in:
Luke Street
2026-08-21 00:50:51 -06:00
committed by GitHub
parent 172d06f38d
commit 5f0f3d4ebe
43 changed files with 851 additions and 181 deletions
+32
View File
@@ -27,8 +27,10 @@
#if TARGET_PC
#include "dusk/frame_interpolation.h"
#include "dusk/mods/item.hpp"
#include "dusk/settings.h"
#include "dusk/version.hpp"
#include "mods/items.h"
#endif
class dmg_rod_HIO_c : public JORReflexible {
@@ -2955,7 +2957,17 @@ static void lure_heart(dmg_rod_class* i_this) {
if (obj_life != NULL) {
fopAcM_delete(obj_life);
fopAcM_onItem(obj_life, 0x80);
#if TARGET_PC
const auto itemCheck = dusk::mods::item_check_commit(
ITEM_CHECK_FISHING_HEART_PIECE, dItemNo_KAKERA_HEART_e, actor);
if (itemCheck.itemNo == dItemNo_KAKERA_HEART_e) {
execItemGet(dItemNo_KAKERA_HEART_e, itemCheck.tag, actor);
} else if (itemCheck.itemNo == dItemNo_NONE_e) {
dusk::mods::item_check_complete(itemCheck, actor);
}
#else
execItemGet(dItemNo_KAKERA_HEART_e);
#endif
u8 eventReg = dComIfGs_getEventReg(0xECFF);
eventReg |= (u8)0x40;
dComIfGs_setEventReg(0xECFF, eventReg);
@@ -4090,7 +4102,15 @@ static void uki_catch(dmg_rod_class* i_this) {
} else if (mgfish->mCaughtType == MG_CATCH_BIN) {
i_this->msgflow.init(actor, 0x139A, 0, NULL);
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[468]);
#if TARGET_PC
const auto itemCheck = dusk::mods::item_check_commit(
ITEM_CHECK_FISHING_BOTTLE, dItemNo_EMPTY_BOTTLE_e, actor);
if (itemCheck.itemNo == dItemNo_EMPTY_BOTTLE_e) {
dComIfGs_setEmptyBottle();
}
#else
dComIfGs_setEmptyBottle();
#endif
} else if (mgfish->mCaughtType == MG_CATCH_KN) {
i_this->msgflow.init(actor, 0x139C, 0, NULL);
} else if (mgfish->mCaughtType == MG_CATCH_ED) {
@@ -4167,6 +4187,18 @@ static void uki_catch(dmg_rod_class* i_this) {
if (mgfish->mCaughtType == MG_CATCH_LH) {
dComIfGp_setItemRupeeCount(10.0f + cM_rndF(40.9f));
}
#if TARGET_PC
else if (mgfish->mCaughtType == MG_CATCH_BIN)
{
const auto itemCheck = dusk::mods::item_check_commit(
ITEM_CHECK_FISHING_BOTTLE, dItemNo_EMPTY_BOTTLE_e, actor);
if (itemCheck.itemNo == dItemNo_EMPTY_BOTTLE_e ||
itemCheck.itemNo == dItemNo_NONE_e)
{
dusk::mods::item_check_complete(itemCheck, actor);
}
}
#endif
} else {
dComIfGs_addFishNum(fish_kind);
if (i_this->field_0x14c0 != 0) {