Skip to content

Commit

Permalink
Revert "Tie NEEDEXCHANGE behavior to classicEquipmentSlots setting (#…
Browse files Browse the repository at this point in the history
…4097)"

This reverts commit c506a2f.
  • Loading branch information
torresmon committed Apr 30, 2022
1 parent 5c3e0a3 commit d3fac76
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2662,15 +2662,12 @@ ReturnValue Player::queryAdd(int32_t index, const Thing& thing, uint32_t count,
// need an exchange with source? (destination item is swapped with currently moved item)
const Item* inventoryItem = getInventoryItem(static_cast<slots_t>(index));
if (inventoryItem && (!inventoryItem->isStackable() || inventoryItem->getID() != item->getID())) {
if (!g_config.getBoolean(ConfigManager::CLASSIC_EQUIPMENT_SLOTS)) {
const Cylinder* cylinder = item->getTopParent();
if (cylinder && (dynamic_cast<const DepotChest*>(cylinder) || dynamic_cast<const Player*>(cylinder))) {
return RETURNVALUE_NEEDEXCHANGE;
}
return RETURNVALUE_NOTENOUGHROOM;
const Cylinder* cylinder = item->getTopParent();
if (cylinder && (dynamic_cast<const DepotChest*>(cylinder) || dynamic_cast<const Player*>(cylinder))) {
return RETURNVALUE_NEEDEXCHANGE;
}

return RETURNVALUE_NEEDEXCHANGE;
return RETURNVALUE_NOTENOUGHROOM;
}
return ret;
}
Expand Down

0 comments on commit d3fac76

Please sign in to comment.