1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Move UpgradeInfo class to header and source files

This commit is contained in:
MichalZr6
2024-12-19 11:29:57 +01:00
parent af9445c16f
commit f893c80192
16 changed files with 139 additions and 93 deletions

View File

@ -32,6 +32,7 @@
#include "../networkPacks/PacksForClient.h"
#include "../networkPacks/PacksForClientBattle.h"
#include "../networkPacks/StackLocation.h"
#include "../lib/gameState/UpgradeInfo.h"
#include <vstd/RNG.h>
@ -1323,12 +1324,9 @@ void HillFort::fillUpgradeInfo(UpgradeInfo & info, const CStackInstance &stack)
int costModifier = upgradeCostPercentage[index];
if(costModifier < 0) // upgrade not allowed
return;
for(const auto & nid : stack.getCreature()->upgrades)
{
info.addUpgrade(nid, stack.getType(), costModifier / 100);
info.addUpgrade(nid, stack.getType(), costModifier);
}
}