mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fixes following review
This commit is contained in:
@ -1323,14 +1323,12 @@ void HillFort::fillUpgradeInfo(UpgradeInfo & info, const CStackInstance &stack)
|
||||
|
||||
int costModifier = upgradeCostPercentage[index];
|
||||
|
||||
if(costModifier < 0)
|
||||
if(costModifier < 0) // upgrade not allowed
|
||||
return;
|
||||
|
||||
for(const auto & nid : stack.getCreature()->upgrades)
|
||||
{
|
||||
info.addUpgrade(nid,
|
||||
(nid.toCreature()->getFullRecruitCost() - stack.getType()->getFullRecruitCost() * costModifier / 100),
|
||||
costModifier >= 0);
|
||||
info.addUpgrade(nid, stack.getType(), costModifier / 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user