Add sound effects to tunic/boot equips (#446)

* Add sound effects to tunic/boot equips

* Use enums for assignable equip swaps
This commit is contained in:
vaguerant 2022-06-07 09:27:03 +10:00 committed by GitHub
parent d01d6ff3d1
commit 3444868b95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2779,22 +2779,24 @@ void func_80835F44(GlobalContext* globalCtx, Player* this, s32 item) {
if (actionParam >= PLAYER_AP_BOOTS_KOKIRI) { if (actionParam >= PLAYER_AP_BOOTS_KOKIRI) {
u16 bootsValue = actionParam - PLAYER_AP_BOOTS_KOKIRI + 1; u16 bootsValue = actionParam - PLAYER_AP_BOOTS_KOKIRI + 1;
if (CUR_EQUIP_VALUE(EQUIP_BOOTS) == bootsValue) { if (CUR_EQUIP_VALUE(EQUIP_BOOTS) == bootsValue) {
Inventory_ChangeEquipment(EQUIP_BOOTS, 1); Inventory_ChangeEquipment(EQUIP_BOOTS, PLAYER_BOOTS_KOKIRI + 1);
} else { } else {
Inventory_ChangeEquipment(EQUIP_BOOTS, bootsValue); Inventory_ChangeEquipment(EQUIP_BOOTS, bootsValue);
} }
Player_SetEquipmentData(globalCtx, this); Player_SetEquipmentData(globalCtx, this);
func_808328EC(this, CUR_EQUIP_VALUE(EQUIP_BOOTS) == PLAYER_BOOTS_IRON + 1 ? NA_SE_PL_WALK_HEAVYBOOTS : NA_SE_PL_CHANGE_ARMS);
return; return;
} }
if (actionParam >= PLAYER_AP_TUNIC_KOKIRI) { if (actionParam >= PLAYER_AP_TUNIC_KOKIRI) {
u16 tunicValue = actionParam - PLAYER_AP_TUNIC_KOKIRI + 1; u16 tunicValue = actionParam - PLAYER_AP_TUNIC_KOKIRI + 1;
if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == tunicValue) { if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == tunicValue) {
Inventory_ChangeEquipment(EQUIP_TUNIC, 1); Inventory_ChangeEquipment(EQUIP_TUNIC, PLAYER_TUNIC_KOKIRI + 1);
} else { } else {
Inventory_ChangeEquipment(EQUIP_TUNIC, tunicValue); Inventory_ChangeEquipment(EQUIP_TUNIC, tunicValue);
} }
Player_SetEquipmentData(globalCtx, this); Player_SetEquipmentData(globalCtx, this);
func_808328EC(this, NA_SE_PL_CHANGE_ARMS);
return; return;
} }