diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-04 18:54:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-04 18:54:18 +0300 |
commit | 829709f07a16e945af416cb1df23d0fcefdba8e0 (patch) | |
tree | 1a40a1dd51724970b71c8833f27d18a39b38a62f /src/net/eathena | |
parent | a3310b047fb85052429a979eb0ebd02d47c43964 (diff) | |
download | manaplus-829709f07a16e945af416cb1df23d0fcefdba8e0.tar.gz manaplus-829709f07a16e945af416cb1df23d0fcefdba8e0.tar.bz2 manaplus-829709f07a16e945af416cb1df23d0fcefdba8e0.tar.xz manaplus-829709f07a16e945af416cb1df23d0fcefdba8e0.zip |
eathena: allow delete characters if account have non default email.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 8 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 5ced3761f..c2292abde 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -285,7 +285,8 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, outMsg.writeInt16(static_cast<int16_t>(race), "race"); } -void CharServerHandler::deleteCharacter(Net::Character *const character) +void CharServerHandler::deleteCharacter(Net::Character *const character, + const std::string &email) { if (!character) return; @@ -294,7 +295,10 @@ void CharServerHandler::deleteCharacter(Net::Character *const character) createOutPacket(CMSG_CHAR_DELETE); outMsg.writeInt32(mSelectedCharacter->dummy->getId(), "id?"); - outMsg.writeString("a@a.com", 40, "email"); + if (email.empty()) + outMsg.writeString("a@a.com", 40, "email"); + else + outMsg.writeString(email, 40, "email"); } void CharServerHandler::switchCharacter() const diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 0af45d9bd..d62d0a3df 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -54,7 +54,8 @@ class CharServerHandler final : public MessageHandler, void renameCharacter(const int id, const std::string &newName) override final; - void deleteCharacter(Net::Character *const character) override final; + void deleteCharacter(Net::Character *const character, + const std::string &email) override final; void switchCharacter() const override final; |