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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user