summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 0d2c4bca..6b8ebca1 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -761,13 +761,12 @@ int Client::exec()
// TODO remove this as soon as inventoryhandler stops using this event
Event::trigger(Event::ClientChannel, Event::LoadingDatabases);
- // load game settings
-
-
// Load XML databases
- SettingsManager::load();
-
CharDB::load();
+
+ if (itemDb)
+ delete itemDb;
+
switch (Net::getNetworkType())
{
case ServerInfo::TMWATHENA:
@@ -781,17 +780,10 @@ int Client::exec()
itemDb = 0;
break;
}
- if (!itemDb || !itemDb->isLoaded())
- {
- // Warn and return to login screen
- errorMessage =
- _("This server is missing needed world data. "
- "Please contact the administrator(s).");
- showOkDialog(_("ItemDB: Error while loading "
- ITEMS_DB_FILE "!"), errorMessage,
- STATE_CHOOSE_SERVER);
- break;
- }
+ assert(itemDb);
+
+ // load settings.xml
+ SettingsManager::load();
ActorSprite::load();