summaryrefslogtreecommitdiff
path: root/src/net/ea/guildhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-07 16:07:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-07 16:14:32 +0300
commit7859c4315e8c59ebeef3b6b030f921badd542f09 (patch)
tree69986384245e2bb7f8b21da816ea8978475f6fd7 /src/net/ea/guildhandler.cpp
parent629aa611136745eba65dbae6ed8762c133161894 (diff)
downloadmanaplus-7859c4315e8c59ebeef3b6b030f921badd542f09.tar.gz
manaplus-7859c4315e8c59ebeef3b6b030f921badd542f09.tar.bz2
manaplus-7859c4315e8c59ebeef3b6b030f921badd542f09.tar.xz
manaplus-7859c4315e8c59ebeef3b6b030f921badd542f09.zip
Move processGuildExpulsion from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/ea/guildhandler.cpp')
-rw-r--r--src/net/ea/guildhandler.cpp82
1 files changed, 39 insertions, 43 deletions
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 2364cfa9a..0cc03d805 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -448,49 +448,6 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) const
}
}
-void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const
-{
- msg.skip(2); // size (can be many explusions in list)
- const std::string nick = msg.readString(24); // Name (of expulsed?)
- msg.skip(24); // acc
- msg.readString(44); // Message
- if (taGuild)
- taGuild->removeMember(nick);
-
- if (!localPlayer)
- return;
-
- if (nick == localPlayer->getName())
- {
- if (taGuild)
- {
- taGuild->removeFromMembers();
- taGuild->clearMembers();
- }
- NotifyManager::notify(NotifyTypes::GUILD_KICKED);
- delete2(guildTab)
-
- if (socialWindow && taGuild)
- socialWindow->removeTab(taGuild);
- if (actorManager)
- actorManager->updatePlayerColors();
- }
- else
- {
- NotifyManager::notify(NotifyTypes::GUILD_USER_KICKED, nick);
- if (actorManager)
- {
- Being *const b = actorManager->findBeingByName(
- nick, ActorType::Player);
-
- if (b)
- b->clearGuilds();
- if (taGuild)
- taGuild->removeMember(nick);
- }
- }
-}
-
void GuildHandler::processGuildExpulsionList(Net::MessageIn &msg) const
{
const int length = msg.readInt16();
@@ -577,4 +534,43 @@ ChatTab *GuildHandler::getTab() const
return guildTab;
}
+void GuildHandler::processGuildExpulsionContinue(const std::string &nick) const
+{
+ if (taGuild)
+ taGuild->removeMember(nick);
+
+ if (!localPlayer)
+ return;
+
+ if (nick == localPlayer->getName())
+ {
+ if (taGuild)
+ {
+ taGuild->removeFromMembers();
+ taGuild->clearMembers();
+ }
+ NotifyManager::notify(NotifyTypes::GUILD_KICKED);
+ delete2(guildTab)
+
+ if (socialWindow && taGuild)
+ socialWindow->removeTab(taGuild);
+ if (actorManager)
+ actorManager->updatePlayerColors();
+ }
+ else
+ {
+ NotifyManager::notify(NotifyTypes::GUILD_USER_KICKED, nick);
+ if (actorManager)
+ {
+ Being *const b = actorManager->findBeingByName(
+ nick, ActorType::Player);
+
+ if (b)
+ b->clearGuilds();
+ if (taGuild)
+ taGuild->removeMember(nick);
+ }
+ }
+}
+
} // namespace Ea