Skip to content

Commit

Permalink
fairy test
Browse files Browse the repository at this point in the history
  • Loading branch information
inspectredc committed Aug 31, 2023
1 parent 0e7c658 commit fc78198
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion soh/include/z64item.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ typedef enum {
/* 0x1B */ EXCH_ITEM_POE,
/* 0x1C */ EXCH_ITEM_BIG_POE,
/* 0x1D */ EXCH_ITEM_LETTER_RUTO,
/* 0x1E */ EXCH_ITEM_MAX
/* 0x1E */ EXCH_ITEM_MAX,
EXCH_ITEM_FAIRY = 0x23,
} ExchangeItemID;

#endif
5 changes: 4 additions & 1 deletion soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ void func_80A70834(EnHy* this, PlayState* play) {

if ((this->actor.params & 0x7F) == ENHY_TYPE_BOJ_5) {
if (!Inventory_HasSpecificBottle(ITEM_BLUE_FIRE) && !Inventory_HasSpecificBottle(ITEM_BUG) &&
!Inventory_HasSpecificBottle(ITEM_FISH)) {
!Inventory_HasSpecificBottle(ITEM_FISH) && (CVarGetInteger("gBeggarBuysFairy", 0) && !Inventory_HasSpecificBottle(ITEM_FAIRY))) {
switch (func_8002F368(play)) {
case EXCH_ITEM_POE:
case EXCH_ITEM_BIG_POE:
Expand All @@ -759,6 +759,9 @@ void func_80A70834(EnHy* this, PlayState* play) {
case EXCH_ITEM_BUG:
this->actor.textId = 0x70F2;
break;
case EXCH_ITEM_FAIRY:
this->actor.textId = 0x70F2;
break;
default:
if (Player_GetMask(play) == PLAYER_MASK_NONE) {
this->actor.textId = 0x700C;
Expand Down
3 changes: 2 additions & 1 deletion soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -5077,7 +5077,8 @@ s32 func_8083B040(Player* this, PlayState* play) {
((this->itemAction > PLAYER_IA_BOTTLE_POE) ||
((this->targetActor != NULL) &&
(((this->itemAction == PLAYER_IA_BOTTLE_POE) && (this->exchangeItemId == EXCH_ITEM_POE)) ||
(this->exchangeItemId == EXCH_ITEM_BLUE_FIRE))))))) {
(this->exchangeItemId == EXCH_ITEM_BLUE_FIRE)))))
|| (CVarGetInteger("gBeggarBuysFairy", 0) && sp28 == 11))) {

if ((play->actorCtx.titleCtx.delayTimer == 0) && (play->actorCtx.titleCtx.alpha == 0)) {
func_80835DE4(play, this, func_8084F104, 0);
Expand Down

0 comments on commit fc78198

Please sign in to comment.