]> jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/MonsterGO.cpp
b9ca812fe6a7307e1f6592ca51c7abb66ba3ed61
[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 mGold = 0;
22 mHealth = 0;
23 mMaxHealth = 0;
24 mStrength = 0;
25 mDefense = 0;
26 mExperience = 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::LevelId(const string &value)
50 {
51 mfkLevelId = value;
52 }
53
54 string MonsterGO::LevelId(void) const
55 {
56 return mfkLevelId;
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::Experience(const unsigned long int &value)
90 {
91 mExperience = value;
92 }
93
94 unsigned long int MonsterGO::Experience(void) const
95 {
96 return mExperience;
97 }
98
99 void MonsterGO::Health(const unsigned int &value)
100 {
101 mHealth = value;
102 }
103
104 unsigned int MonsterGO::Health(void) const
105 {
106 return mHealth;
107 }
108
109 void MonsterGO::MaxHealth(const unsigned int &value)
110 {
111 mMaxHealth = value;
112 }
113
114 unsigned int MonsterGO::MaxHealth(void) const
115 {
116 return mMaxHealth;
117 }
118
119 void MonsterGO::WeaponName(const string &value)
120 {
121 assert(!value.empty());
122 mWeaponName = value;
123 }
124
125 string MonsterGO::WeaponName(void) const
126 {
127 return mWeaponName;
128 }
129
130 void MonsterGO::DeathCry(const string &value)
131 {
132 assert(!value.empty());
133 mDeathCry = value;
134 }
135
136 string MonsterGO::DeathCry(void) const
137 {
138 return mDeathCry;
139 }
140
141 bool MonsterGO::operator==(const MonsterGO &right) const
142 {
143 return mId == right.mId && mfkLevelId == right.mfkLevelId && mHealth == right.mHealth &&
144 mDefense == right.mDefense && mDeathCry == right.mDeathCry &&
145 mGold == right.mGold && mHealth == right.mHealth &&
146 mMaxHealth == right.mMaxHealth && mName == right.mName &&
147 mStrength == right.mStrength && mWeaponName == right.mWeaponName;
148 }
149
150 bool MonsterGO::operator!=(const MonsterGO &right) const
151 {
152 return (!(*this == right));
153 }
154
155 ObjectTypes::ObjectType MonsterGO::ObjectType(void) const
156 {
157 return ObjectTypes::Monster;
158 }