1
0

avoid sending non stacked items to overflow due to the count being set to 65535 and earlier clients split those stacks

This commit is contained in:
Emagi 2024-12-13 14:51:02 -05:00
parent 2a3a280793
commit 82e94d0328

View File

@ -1377,7 +1377,7 @@ void WorldDatabase::LoadCharacterItemList(int32 account_id, int32 char_id, Playe
ret = player->GetAppearanceEquipmentList()->AddItem(item->details.slot_id, item);
}
else {
if (version < 1209 && item->details.count > 255) {
if (version < 1209 && item->details.count > 255 && item->stack_count > 1) {
int stacks = item->details.count / 255;
int8 remainder = item->details.count % 255;
item->details.count = remainder;