mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
All objects that can be owned by player now implement IOwnableObject
This commit is contained in:
@@ -147,10 +147,7 @@ ResourceSet NewTurnProcessor::generatePlayerIncome(PlayerColor playerID, bool ne
|
||||
incomeHandicapped.applyHandicap(playerSettings->handicap.percentIncome);
|
||||
|
||||
for (auto obj : state.getOwnedObjects())
|
||||
{
|
||||
if (obj->asOwnable())
|
||||
incomeHandicapped += obj->asOwnable()->dailyIncome();
|
||||
}
|
||||
incomeHandicapped += obj->asOwnable()->dailyIncome();
|
||||
|
||||
return incomeHandicapped;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user