summaryrefslogtreecommitdiff
path: root/src/gui/socialwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-26 21:56:11 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-26 21:56:11 +0300
commit8f10444e4ce4a4e25455f0a3857edc7ca74631e8 (patch)
tree7917730822f7bc090adc6af482eab843c79a389c /src/gui/socialwindow.cpp
parent110134603554e06adab93a132ef8f82e55db68ad (diff)
downloadmv-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.tar.gz
mv-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.tar.bz2
mv-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.tar.xz
mv-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.zip
Impliment 3 attack lists. (priority, attack, ignore)
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r--src/gui/socialwindow.cpp43
1 files changed, 39 insertions, 4 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index c6ec12cd8..d25ca209d 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -808,7 +808,7 @@ public:
std::vector<Avatar*> *avatars = mBeings->getMembers();
- std::list<std::string> mobs = player_node->getAttackMobs();
+ std::list<std::string> mobs = player_node->getPriorityAttackMobs();
std::list<std::string>::iterator i = mobs.begin();
std::vector<Avatar*>::iterator ia = avatars->begin();
@@ -820,7 +820,7 @@ public:
}
avatars->clear();
- Avatar *ava = new Avatar(_("Selected mobs"));
+ Avatar *ava = new Avatar(_("Priority mobs"));
ava->setOnline(false);
ava->setLevel(-1);
ava->setType(MapItem::SEPARATOR);
@@ -844,7 +844,42 @@ public:
Avatar *ava = new Avatar(name);
ava->setOnline(true);
ava->setLevel(level);
- ava->setType(MapItem::MONSTER);
+ ava->setType(MapItem::PRIORITY);
+ ava->setX(0);
+ ava->setY(0);
+ avatars->push_back(ava);
+
+ ++ i;
+ }
+
+ ava = new Avatar(_("Attack mobs"));
+ ava->setOnline(false);
+ ava->setLevel(-1);
+ ava->setType(MapItem::SEPARATOR);
+ ava->setX(0);
+ ava->setY(0);
+ avatars->push_back(ava);
+
+ mobs = player_node->getAttackMobs();
+ i = mobs.begin();
+
+ while (i != mobs.end())
+ {
+ std::string name;
+ int level = -1;
+ if (*i == "")
+ {
+ name = _("(default)");
+ level = 0;
+ }
+ else
+ {
+ name = *i;
+ }
+ Avatar *ava = new Avatar(name);
+ ava->setOnline(true);
+ ava->setLevel(level);
+ ava->setType(MapItem::ATTACK);
ava->setX(0);
ava->setY(0);
avatars->push_back(ava);
@@ -879,7 +914,7 @@ public:
Avatar *ava = new Avatar(name);
ava->setOnline(false);
ava->setLevel(level);
- ava->setType(MapItem::MONSTER);
+ ava->setType(MapItem::IGNORE);
ava->setX(0);
ava->setY(0);
avatars->push_back(ava);