mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
pass object/hero parameters directly instead of passing query
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
struct CPack;
|
||||
class CGObjectInstance;
|
||||
class CGHeroInstance;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
@@ -40,18 +42,29 @@ public:
|
||||
|
||||
CQuery(CGameHandler * gh);
|
||||
|
||||
virtual bool blocksPack(const CPack *pack) const; //query can block attempting actions by player. Eg. he can't move hero during the battle.
|
||||
/// query can block attempting actions by player. Eg. he can't move hero during the battle.
|
||||
virtual bool blocksPack(const CPack *pack) const;
|
||||
|
||||
virtual bool endsByPlayerAnswer() const; //query is removed after player gives answer (like dialogs)
|
||||
virtual void onAdding(PlayerColor color); //called just before query is pushed on stack
|
||||
virtual void onAdded(PlayerColor color); //called right after query is pushed on stack
|
||||
virtual void onRemoval(PlayerColor color); //called after query is removed from stack
|
||||
virtual void onExposure(QueryPtr topQuery);//called when query immediately above is removed and this is exposed (becomes top)
|
||||
virtual std::string toString() const;
|
||||
/// query is removed after player gives answer (like dialogs)
|
||||
virtual bool endsByPlayerAnswer() const;
|
||||
|
||||
virtual void notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit) const;
|
||||
/// called just before query is pushed on stack
|
||||
virtual void onAdding(PlayerColor color);
|
||||
|
||||
/// called right after query is pushed on stack
|
||||
virtual void onAdded(PlayerColor color);
|
||||
|
||||
/// called after query is removed from stack
|
||||
virtual void onRemoval(PlayerColor color);
|
||||
|
||||
/// called when query immediately above is removed and this is exposed (becomes top)
|
||||
virtual void onExposure(QueryPtr topQuery);
|
||||
|
||||
/// called when this query is being removed and must report its result to currently visited object
|
||||
virtual void notifyObjectAboutRemoval(const CGObjectInstance * visitedObject, const CGHeroInstance * visitingHero) const;
|
||||
|
||||
virtual void setReply(std::optional<int32_t> reply);
|
||||
virtual std::string toString() const;
|
||||
|
||||
virtual ~CQuery();
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user