diff options
author | Przemysław Grzywacz <nexather@gmail.com> | 2013-05-07 17:45:26 +0200 |
---|---|---|
committer | Przemysław Grzywacz <nexather@gmail.com> | 2013-05-07 17:45:26 +0200 |
commit | 92c09d42b782deff9dcb9dcc6b408fdd36bc4f37 (patch) | |
tree | ba6fc1735e766e32bf3eb76531b8ea506b9bd241 /src/client.cpp | |
parent | bd1fdd87eed48ba3ffcc413936d6a6a60a429a97 (diff) | |
download | mana-92c09d42b782deff9dcb9dcc6b408fdd36bc4f37.tar.gz mana-92c09d42b782deff9dcb9dcc6b408fdd36bc4f37.tar.bz2 mana-92c09d42b782deff9dcb9dcc6b408fdd36bc4f37.tar.xz mana-92c09d42b782deff9dcb9dcc6b408fdd36bc4f37.zip |
items.xml can be used from settings.xml
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 24 |
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(); |