| 302 | } |
| 303 | |
| 304 | void ActionBar::customBarClick(uint8_t index, bool primary) { |
| 305 | if (auto swapItem = m_player->inventory()->swapSlotItem()) { |
| 306 | if (primary || itemSafeTwoHanded(swapItem)) |
| 307 | m_player->inventory()->setCustomBarPrimarySlot(index, InventorySlot(SwapSlot())); |
| 308 | else |
| 309 | m_player->inventory()->setCustomBarSecondarySlot(index, InventorySlot(SwapSlot())); |
| 310 | |
| 311 | m_player->inventory()->clearSwap(); |
| 312 | |
| 313 | } else { |
| 314 | m_player->inventory()->selectActionBarLocation(index); |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | void ActionBar::customBarClickRight(uint8_t index, bool primary) { |
| 319 | if (m_paneManager->registeredPaneIsDisplayed(MainInterfacePanes::Inventory)) { |
nothing calls this directly
no test coverage detected