]>
jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/PotionGO.cpp
1 #include <GameServ/GameLayer/GameObjects/PotionGO.h>
2 using GameServ::GameLayer::GameObjects::PotionGO
;
4 #include <GameServ/Types.h>
5 using GameServ::Types::Modifiers
;
6 using GameServ::Types::ItemTypes
;
13 #include <boost/format.hpp>
14 #include <boost/algorithm/string.hpp>
19 PotionGO::PotionGO() : ItemGO()
23 PotionGO::PotionGO(const string
&name
, const int &price
, const int &uses
, const int &strength
, const int &defense
, const int &maxhealth
) :
30 mModifiers
[Modifiers::strength
] = Range
<int>(strength
, strength
);
31 mModifiers
[Modifiers::defense
] = Range
<int>(defense
, defense
);
32 mModifiers
[Modifiers::maxhealth
] = Range
<int>(maxhealth
, maxhealth
);
39 ItemTypes::ItemType
PotionGO::Type(void) const
41 return ItemTypes::Potion
;
44 ItemGO
*PotionGO::Clone(void) const
46 return new PotionGO(*this);