mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix corrupt item cache crashes, bot whispers, trade crashes
This commit is contained in:
@@ -2350,7 +2350,9 @@ void PlayerbotFactory::InitInventoryTrade()
|
||||
break;
|
||||
case ITEM_QUALITY_UNCOMMON:
|
||||
stacks = 1;
|
||||
count = urand(1, proto->GetMaxStackSize() / 2);
|
||||
int maxStackSize = proto->GetMaxStackSize()/2;
|
||||
uint32 max = std::max(1, maxStackSize);
|
||||
count = urand(1, max);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user