diff options
Diffstat (limited to 'src/game-server/gamehandler.cpp')
-rw-r--r-- | src/game-server/gamehandler.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp index 7886ac18..675a0fc0 100644 --- a/src/game-server/gamehandler.cpp +++ b/src/game-server/gamehandler.cpp @@ -443,6 +443,16 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message) result.writeShort(GPMSG_RAISE_ATTRIBUTE_RESPONSE); result.writeByte(retCode); result.writeByte(attribute); + + if (retCode == ATTRIBMOD_OK ) + { + accountHandler->updateCharacterPoints( + computer.character->getDatabaseID(), + computer.character->getCharacterPoints(), + computer.character->getCorrectionPoints(), + attribute, + computer.character->getAttribute(attribute)); + } } break; case PGMSG_LOWER_ATTRIBUTE: @@ -453,6 +463,16 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message) result.writeShort(GPMSG_LOWER_ATTRIBUTE_RESPONSE); result.writeByte(retCode); result.writeByte(attribute); + + if (retCode == ATTRIBMOD_OK ) + { + accountHandler->updateCharacterPoints( + computer.character->getDatabaseID(), + computer.character->getCharacterPoints(), + computer.character->getCorrectionPoints(), + attribute, + computer.character->getAttribute(attribute)); + } } break; case PGMSG_RESPAWN: |