diff options
| author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-09-28 23:39:01 +0200 |
|---|---|---|
| committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-09-28 23:39:01 +0200 |
| commit | 77ea3d90114a7d6503d19e89ffaf2e548f63e420 (patch) | |
| tree | f92edc2775fde07a7b9df4ccf7c8f70f436c2c13 /src/game-server/attributemanager.cpp | |
| parent | 60b44b8efa96d318fb22077011f2ccb5d2f03104 (diff) | |
Started to fix the autoattack system.
I simply made the default autoattack look for the default skill
and add exp to it when killing monsters.
Now the player can earn xp again even if it's not well handled
between two logins.
Diffstat (limited to 'src/game-server/attributemanager.cpp')
| -rw-r--r-- | src/game-server/attributemanager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game-server/attributemanager.cpp b/src/game-server/attributemanager.cpp index 31566be..bb30784 100644 --- a/src/game-server/attributemanager.cpp +++ b/src/game-server/attributemanager.cpp @@ -97,7 +97,10 @@ bool AttributeManager::isAttributeDirectlyModifiable(int id) const ModifierLocation AttributeManager::getLocation(const std::string &tag) const { - return mTagMap.at(tag); + if (mTagMap.find(tag) != mTagMap.end()) + return mTagMap.at(tag); + else + return ModifierLocation(0, 0); } const std::string *AttributeManager::getTag(const ModifierLocation &location) const |
