summaryrefslogtreecommitdiff
path: root/src/net/ea/guildhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-13 23:54:06 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-13 23:54:06 +0300
commit6065690856ffc750404c9c0940d9a1f3a0cdd42c (patch)
tree5c9982c794c5631a967436032f9a6d55a0dacd08 /src/net/ea/guildhandler.cpp
parent424ed0b25065cc5ecc4b8464db2581a03189ef60 (diff)
downloadmanaplus-6065690856ffc750404c9c0940d9a1f3a0cdd42c.tar.gz
manaplus-6065690856ffc750404c9c0940d9a1f3a0cdd42c.tar.bz2
manaplus-6065690856ffc750404c9c0940d9a1f3a0cdd42c.tar.xz
manaplus-6065690856ffc750404c9c0940d9a1f3a0cdd42c.zip
Add player/item/other counter in social window.
Diffstat (limited to 'src/net/ea/guildhandler.cpp')
-rw-r--r--src/net/ea/guildhandler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index b2a78f7da..e19b44592 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -145,6 +145,8 @@ void GuildHandler::processGuildMemberLogin(Net::MessageIn &msg) const
m->setOnline(online);
if (guildTab)
guildTab->showOnline(m->getName(), online);
+ if (socialWindow)
+ socialWindow->updateGuildCounter();
}
}
}
@@ -234,6 +236,8 @@ void GuildHandler::processGuildMemberList(Net::MessageIn &msg) const
taGuild->clearMembers();
+ int onlineNum = 0;
+ int totalNum = 0;
for (int i = 0; i < count; i++)
{
const int id = msg.readInt32(); // Account ID
@@ -274,6 +278,9 @@ void GuildHandler::processGuildMemberList(Net::MessageIn &msg) const
}
}
}
+ if (online)
+ onlineNum ++;
+ totalNum ++;
}
}
taGuild->sort();
@@ -282,6 +289,8 @@ void GuildHandler::processGuildMemberList(Net::MessageIn &msg) const
actorSpriteManager->updatePlayerGuild();
actorSpriteManager->updatePlayerColors();
}
+ if (socialWindow)
+ socialWindow->updateGuildCounter(onlineNum, totalNum);
}
void GuildHandler::processGuildPosNameList(Net::MessageIn &msg) const