]> 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 3a7e6bde3f66425a695ba3950993da9937326577..6e8301de22e9c1717f75b57b5fe53c8753cb56b1 100644 (file)
@@ -18,27 +18,33 @@ using boost::str;
 \r
 ArmorGO::ArmorGO() : ItemGO()\r
 {\r
-       mType = ItemTypes::Armor;\r
 }\r
 \r
-ArmorGO::ArmorGO(const string &name, const int &price, const int &uses, const int &strength, const int &defense, const int &maxhp) :\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] = strength;\r
-       mModifiers[Modifiers::defense] = defense;\r
-       mModifiers[Modifiers::maxhp] = maxhp;\r
-       mType = ItemTypes::Armor;\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