mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 04:50:05 -07:00
Add MSI to EnEx hook handler.
Resolve other review suggestions.
This commit is contained in:
parent
baf41161d3
commit
1d5a54901b
4 changed files with 9 additions and 40 deletions
|
@ -333,9 +333,13 @@ void RandomizerOnItemReceiveHandler(GetItemEntry receivedItemEntry) {
|
|||
}
|
||||
|
||||
void EnExItem_DrawRandomizedItem(EnExItem* enExItem, PlayState* play) {
|
||||
GetItemEntry randoGetItem = enExItem->sohItemEntry;
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0)) {
|
||||
randoGetItem = GET_ITEM_MYSTERY;
|
||||
}
|
||||
func_8002ED80(&enExItem->actor, play, 0);
|
||||
EnItem00_CustomItemsParticles(&enExItem->actor, play, enExItem->sohItemEntry);
|
||||
GetItemEntry_Draw(play, enExItem->sohItemEntry);
|
||||
EnItem00_CustomItemsParticles(&enExItem->actor, play, randoGetItem);
|
||||
GetItemEntry_Draw(play, randoGetItem);
|
||||
}
|
||||
|
||||
void EnExItem_WaitForObjectRandomized(EnExItem* enExItem, PlayState* play) {
|
||||
|
|
|
@ -487,47 +487,14 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
|
|||
}
|
||||
if (this) {}
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE;
|
||||
switch (this->type) {
|
||||
case EXITEM_BOMB_BAG_BOWLING:
|
||||
case EXITEM_BOMB_BAG_COUNTER:
|
||||
randoGetItem = (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0) && Randomizer_IsCheckShuffled(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE))
|
||||
? GetItemMystery()
|
||||
: Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20);
|
||||
break;
|
||||
case EXITEM_BOMBCHUS_BOWLING:
|
||||
case EXITEM_BOMBCHUS_COUNTER:
|
||||
randoGetItem = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10);
|
||||
break;
|
||||
case EXITEM_BULLET_BAG:
|
||||
randoGetItem = (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0) && Randomizer_IsCheckShuffled(RC_LW_TARGET_IN_WOODS))
|
||||
? GetItemMystery() : Randomizer_GetItemFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50);
|
||||
break;
|
||||
}
|
||||
|
||||
if (randoGetItem.getItemId != GI_NONE) {
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);
|
||||
GetItemEntry_Draw(play, randoGetItem);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
GetItem_Draw(play, this->giDrawId);
|
||||
}
|
||||
|
||||
void EnExItem_DrawHeartPiece(EnExItem* this, PlayState* play) {
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
|
||||
if (IS_RANDO) {
|
||||
GetItemEntry randoGetItem = (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0) && Randomizer_IsCheckShuffled(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE))
|
||||
? GetItemMystery() : Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);
|
||||
GetItemEntry_Draw(play, randoGetItem);
|
||||
} else {
|
||||
GetItem_Draw(play, GID_HEART_PIECE);
|
||||
}
|
||||
}
|
||||
|
||||
void EnExItem_DrawMagic(EnExItem* this, PlayState* play, s16 magicIndex) {
|
||||
static s16 giDrawIds[] = { GID_DINS_FIRE, GID_FARORES_WIND, GID_NAYRUS_LOVE };
|
||||
|
|
|
@ -206,14 +206,12 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, PlayState* play) {
|
|||
if (play->actorCtx.lensActive) {
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
|
||||
GetItem_Draw(play, this->giDrawId);
|
||||
}
|
||||
}
|
||||
|
||||
void ItemEtcetera_Draw(Actor* thisx, PlayState* play) {
|
||||
ItemEtcetera* this = (ItemEtcetera*)thisx;
|
||||
s32 type = this->actor.params & 0xFF;
|
||||
|
||||
func_8002EBCC(&this->actor, play, 0);
|
||||
func_8002ED80(&this->actor, play, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue