From cff9f1947bac8fa49aaf6f846a6e4335a439ac2e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 4 Oct 2009 12:27:07 -0600 Subject: Add ability to delect characters from account --- src/net/tmwserv/charhandler.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/net/tmwserv/charhandler.cpp') 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; -- cgit v1.2.3-70-g09d2