]>
jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/MasterGO.cpp
1 #include <GameServ/GameLayer/GameObjects/GameObject.h>
2 using GameServ::GameLayer::GameObjects::GameObject
;
3 #include <GameServ/GameLayer/GameObjects/MasterGO.h>
4 using GameServ::GameLayer::GameObjects::MasterGO
;
6 #include <GameServ/Types.h>
7 using GameServ::Types::ObjectTypes
;
16 MasterGO::MasterGO(const string
&Id
) : GameObject(Id
)
24 MasterGO
*MasterGO::Clone(void) const
26 return new MasterGO(*this);
29 void MasterGO::Name(const string
&value
)
31 assert(!value
.empty());
35 string
MasterGO::Name(void) const
40 void MasterGO::Strength(const int &value
)
46 int MasterGO::Strength(void) const
51 void MasterGO::Defense(const int &value
)
57 int MasterGO::Defense(void) const
62 void MasterGO::Gold(const unsigned long &value
)
67 unsigned long MasterGO::Gold(void) const
72 void MasterGO::Health(const int &value
)
77 int MasterGO::Health(void) const
82 void MasterGO::MaxHealth(const int &value
)
87 int MasterGO::MaxHealth(void) const
92 void MasterGO::WeaponName(const string
&value
)
94 assert(!value
.empty());
98 string
MasterGO::WeaponName(void) const
103 void MasterGO::DeathCry(const string
&value
)
105 assert(!value
.empty());
109 string
MasterGO::DeathCry(void) const
114 bool MasterGO::operator==(const MasterGO
&right
) const
116 return mId
== right
.mId
&& mHealth
== right
.mHealth
&&
117 mDefense
== right
.mDefense
&& mDeathCry
== right
.mDeathCry
&&
118 mGold
== right
.mGold
&& mHealth
== right
.mHealth
&&
119 mMaxHealth
== right
.mMaxHealth
&& mName
== right
.mName
&&
120 mStrength
== right
.mStrength
&& mWeaponName
== right
.mWeaponName
;
123 bool MasterGO::operator!=(const MasterGO
&right
) const
125 return (!(*this == right
));
128 ObjectTypes::ObjectType
MasterGO::ObjectType(void) const
130 return ObjectTypes::Master
;