]> jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/MonsterGO.cpp
Consolidated monster data into a single .dat file
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / src / GameLayer / GameObjects / MonsterGO.cpp
1 #include <GameServ/GameLayer/GameObjects/GameObject.h>
2 using GameServ::GameLayer::GameObjects::GameObject;
3 #include <GameServ/GameLayer/GameObjects/MonsterGO.h>
4 using GameServ::GameLayer::GameObjects::MonsterGO;
5
6 #include <string>
7 using std::string;
8
9 MonsterGO::MonsterGO() : GameObject()
10 {
11 Initialize();
12 }
13
14 MonsterGO::MonsterGO(const string &Id) : GameObject(Id)
15 {
16 Initialize();
17 }
18
19 void MonsterGO::Initialize(void)
20 {
21 mLevel = 0;
22 mGold = 0;
23 mHealth = 0;
24 mMaxHealth = 0;
25 mStrength = 0;
26 mDefense = 0;
27 }
28
29 MonsterGO::~MonsterGO()
30 {
31 }
32
33 MonsterGO *MonsterGO::Clone(void) const
34 {
35 return new MonsterGO(*this);
36 }
37
38 void MonsterGO::Name(const string &value)
39 {
40 assert(!value.empty());
41 mName = value;
42 }
43
44 string MonsterGO::Name(void) const
45 {
46 return mName;
47 }
48
49 void MonsterGO::Level(const unsigned int &value)
50 {
51 mLevel = value;
52 }
53
54 unsigned int MonsterGO::Level(void) const
55 {
56 return mLevel;
57 }
58
59 void MonsterGO::Strength(const unsigned int &value)
60 {
61 mStrength = value;
62 }
63
64 unsigned int MonsterGO::Strength(void) const
65 {
66 return mStrength;
67 }
68
69 void MonsterGO::Defense(const unsigned int &value)
70 {
71 mDefense = value;
72 }
73
74 unsigned int MonsterGO::Defense(void) const
75 {
76 return mDefense;
77 }
78
79 void MonsterGO::Gold(const unsigned long int &value)
80 {
81 mGold = value;
82 }
83
84 unsigned long int MonsterGO::Gold(void) const
85 {
86 return mGold;
87 }
88
89 void MonsterGO::Health(const unsigned int &value)
90 {
91 mHealth = value;
92 }
93
94 unsigned int MonsterGO::Health(void) const
95 {
96 return mHealth;
97 }
98
99 void MonsterGO::MaxHealth(const unsigned int &value)
100 {
101 mMaxHealth = value;
102 }
103
104 unsigned int MonsterGO::MaxHealth(void) const
105 {
106 return mMaxHealth;
107 }
108
109 void MonsterGO::WeaponName(const string &value)
110 {
111 assert(!value.empty());
112 mWeaponName = value;
113 }
114
115 string MonsterGO::WeaponName(void) const
116 {
117 return mWeaponName;
118 }
119
120 void MonsterGO::DeathCry(const string &value)
121 {
122 assert(!value.empty());
123 mDeathCry = value;
124 }
125
126 string MonsterGO::DeathCry(void) const
127 {
128 return mDeathCry;
129 }
130
131 bool MonsterGO::operator==(const MonsterGO &right) const
132 {
133 return mId == right.mId && mLevel == right.mLevel && mHealth == right.mHealth &&
134 mDefense == right.mDefense && mDeathCry == right.mDeathCry &&
135 mGold == right.mGold && mHealth == right.mHealth &&
136 mMaxHealth == right.mMaxHealth && mName == right.mName &&
137 mStrength == right.mStrength && mWeaponName == right.mWeaponName;
138 }
139
140 bool MonsterGO::operator!=(const MonsterGO &right) const
141 {
142 return (!(*this == right));
143 }
144
145 ObjectTypes::ObjectType MonsterGO::ObjectType(void) const
146 {
147 return ObjectTypes::Monster;
148 }