Skip to content

Commit

Permalink
[Fix] Client debug on depot search (255+ items) (#496)
Browse files Browse the repository at this point in the history
There is a debug on the client when you search for an item that has more than 255 slots. For example, if you search for a 'mace' and you have 256 mace on your depot, and you click on search, the client will debug.
  • Loading branch information
marcosvf132 committed Sep 1, 2022
1 parent 0185869 commit d14c31c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6012,10 +6012,14 @@ void Player::requestDepotSearchItem(uint16_t itemId, uint8_t tier)
}

if (c->isInbox()) {
inboxItems.push_back(item);
if (inboxItems.size() < 255) {
inboxItems.push_back(item);
}
inboxCount += Item::countByType(item, -1);
} else {
depotItems.push_back(item);
if (depotItems.size() < 255) {
depotItems.push_back(item);
}
depotCount += Item::countByType(item, -1);
}
}
Expand Down

0 comments on commit d14c31c

Please sign in to comment.