diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-04 02:58:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-04 22:00:41 +0300 |
commit | 46106e962bee32271ee644224c5ac525eb32f888 (patch) | |
tree | c098cb2aa421bff026e499b35f88b7185e995099 /src/gui/questswindow.h | |
parent | 28e10f7225551b1dc2e1f35b8d4d145db528e4c7 (diff) | |
download | manaverse-46106e962bee32271ee644224c5ac525eb32f888.tar.gz manaverse-46106e962bee32271ee644224c5ac525eb32f888.tar.bz2 manaverse-46106e962bee32271ee644224c5ac525eb32f888.tar.xz manaverse-46106e962bee32271ee644224c5ac525eb32f888.zip |
Add different effects to npc depend on qests status (evol only)
Diffstat (limited to 'src/gui/questswindow.h')
-rw-r--r-- | src/gui/questswindow.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h index 884b488c4..ad02c5397 100644 --- a/src/gui/questswindow.h +++ b/src/gui/questswindow.h @@ -32,15 +32,21 @@ #include <map> #include <vector> +class Being; class Button; class BrowserBox; class ExtendedListBox; class ItemLinkHandler; +class Map; class ScrollArea; +class QuestEffect; class QuestsModel; struct QuestItem; +typedef std::map<int, const QuestEffect*> NpcQuestEffectMap; +typedef NpcQuestEffectMap::const_iterator NpcQuestEffectMapCIter; + class QuestsWindow final : public Window, public gcn::ActionListener { public: @@ -66,11 +72,19 @@ class QuestsWindow final : public Window, public gcn::ActionListener void showQuest(const QuestItem *const quest); + void setMap(const Map *const map); + + void updateEffects(); + + void addEffect(Being *const being); + private: void loadXml(); void loadQuest(const int var, const XmlNodePtr node); + void loadEffect(const int var, const XmlNodePtr node); + QuestsModel *mQuestsModel; ExtendedListBox *mQuestsListBox; ScrollArea *mQuestScrollArea; @@ -78,13 +92,20 @@ class QuestsWindow final : public Window, public gcn::ActionListener BrowserBox *mText; ScrollArea *mTextScrollArea; Button *mCloseButton; + //quest variables: var, value std::map<int, int> mVars; + //quests: var, quests std::map<int, std::vector<QuestItem*> > mQuests; + std::vector<QuestEffect*> mAllEffects; + std::vector<const QuestEffect*> mMapEffects; + //npc effects for current map and values: npc, effect + NpcQuestEffectMap mNpcEffects; std::vector<QuestItem*> mQuestLinks; Image *mCompleteIcon; Image *mIncompleteIcon; int mNewQuestEffectId; int mCompleteQuestEffectId; + const Map *mMap; }; extern QuestsWindow *questsWindow; |