diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-25 17:00:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-25 17:00:29 +0300 |
commit | 86ea4ef67a3a4ee16ad41bdd2a5e8a0a19635068 (patch) | |
tree | 9fb021b988d6ac482b02b2c91cfc3981696e981c /src/net/ea/charserverhandler.cpp | |
parent | 5f602ac6b69195658ea54d218b29b270744bbb47 (diff) | |
download | mv-86ea4ef67a3a4ee16ad41bdd2a5e8a0a19635068.tar.gz mv-86ea4ef67a3a4ee16ad41bdd2a5e8a0a19635068.tar.bz2 mv-86ea4ef67a3a4ee16ad41bdd2a5e8a0a19635068.tar.xz mv-86ea4ef67a3a4ee16ad41bdd2a5e8a0a19635068.zip |
Move receive code from charserverhandler into separate file.
Diffstat (limited to 'src/net/ea/charserverhandler.cpp')
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index eafdaff34..e46562085 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -77,105 +77,6 @@ unsigned int CharServerHandler::maxSprite() const return EA_SPRITE_VECTOREND; } -void CharServerHandler::processCharLoginError(Net::MessageIn &msg) -{ - BLOCK_START("CharServerHandler::processCharLoginError") - switch (msg.readUInt8("error")) - { - case 0: - // TRANSLATORS: error message - errorMessage = _("Access denied. Most likely, there are " - "too many players on this server."); - break; - case 1: - // TRANSLATORS: error message - errorMessage = _("Cannot use this ID."); - break; - default: - // TRANSLATORS: error message - errorMessage = _("Unknown char-server failure."); - break; - } - client->setState(STATE_ERROR); - BLOCK_END("CharServerHandler::processCharLoginError") -} - -void CharServerHandler::processCharCreateFailed(Net::MessageIn &msg) -{ - BLOCK_START("CharServerHandler::processCharCreateFailed") - switch (msg.readUInt8("error")) - { - case 1: - case 0: - default: - // TRANSLATORS: error message - errorMessage = _("Failed to create character. Most " - "likely the name is already taken."); - break; - case 2: - // TRANSLATORS: error message - errorMessage = _("Wrong name."); - break; - case 3: - // TRANSLATORS: error message - errorMessage = _("Incorrect stats."); - break; - case 4: - // TRANSLATORS: error message - errorMessage = _("Incorrect hair."); - break; - case 5: - // TRANSLATORS: error message - errorMessage = _("Incorrect slot."); - break; - case 6: - // TRANSLATORS: error message - errorMessage = _("Incorrect race."); - break; - case 7: - // TRANSLATORS: error message - errorMessage = _("Incorrect look."); - break; - } - CREATEWIDGET(OkDialog, - // TRANSLATORS: error message header - _("Error"), - errorMessage, - // TRANSLATORS: ok dialog button - _("OK"), - DialogType::ERROR, - Modal_true, - ShowCenter_true, - nullptr, - 260); - if (mCharCreateDialog) - mCharCreateDialog->unlock(); - BLOCK_END("CharServerHandler::processCharCreateFailed") -} - -void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED) -{ - BLOCK_START("CharServerHandler::processCharDelete") - delete mSelectedCharacter; - mCharacters.remove(mSelectedCharacter); - mSelectedCharacter = nullptr; - updateCharSelectDialog(); - unlockCharSelectDialog(); - CREATEWIDGET(OkDialog, - // TRANSLATORS: info message header - _("Info"), - // TRANSLATORS: info message - _("Character deleted."), - // TRANSLATORS: ok dialog button - _("OK"), - DialogType::OK, - Modal_true, - ShowCenter_true, - nullptr, - 260); - BLOCK_END("CharServerHandler::processCharDelete") -} - void CharServerHandler::clear() { delete_all(mCharacters); |