1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Rewardables will use per-object name, if available

This commit is contained in:
Ivan Savenko
2023-03-30 22:29:58 +03:00
parent e652b3eef0
commit 508d68f77c
2 changed files with 18 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ class DLL_LINKAGE CRandomRewardObjectInfo : public IObjectInfo
void configureReward(CRewardableObject * object, CRandomGenerator & rng, CRewardInfo & info, const JsonNode & source) const;
void configureResetInfo(CRewardableObject * object, CRandomGenerator & rng, CRewardResetInfo & info, const JsonNode & source) const;
public:
const JsonNode & getParameters() const;
bool givesResources() const override;
bool givesExperience() const override;
@@ -60,6 +62,8 @@ class DLL_LINKAGE CRewardableConstructor : public AObjectTypeHandler
void initTypeData(const JsonNode & config) override;
public:
bool hasNameTextID() const override;
CGObjectInstance * create(std::shared_ptr<const ObjectTemplate> tmpl = nullptr) const override;
void configureObject(CGObjectInstance * object, CRandomGenerator & rng) const override;