1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Remove trash treasures from large piles.

This commit is contained in:
DjWarmonger 2014-07-30 10:21:53 +02:00
parent f8359b4eb5
commit 5814a057c8

View File

@ -675,7 +675,7 @@ bool CRmgTemplateZone::createTreasurePile (CMapGenerator* gen, int3 &pos)
int currentValue = 0;
CGObjectInstance * object = nullptr;
while (currentValue < desiredValue)
while (currentValue < minValue) //we don't want to spawn worthless items for greater piles when their value gets low, so abort earlier
{
treasures[info.nextTreasurePos] = nullptr;