| 316 | } |
| 317 | |
| 318 | void ActionBar::customBarClickRight(uint8_t index, bool primary) { |
| 319 | if (m_paneManager->registeredPaneIsDisplayed(MainInterfacePanes::Inventory)) { |
| 320 | auto inventory = m_player->inventory(); |
| 321 | auto primarySlot = inventory->customBarPrimarySlot(index); |
| 322 | auto secondarySlot = inventory->customBarSecondarySlot(index); |
| 323 | |
| 324 | if (primary || (primarySlot && itemSafeTwoHanded(inventory->itemsAt(*primarySlot)))) |
| 325 | inventory->setCustomBarPrimarySlot(index, {}); |
| 326 | else |
| 327 | inventory->setCustomBarSecondarySlot(index, {}); |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | void ActionBar::essentialBarClick(uint8_t index) { |
| 332 | m_player->inventory()->selectActionBarLocation((EssentialItem)index); |
nothing calls this directly
no test coverage detected