1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fixed all the issues with Quests, #828 and #1223.

Upgrade cost will never be negative.
This commit is contained in:
DjWarmonger
2013-07-23 15:03:01 +00:00
parent b1a569910b
commit 66d6aebe32
7 changed files with 37 additions and 18 deletions

View File

@@ -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;
}