summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-13 06:11:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-13 06:31:58 +0300
commitbc6e0ea4d7042ad48164b8bad69bff02ca5f8a5a (patch)
treea378ebc4970084cbc7539a0a457431876c451333 /src/gui
parentb24a71e73815ef3196456c8697150443aa58d8df (diff)
downloadmanaplus-bc6e0ea4d7042ad48164b8bad69bff02ca5f8a5a.tar.gz
manaplus-bc6e0ea4d7042ad48164b8bad69bff02ca5f8a5a.tar.bz2
manaplus-bc6e0ea4d7042ad48164b8bad69bff02ca5f8a5a.tar.xz
manaplus-bc6e0ea4d7042ad48164b8bad69bff02ca5f8a5a.zip
Show enemy relation in online list.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/whoisonline.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index ead38f42b..e0fa4ebcf 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -198,6 +198,7 @@ void WhoIsOnline::loadList()
std::vector<std::string> friends;
std::vector<std::string> neutral;
std::vector<std::string> disregard;
+ std::vector<std::string> enemy;
// Tokenize and add each line separately
char *line = strtok(mMemoryBuffer, "\n");
@@ -270,6 +271,7 @@ void WhoIsOnline::loadList()
switch (player_relations.getRelation(nick))
{
case PlayerRelation::NEUTRAL:
+ default:
neutral.push_back(prepareNick(nick, level, "0"));
break;
@@ -282,9 +284,12 @@ void WhoIsOnline::loadList()
disregard.push_back(prepareNick(nick, level, "8"));
break;
+ case PlayerRelation::ENEMY2:
+ enemy.push_back(prepareNick(nick, level, "1"));
+ break;
+
case PlayerRelation::IGNORED:
case PlayerRelation::ERASED:
- default:
//Ignore the ignored.
break;
}
@@ -316,6 +321,16 @@ void WhoIsOnline::loadList()
mBrowserBox->addRow("---");
addedFromSection = false;
}
+ for (int i = 0; i < static_cast<int>(enemy.size()); i++)
+ {
+ mBrowserBox->addRow(enemy.at(i));
+ addedFromSection = true;
+ }
+ if (addedFromSection == true)
+ {
+ mBrowserBox->addRow("---");
+ addedFromSection = false;
+ }
for (int i = 0; i < static_cast<int>(neutral.size()); i++)
{
mBrowserBox->addRow(neutral.at(i));