mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Remove redundant virtual
specifiers
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt` ```python import os with open("../redundant_virtual.txt") as f: for line in f: print() line: str = line.strip() print(line) tmp = line.split(":") file = tmp[0].strip() code = tmp[-1].strip() print(file) print(code) new_code = code.replace("virtual ", "", 1) # https://superuser.com/a/802490/578501 command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}" os.system(command) ```
This commit is contained in:
parent
b319d16de6
commit
522cb571b3
@ -19,8 +19,8 @@ class CEmptyAI : public CGlobalAI
|
||||
std::shared_ptr<CCallback> cb;
|
||||
|
||||
public:
|
||||
virtual void saveGame(BinarySerializer & h) override;
|
||||
virtual void loadGame(BinaryDeserializer & h) override;
|
||||
void saveGame(BinarySerializer & h) override;
|
||||
void loadGame(BinaryDeserializer & h) override;
|
||||
|
||||
void initGameInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CCallback> CB) override;
|
||||
void yourTurn(QueryID queryID) override;
|
||||
|
@ -27,7 +27,7 @@ namespace Goals
|
||||
|
||||
virtual Goals::TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual bool operator==(const BuildingBehavior & other) const override
|
||||
bool operator==(const BuildingBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace Goals
|
||||
|
||||
virtual Goals::TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual bool operator==(const BuyArmyBehavior & other) const override
|
||||
bool operator==(const BuyArmyBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ namespace Goals
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual bool operator==(const CaptureObjectsBehavior & other) const override;
|
||||
bool operator==(const CaptureObjectsBehavior & other) const override;
|
||||
|
||||
static Goals::TGoalVec getVisitGoals(const std::vector<AIPath> & paths, const CGObjectInstance * objToVisit = nullptr);
|
||||
|
||||
|
@ -28,10 +28,10 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual TGoalVec decompose() const override;
|
||||
TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual bool operator==(const ClusterBehavior & other) const override
|
||||
bool operator==(const ClusterBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ namespace Goals
|
||||
virtual Goals::TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual bool operator==(const DefenceBehavior & other) const override
|
||||
bool operator==(const DefenceBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual TGoalVec decompose() const override;
|
||||
TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual bool operator==(const GatherArmyBehavior & other) const override
|
||||
bool operator==(const GatherArmyBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual TGoalVec decompose() const override;
|
||||
TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual bool operator==(const RecruitHeroBehavior & other) const override
|
||||
bool operator==(const RecruitHeroBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual TGoalVec decompose() const override;
|
||||
TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual bool operator==(const StartupBehavior & other) const override
|
||||
bool operator==(const StartupBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual TGoalVec decompose() const override;
|
||||
TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual bool operator==(const StayAtTownBehavior & other) const override
|
||||
bool operator==(const StayAtTownBehavior & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace Goals
|
||||
|
||||
void accept(AIGateway * ai) override;
|
||||
std::string toString() const override;
|
||||
virtual bool operator==(const AdventureSpellCast & other) const override;
|
||||
bool operator==(const AdventureSpellCast & other) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
|
||||
virtual bool operator==(const Build & other) const override
|
||||
bool operator==(const Build & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Goals
|
||||
|
||||
void accept(AIGateway * ai) override;
|
||||
std::string toString() const override;
|
||||
virtual bool operator==(const BuildBoat & other) const override;
|
||||
bool operator==(const BuildBoat & other) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ namespace Goals
|
||||
}
|
||||
BuildThis(BuildingID Bid, const CGTownInstance * tid);
|
||||
|
||||
virtual bool operator==(const BuildThis & other) const override;
|
||||
bool operator==(const BuildThis & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
void accept(AIGateway * ai) override;
|
||||
};
|
||||
|
@ -36,11 +36,11 @@ namespace Goals
|
||||
priority = 3;//TODO: evaluate?
|
||||
}
|
||||
|
||||
virtual bool operator==(const BuyArmy & other) const override;
|
||||
bool operator==(const BuyArmy & other) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual void accept(AIGateway * ai) override;
|
||||
void accept(AIGateway * ai) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ namespace Goals
|
||||
//h & value & resID & objid & aid & tile & hero & town & bid;
|
||||
}
|
||||
|
||||
virtual bool operator==(const AbstractGoal & g) const override
|
||||
bool operator==(const AbstractGoal & g) const override
|
||||
{
|
||||
if(goalType != g.goalType)
|
||||
return false;
|
||||
@ -54,7 +54,7 @@ namespace Goals
|
||||
|
||||
virtual bool operator==(const T & other) const = 0;
|
||||
|
||||
virtual TGoalVec decompose() const override
|
||||
TGoalVec decompose() const override
|
||||
{
|
||||
TSubgoal single = decomposeSingle();
|
||||
|
||||
@ -90,11 +90,11 @@ namespace Goals
|
||||
return *((T *)this);
|
||||
}
|
||||
|
||||
virtual bool isElementar() const override { return true; }
|
||||
bool isElementar() const override { return true; }
|
||||
|
||||
virtual HeroPtr getHero() const override { return AbstractGoal::hero; }
|
||||
|
||||
virtual int getHeroExchangeCount() const override { return 0; }
|
||||
int getHeroExchangeCount() const override { return 0; }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -34,11 +34,11 @@ namespace Goals
|
||||
name = obj->getObjectName();
|
||||
}
|
||||
|
||||
virtual bool operator==(const CaptureObject & other) const override;
|
||||
bool operator==(const CaptureObject & other) const override;
|
||||
virtual Goals::TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual bool hasHash() const override { return true; }
|
||||
virtual uint64_t getHash() const override;
|
||||
bool hasHash() const override { return true; }
|
||||
uint64_t getHash() const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,10 @@ namespace Goals
|
||||
|
||||
virtual Goals::TGoalVec decompose() const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual bool hasHash() const override { return true; }
|
||||
virtual uint64_t getHash() const override;
|
||||
bool hasHash() const override { return true; }
|
||||
uint64_t getHash() const override;
|
||||
|
||||
virtual bool operator==(const CompleteQuest & other) const override;
|
||||
bool operator==(const CompleteQuest & other) const override;
|
||||
|
||||
private:
|
||||
TGoalVec tryCompleteQuest() const;
|
||||
|
@ -26,15 +26,15 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator==(const Composition & other) const override;
|
||||
bool operator==(const Composition & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
void accept(AIGateway * ai) override;
|
||||
Composition & addNext(const AbstractGoal & goal);
|
||||
Composition & addNext(TSubgoal goal);
|
||||
Composition & addNextSequence(const TGoalVec & taskSequence);
|
||||
virtual TGoalVec decompose() const override;
|
||||
virtual bool isElementar() const override;
|
||||
virtual int getHeroExchangeCount() const override;
|
||||
TGoalVec decompose() const override;
|
||||
bool isElementar() const override;
|
||||
int getHeroExchangeCount() const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Goals
|
||||
{
|
||||
tile = Tile;
|
||||
}
|
||||
virtual bool operator==(const DigAtTile & other) const override;
|
||||
bool operator==(const DigAtTile & other) const override;
|
||||
|
||||
private:
|
||||
//TSubgoal decomposeSingle() const override;
|
||||
|
@ -26,7 +26,7 @@ namespace Goals
|
||||
|
||||
void accept(AIGateway * ai) override;
|
||||
std::string toString() const override;
|
||||
virtual bool operator==(const DismissHero & other) const override;
|
||||
bool operator==(const DismissHero & other) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace Goals
|
||||
|
||||
void accept(AIGateway * ai) override;
|
||||
std::string toString() const override;
|
||||
virtual bool operator==(const ExchangeSwapTownHeroes & other) const override;
|
||||
bool operator==(const ExchangeSwapTownHeroes & other) const override;
|
||||
|
||||
const CGHeroInstance * getGarrisonHero() const { return garrisonHero; }
|
||||
HeroLockedReason getLockingReason() const { return lockingReason; }
|
||||
|
@ -30,10 +30,10 @@ namespace Goals
|
||||
|
||||
void accept(AIGateway * ai) override;
|
||||
std::string toString() const override;
|
||||
virtual bool operator==(const ExecuteHeroChain & other) const override;
|
||||
bool operator==(const ExecuteHeroChain & other) const override;
|
||||
const AIPath & getPath() const { return chainPath; }
|
||||
|
||||
virtual int getHeroExchangeCount() const override { return chainPath.exchangeCount; }
|
||||
int getHeroExchangeCount() const override { return chainPath.exchangeCount; }
|
||||
|
||||
private:
|
||||
bool moveHeroToTile(const CGHeroInstance * hero, const int3 & tile);
|
||||
|
@ -36,7 +36,7 @@ namespace Goals
|
||||
TGoalVec getAllPossibleSubgoals() override;
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const GatherArmy & other) const override;
|
||||
bool operator==(const GatherArmy & other) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace Goals
|
||||
return TGoalVec();
|
||||
}
|
||||
|
||||
virtual bool operator==(const Invalid & other) const override
|
||||
bool operator==(const Invalid & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -42,7 +42,7 @@ namespace Goals
|
||||
return "Invalid";
|
||||
}
|
||||
|
||||
virtual void accept(AIGateway * ai) override
|
||||
void accept(AIGateway * ai) override
|
||||
{
|
||||
throw cannotFulfillGoalException("Can not fulfill Invalid goal!");
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace Goals
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool operator==(const RecruitHero & other) const override
|
||||
bool operator==(const RecruitHero & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace Goals
|
||||
|
||||
void accept(AIGateway * ai) override;
|
||||
std::string toString() const override;
|
||||
virtual bool operator==(const SaveResources & other) const override;
|
||||
bool operator==(const SaveResources & other) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace Goals
|
||||
public:
|
||||
StayAtTown(const CGTownInstance * town, AIPath & path);
|
||||
|
||||
virtual bool operator==(const StayAtTown & other) const override;
|
||||
bool operator==(const StayAtTown & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
void accept(AIGateway * ai) override;
|
||||
float getMovementWasted() const { return movementWasted; }
|
||||
|
@ -34,7 +34,7 @@ namespace Goals
|
||||
value = val;
|
||||
objid = Objid;
|
||||
}
|
||||
virtual bool operator==(const Trade & other) const override;
|
||||
bool operator==(const Trade & other) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace Goals
|
||||
ArmyUpgrade(const AIPath & upgradePath, const CGObjectInstance * upgrader, const ArmyUpgradeInfo & upgrade);
|
||||
ArmyUpgrade(const CGHeroInstance * targetMain, const CGObjectInstance * upgrader, const ArmyUpgradeInfo & upgrade);
|
||||
|
||||
virtual bool operator==(const ArmyUpgrade & other) const override;
|
||||
bool operator==(const ArmyUpgrade & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
uint64_t getUpgradeValue() const { return upgradeValue; }
|
||||
|
@ -30,7 +30,7 @@ namespace Goals
|
||||
DefendTown(const CGTownInstance * town, const HitMapInfo & treat, const AIPath & defencePath, bool isCounterAttack = false);
|
||||
DefendTown(const CGTownInstance * town, const HitMapInfo & treat, const CGHeroInstance * defender);
|
||||
|
||||
virtual bool operator==(const DefendTown & other) const override;
|
||||
bool operator==(const DefendTown & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
const HitMapInfo & getTreat() const { return treat; }
|
||||
|
@ -28,7 +28,7 @@ namespace Goals
|
||||
sethero(targetHero);
|
||||
}
|
||||
|
||||
virtual bool operator==(const HeroExchange & other) const override;
|
||||
bool operator==(const HeroExchange & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
|
||||
uint64_t getReinforcementArmyStrength() const;
|
||||
|
@ -36,7 +36,7 @@ namespace Goals
|
||||
sethero(pathToCenter.targetHero);
|
||||
}
|
||||
|
||||
virtual bool operator==(const UnlockCluster & other) const override;
|
||||
bool operator==(const UnlockCluster & other) const override;
|
||||
virtual std::string toString() const override;
|
||||
std::shared_ptr<ObjectCluster> getCluster() const { return cluster; }
|
||||
const AIPath & getPathToCenter() { return pathToCenter; }
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
const PathfinderConfig * pathfinderConfig,
|
||||
const CPathfinderHelper * pathfinderHelper) override;
|
||||
|
||||
virtual void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) override;
|
||||
void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) override;
|
||||
|
||||
void commit(
|
||||
AIPathNode * destination,
|
||||
|
@ -34,7 +34,7 @@ namespace AIPathfinding
|
||||
|
||||
~AIPathfinderConfig();
|
||||
|
||||
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
|
||||
CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace AIPathfinding
|
||||
public:
|
||||
AdventureCastAction(SpellID spellToCast, const CGHeroInstance * hero, DayFlags flagsToAdd = DayFlags::NONE);
|
||||
|
||||
virtual void execute(const CGHeroInstance * hero) const override;
|
||||
void execute(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual void applyOnDestination(
|
||||
const CGHeroInstance * hero,
|
||||
@ -38,7 +38,7 @@ namespace AIPathfinding
|
||||
AIPathNode * dstMode,
|
||||
const AIPathNode * srcNode) const override;
|
||||
|
||||
virtual bool canAct(const AIPathNode * source) const override;
|
||||
bool canAct(const AIPathNode * source) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ namespace AIPathfinding
|
||||
{
|
||||
}
|
||||
|
||||
virtual void execute(const CGHeroInstance * hero) const override;
|
||||
void execute(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ namespace AIPathfinding
|
||||
class SummonBoatAction : public VirtualBoatAction
|
||||
{
|
||||
public:
|
||||
virtual void execute(const CGHeroInstance * hero) const override;
|
||||
void execute(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual void applyOnDestination(
|
||||
const CGHeroInstance * hero,
|
||||
@ -34,9 +34,9 @@ namespace AIPathfinding
|
||||
AIPathNode * dstMode,
|
||||
const AIPathNode * srcNode) const override;
|
||||
|
||||
virtual bool canAct(const AIPathNode * source) const override;
|
||||
bool canAct(const AIPathNode * source) const override;
|
||||
|
||||
virtual const ChainActor * getActor(const ChainActor * sourceActor) const override;
|
||||
const ChainActor * getActor(const ChainActor * sourceActor) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
|
||||
@ -56,17 +56,17 @@ namespace AIPathfinding
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool canAct(const AIPathNode * source) const override;
|
||||
bool canAct(const AIPathNode * source) const override;
|
||||
|
||||
virtual void execute(const CGHeroInstance * hero) const override;
|
||||
void execute(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual Goals::TSubgoal decompose(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual const ChainActor * getActor(const ChainActor * sourceActor) const override;
|
||||
const ChainActor * getActor(const ChainActor * sourceActor) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
|
||||
virtual const CGObjectInstance * targetObject() const override;
|
||||
const CGObjectInstance * targetObject() const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -28,11 +28,11 @@ namespace AIPathfinding
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool canAct(const AIPathNode * node) const override;
|
||||
bool canAct(const AIPathNode * node) const override;
|
||||
|
||||
virtual Goals::TSubgoal decompose(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual void execute(const CGHeroInstance * hero) const override;
|
||||
void execute(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ namespace AIPathfinding
|
||||
{
|
||||
}
|
||||
|
||||
virtual void execute(const CGHeroInstance * hero) const override;
|
||||
void execute(const CGHeroInstance * hero) const override;
|
||||
|
||||
virtual std::string toString() const override;
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ class HeroExchangeArmy : public CArmedInstance
|
||||
public:
|
||||
TResources armyCost;
|
||||
bool requireBuyArmy;
|
||||
virtual bool needsLastStack() const override;
|
||||
bool needsLastStack() const override;
|
||||
std::shared_ptr<SpecialAction> getActorAction() const;
|
||||
|
||||
HeroExchangeArmy(): CArmedInstance(nullptr, true), requireBuyArmy(false) {}
|
||||
@ -126,7 +126,7 @@ public:
|
||||
HeroActor(const ChainActor * carrier, const ChainActor * other, const HeroExchangeArmy * army, const Nullkiller * ai);
|
||||
|
||||
protected:
|
||||
virtual ExchangeResult tryExchangeNoLock(const ChainActor * specialActor, const ChainActor * other) const override;
|
||||
ExchangeResult tryExchangeNoLock(const ChainActor * specialActor, const ChainActor * other) const override;
|
||||
};
|
||||
|
||||
class ObjectActor : public ChainActor
|
||||
|
@ -39,6 +39,6 @@ namespace Goals
|
||||
void accept(VCAI * ai) override;
|
||||
std::string name() const override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const AdventureSpellCast & other) const override;
|
||||
bool operator==(const AdventureSpellCast & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
|
||||
virtual bool operator==(const Build & other) const override
|
||||
bool operator==(const Build & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -32,6 +32,6 @@ namespace Goals
|
||||
void accept(VCAI * ai) override;
|
||||
std::string name() const override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const BuildBoat & other) const override;
|
||||
bool operator==(const BuildBoat & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ namespace Goals
|
||||
}
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
//bool fulfillsMe(TSubgoal goal) override;
|
||||
virtual bool operator==(const BuildThis & other) const override;
|
||||
bool operator==(const BuildThis & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -36,6 +36,6 @@ namespace Goals
|
||||
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const BuyArmy & other) const override;
|
||||
bool operator==(const BuyArmy & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ namespace Goals
|
||||
//h & value & resID & objid & aid & tile & hero & town & bid;
|
||||
}
|
||||
|
||||
virtual bool operator==(const AbstractGoal & g) const override
|
||||
bool operator==(const AbstractGoal & g) const override
|
||||
{
|
||||
if(goalType != g.goalType)
|
||||
return false;
|
||||
|
@ -40,6 +40,6 @@ namespace Goals
|
||||
TGoalVec getAllPossibleSubgoals() override;
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
virtual bool operator==(const ClearWayTo & other) const override;
|
||||
bool operator==(const ClearWayTo & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -35,6 +35,6 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
TSubgoal whatToDoToTrade();
|
||||
bool fulfillsMe(TSubgoal goal) override; //TODO: Trade
|
||||
virtual bool operator==(const CollectRes & other) const override;
|
||||
bool operator==(const CollectRes & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
std::string name() const override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const CompleteQuest & other) const override;
|
||||
bool operator==(const CompleteQuest & other) const override;
|
||||
|
||||
private:
|
||||
TGoalVec tryCompleteQuest() const;
|
||||
|
@ -27,6 +27,6 @@ namespace Goals
|
||||
}
|
||||
TGoalVec getAllPossibleSubgoals() override;
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
virtual bool operator==(const Conquer & other) const override;
|
||||
bool operator==(const Conquer & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -36,6 +36,6 @@ namespace Goals
|
||||
return TGoalVec();
|
||||
}
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
virtual bool operator==(const DigAtTile & other) const override;
|
||||
bool operator==(const DigAtTile & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
std::string completeMessage() const override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
virtual bool operator==(const Explore & other) const override;
|
||||
bool operator==(const Explore & other) const override;
|
||||
|
||||
private:
|
||||
TSubgoal exploreNearestNeighbour(HeroPtr h) const;
|
||||
|
@ -42,6 +42,6 @@ namespace Goals
|
||||
}
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
virtual bool operator==(const FindObj & other) const override;
|
||||
bool operator==(const FindObj & other) const override;
|
||||
};
|
||||
}
|
@ -33,6 +33,6 @@ namespace Goals
|
||||
TGoalVec getAllPossibleSubgoals() override;
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const GatherArmy & other) const override;
|
||||
bool operator==(const GatherArmy & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace Goals
|
||||
TGoalVec getAllPossibleSubgoals() override;
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
virtual bool operator==(const GatherTroops & other) const override;
|
||||
bool operator==(const GatherTroops & other) const override;
|
||||
|
||||
private:
|
||||
int getCreaturesCount(const CArmedInstance * army);
|
||||
|
@ -35,6 +35,6 @@ namespace Goals
|
||||
return TGoalVec();
|
||||
}
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
virtual bool operator==(const GetArtOfType & other) const override;
|
||||
bool operator==(const GetArtOfType & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace Goals
|
||||
return iAmElementar();
|
||||
}
|
||||
|
||||
virtual bool operator==(const Invalid & other) const override
|
||||
bool operator==(const Invalid & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace Goals
|
||||
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
|
||||
virtual bool operator==(const RecruitHero & other) const override
|
||||
bool operator==(const RecruitHero & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -33,6 +33,6 @@ namespace Goals
|
||||
priority = 3; //trading is instant, but picking resources is free
|
||||
}
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
virtual bool operator==(const Trade & other) const override;
|
||||
bool operator==(const Trade & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const VisitHero & other) const override;
|
||||
bool operator==(const VisitHero & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -27,6 +27,6 @@ namespace Goals
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
bool fulfillsMe(TSubgoal goal) override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const VisitObj & other) const override;
|
||||
bool operator==(const VisitObj & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -32,6 +32,6 @@ namespace Goals
|
||||
TGoalVec getAllPossibleSubgoals() override;
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
std::string completeMessage() const override;
|
||||
virtual bool operator==(const VisitTile & other) const override;
|
||||
bool operator==(const VisitTile & other) const override;
|
||||
};
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace Goals
|
||||
}
|
||||
TSubgoal whatToDoToAchieve() override;
|
||||
|
||||
virtual bool operator==(const Win & other) const override
|
||||
bool operator==(const Win & other) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
const PathfinderConfig * pathfinderConfig,
|
||||
const CPathfinderHelper * pathfinderHelper) override;
|
||||
|
||||
virtual void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) override;
|
||||
void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) override;
|
||||
|
||||
const AIPathNode * getAINode(const CGPathNode * node) const;
|
||||
void updateAINode(CGPathNode * node, std::function<void (AIPathNode *)> updater);
|
||||
|
@ -30,6 +30,6 @@ namespace AIPathfinding
|
||||
|
||||
~AIPathfinderConfig();
|
||||
|
||||
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
|
||||
CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
|
||||
};
|
||||
}
|
||||
|
@ -899,14 +899,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool callTyped() override { return false; }
|
||||
bool callTyped() override { return false; }
|
||||
|
||||
virtual void visitForLobby(CPackForLobby & lobbyPack) override
|
||||
void visitForLobby(CPackForLobby & lobbyPack) override
|
||||
{
|
||||
handler.visitForLobby(lobbyPack);
|
||||
}
|
||||
|
||||
virtual void visitForClient(CPackForClient & clientPack) override
|
||||
void visitForClient(CPackForClient & clientPack) override
|
||||
{
|
||||
handler.visitForClient(clientPack);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
void showTeleportDialog(TeleportDialog * iw) override {};
|
||||
void showObjectWindow(const CGObjectInstance * object, EOpenWindowMode window, const CGHeroInstance * visitor, bool addQuery) override {};
|
||||
void giveResource(PlayerColor player, GameResID which, int val) override {};
|
||||
virtual void giveResources(PlayerColor player, TResources resources) override {};
|
||||
void giveResources(PlayerColor player, TResources resources) override {};
|
||||
|
||||
void giveCreatures(const CArmedInstance * objid, const CGHeroInstance * h, const CCreatureSet & creatures, bool remove) override {};
|
||||
void takeCreatures(ObjectInstanceID objid, const std::vector<CStackBasicDescriptor> & creatures) override {};
|
||||
|
@ -118,16 +118,16 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void visitChangeObjPos(ChangeObjPos & pack) override;
|
||||
virtual void visitRemoveObject(RemoveObject & pack) override;
|
||||
virtual void visitTryMoveHero(TryMoveHero & pack) override;
|
||||
virtual void visitGiveHero(GiveHero & pack) override;
|
||||
virtual void visitBattleStart(BattleStart & pack) override;
|
||||
virtual void visitBattleNextRound(BattleNextRound & pack) override;
|
||||
virtual void visitBattleUpdateGateState(BattleUpdateGateState & pack) override;
|
||||
virtual void visitBattleResult(BattleResult & pack) override;
|
||||
virtual void visitBattleStackMoved(BattleStackMoved & pack) override;
|
||||
virtual void visitBattleAttack(BattleAttack & pack) override;
|
||||
virtual void visitStartAction(StartAction & pack) override;
|
||||
virtual void visitSetObjectProperty(SetObjectProperty & pack) override;
|
||||
void visitChangeObjPos(ChangeObjPos & pack) override;
|
||||
void visitRemoveObject(RemoveObject & pack) override;
|
||||
void visitTryMoveHero(TryMoveHero & pack) override;
|
||||
void visitGiveHero(GiveHero & pack) override;
|
||||
void visitBattleStart(BattleStart & pack) override;
|
||||
void visitBattleNextRound(BattleNextRound & pack) override;
|
||||
void visitBattleUpdateGateState(BattleUpdateGateState & pack) override;
|
||||
void visitBattleResult(BattleResult & pack) override;
|
||||
void visitBattleStackMoved(BattleStackMoved & pack) override;
|
||||
void visitBattleAttack(BattleAttack & pack) override;
|
||||
void visitStartAction(StartAction & pack) override;
|
||||
void visitSetObjectProperty(SetObjectProperty & pack) override;
|
||||
};
|
||||
|
@ -32,11 +32,11 @@ public:
|
||||
|
||||
bool getResult() const { return result; }
|
||||
|
||||
virtual void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
virtual void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
virtual void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
virtual void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
virtual void visitLobbyUpdateState(LobbyUpdateState & pack) override;
|
||||
void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
void visitLobbyUpdateState(LobbyUpdateState & pack) override;
|
||||
};
|
||||
|
||||
class ApplyOnLobbyScreenNetPackVisitor : public VCMI_LIB_WRAP_NAMESPACE(ICPackVisitor)
|
||||
@ -51,11 +51,11 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
virtual void visitLobbyChatMessage(LobbyChatMessage & pack) override;
|
||||
virtual void visitLobbyGuiAction(LobbyGuiAction & pack) override;
|
||||
virtual void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
virtual void visitLobbyLoadProgress(LobbyLoadProgress & pack) override;
|
||||
virtual void visitLobbyUpdateState(LobbyUpdateState & pack) override;
|
||||
virtual void visitLobbyShowMessage(LobbyShowMessage & pack) override;
|
||||
void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
void visitLobbyChatMessage(LobbyChatMessage & pack) override;
|
||||
void visitLobbyGuiAction(LobbyGuiAction & pack) override;
|
||||
void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
void visitLobbyLoadProgress(LobbyLoadProgress & pack) override;
|
||||
void visitLobbyUpdateState(LobbyUpdateState & pack) override;
|
||||
void visitLobbyShowMessage(LobbyShowMessage & pack) override;
|
||||
};
|
||||
|
@ -40,7 +40,7 @@ class CHoverableArea: public virtual CIntObject
|
||||
public:
|
||||
std::string hoverText;
|
||||
|
||||
virtual void hover (bool on) override;
|
||||
void hover (bool on) override;
|
||||
|
||||
CHoverableArea();
|
||||
virtual ~CHoverableArea();
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
class CRClickPopup : public WindowBase
|
||||
{
|
||||
public:
|
||||
virtual void close() override;
|
||||
void close() override;
|
||||
bool isPopupWindow() const override;
|
||||
|
||||
static std::shared_ptr<WindowBase> createCustomInfoWindow(Point position, const CGObjectInstance * specific);
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
std::string getJsonKey() const override;
|
||||
void registerIcons(const IconRegistar & cb) const override;
|
||||
ArtifactID getId() const override;
|
||||
virtual const IBonusBearer * getBonusBearer() const override;
|
||||
const IBonusBearer * getBonusBearer() const override;
|
||||
|
||||
std::string getDescriptionTranslated() const override;
|
||||
std::string getEventTranslated() const override;
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
std::string getJsonKey() const override;
|
||||
void registerIcons(const IconRegistar & cb) const override;
|
||||
CreatureID getId() const override;
|
||||
virtual const IBonusBearer * getBonusBearer() const override;
|
||||
const IBonusBearer * getBonusBearer() const override;
|
||||
|
||||
int32_t getAdvMapAmountMin() const override;
|
||||
int32_t getAdvMapAmountMax() const override;
|
||||
|
@ -171,7 +171,7 @@ public:
|
||||
virtual void fillUpgradeInfo(const CArmedInstance *obj, SlotID stackPos, UpgradeInfo &out)const;
|
||||
|
||||
//hero
|
||||
virtual const CGHeroInstance * getHero(ObjectInstanceID objid) const override;
|
||||
const CGHeroInstance * getHero(ObjectInstanceID objid) const override;
|
||||
const CGHeroInstance * getHeroWithSubid(int subid) const override;
|
||||
virtual int getHeroCount(PlayerColor player, bool includeGarrisoned) const;
|
||||
virtual bool getHeroInfo(const CGObjectInstance * hero, InfoAboutHero & dest, const CGObjectInstance * selectedObject = nullptr) const;
|
||||
@ -183,7 +183,7 @@ public:
|
||||
//virtual const CGObjectInstance * getArmyInstance(ObjectInstanceID oid) const;
|
||||
|
||||
//objects
|
||||
virtual const CGObjectInstance * getObj(ObjectInstanceID objid, bool verbose = true) const override;
|
||||
const CGObjectInstance * getObj(ObjectInstanceID objid, bool verbose = true) const override;
|
||||
virtual std::vector <const CGObjectInstance * > getBlockingObjs(int3 pos)const;
|
||||
virtual std::vector <const CGObjectInstance * > getVisitableObjs(int3 pos, bool verbose = true) const override;
|
||||
virtual std::vector <const CGObjectInstance * > getFlaggableObjects(int3 pos) const;
|
||||
|
@ -144,26 +144,26 @@ public:
|
||||
virtual std::string getBattleAIName() const = 0; //has to return name of the battle AI to be used
|
||||
|
||||
//battle interface
|
||||
virtual void activeStack(const BattleID & battleID, const CStack * stack) override;
|
||||
virtual void yourTacticPhase(const BattleID & battleID, int distance) override;
|
||||
void activeStack(const BattleID & battleID, const CStack * stack) override;
|
||||
void yourTacticPhase(const BattleID & battleID, int distance) override;
|
||||
|
||||
virtual void battleNewRound(const BattleID & battleID) override;
|
||||
virtual void battleCatapultAttacked(const BattleID & battleID, const CatapultAttack & ca) override;
|
||||
virtual void battleStart(const BattleID & battleID, const CCreatureSet *army1, const CCreatureSet *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2, bool side, bool replayAllowed) override;
|
||||
void battleNewRound(const BattleID & battleID) override;
|
||||
void battleCatapultAttacked(const BattleID & battleID, const CatapultAttack & ca) override;
|
||||
void battleStart(const BattleID & battleID, const CCreatureSet *army1, const CCreatureSet *army2, int3 tile, const CGHeroInstance *hero1, const CGHeroInstance *hero2, bool side, bool replayAllowed) override;
|
||||
virtual void battleStacksAttacked(const BattleID & battleID, const std::vector<BattleStackAttacked> & bsa, bool ranged) override;
|
||||
virtual void actionStarted(const BattleID & battleID, const BattleAction &action) override;
|
||||
virtual void battleNewRoundFirst(const BattleID & battleID) override;
|
||||
virtual void actionFinished(const BattleID & battleID, const BattleAction &action) override;
|
||||
virtual void battleStacksEffectsSet(const BattleID & battleID, const SetStackEffect & sse) override;
|
||||
void actionStarted(const BattleID & battleID, const BattleAction &action) override;
|
||||
void battleNewRoundFirst(const BattleID & battleID) override;
|
||||
void actionFinished(const BattleID & battleID, const BattleAction &action) override;
|
||||
void battleStacksEffectsSet(const BattleID & battleID, const SetStackEffect & sse) override;
|
||||
virtual void battleObstaclesChanged(const BattleID & battleID, const std::vector<ObstacleChanges> & obstacles) override;
|
||||
virtual void battleStackMoved(const BattleID & battleID, const CStack * stack, std::vector<BattleHex> dest, int distance, bool teleport) override;
|
||||
virtual void battleAttack(const BattleID & battleID, const BattleAttack *ba) override;
|
||||
virtual void battleSpellCast(const BattleID & battleID, const BattleSpellCast *sc) override;
|
||||
virtual void battleEnd(const BattleID & battleID, const BattleResult *br, QueryID queryID) override;
|
||||
void battleAttack(const BattleID & battleID, const BattleAttack *ba) override;
|
||||
void battleSpellCast(const BattleID & battleID, const BattleSpellCast *sc) override;
|
||||
void battleEnd(const BattleID & battleID, const BattleResult *br, QueryID queryID) override;
|
||||
virtual void battleUnitsChanged(const BattleID & battleID, const std::vector<UnitChanges> & units) override;
|
||||
|
||||
virtual void saveGame(BinarySerializer & h) override;
|
||||
virtual void loadGame(BinaryDeserializer & h) override;
|
||||
void saveGame(BinarySerializer & h) override;
|
||||
void loadGame(BinaryDeserializer & h) override;
|
||||
};
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual JsonNode toJsonNode() const override;
|
||||
JsonNode toJsonNode() const override;
|
||||
};
|
||||
|
||||
class DLL_LINKAGE TimesHeroLevelUpdater : public IUpdater
|
||||
@ -62,7 +62,7 @@ public:
|
||||
|
||||
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual JsonNode toJsonNode() const override;
|
||||
JsonNode toJsonNode() const override;
|
||||
};
|
||||
|
||||
class DLL_LINKAGE TimesStackLevelUpdater : public IUpdater
|
||||
@ -75,7 +75,7 @@ public:
|
||||
|
||||
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual JsonNode toJsonNode() const override;
|
||||
JsonNode toJsonNode() const override;
|
||||
};
|
||||
|
||||
class DLL_LINKAGE ArmyMovementUpdater : public IUpdater
|
||||
@ -98,7 +98,7 @@ public:
|
||||
|
||||
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus> & b, const CBonusSystemNode & context) const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual JsonNode toJsonNode() const override;
|
||||
JsonNode toJsonNode() const override;
|
||||
};
|
||||
|
||||
class DLL_LINKAGE OwnerUpdater : public IUpdater
|
||||
@ -111,7 +111,7 @@ public:
|
||||
|
||||
std::shared_ptr<Bonus> createUpdatedBonus(const std::shared_ptr<Bonus>& b, const CBonusSystemNode& context) const override;
|
||||
virtual std::string toString() const override;
|
||||
virtual JsonNode toJsonNode() const override;
|
||||
JsonNode toJsonNode() const override;
|
||||
};
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
@ -424,7 +424,7 @@ class DLL_LINKAGE CGTerrainPatch : public CGObjectInstance
|
||||
public:
|
||||
using CGObjectInstance::CGObjectInstance;
|
||||
|
||||
virtual bool isTile2Terrain() const override
|
||||
bool isTile2Terrain() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ struct DLL_LINKAGE CLobbyPackToPropagate : public CPackForLobby
|
||||
|
||||
struct DLL_LINKAGE CLobbyPackToServer : public CPackForLobby
|
||||
{
|
||||
virtual bool isForServer() const override;
|
||||
bool isForServer() const override;
|
||||
};
|
||||
|
||||
struct DLL_LINKAGE LobbyClientConnected : public CLobbyPackToPropagate
|
||||
|
@ -233,7 +233,7 @@ struct DLL_LINKAGE CDestinationNodeInfo : public PathNodeInfo
|
||||
|
||||
CDestinationNodeInfo();
|
||||
|
||||
virtual void setNode(CGameState * gs, CGPathNode * n) override;
|
||||
void setNode(CGameState * gs, CGPathNode * n) override;
|
||||
|
||||
virtual bool isBetterWay() const;
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
const PathfinderConfig * pathfinderConfig,
|
||||
const CPathfinderHelper * pathfinderHelper) override;
|
||||
|
||||
virtual void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) override;
|
||||
void commit(CDestinationNodeInfo & destination, const PathNodeInfo & source) override;
|
||||
};
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
SingleHeroPathfinderConfig(CPathsInfo & out, CGameState * gs, const CGHeroInstance * hero);
|
||||
virtual ~SingleHeroPathfinderConfig();
|
||||
|
||||
virtual CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
|
||||
CPathfinderHelper * getOrCreatePathfinderHelper(const PathNodeInfo & source, CGameState * gs) override;
|
||||
|
||||
static std::vector<std::shared_ptr<IPathfindingRule>> buildRuleSet();
|
||||
};
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
Modificator() = delete;
|
||||
Modificator(Zone & zone, RmgMap & map, CMapGenerator & generator);
|
||||
|
||||
virtual void init() {/*override to add dependencies*/}
|
||||
void init() {/*override to add dependencies*/}
|
||||
virtual char dump(const int3 &);
|
||||
virtual ~Modificator() = default;
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
LuaSpellEffectFactory(const Script * script_);
|
||||
virtual ~LuaSpellEffectFactory();
|
||||
|
||||
virtual Effect * create() const override;
|
||||
Effect * create() const override;
|
||||
|
||||
private:
|
||||
const Script * script;
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
static int toJsonNode(lua_State * L);
|
||||
|
||||
protected:
|
||||
virtual void adjustStaticTable(lua_State * L) const override;
|
||||
void adjustStaticTable(lua_State * L) const override;
|
||||
};
|
||||
|
||||
class BonusListProxy : public SharedWrapper<const BonusList, BonusListProxy>
|
||||
@ -56,7 +56,7 @@ public:
|
||||
|
||||
static std::shared_ptr<const Bonus> index(std::shared_ptr<const BonusList> self, int key);
|
||||
protected:
|
||||
virtual void adjustMetatable(lua_State * L) const override;
|
||||
void adjustMetatable(lua_State * L) const override;
|
||||
};
|
||||
|
||||
class BonusBearerProxy : public OpaqueWrapper<const IBonusBearer, BonusBearerProxy>
|
||||
|
@ -417,14 +417,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool callTyped() override { return false; }
|
||||
bool callTyped() override { return false; }
|
||||
|
||||
virtual void visitForLobby(CPackForLobby & packForLobby) override
|
||||
void visitForLobby(CPackForLobby & packForLobby) override
|
||||
{
|
||||
handler.handleReceivedPack(std::unique_ptr<CPackForLobby>(&packForLobby));
|
||||
}
|
||||
|
||||
virtual void visitForServer(CPackForServer & serverPack) override
|
||||
void visitForServer(CPackForServer & serverPack) override
|
||||
{
|
||||
if (gh)
|
||||
gh->handleReceivedPack(&serverPack);
|
||||
@ -432,7 +432,7 @@ public:
|
||||
logNetwork->error("Received pack for game server while in lobby!");
|
||||
}
|
||||
|
||||
virtual void visitForClient(CPackForClient & clientPack) override
|
||||
void visitForClient(CPackForClient & clientPack) override
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -28,15 +28,15 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void visitForLobby(CPackForLobby & pack) override;
|
||||
virtual void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
virtual void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
virtual void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
virtual void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
virtual void visitLobbyChangeHost(LobbyChangeHost & pack) override;
|
||||
virtual void visitLobbyChangePlayerOption(LobbyChangePlayerOption & pack) override;
|
||||
virtual void visitLobbyChatMessage(LobbyChatMessage & pack) override;
|
||||
virtual void visitLobbyGuiAction(LobbyGuiAction & pack) override;
|
||||
void visitForLobby(CPackForLobby & pack) override;
|
||||
void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
void visitLobbyChangeHost(LobbyChangeHost & pack) override;
|
||||
void visitLobbyChangePlayerOption(LobbyChangePlayerOption & pack) override;
|
||||
void visitLobbyChatMessage(LobbyChatMessage & pack) override;
|
||||
void visitLobbyGuiAction(LobbyGuiAction & pack) override;
|
||||
};
|
||||
|
||||
class ApplyOnServerAfterAnnounceNetPackVisitor : public VCMI_LIB_WRAP_NAMESPACE(ICPackVisitor)
|
||||
@ -50,12 +50,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void visitForLobby(CPackForLobby & pack) override;
|
||||
virtual void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
virtual void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
virtual void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
virtual void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
virtual void visitLobbyChangeHost(LobbyChangeHost & pack) override;
|
||||
void visitForLobby(CPackForLobby & pack) override;
|
||||
void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
void visitLobbyChangeHost(LobbyChangeHost & pack) override;
|
||||
};
|
||||
|
||||
class ApplyOnServerNetPackVisitor : public VCMI_LIB_WRAP_NAMESPACE(ICPackVisitor)
|
||||
@ -75,21 +75,21 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
virtual void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
virtual void visitLobbySetMap(LobbySetMap & pack) override;
|
||||
virtual void visitLobbySetCampaign(LobbySetCampaign & pack) override;
|
||||
virtual void visitLobbySetCampaignMap(LobbySetCampaignMap & pack) override;
|
||||
virtual void visitLobbySetCampaignBonus(LobbySetCampaignBonus & pack) override;
|
||||
virtual void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
virtual void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
virtual void visitLobbyChangeHost(LobbyChangeHost & pack) override;
|
||||
virtual void visitLobbyChangePlayerOption(LobbyChangePlayerOption & pack) override;
|
||||
virtual void visitLobbySetPlayer(LobbySetPlayer & pack) override;
|
||||
virtual void visitLobbySetPlayerName(LobbySetPlayerName & pack) override;
|
||||
virtual void visitLobbySetTurnTime(LobbySetTurnTime & pack) override;
|
||||
virtual void visitLobbySetExtraOptions(LobbySetExtraOptions & pack) override;
|
||||
virtual void visitLobbySetSimturns(LobbySetSimturns & pack) override;
|
||||
virtual void visitLobbySetDifficulty(LobbySetDifficulty & pack) override;
|
||||
virtual void visitLobbyForceSetPlayer(LobbyForceSetPlayer & pack) override;
|
||||
void visitLobbyClientConnected(LobbyClientConnected & pack) override;
|
||||
void visitLobbyClientDisconnected(LobbyClientDisconnected & pack) override;
|
||||
void visitLobbySetMap(LobbySetMap & pack) override;
|
||||
void visitLobbySetCampaign(LobbySetCampaign & pack) override;
|
||||
void visitLobbySetCampaignMap(LobbySetCampaignMap & pack) override;
|
||||
void visitLobbySetCampaignBonus(LobbySetCampaignBonus & pack) override;
|
||||
void visitLobbyEndGame(LobbyEndGame & pack) override;
|
||||
void visitLobbyStartGame(LobbyStartGame & pack) override;
|
||||
void visitLobbyChangeHost(LobbyChangeHost & pack) override;
|
||||
void visitLobbyChangePlayerOption(LobbyChangePlayerOption & pack) override;
|
||||
void visitLobbySetPlayer(LobbySetPlayer & pack) override;
|
||||
void visitLobbySetPlayerName(LobbySetPlayerName & pack) override;
|
||||
void visitLobbySetTurnTime(LobbySetTurnTime & pack) override;
|
||||
void visitLobbySetExtraOptions(LobbySetExtraOptions & pack) override;
|
||||
void visitLobbySetSimturns(LobbySetSimturns & pack) override;
|
||||
void visitLobbySetDifficulty(LobbySetDifficulty & pack) override;
|
||||
void visitLobbyForceSetPlayer(LobbyForceSetPlayer & pack) override;
|
||||
};
|
||||
|
@ -28,34 +28,34 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void visitSaveGame(SaveGame & pack) override;
|
||||
virtual void visitGamePause(GamePause & pack) override;
|
||||
virtual void visitEndTurn(EndTurn & pack) override;
|
||||
virtual void visitDismissHero(DismissHero & pack) override;
|
||||
virtual void visitMoveHero(MoveHero & pack) override;
|
||||
virtual void visitCastleTeleportHero(CastleTeleportHero & pack) override;
|
||||
virtual void visitArrangeStacks(ArrangeStacks & pack) override;
|
||||
virtual void visitBulkMoveArmy(BulkMoveArmy & pack) override;
|
||||
virtual void visitBulkSplitStack(BulkSplitStack & pack) override;
|
||||
virtual void visitBulkMergeStacks(BulkMergeStacks & pack) override;
|
||||
virtual void visitBulkSmartSplitStack(BulkSmartSplitStack & pack) override;
|
||||
virtual void visitDisbandCreature(DisbandCreature & pack) override;
|
||||
virtual void visitBuildStructure(BuildStructure & pack) override;
|
||||
virtual void visitRecruitCreatures(RecruitCreatures & pack) override;
|
||||
virtual void visitUpgradeCreature(UpgradeCreature & pack) override;
|
||||
virtual void visitGarrisonHeroSwap(GarrisonHeroSwap & pack) override;
|
||||
virtual void visitExchangeArtifacts(ExchangeArtifacts & pack) override;
|
||||
virtual void visitBulkExchangeArtifacts(BulkExchangeArtifacts & pack) override;
|
||||
virtual void visitAssembleArtifacts(AssembleArtifacts & pack) override;
|
||||
virtual void visitEraseArtifactByClient(EraseArtifactByClient & pack) override;
|
||||
virtual void visitBuyArtifact(BuyArtifact & pack) override;
|
||||
virtual void visitTradeOnMarketplace(TradeOnMarketplace & pack) override;
|
||||
virtual void visitSetFormation(SetFormation & pack) override;
|
||||
virtual void visitHireHero(HireHero & pack) override;
|
||||
virtual void visitBuildBoat(BuildBoat & pack) override;
|
||||
virtual void visitQueryReply(QueryReply & pack) override;
|
||||
virtual void visitMakeAction(MakeAction & pack) override;
|
||||
virtual void visitDigWithHero(DigWithHero & pack) override;
|
||||
virtual void visitCastAdvSpell(CastAdvSpell & pack) override;
|
||||
virtual void visitPlayerMessage(PlayerMessage & pack) override;
|
||||
void visitSaveGame(SaveGame & pack) override;
|
||||
void visitGamePause(GamePause & pack) override;
|
||||
void visitEndTurn(EndTurn & pack) override;
|
||||
void visitDismissHero(DismissHero & pack) override;
|
||||
void visitMoveHero(MoveHero & pack) override;
|
||||
void visitCastleTeleportHero(CastleTeleportHero & pack) override;
|
||||
void visitArrangeStacks(ArrangeStacks & pack) override;
|
||||
void visitBulkMoveArmy(BulkMoveArmy & pack) override;
|
||||
void visitBulkSplitStack(BulkSplitStack & pack) override;
|
||||
void visitBulkMergeStacks(BulkMergeStacks & pack) override;
|
||||
void visitBulkSmartSplitStack(BulkSmartSplitStack & pack) override;
|
||||
void visitDisbandCreature(DisbandCreature & pack) override;
|
||||
void visitBuildStructure(BuildStructure & pack) override;
|
||||
void visitRecruitCreatures(RecruitCreatures & pack) override;
|
||||
void visitUpgradeCreature(UpgradeCreature & pack) override;
|
||||
void visitGarrisonHeroSwap(GarrisonHeroSwap & pack) override;
|
||||
void visitExchangeArtifacts(ExchangeArtifacts & pack) override;
|
||||
void visitBulkExchangeArtifacts(BulkExchangeArtifacts & pack) override;
|
||||
void visitAssembleArtifacts(AssembleArtifacts & pack) override;
|
||||
void visitEraseArtifactByClient(EraseArtifactByClient & pack) override;
|
||||
void visitBuyArtifact(BuyArtifact & pack) override;
|
||||
void visitTradeOnMarketplace(TradeOnMarketplace & pack) override;
|
||||
void visitSetFormation(SetFormation & pack) override;
|
||||
void visitHireHero(HireHero & pack) override;
|
||||
void visitBuildBoat(BuildBoat & pack) override;
|
||||
void visitQueryReply(QueryReply & pack) override;
|
||||
void visitMakeAction(MakeAction & pack) override;
|
||||
void visitDigWithHero(DigWithHero & pack) override;
|
||||
void visitCastAdvSpell(CastAdvSpell & pack) override;
|
||||
void visitPlayerMessage(PlayerMessage & pack) override;
|
||||
};
|
||||
|
@ -28,10 +28,10 @@ public:
|
||||
|
||||
CBattleQuery(CGameHandler * owner);
|
||||
CBattleQuery(CGameHandler * owner, const IBattleInfo * Bi); //TODO
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
virtual bool blocksPack(const CPack *pack) const override;
|
||||
virtual void onRemoval(PlayerColor color) override;
|
||||
virtual void onExposure(QueryPtr topQuery) override;
|
||||
void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
bool blocksPack(const CPack *pack) const override;
|
||||
void onRemoval(PlayerColor color) override;
|
||||
void onExposure(QueryPtr topQuery) override;
|
||||
};
|
||||
|
||||
class CBattleDialogQuery : public CDialogQuery
|
||||
@ -41,5 +41,5 @@ public:
|
||||
|
||||
const IBattleInfo * bi;
|
||||
|
||||
virtual void onRemoval(PlayerColor color) override;
|
||||
void onRemoval(PlayerColor color) override;
|
||||
};
|
||||
|
@ -68,8 +68,8 @@ class CDialogQuery : public CQuery
|
||||
{
|
||||
public:
|
||||
CDialogQuery(CGameHandler * owner);
|
||||
virtual bool endsByPlayerAnswer() const override;
|
||||
virtual bool blocksPack(const CPack *pack) const override;
|
||||
bool endsByPlayerAnswer() const override;
|
||||
bool blocksPack(const CPack *pack) const override;
|
||||
void setReply(std::optional<int32_t> reply) override;
|
||||
protected:
|
||||
std::optional<ui32> answer;
|
||||
|
@ -46,9 +46,9 @@ public:
|
||||
|
||||
CObjectVisitQuery(CGameHandler * owner, const CGObjectInstance *Obj, const CGHeroInstance *Hero, int3 Tile);
|
||||
|
||||
virtual bool blocksPack(const CPack *pack) const override;
|
||||
virtual void onRemoval(PlayerColor color) override;
|
||||
virtual void onExposure(QueryPtr topQuery) override;
|
||||
bool blocksPack(const CPack *pack) const override;
|
||||
void onRemoval(PlayerColor color) override;
|
||||
void onExposure(QueryPtr topQuery) override;
|
||||
};
|
||||
|
||||
//Created when hero attempts move and something happens
|
||||
@ -60,11 +60,11 @@ public:
|
||||
bool visitDestAfterVictory; //if hero moved to guarded tile and it should be visited once guard is defeated
|
||||
const CGHeroInstance *hero;
|
||||
|
||||
virtual void onExposure(QueryPtr topQuery) override;
|
||||
void onExposure(QueryPtr topQuery) override;
|
||||
|
||||
CHeroMovementQuery(CGameHandler * owner, const TryMoveHero & Tmh, const CGHeroInstance * Hero, bool VisitDestAfterVictory = false);
|
||||
virtual void onAdding(PlayerColor color) override;
|
||||
virtual void onRemoval(PlayerColor color) override;
|
||||
void onAdding(PlayerColor color) override;
|
||||
void onRemoval(PlayerColor color) override;
|
||||
};
|
||||
|
||||
class CGarrisonDialogQuery : public CDialogQuery //used also for hero exchange dialogs
|
||||
@ -73,8 +73,8 @@ public:
|
||||
std::array<const CArmedInstance *,2> exchangingArmies;
|
||||
|
||||
CGarrisonDialogQuery(CGameHandler * owner, const CArmedInstance *up, const CArmedInstance *down);
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
virtual bool blocksPack(const CPack *pack) const override;
|
||||
void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
bool blocksPack(const CPack *pack) const override;
|
||||
};
|
||||
|
||||
//yes/no and component selection dialogs
|
||||
@ -85,7 +85,7 @@ public:
|
||||
|
||||
CBlockingDialogQuery(CGameHandler * owner, const BlockingDialog &bd);
|
||||
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
};
|
||||
|
||||
class OpenWindowQuery : public CDialogQuery
|
||||
@ -105,7 +105,7 @@ public:
|
||||
|
||||
CTeleportDialogQuery(CGameHandler * owner, const TeleportDialog &td);
|
||||
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
};
|
||||
|
||||
class CHeroLevelUpDialogQuery : public CDialogQuery
|
||||
@ -113,8 +113,8 @@ class CHeroLevelUpDialogQuery : public CDialogQuery
|
||||
public:
|
||||
CHeroLevelUpDialogQuery(CGameHandler * owner, const HeroLevelUp &Hlu, const CGHeroInstance * Hero);
|
||||
|
||||
virtual void onRemoval(PlayerColor color) override;
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
void onRemoval(PlayerColor color) override;
|
||||
void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
|
||||
HeroLevelUp hlu;
|
||||
const CGHeroInstance * hero;
|
||||
@ -125,8 +125,8 @@ class CCommanderLevelUpDialogQuery : public CDialogQuery
|
||||
public:
|
||||
CCommanderLevelUpDialogQuery(CGameHandler * owner, const CommanderLevelUp &Clu, const CGHeroInstance * Hero);
|
||||
|
||||
virtual void onRemoval(PlayerColor color) override;
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
void onRemoval(PlayerColor color) override;
|
||||
void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const override;
|
||||
|
||||
CommanderLevelUp clu;
|
||||
const CGHeroInstance * hero;
|
||||
|
@ -15,6 +15,6 @@
|
||||
class CVcmiTestConfig : public ::testing::Environment
|
||||
{
|
||||
public:
|
||||
virtual void SetUp() override;
|
||||
virtual void TearDown() override;
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user