diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-09-13 14:59:08 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-09-13 15:06:59 -0600 |
commit | 993e746249ea0dddcfc5edcbe9a4e2fb61f839e6 (patch) | |
tree | c0bab2438a3fbe41155b4d8932f17dbba30d8b3c /src/net | |
parent | 3483d51f703bc2ce2ebf71335225bb6e8c9db99c (diff) | |
download | mana-993e746249ea0dddcfc5edcbe9a4e2fb61f839e6.tar.gz mana-993e746249ea0dddcfc5edcbe9a4e2fb61f839e6.tar.bz2 mana-993e746249ea0dddcfc5edcbe9a4e2fb61f839e6.tar.xz mana-993e746249ea0dddcfc5edcbe9a4e2fb61f839e6.zip |
Fix loading of manaserv's attributes file
Reviewed-by: Bertram
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/manaserv/generalhandler.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp index f4982173..2858d16f 100644 --- a/src/net/manaserv/generalhandler.cpp +++ b/src/net/manaserv/generalhandler.cpp @@ -176,14 +176,17 @@ void GeneralHandler::event(const std::string &channel, { if (channel == "Client") { - int newState = event.getInt("newState"); - - if (newState == STATE_GAME) + if (event.getName() == "StatChange") { - GameHandler *game = static_cast<GameHandler*>(Net::getGameHandler()); - game->gameLoading(); + int newState = event.getInt("newState"); + + if (newState == STATE_GAME) + { + GameHandler *game = static_cast<GameHandler*>(Net::getGameHandler()); + game->gameLoading(); + } } - else if (newState == STATE_LOAD_DATA) + else if (event.getName() == "DBsLoading") { Attributes::load(); Attributes::informItemDB(); |