diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-04 18:09:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-04 18:09:51 +0300 |
commit | 45cc2ca610613ee824e0549904edb33334b265a7 (patch) | |
tree | bdfd7badb19824a4fe849ba9de9bdd52737910e5 | |
parent | fa2383b7cb1fb53c2411af6bd04c4dbda4c7d3cb (diff) | |
download | plus-45cc2ca610613ee824e0549904edb33334b265a7.tar.gz plus-45cc2ca610613ee824e0549904edb33334b265a7.tar.bz2 plus-45cc2ca610613ee824e0549904edb33334b265a7.tar.xz plus-45cc2ca610613ee824e0549904edb33334b265a7.zip |
Move processCharDeleteFailed from ea namespace into eathena and tmwa.
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 13 | ||||
-rw-r--r-- | src/net/ea/charserverhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 17 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.h | 2 |
6 files changed, 35 insertions, 15 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 43a080a49..2e1e3b262 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -165,19 +165,6 @@ void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED) BLOCK_END("CharServerHandler::processCharDelete") } -void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED) -{ - BLOCK_START("CharServerHandler::processCharDeleteFailed") - unlockCharSelectDialog(); - // TRANSLATORS: error message - new OkDialog(_("Error"), _("Failed to delete character."), - // TRANSLATORS: ok dialog button - _("OK"), - DialogType::ERROR, - true, true, nullptr, 260); - BLOCK_END("CharServerHandler::processCharDeleteFailed") -} - void CharServerHandler::clear() { delete_all(mCharacters); diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h index 170b84267..305fee0ee 100644 --- a/src/net/ea/charserverhandler.h +++ b/src/net/ea/charserverhandler.h @@ -60,8 +60,6 @@ class CharServerHandler notfinal : public Net::CharServerHandler static void processCharDelete(Net::MessageIn &msg); - static void processCharDeleteFailed(Net::MessageIn &msg); - virtual void clear() override final; protected: diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 49cde4480..5ced3761f 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -593,4 +593,18 @@ void CharServerHandler::processCharChangeSlot(Net::MessageIn &msg) msg.readInt16("unused"); } +void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED) +{ + BLOCK_START("CharServerHandler::processCharDeleteFailed") + unlockCharSelectDialog(); + msg.readUInt8("error"); + // TRANSLATORS: error message + new OkDialog(_("Error"), _("Failed to delete character."), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::ERROR, + true, true, nullptr, 260); + BLOCK_END("CharServerHandler::processCharDeleteFailed") +} + } // namespace EAthena diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 364c1d694..0af45d9bd 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -98,6 +98,8 @@ class CharServerHandler final : public MessageHandler, static void processCharChangeSlot(Net::MessageIn &msg); + static void processCharDeleteFailed(Net::MessageIn &msg); + private: static std::string mNewName; static uint32_t mPinSeed; diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 34885f7e7..2412a094d 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -28,7 +28,10 @@ #include "being/attributes.h" +#include "gui/dialogtype.h" + #include "gui/windows/charcreatedialog.h" +#include "gui/windows/okdialog.h" #include "net/character.h" #include "net/logindata.h" @@ -521,4 +524,18 @@ void CharServerHandler::changeSlot(const int oldSlot A_UNUSED, { } +void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED) +{ + BLOCK_START("CharServerHandler::processCharDeleteFailed") + unlockCharSelectDialog(); + msg.readUInt8("error"); + // TRANSLATORS: error message + new OkDialog(_("Error"), _("Failed to delete character."), + // TRANSLATORS: ok dialog button + _("OK"), + DialogType::ERROR, + true, true, nullptr, 260); + BLOCK_END("CharServerHandler::processCharDeleteFailed") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h index cf82580f8..ab513d0d2 100644 --- a/src/net/tmwa/charserverhandler.h +++ b/src/net/tmwa/charserverhandler.h @@ -90,6 +90,8 @@ class CharServerHandler final : public MessageHandler, static void processCharCreate(Net::MessageIn &msg); static void processCharCreate2(Net::MessageIn &msg); + + static void processCharDeleteFailed(Net::MessageIn &msg); }; } // namespace TmwAthena |