From 62da739fc73e269959bbbe8a6b741f50c5e82238 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 5 Sep 2011 02:14:07 +0300 Subject: Fix guild tab removing after receive some packets. --- src/net/tmwa/beinghandler.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index ce2db733f..c087ab43d 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -27,6 +27,7 @@ #include "client.h" #include "effectmanager.h" #include "guild.h" +#include "guildmanager.h" #include "keyboardconfig.h" #include "localplayer.h" #include "logger.h" @@ -505,10 +506,17 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType) guild = msg.readInt32(); // guild - if (guild == 0) - dstBeing->clearGuilds(); - else - dstBeing->setGuild(Guild::getGuild(static_cast(guild))); + if (!guildManager || !GuildManager::getEnableGuildBot()) + { + if (guild == 0) + { + dstBeing->clearGuilds(); + } + else + { + dstBeing->setGuild(Guild::getGuild(static_cast(guild))); + } + } msg.readInt16(); // emblem msg.readInt16(); // manner -- cgit v1.2.3-70-g09d2