mirror of https://github.com/zeldaret/botw.git
match PMDM autoEquip
This commit is contained in:
parent
bfb94a3b6e
commit
37337d271c
|
@ -56389,7 +56389,7 @@ Address,Quality,Size,Name
|
|||
0x0000007100970060,O,000248,_ZN5uking2ui16PauseMenuDataMgr11cookItemGetERKNS_8CookItemE
|
||||
0x0000007100970158,O,000268,_ZN5uking2ui16PauseMenuDataMgr26setCookDataOnLastAddedItemERKNS_8CookItemE
|
||||
0x0000007100970264,O,000116,_ZN5uking2ui16PauseMenuDataMgr22autoEquipLastAddedItemEv
|
||||
0x00000071009702d8,m,000268,_ZN5uking2ui16PauseMenuDataMgr9autoEquipEPNS0_9PouchItemERKN4sead10OffsetListIS2_EE
|
||||
0x00000071009702d8,O,000268,_ZN5uking2ui16PauseMenuDataMgr9autoEquipEPNS0_9PouchItemERKN4sead10OffsetListIS2_EE
|
||||
0x00000071009703e4,m,000216,_ZN5uking2ui16PauseMenuDataMgr10unequipAllENS0_13PouchItemTypeE
|
||||
0x00000071009704bc,O,001352,_ZN5uking2ui16PauseMenuDataMgr10removeItemERKN4sead14SafeStringBaseIcEE
|
||||
0x0000007100970a04,O,000896,_ZN5uking2ui16PauseMenuDataMgr22removeWeaponIfEquippedERKN4sead14SafeStringBaseIcEE
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -1054,7 +1054,6 @@ void PauseMenuDataMgr::autoEquipLastAddedItem() {
|
|||
}
|
||||
}
|
||||
|
||||
// NON_MATCHING: branching
|
||||
const sead::SafeString& PauseMenuDataMgr::autoEquip(PouchItem* item,
|
||||
const sead::OffsetList<PouchItem>& list) {
|
||||
const auto type = item->getType();
|
||||
|
@ -1064,20 +1063,30 @@ const sead::SafeString& PauseMenuDataMgr::autoEquip(PouchItem* item,
|
|||
if (type >= PouchItemType::Material)
|
||||
return sead::SafeString::cEmptyString;
|
||||
|
||||
if (isPouchItemArmor(type)) {
|
||||
for (auto& other : list) {
|
||||
if (other.getType() > PouchItemType::ArmorLower)
|
||||
break;
|
||||
if (other.getType() == type)
|
||||
other.mEquipped = false;
|
||||
}
|
||||
} else if (isPouchItemWeapon(type)) {
|
||||
switch (type) {
|
||||
case PouchItemType::Sword:
|
||||
case PouchItemType::Bow:
|
||||
case PouchItemType::Shield:
|
||||
case PouchItemType::Arrow:
|
||||
for (auto& other : list) {
|
||||
if (other.getType() > PouchItemType::Shield)
|
||||
break;
|
||||
if (other.getType() == type)
|
||||
other.mEquipped = false;
|
||||
}
|
||||
break;
|
||||
case PouchItemType::ArmorHead:
|
||||
case PouchItemType::ArmorUpper:
|
||||
case PouchItemType::ArmorLower:
|
||||
for (auto& other : list) {
|
||||
if (other.getType() > PouchItemType::ArmorLower)
|
||||
break;
|
||||
if (other.getType() == type)
|
||||
other.mEquipped = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
item->mEquipped = true;
|
||||
|
|
Loading…
Reference in New Issue