|
@@ -33,6 +33,7 @@ class IBattleEventsReceiver;
|
|
|
class IGameEventsReceiver;
|
|
class IGameEventsReceiver;
|
|
|
struct ArtifactLocation;
|
|
struct ArtifactLocation;
|
|
|
class BattleStateInfoForRetreat;
|
|
class BattleStateInfoForRetreat;
|
|
|
|
|
+class IMarket;
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|
|
VCMI_LIB_NAMESPACE_END
|
|
|
|
|
|
|
@@ -73,8 +74,8 @@ public:
|
|
|
virtual bool upgradeCreature(const CArmedInstance *obj, SlotID stackPos, CreatureID newID=CreatureID::NONE)=0; //if newID==-1 then best possible upgrade will be made
|
|
virtual bool upgradeCreature(const CArmedInstance *obj, SlotID stackPos, CreatureID newID=CreatureID::NONE)=0; //if newID==-1 then best possible upgrade will be made
|
|
|
virtual void swapGarrisonHero(const CGTownInstance *town)=0;
|
|
virtual void swapGarrisonHero(const CGTownInstance *town)=0;
|
|
|
|
|
|
|
|
- virtual void trade(const CGObjectInstance * market, EMarketMode::EMarketMode mode, ui32 id1, ui32 id2, ui32 val1, const CGHeroInstance * hero = nullptr)=0; //mode==0: sell val1 units of id1 resource for id2 resiurce
|
|
|
|
|
- virtual void trade(const CGObjectInstance * market, EMarketMode::EMarketMode mode, const std::vector<ui32> & id1, const std::vector<ui32> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr)=0;
|
|
|
|
|
|
|
+ virtual void trade(const IMarket * market, EMarketMode::EMarketMode mode, ui32 id1, ui32 id2, ui32 val1, const CGHeroInstance * hero = nullptr)=0; //mode==0: sell val1 units of id1 resource for id2 resiurce
|
|
|
|
|
+ virtual void trade(const IMarket * market, EMarketMode::EMarketMode mode, const std::vector<ui32> & id1, const std::vector<ui32> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr)=0;
|
|
|
|
|
|
|
|
virtual int selectionMade(int selection, QueryID queryID) =0;
|
|
virtual int selectionMade(int selection, QueryID queryID) =0;
|
|
|
virtual int sendQueryReply(const JsonNode & reply, QueryID queryID) =0;
|
|
virtual int sendQueryReply(const JsonNode & reply, QueryID queryID) =0;
|
|
@@ -168,8 +169,8 @@ public:
|
|
|
void endTurn() override;
|
|
void endTurn() override;
|
|
|
void swapGarrisonHero(const CGTownInstance *town) override;
|
|
void swapGarrisonHero(const CGTownInstance *town) override;
|
|
|
void buyArtifact(const CGHeroInstance *hero, ArtifactID aid) override;
|
|
void buyArtifact(const CGHeroInstance *hero, ArtifactID aid) override;
|
|
|
- void trade(const CGObjectInstance * market, EMarketMode::EMarketMode mode, ui32 id1, ui32 id2, ui32 val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
|
|
- void trade(const CGObjectInstance * market, EMarketMode::EMarketMode mode, const std::vector<ui32> & id1, const std::vector<ui32> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
|
|
|
|
+ void trade(const IMarket * market, EMarketMode::EMarketMode mode, ui32 id1, ui32 id2, ui32 val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
|
|
+ void trade(const IMarket * market, EMarketMode::EMarketMode mode, const std::vector<ui32> & id1, const std::vector<ui32> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
void setFormation(const CGHeroInstance * hero, bool tight) override;
|
|
void setFormation(const CGHeroInstance * hero, bool tight) override;
|
|
|
void recruitHero(const CGObjectInstance *townOrTavern, const CGHeroInstance *hero) override;
|
|
void recruitHero(const CGObjectInstance *townOrTavern, const CGHeroInstance *hero) override;
|
|
|
void save(const std::string &fname) override;
|
|
void save(const std::string &fname) override;
|