Skip to content

Commit

Permalink
fix: equipping two-handed distance weapons via action bar removes qui…
Browse files Browse the repository at this point in the history
…ver if equipped (#2587)
  • Loading branch information
pennaor authored Apr 30, 2024
1 parent 98e927d commit e1faa1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3199,7 +3199,13 @@ void Game::playerEquipItem(uint32_t playerId, uint16_t itemId, bool hasTier /* =
} else {
const int32_t &slotPosition = equipItem->getSlotPosition();
// Checks if a two-handed item is being equipped in the left slot when the right slot is already occupied and move to backpack
if (slotPosition & SLOTP_LEFT && rightItem && (slotPosition & SLOTP_TWO_HAND)) {
if (
(slotPosition & SLOTP_LEFT)
&& (slotPosition & SLOTP_TWO_HAND)
&& rightItem
&& !(it.weaponType == WEAPON_DISTANCE)
&& !rightItem->isQuiver()
) {
ret = internalCollectManagedItems(player, rightItem, getObjectCategory(rightItem), false);
}

Expand Down

0 comments on commit e1faa1f

Please sign in to comment.