1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

- minor mechanics fixes, corrected handling of 2nd upgrades (like pirates from hota)

This commit is contained in:
Ivan Savenko
2012-01-13 14:18:32 +00:00
parent ba646b1d41
commit 3fcf8b6f4b
4 changed files with 18 additions and 11 deletions

View File

@ -1873,7 +1873,7 @@ GrowthInfo CGTownInstance::getGrowthInfo(int level) const
if (!vstd::contains(builtBuildings, EBuilding::DWELL_FIRST+level))
return ret; //no dwelling
const CCreature *creature = VLC->creh->creatures[town->basicCreatures[level]];
const CCreature *creature = VLC->creh->creatures[creatures[level].second.back()];
const int base = creature->growth;
int castleBonus = 0;
@ -1896,7 +1896,7 @@ GrowthInfo CGTownInstance::getGrowthInfo(int level) const
if(const PlayerState *p = cb->getPlayer(tempOwner, false))
{
BOOST_FOREACH(const CGDwelling *dwelling, p->dwellings)
if(creature->idNumber == dwelling->creatures[0].second[0])
if(vstd::contains(creatures[level].second, dwelling->creatures[0].second[0]))
dwellingBonus++;
}