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

Fixed broken town`s marketplace

This commit is contained in:
AlexVinS 2018-04-06 05:48:28 +03:00
parent a8e1c51c36
commit db60983b5a

View File

@ -208,21 +208,14 @@ void CCallback::buyArtifact(const CGHeroInstance *hero, ArtifactID aid)
void CCallback::trade(const CGObjectInstance * market, EMarketMode::EMarketMode mode, ui32 id1, ui32 id2, ui32 val1, const CGHeroInstance * hero)
{
TradeOnMarketplace pack;
pack.marketId = market->id;
pack.heroId = hero->id;
pack.mode = mode;
pack.r1 = {id1};
pack.r2 = {id2};
pack.val = {val1};
sendRequest(&pack);
trade(market, mode, std::vector<ui32>(1, id1), std::vector<ui32>(1, id2), std::vector<ui32>(1, val1), hero);
}
void CCallback::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)
{
TradeOnMarketplace pack;
pack.marketId = market->id;
pack.heroId = hero->id;
pack.heroId = hero ? hero->id : ObjectInstanceID();
pack.mode = mode;
pack.r1 = id1;
pack.r2 = id2;