mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Constify
This commit is contained in:
parent
78e5d39ea0
commit
58b427345f
@ -224,7 +224,7 @@ void CCallback::trade(const CGObjectInstance *market, EMarketMode::EMarketMode m
|
||||
sendRequest(&pack);
|
||||
}
|
||||
|
||||
void CCallback::trade(const CGObjectInstance *market, EMarketMode::EMarketMode mode, std::vector<ui32> id1, std::vector<ui32> id2, std::vector<ui32> val1, const CGHeroInstance *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.market = market;
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
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, std::vector<ui32> id1, std::vector<ui32> id2, std::vector<ui32> val1, const CGHeroInstance *hero = nullptr)=0;
|
||||
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 int selectionMade(int selection, QueryID queryID) =0;
|
||||
virtual int sendQueryReply(const JsonNode & reply, QueryID queryID) =0;
|
||||
@ -140,7 +140,7 @@ public:
|
||||
void swapGarrisonHero(const CGTownInstance *town) 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, std::vector<ui32> id1, std::vector<ui32> id2, std::vector<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 setFormation(const CGHeroInstance * hero, bool tight) override;
|
||||
void recruitHero(const CGObjectInstance *townOrTavern, const CGHeroInstance *hero) override;
|
||||
void save(const std::string &fname) override;
|
||||
|
@ -5418,7 +5418,7 @@ void CGameHandler::visitObjectOnTile(const TerrainTile &t, const CGHeroInstance
|
||||
}
|
||||
}
|
||||
|
||||
bool CGameHandler::sacrificeCreatures(const IMarket *market, const CGHeroInstance *hero, std::vector<SlotID> slot, std::vector<ui32> count)
|
||||
bool CGameHandler::sacrificeCreatures(const IMarket *market, const CGHeroInstance *hero, const std::vector<SlotID> &slot, const std::vector<ui32> &count)
|
||||
{
|
||||
if (!hero)
|
||||
COMPLAIN_RET("You need hero to sacrifice creature!");
|
||||
@ -5459,7 +5459,7 @@ bool CGameHandler::sacrificeCreatures(const IMarket *market, const CGHeroInstanc
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CGameHandler::sacrificeArtifact(const IMarket * m, const CGHeroInstance * hero, std::vector<ArtifactPosition> slot)
|
||||
bool CGameHandler::sacrificeArtifact(const IMarket * m, const CGHeroInstance * hero, const std::vector<ArtifactPosition> &slot)
|
||||
{
|
||||
if (!hero)
|
||||
COMPLAIN_RET("You need hero to sacrifice artifact!");
|
||||
|
@ -204,7 +204,7 @@ public:
|
||||
bool buildBoat( ObjectInstanceID objid );
|
||||
bool setFormation( ObjectInstanceID hid, ui8 formation );
|
||||
bool tradeResources(const IMarket *market, ui32 val, PlayerColor player, ui32 id1, ui32 id2);
|
||||
bool sacrificeCreatures(const IMarket *market, const CGHeroInstance *hero, std::vector<SlotID> slot, std::vector<ui32> count);
|
||||
bool sacrificeCreatures(const IMarket *market, const CGHeroInstance *hero, const std::vector<SlotID> &slot, const std::vector<ui32> &count);
|
||||
bool sendResources(ui32 val, PlayerColor player, Res::ERes r1, PlayerColor r2);
|
||||
bool sellCreatures(ui32 count, const IMarket *market, const CGHeroInstance * hero, SlotID slot, Res::ERes resourceID);
|
||||
bool transformInUndead(const IMarket *market, const CGHeroInstance * hero, SlotID slot);
|
||||
@ -287,7 +287,7 @@ public:
|
||||
void handleAttackBeforeCasting(BattleAttack *bat);
|
||||
void handleAfterAttackCasting (const BattleAttack & bat);
|
||||
void attackCasting(const BattleAttack & bat, Bonus::BonusType attackMode, const CStack * attacker);
|
||||
bool sacrificeArtifact(const IMarket * m, const CGHeroInstance * hero, std::vector<ArtifactPosition> slot);
|
||||
bool sacrificeArtifact(const IMarket * m, const CGHeroInstance * hero, const std::vector<ArtifactPosition> &slot);
|
||||
void spawnWanderingMonsters(CreatureID creatureID);
|
||||
void handleCheatCode(std::string & cheat, PlayerColor player, const CGHeroInstance * hero, const CGTownInstance * town, bool & cheated);
|
||||
friend class CVCMIServer;
|
||||
|
Loading…
Reference in New Issue
Block a user