diff options
Diffstat (limited to 'src/net/tmwserv/charhandler.cpp')
-rw-r--r-- | src/net/tmwserv/charhandler.cpp | 11 |
1 files changed, 9 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; |