diff options
-rw-r--r-- | src/game-server/accountconnection.cpp | 6 | ||||
-rw-r--r-- | src/game-server/accountconnection.hpp | 9 | ||||
-rw-r--r-- | src/game-server/attribute.cpp | 4 | ||||
-rw-r--r-- | src/game-server/gamehandler.cpp | 8 |
4 files changed, 11 insertions, 16 deletions
diff --git a/src/game-server/accountconnection.cpp b/src/game-server/accountconnection.cpp index 1a35587e..128e3df0 100644 --- a/src/game-server/accountconnection.cpp +++ b/src/game-server/accountconnection.cpp @@ -348,17 +348,13 @@ void AccountConnection::syncChanges(bool force) } void AccountConnection::updateCharacterPoints(int charId, int charPoints, - int corrPoints, - int attribId, - int attribValue) + int corrPoints) { mSyncMessages++; mSyncBuffer->writeByte(SYNC_CHARACTER_POINTS); mSyncBuffer->writeLong(charId); mSyncBuffer->writeLong(charPoints); mSyncBuffer->writeLong(corrPoints); - mSyncBuffer->writeByte(attribId); - mSyncBuffer->writeLong(attribValue); syncChanges(); } diff --git a/src/game-server/accountconnection.hpp b/src/game-server/accountconnection.hpp index e2b793b1..28599f82 100644 --- a/src/game-server/accountconnection.hpp +++ b/src/game-server/accountconnection.hpp @@ -126,12 +126,15 @@ class AccountConnection : public Connection * @param charId ID of the character * @param charPoints character points left for the character * @param corrPoints correction points left for the character + */ + void updateCharacterPoints(int charId, int charPoints, + int corrPoints); + + /** + * @param charId ID of the character * @param attribId ID of the modified attribute * @param attribValue New value of the modified attribute */ - void updateCharacterPoints(int charId, int charPoints, - int corrPoints, int attribId, - int attribValue); void updateAttributes(int charId, int attrId, double base, double mod); diff --git a/src/game-server/attribute.cpp b/src/game-server/attribute.cpp index 37ac07b5..0feb1fd0 100644 --- a/src/game-server/attribute.cpp +++ b/src/game-server/attribute.cpp @@ -179,8 +179,8 @@ void AttributeModifiersEffect::updateMod(double value) bool AttributeModifiersEffect::recalculateModifiedValue(double newPrevLayerValue) { double oldValue = mCacheVal; - switch (mEType) - case AME_ADD: { + switch (mEType) { + case AME_ADD: switch (mSType) { case TY_ST: case TY_NSTB: diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp index 95478d82..15214a78 100644 --- a/src/game-server/gamehandler.cpp +++ b/src/game-server/gamehandler.cpp @@ -543,9 +543,7 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message) accountHandler->updateCharacterPoints( computer.character->getDatabaseID(), computer.character->getCharacterPoints(), - computer.character->getCorrectionPoints(), - attribute, - computer.character->getAttribute(attribute)); + computer.character->getCorrectionPoints()); // log transaction std::stringstream str; @@ -569,9 +567,7 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message) accountHandler->updateCharacterPoints( computer.character->getDatabaseID(), computer.character->getCharacterPoints(), - computer.character->getCorrectionPoints(), - attribute, - computer.character->getAttribute(attribute)); + computer.character->getCorrectionPoints()); // log transaction std::stringstream str; |