|
@@ -34,7 +34,6 @@ class IBattleEventsReceiver;
|
|
|
class IGameEventsReceiver;
|
|
|
struct ArtifactLocation;
|
|
|
class BattleStateInfoForRetreat;
|
|
|
-class IMarket;
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|
|
|
|
|
@@ -81,8 +80,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 void swapGarrisonHero(const CGTownInstance *town)=0;
|
|
|
|
|
|
- virtual void trade(const IMarket * market, EMarketMode mode, TradeItemSell id1, TradeItemBuy 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 mode, const std::vector<TradeItemSell> & id1, const std::vector<TradeItemBuy> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr)=0;
|
|
|
+ virtual void trade(const ObjectInstanceID marketId, EMarketMode mode, TradeItemSell id1, TradeItemBuy id2, ui32 val1, const CGHeroInstance * hero = nullptr)=0; //mode==0: sell val1 units of id1 resource for id2 resiurce
|
|
|
+ virtual void trade(const ObjectInstanceID marketId, EMarketMode mode, const std::vector<TradeItemSell> & id1, const std::vector<TradeItemBuy> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr)=0;
|
|
|
|
|
|
virtual int selectionMade(int selection, QueryID queryID) =0;
|
|
|
virtual int sendQueryReply(std::optional<int32_t> reply, QueryID queryID) =0;
|
|
@@ -190,8 +189,8 @@ public:
|
|
|
void endTurn() override;
|
|
|
void swapGarrisonHero(const CGTownInstance *town) override;
|
|
|
void buyArtifact(const CGHeroInstance *hero, ArtifactID aid) override;
|
|
|
- void trade(const IMarket * market, EMarketMode mode, TradeItemSell id1, TradeItemBuy id2, ui32 val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
- void trade(const IMarket * market, EMarketMode mode, const std::vector<TradeItemSell> & id1, const std::vector<TradeItemBuy> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
+ void trade(const ObjectInstanceID marketId, EMarketMode mode, TradeItemSell id1, TradeItemBuy id2, ui32 val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
+ void trade(const ObjectInstanceID marketId, EMarketMode mode, const std::vector<TradeItemSell> & id1, const std::vector<TradeItemBuy> & id2, const std::vector<ui32> & val1, const CGHeroInstance * hero = nullptr) override;
|
|
|
void setFormation(const CGHeroInstance * hero, EArmyFormation mode) override;
|
|
|
void recruitHero(const CGObjectInstance *townOrTavern, const CGHeroInstance *hero, const HeroTypeID & nextHero=HeroTypeID::NONE) override;
|
|
|
void save(const std::string &fname) override;
|