mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
calculate income
This commit is contained in:
@@ -215,6 +215,10 @@ TResources CGTownInstance::dailyIncome() const
|
||||
ret += p.second->produce;
|
||||
}
|
||||
}
|
||||
|
||||
auto playerSettings = cb->gameState()->scenarioOps->getIthPlayersSettings(getOwner());
|
||||
for(TResources::nziterator it(ret); it.valid(); it++)
|
||||
ret[it->resType] = ret[it->resType] * playerSettings.handicap.percentIncome / 100;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user