diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game-server/character.cpp | 13 | ||||
-rw-r--r-- | src/game-server/character.hpp | 10 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp index 2af2808e..c78a8a92 100644 --- a/src/game-server/character.cpp +++ b/src/game-server/character.cpp @@ -334,6 +334,19 @@ int Character::getAttribute(int attr) const } } +int Character::getModifiedAttribute(int attr) const +{ + if (attr <= CHAR_ATTR_END) + { + return Being::getModifiedAttribute(attr); + } + else + { + //TODO: Find a way to modify skills + return Character::levelForExp(mExperience.find(attr)->second); + } +} + void Character::modifiedAttribute(int attr) { if (attr >= CHAR_ATTR_BEGIN && attr < CHAR_ATTR_END) diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp index da2af285..828566ab 100644 --- a/src/game-server/character.hpp +++ b/src/game-server/character.hpp @@ -239,10 +239,16 @@ class Character : public Being void setMapId(int); /** - * Over loads being::getAttribute, character skills are + * Over loads Being::getAttribute, character skills are * treated as extend attributes */ - int getAttribute(int) const; + int getAttribute(int) const; + + /** + * Over loads Being::getModifiedAttribute + * Charcter skills are treated as extend attributes + */ + int getModifiedAttribute(int) const; /** * Updates base Being attributes. |