1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fixing bugs for external dwelling bonus of Golem Factory (#382)

* Fixing bugs for external dwelling bonus of Golem Factory.

[Problem]
  The occupied Golem Factory on adventure map doesn't give
  the player corresponding weekly growth bonus.

[Solution]
  1. Add the dwelling (of multiple generators) to a player's dewelling set.
  2. Created helper function to calculate external dwelling bonus
  points.

[Test]
  Manual testing on the map, works fine.

https://bugs.vcmi.eu/view.php?id=2789
This commit is contained in:
Hao Hu
2017-10-07 07:42:33 -07:00
committed by ArseniyShestakov
parent 185631e94a
commit 9cc2464cf6
2 changed files with 18 additions and 4 deletions

View File

@@ -294,4 +294,6 @@ public:
protected:
void setPropertyDer(ui8 what, ui32 val) override;
void serializeJsonOptions(JsonSerializeFormat & handler) override;
private:
int getDwellingBonus(const std::vector<CreatureID>& creatureIds, const std::vector<ConstTransitivePtr<CGDwelling> >& dwellings) const;
};