Skip to content

Commit

Permalink
fix arrow slot
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKnopik committed Nov 24, 2024
1 parent c5511b4 commit 6916e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,7 @@ ReturnValue Player::queryMaxCount(int32_t index, const Thing& thing, uint32_t co
}
} else if (queryAdd(slotIndex, *item, item->getItemCount(), flags) == RETURNVALUE_NOERROR) { // empty slot
if (item->isStackable()) {
n += 100;
n += item->getStackSize();
} else {
++n;
}
Expand All @@ -2705,7 +2705,7 @@ ReturnValue Player::queryMaxCount(int32_t index, const Thing& thing, uint32_t co
if (destItem) {
if (destItem->isStackable() && item->equals(destItem) &&
destItem->getItemCount() < destItem->getStackSize()) {
maxQueryCount = 100 - destItem->getItemCount();
maxQueryCount = destItem->getStackSize() - destItem->getItemCount();
} else {
maxQueryCount = 0;
}
Expand Down

0 comments on commit 6916e79

Please sign in to comment.