]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/ArmorGO.cpp
Finished out the LevelGO class for now
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / src / GameLayer / GameObjects / ArmorGO.cpp
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6e8301de22e9c1717f75b57b5fe53c8753cb56b1 100644 (file)
@@ -0,0 +1,54 @@
+#include <GameServ/GameLayer/GameObjects/ArmorGO.h>\r
+using GameServ::GameLayer::GameObjects::ArmorGO;\r
+\r
+#include <GameServ/Types.h>\r
+using GameServ::Types::Modifiers;\r
+using GameServ::Types::ItemTypes;\r
+\r
+#include <string>\r
+using std::string;\r
+#include <map>\r
+using std::map;\r
+\r
+#include <boost/format.hpp>\r
+#include <boost/algorithm/string.hpp>\r
+using boost::format;\r
+using boost::str;\r
+\r
+\r
+ArmorGO::ArmorGO() : ItemGO()\r
+{\r
+}\r
+\r
+ArmorGO::ArmorGO(const string &name, const int &price, const int &uses, const int &strength, const int &defense, const int &maxhealth) :\r
+ItemGO()\r
+{\r
+       mName = name;\r
+       mPrice = price;\r
+       mUses = uses;\r
+       mModifiers.clear();\r
+       mModifiers[Modifiers::strength] = Range(strength, strength);\r
+       mModifiers[Modifiers::defense] = Range(defense, defense);\r
+       mModifiers[Modifiers::maxhealth] = Range(maxhealth, maxhealth);\r
+}\r
+\r
+ArmorGO::~ArmorGO()\r
+{\r
+}\r
+\r
+ItemTypes::ItemType ArmorGO::Type(void) const\r
+{\r
+       return ItemTypes::Armor;\r
+}\r
+\r
+ArmorGO *ArmorGO::Clone(void) const\r
+{\r
+       return new ArmorGO(*this);\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r