1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Bonusing objects are now configured in json

This commit is contained in:
Ivan Savenko
2023-01-23 01:05:10 +02:00
parent bfd6c40f25
commit 62e127fb59
11 changed files with 449 additions and 473 deletions

View File

@@ -295,28 +295,6 @@ public:
friend class CRandomRewardObjectInfo;
};
class DLL_LINKAGE CGBonusingObject : public CRewardableObject //objects giving bonuses to luck/morale/movement
{
protected:
CVisitInfo getVisitInfo(int index, const CGHeroInstance *h) const override;
void grantReward(ui32 rewardID, const CGHeroInstance * hero) const override;
public:
void initObj(CRandomGenerator & rand) override;
CGBonusingObject();
void onHeroVisit(const CGHeroInstance *h) const override;
bool wasVisited(const CGHeroInstance * h) const override;
template <typename Handler> void serialize(Handler &h, const int version)
{
h & static_cast<CRewardableObject&>(*this);
}
};
class DLL_LINKAGE CGVisitableOPH : public CRewardableObject //objects visitable only once per hero
{
public: