From 4ead5c9f65ffbf1de9b0cb60cae06b116badbced Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Feb 2011 22:15:55 +0200 Subject: Close npc and other dialogs if reconnecting. Also save extra layers if network error. --- src/client.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 251144654..3c1c2054d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -39,6 +39,8 @@ #include "statuseffect.h" #include "units.h" +#include "gui/buy.h" +#include "gui/buysell.h" #include "gui/changeemaildialog.h" #include "gui/changepassworddialog.h" #include "gui/charselectdialog.h" @@ -48,6 +50,8 @@ #include "gui/okdialog.h" #include "gui/quitdialog.h" #include "gui/register.h" +#include "gui/npcdialog.h" +#include "gui/sell.h" #include "gui/sdlinput.h" #include "gui/serverdialog.h" #include "gui/setup.h" @@ -67,6 +71,7 @@ #include "net/logindata.h" #include "net/loginhandler.h" #include "net/net.h" +#include "net/npchandler.h" #include "net/packetcounters.h" #include "net/worldinfo.h" @@ -1999,3 +2004,12 @@ void Client::setFramerate(int fpsLimit) SDL_setFramerate(&instance()->mFpsManager, fpsLimit); } + +void Client::closeDialogs() +{ + Net::getNpcHandler()->clearDialogs(); + BuyDialog::closeAll(); + BuySellDialog::closeAll(); + NpcDialog::closeAll(); + SellDialog::closeAll(); +} \ No newline at end of file -- cgit v1.2.3-70-g09d2