1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

- fix for hero flags along with battlehero cleanup

- removed unused code
This commit is contained in:
Ivan Savenko
2012-08-29 14:55:31 +00:00
parent d0e2f25cfe
commit c7789992c3
5 changed files with 60 additions and 74 deletions

View File

@@ -1657,19 +1657,6 @@ int CGameState::battleGetBattlefieldType(int3 tile) const
}
}
std::set<std::pair<int, int> > costDiff(const std::vector<ui32> &a, const std::vector<ui32> &b, const int modifier = 100) //modifer %
{
std::set<std::pair<int, int> > ret;
for(int j=0;j<GameConstants::RESOURCE_QUANTITY;j++)
{
assert(a[j] >= b[j]);
if(int dif = modifier * (a[j] - b[j]) / 100)
ret.insert(std::make_pair(j,dif));
}
return ret;
}
UpgradeInfo CGameState::getUpgradeInfo(const CStackInstance &stack)
{
UpgradeInfo ret;