diff options
Diffstat (limited to 'src/game-server/gamehandler.cpp')
-rw-r--r-- | src/game-server/gamehandler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp index c7ff655a..e1f58967 100644 --- a/src/game-server/gamehandler.cpp +++ b/src/game-server/gamehandler.cpp @@ -876,14 +876,15 @@ void GameHandler::handleRaiseAttribute(GameClient &client, MessageIn &message) auto *characterComponent = client.character->getComponent<CharacterComponent>(); - const int attribute = message.readInt16(); + const int attributeId = message.readInt16(); + auto *attribute = attributeManager->getAttributeInfo(attributeId); AttribmodResponseCode retCode; retCode = characterComponent->useCharacterPoint(*client.character, attribute); MessageOut result(GPMSG_RAISE_ATTRIBUTE_RESPONSE); result.writeInt8(retCode); - result.writeInt16(attribute); + result.writeInt16(attributeId); client.send(result); if (retCode == ATTRIBMOD_OK) @@ -906,14 +907,15 @@ void GameHandler::handleLowerAttribute(GameClient &client, MessageIn &message) auto *characterComponent = client.character->getComponent<CharacterComponent>(); - const int attribute = message.readInt32(); + const int attributeId = message.readInt32(); + auto *attribute = attributeManager->getAttributeInfo(attributeId); AttribmodResponseCode retCode; retCode = characterComponent->useCorrectionPoint(*client.character, attribute); MessageOut result(GPMSG_LOWER_ATTRIBUTE_RESPONSE); result.writeInt8(retCode); - result.writeInt16(attribute); + result.writeInt16(attributeId); client.send(result); if (retCode == ATTRIBMOD_OK) |