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

- Removed pointer usage for CQuest. may look rough, but works and fixes #1051.

- Better autoSkip mode, now info windows are not displayed.
This commit is contained in:
DjWarmonger
2012-09-28 15:46:09 +00:00
parent 786bd73e67
commit 0435d5a4f1
6 changed files with 48 additions and 25 deletions

View File

@ -76,6 +76,8 @@ public:
std::string firstVisitText, nextVisitText, completedText;
bool isCustomFirst, isCustomNext, isCustomComplete;
CQuest(){missionType = 0;}; //default constructor
virtual bool checkQuest (const CGHeroInstance * h) const; //determines whether the quest is complete or not
virtual void getVisitText (MetaString &text, std::vector<Component> &components, bool isCustom, bool FirstVisit, const CGHeroInstance * h = NULL) const;
virtual void getCompletionText (MetaString &text, std::vector<Component> &components, bool isCustom, const CGHeroInstance * h = NULL) const;
@ -83,6 +85,11 @@ public:
virtual void completeQuest (const CGHeroInstance * h) const {};
virtual void addReplacements(MetaString &out, const std::string &base) const;
bool operator== (const CQuest & quest) const
{
return (quest.qid == qid);
}
template <typename Handler> void serialize(Handler &h, const int version)
{
h & qid & missionType & progress & lastDay & m13489val & m2stats & m5arts & m6creatures & m7resources