diff options
| author | mike8699 <mikebuntu68@gmail.com> | 2025-01-01 22:31:14 -0500 |
|---|---|---|
| committer | mike8699 <mikebuntu68@gmail.com> | 2025-01-05 19:06:26 -0500 |
| commit | 200a68b3de85ed98e5b07b33abce3fe930428828 (patch) | |
| tree | 2d5b93192f0362a548b33247d233df9d669f872a /src/00_Core/Player/LinkStateItem.cpp | |
| parent | 11a3df2d99a16600d40a04da43122bd12b6e3b92 (diff) | |
LinkStateItem::OnStateLeave 92% match
Diffstat (limited to 'src/00_Core/Player/LinkStateItem.cpp')
| -rw-r--r-- | src/00_Core/Player/LinkStateItem.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/00_Core/Player/LinkStateItem.cpp b/src/00_Core/Player/LinkStateItem.cpp index 2c447778..4b85f21b 100644 --- a/src/00_Core/Player/LinkStateItem.cpp +++ b/src/00_Core/Player/LinkStateItem.cpp @@ -51,7 +51,7 @@ void LinkStateItem::OnStateLeave(s32 param1) { case 0: break; case 1: break; case 2: break; - case 4: EquipBomb::StopUsing(this); break; + case 4: EquipBomb::StopUsing(this, param1); break; case 5: break; case 6: EquipRope::StopUsing(this); break; case 8: EquipHammer::StopUsing(this); break; @@ -68,16 +68,22 @@ void LinkStateItem::OnStateLeave(s32 param1) { pEVar1->vfunc_1c(); } - if ((this->mEquipId <= 9 && this->mEquipId >= 9) || (this->mEquipId <= 1 && this->mEquipId >= -1) && (this->mEquipId != -1 && this->mEquipId != 0 && this->mEquipId != 1)) { - if (this->mEquipId == 10) this->EquipItem_vfunc_28(); - } - else { - this->EquipItem_vfunc_28(); - - if (param1 != 4 && param1 != 2) { - pLVar2 = this->GetLinkStateMove(); - pLVar2->mUnk_14 = true; - } + switch (this->mEquipId) { + case -1: + case 0: + break; + case 1: + break; + case 9: + case 10: + this->EquipItem_vfunc_28(); + break; + default: + this->EquipItem_vfunc_28(); + if (param1 != 4 && param1 != 2) { + pLVar2 = this->GetLinkStateMove(); + pLVar2->mUnk_14 = true; + } } this->mNextEquip = 0xffffffff; |
