diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-13 23:54:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-13 23:54:06 +0300 |
commit | 6065690856ffc750404c9c0940d9a1f3a0cdd42c (patch) | |
tree | 5c9982c794c5631a967436032f9a6d55a0dacd08 /src/net/ea | |
parent | 424ed0b25065cc5ecc4b8464db2581a03189ef60 (diff) | |
download | manaplus-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')
-rw-r--r-- | src/net/ea/guildhandler.cpp | 9 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 1 |
2 files changed, 10 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 diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index a8233bbf6..819b2f133 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -142,6 +142,7 @@ void PartyHandler::processPartyInfo(Net::MessageIn &msg) const { player_node->setParty(Ea::taParty); player_node->setPartyName(Ea::taParty->getName()); + socialWindow->updateParty(); } } |