diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-02-11 20:00:09 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-02-11 20:00:09 +0100 |
commit | 599642b57e65d5b515fd748a0f71bc7e03723b05 (patch) | |
tree | 93fe70adf6c190983a4f40de4d3ca00bd63106cb /src/account-server | |
parent | afe3490781c1d35e452a52a53988526b72cea61e (diff) | |
download | manaserv-599642b57e65d5b515fd748a0f71bc7e03723b05.tar.gz manaserv-599642b57e65d5b515fd748a0f71bc7e03723b05.tar.bz2 manaserv-599642b57e65d5b515fd748a0f71bc7e03723b05.tar.xz manaserv-599642b57e65d5b515fd748a0f71bc7e03723b05.zip |
Fix the GP base and mod values for newly created characters.
Reviewed-by: Freeyorp.
Diffstat (limited to 'src/account-server')
-rw-r--r-- | src/account-server/accounthandler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index 5cb71c4d..79415bd7 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -802,6 +802,17 @@ void AccountHandler::handleCharacterCreateMessage(AccountClient &client, newCharacter->setAccount(acc); newCharacter->setCharacterSlot(slot); newCharacter->setLevel(1); + + // Init GP value to avoid flawed ones. + AttributeMap::iterator itr = + newCharacter->mAttributes.find(ATTR_GP); + // Set up the base and modified attribute to 0. + if (itr != newCharacter->mAttributes.end()) + { + itr->second.first = 0; + itr->second.second = 0; + } + newCharacter->setCharacterPoints(0); newCharacter->setCorrectionPoints(0); newCharacter->setGender(gender); |