summaryrefslogtreecommitdiff
path: root/src/net/tmwa/generalhandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-05-02 10:10:37 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-05-02 10:11:19 +0200
commit679d830d0ba6ecbcd698b1ff2625144d08314b9e (patch)
tree24e5c1ea5fa6f11165d726cd345726fd3dae8fdd /src/net/tmwa/generalhandler.cpp
parent35108f09f64835a8d02c5bfb2ec62426ab83bd59 (diff)
parenta6b11834f227b8edbfb39633380806480fd2a2c5 (diff)
downloadmana-client-679d830d0ba6ecbcd698b1ff2625144d08314b9e.tar.gz
mana-client-679d830d0ba6ecbcd698b1ff2625144d08314b9e.tar.bz2
mana-client-679d830d0ba6ecbcd698b1ff2625144d08314b9e.tar.xz
mana-client-679d830d0ba6ecbcd698b1ff2625144d08314b9e.zip
Merge branch 'master' into lpc2012
This merge reverts change 3b22c2cf170c877904dcef5a4af03ac360bd0581. Conflicts: src/gui/charcreatedialog.cpp src/net/manaserv/manaserv_protocol.h
Diffstat (limited to 'src/net/tmwa/generalhandler.cpp')
-rw-r--r--src/net/tmwa/generalhandler.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 6c2bcddb..0ce16691 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -1,7 +1,7 @@
/*
* The Mana Client
* Copyright (C) 2009 The Mana World Development Team
- * Copyright (C) 2009-2012 The Mana Developers
+ * Copyright (C) 2009-2013 The Mana Developers
*
* This file is part of The Mana Client.
*
@@ -57,11 +57,11 @@
#include "net/tmwa/gui/guildtab.h"
#include "net/tmwa/gui/partytab.h"
+#include "resources/attributes.h"
#include "resources/itemdb.h"
#include "utils/gettext.h"
-#include <assert.h>
#include <list>
extern Net::GeneralHandler *generalHandler;
@@ -108,6 +108,7 @@ GeneralHandler::GeneralHandler():
setStatsList(stats);
+ listen(Event::ClientChannel);
listen(Event::GameChannel);
}
@@ -185,12 +186,17 @@ void GeneralHandler::reload()
static_cast<LoginHandler*>(mLoginHandler.get())->clearWorlds();
static_cast<CharServerHandler*>(mCharHandler.get())->setCharCreateDialog(0);
static_cast<CharServerHandler*>(mCharHandler.get())->setCharSelectDialog(0);
+
+ Attributes::unload();
+ Attributes::load();
}
void GeneralHandler::unload()
{
if (mNetwork)
mNetwork->clearHandlers();
+
+ Attributes::unload();
}
void GeneralHandler::flushNetwork()
@@ -220,7 +226,14 @@ void GeneralHandler::clearHandlers()
void GeneralHandler::event(Event::Channel channel,
const Event &event)
{
- if (channel == Event::GameChannel)
+ if (channel == Event::ClientChannel)
+ {
+ if (event.getType() == Event::LoadingDatabases)
+ {
+ Attributes::load();
+ }
+ }
+ else if (channel == Event::GameChannel)
{
if (event.getType() == Event::GuiWindowsLoaded)
{