Crossfire Server, Trunk
Quests.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2021 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef COMMON_QUESTS_H
14 #define COMMON_QUESTS_H
15 
16 extern "C" {
17 #include "quest.h"
18 }
19 #include "AssetsCollection.h"
20 
21 class Quests : public AssetsCollection<quest_definition> {
22 public:
23  Quests();
24  virtual ~Quests();
25 
26  size_t visibleCount() const { return visibleQuests; }
27 
28 protected:
29  virtual quest_definition *create(const std::string& name);
30  virtual void destroy(quest_definition *item);
31  virtual void replace(quest_definition *existing, quest_definition *update);
32  virtual void added(quest_definition *quest);
33 
34 private:
35  size_t visibleQuests;
36 };
37 
38 #endif /* QUESTS_H */
39 
Quests::visibleCount
size_t visibleCount() const
Definition: Quests.h:26
quest
Definition: quest.py:1
AssetsCollection
Definition: AssetsCollection.h:39
Quests
Definition: Quests.h:21
Quests::Quests
Quests()
Definition: Quests.cpp:15
AssetsCollection.h
Quests::replace
virtual void replace(quest_definition *existing, quest_definition *update)
Definition: Quests.cpp:29
Quests::create
virtual quest_definition * create(const std::string &name)
Definition: Quests.cpp:21
quest.h
Quests::visibleQuests
size_t visibleQuests
Definition: Quests.h:35
Quests::added
virtual void added(quest_definition *quest)
Definition: Quests.cpp:41
item
Definition: item.py:1
Quests::destroy
virtual void destroy(quest_definition *item)
Definition: Quests.cpp:25
quest_definition
Definition: quest.h:42
give.name
name
Definition: give.py:27
Quests::~Quests
virtual ~Quests()
Definition: Quests.cpp:18