Crossfire Server, Trunk  R20513
CREMapInformation.h
Go to the documentation of this file.
1 #ifndef CLASS_CRE_MAP_INFORMATION_H
2 #define CLASS_CRE_MAP_INFORMATION_H
3 
4 #include <QObject>
5 #include <QString>
6 #include <QStringList>
7 #include <QDateTime>
8 #include <QHash>
9 
10 class CRERandomMap;
11 
12 class CREMapInformation : public QObject
13 {
14  Q_OBJECT
15 
16  Q_PROPERTY(QString path READ path)
17  Q_PROPERTY(QString name READ name)
18  Q_PROPERTY(int level READ level)
19  Q_PROPERTY(qint64 experience READ experience)
20 
21  public:
23  CREMapInformation(const QString& path);
24 
25  CREMapInformation* clone() const;
26 
27  const QString& displayName() const;
28 
29  const QString& path() const;
30  void setPath(const QString& path);
31 
32  const QString& name() const;
33  void setName(const QString& name);
34 
35  QStringList archetypes() const;
36  void addArchetype(const QString& archetype);
37 
38  const QDateTime& mapTime() const;
39  void setMapTime(const QDateTime& date);
40 
41  QStringList exitsTo() const;
42  void addExitTo(const QString& path);
43 
44  QStringList accessedFrom() const;
45  void addAccessedFrom(const QString& path);
46 
47  int level() const;
48  void setLevel(int level);
49 
50  qint64 experience() const;
51  void setExperience(qint64 experience);
52 
53  const QString& region() const;
54  void setRegion(const QString& region);
55 
56  QStringList messages() const;
57  void addMessage(const QString& message);
58 
59  QStringList quests() const;
60  void addQuest(const QString& quest);
61 
62  QHash<QString, int>& shopItems();
63  const QHash<QString, int>& shopItems() const;
64 
65  double shopGreed() const;
66  void setShopGreed(double greed);
67  const QString& shopRace() const;
68  void setShopRace(const QString& race);
69  quint64 shopMin() const;
70  void setShopMin(quint64 min);
71  quint64 shopMax() const;
72  void setShopMax(quint64 max);
73 
74  QList<CRERandomMap*> randomMaps() const;
75  void addRandomMap(CRERandomMap* map);
76 
77  protected:
78  QString myPath;
79  QString myName;
80  QStringList myArchetypes;
81  QDateTime myMapTime;
82  QStringList myExitsTo;
83  QStringList myAccessedFrom;
84  int myLevel;
85  qint64 myExperience;
86  QString myRegion;
87  QStringList myMessages;
88  QStringList myQuests;
89  QHash<QString, int> myShopItems;
90  double myShopGreed;
91  QString myShopRace;
92  quint64 myShopMin, myShopMax;
94 
95  void copy(const CREMapInformation& other);
96 };
97 
98 #endif // CLASS_CRE_MAP_INFORMATION_H
QStringList exitsTo() const
QStringList myMessages
int level() const
QStringList myAccessedFrom
QStringList myArchetypes
qint64 experience() const
QHash< QString, int > myShopItems
const QString & name() const
void setPath(const QString &path)
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:465
const QString & displayName() const
void copy(const CREMapInformation &other)
void addMessage(const QString &message)
QList< CRERandomMap * > randomMaps() const
void setShopRace(const QString &race)
void addQuest(const QString &quest)
QStringList messages() const
void setShopMin(quint64 min)
QStringList archetypes() const
double shopGreed() const
This is a game region.
Definition: map.h:276
void setRegion(const QString &region)
void addRandomMap(CRERandomMap *map)
const QString & shopRace() const
void setName(const QString &name)
QStringList accessedFrom() const
void setShopMax(quint64 max)
const QString & path() const
void addAccessedFrom(const QString &path)
CREMapInformation * clone() const
void setMapTime(const QDateTime &date)
void addExitTo(const QString &path)
quint64 shopMin() const
void setExperience(qint64 experience)
quint64 shopMax() const
void addArchetype(const QString &archetype)
void setLevel(int level)
QList< CRERandomMap * > myRandomMaps
const QDateTime & mapTime() const
void setShopGreed(double greed)
QStringList quests() const
QHash< QString, int > & shopItems()