1
0
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:
MichalZr6
2024-12-16 16:05:46 +01:00
parent bbc41fc1b9
commit af9445c16f
11 changed files with 39 additions and 38 deletions

View File

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