X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/e0d3cb09ee3cbd32ea2e6c6b4a981e46d7878259..23f6e925552de5981b9d6ff0fd3c596f9a47882e:/gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/WeaponGO.cpp diff --git a/gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/WeaponGO.cpp b/gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/WeaponGO.cpp index 40edef5..1f6c169 100644 --- a/gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/WeaponGO.cpp +++ b/gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/WeaponGO.cpp @@ -3,10 +3,13 @@ using GameServ::GameLayer::GameObjects::ItemGO; #include using GameServ::GameLayer::GameObjects::WeaponGO; +#include +using GameServ::Types::Modifiers; + #include using std::string; -#include -using std::vector; +#include +using std::map; #include #include @@ -15,18 +18,20 @@ using boost::str; WeaponGO::WeaponGO() : ItemGO() { + mType = ItemTypes::Weapon; } -WeaponGO::WeaponGO(const string &name, const int &price, const int &uses, const int &strength, const int &defense, const int &maxhp) : +WeaponGO::WeaponGO(const string &name, const int &price, const int &uses, const int &strength, const int &defense, const int &maxhealth) : ItemGO() { mName = name; mPrice = price; mUses = uses; mModifiers.clear(); - mModifiers.push_back(str(format("STRENGTH + %d") % strength)); - mModifiers.push_back(str(format("DEFENSE + %d") % defense)); - mModifiers.push_back(str(format("MAXHP + %d") % maxhp)); + mModifiers[Modifiers::strength] = strength; + mModifiers[Modifiers::defense] = defense; + mModifiers[Modifiers::maxhealth] = maxhealth; + mType = ItemTypes::Weapon; } WeaponGO::~WeaponGO()