mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Upgrade cost will never be negative.
This commit is contained in:
@@ -1728,6 +1728,9 @@ UpgradeInfo CGameState::getUpgradeInfo(const CStackInstance &stack)
|
||||
if(ret.newID.size())
|
||||
ret.oldID = base->idNumber;
|
||||
|
||||
for (Res::ResourceSet &cost : ret.cost)
|
||||
cost.positive(); //upgrade cost can't be negative, ignore missing resources
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user