summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-07-30 13:33:13 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-07-30 13:33:13 +0200
commit9b30cad049d8f3ac9c63290331e73515d51c0260 (patch)
tree6b3400e77e1333cbe5a53c2baef39f8e7945e170 /src
parent499352c94a5926587c6974d96cbe12b0f3420e83 (diff)
downloadmanaserv-9b30cad049d8f3ac9c63290331e73515d51c0260.tar.gz
manaserv-9b30cad049d8f3ac9c63290331e73515d51c0260.tar.bz2
manaserv-9b30cad049d8f3ac9c63290331e73515d51c0260.tar.xz
manaserv-9b30cad049d8f3ac9c63290331e73515d51c0260.zip
Fixed a little mistake done in Monster::setAttribute.
It was using at() for setting. Also I changed the unsigned int to int as the default returned was -1 in the MonsterManager::reload() function.
Diffstat (limited to 'src')
-rw-r--r--src/game-server/monster.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game-server/monster.hpp b/src/game-server/monster.hpp
index 86a69ac8..0d5d9688 100644
--- a/src/game-server/monster.hpp
+++ b/src/game-server/monster.hpp
@@ -98,13 +98,13 @@ class MonsterClass
/**
* Sets a being base attribute.
*/
- void setAttribute(size_t attribute, int value)
- { mAttributes.at(attribute) = value; }
+ void setAttribute(int attribute, double value)
+ { mAttributes[attribute] = value; }
/**
* Returns a being base attribute.
*/
- int getAttribute(unsigned int attribute) const
+ double getAttribute(int attribute) const
{ return mAttributes.at(attribute); }
/** Sets collision circle radius. */
@@ -181,7 +181,7 @@ class MonsterClass
private:
unsigned short mID;
MonsterDrops mDrops;
- std::map<unsigned int, double> mAttributes; /**< Base attributes of the monster. */
+ std::map<int, double> mAttributes; /**< Base attributes of the monster. */
float mSpeed; /**< The monster class speed in tiles per second */
int mSize;
int mExp;