summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-28 23:25:26 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-28 23:25:26 +0300
commit8002c6f3844e637e246d0bd96dd6253ac91324a3 (patch)
tree651052ce27eedbf4162d4031a2237f0b1c916ae1
parent09eb9b1ca997c3a6489f37bdaa3c590aeeb1501b (diff)
downloadplus-8002c6f3844e637e246d0bd96dd6253ac91324a3.tar.gz
plus-8002c6f3844e637e246d0bd96dd6253ac91324a3.tar.bz2
plus-8002c6f3844e637e246d0bd96dd6253ac91324a3.tar.xz
plus-8002c6f3844e637e246d0bd96dd6253ac91324a3.zip
Fixed invite to guild/kick from guild.
Update visible players guild statuses.
-rw-r--r--src/gui/popupmenu.cpp11
-rw-r--r--src/guildmanager.cpp17
2 files changed, 27 insertions, 1 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index a3041fcf7..6db4a408f 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -233,6 +233,17 @@ void PopupMenu::showPopup(int x, int y, Being *being)
}
}
}
+ else if (guild2->getMember(mNick))
+ {
+ mBrowserBox->addRow(strprintf(
+ "@@guild-kick|%s@@", _("Kick from guild")));
+ if (guild2->getServerGuild())
+ {
+ mBrowserBox->addRow(strprintf(
+ "@@guild-pos|%s >@@",
+ _("Change pos in guild")));
+ }
+ }
else
{
if (guild2->getServerGuild()
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 1ce8b9a74..77324e67e 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -161,9 +161,12 @@ void GuildManager::updateList()
i ++;
}
guild->sort();
+ createTab(guild);
if (actorSpriteManager)
+ {
actorSpriteManager->updatePlayerGuild();
- createTab(guild);
+ actorSpriteManager->updatePlayerColors();
+ }
}
mTempList.clear();
mGotInfo = true;
@@ -346,7 +349,11 @@ bool GuildManager::process(std::string msg)
msg, Being::PLAYER);
if (b)
+ {
b->clearGuilds();
+ b->setGuildName("");
+ b->updateColors();
+ }
}
guild->removeMember(msg);
@@ -443,6 +450,11 @@ bool GuildManager::afterRemove()
return false;
guild->removeFromMembers();
guild->clearMembers();
+ if (player_node)
+ {
+ player_node->setGuildName("");
+ player_node->clearGuilds();
+ }
SERVER_NOTICE(_("You have left the guild."))
delete mTab;
mTab = 0;
@@ -450,7 +462,10 @@ bool GuildManager::afterRemove()
if (socialWindow)
socialWindow->removeTab(guild);
if (actorSpriteManager)
+ {
+ actorSpriteManager->updatePlayerGuild();
actorSpriteManager->updatePlayerColors();
+ }
reload();
return true;
}