diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-10-04 12:27:07 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-10-04 12:27:07 -0600 |
commit | cff9f1947bac8fa49aaf6f846a6e4335a439ac2e (patch) | |
tree | a1b2272c9541bb1ee40323948970787459187ae6 /src/net/tmwserv | |
parent | 95b54aee1b20e6fd2bf8f99766d810e0ab2e5477 (diff) | |
download | mana-cff9f1947bac8fa49aaf6f846a6e4335a439ac2e.tar.gz mana-cff9f1947bac8fa49aaf6f846a6e4335a439ac2e.tar.bz2 mana-cff9f1947bac8fa49aaf6f846a6e4335a439ac2e.tar.xz mana-cff9f1947bac8fa49aaf6f846a6e4335a439ac2e.zip |
Add ability to delect characters from account
Diffstat (limited to 'src/net/tmwserv')
-rw-r--r-- | src/net/tmwserv/charhandler.cpp | 11 | ||||
-rw-r--r-- | src/net/tmwserv/charhandler.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/net/tmwserv/charhandler.cpp b/src/net/tmwserv/charhandler.cpp index 841c9a2d..03a6dff0 100644 --- a/src/net/tmwserv/charhandler.cpp +++ b/src/net/tmwserv/charhandler.cpp @@ -100,10 +100,13 @@ void CharHandler::handleMessage(MessageIn &msg) // Character deletion successful if (errMsg == ERRMSG_OK) { - delete mCharInfo->getEntry(); + LocalPlayer *tempPlayer = mCharInfo->getEntry(); mCharInfo->setEntry(0); mCharInfo->unlock(); + if (mCharSelectDialog) + mCharSelectDialog->update(mCharInfo->getPos()); new OkDialog(_("Info"), _("Player deleted.")); + delete tempPlayer; } // Character deletion failed else @@ -291,9 +294,13 @@ void CharHandler::handleCharSelectResponse(MessageIn &msg) } } +void CharHandler::setCharSelectDialog(CharSelectDialog *window) +{ + mCharSelectDialog = window; +} + void CharHandler::setCharCreateDialog(CharCreateDialog *window) { - mCharSelectDialog = window ? window->getSelectDialog() : NULL; mCharCreateDialog = window; if (!mCharCreateDialog) return; diff --git a/src/net/tmwserv/charhandler.h b/src/net/tmwserv/charhandler.h index 5517bd17..03ea51dc 100644 --- a/src/net/tmwserv/charhandler.h +++ b/src/net/tmwserv/charhandler.h @@ -47,6 +47,8 @@ class CharHandler : public MessageHandler, public Net::CharHandler mCharInfo = charInfo; } + void setCharSelectDialog(CharSelectDialog *window); + /** * Sets the character create dialog. The handler will clean up this * dialog when a new character is succesfully created, and will unlock |