diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-26 21:56:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-26 21:56:11 +0300 |
commit | 8f10444e4ce4a4e25455f0a3857edc7ca74631e8 (patch) | |
tree | 7917730822f7bc090adc6af482eab843c79a389c /src/gui/socialwindow.cpp | |
parent | 110134603554e06adab93a132ef8f82e55db68ad (diff) | |
download | plus-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.tar.gz plus-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.tar.bz2 plus-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.tar.xz plus-8f10444e4ce4a4e25455f0a3857edc7ca74631e8.zip |
Impliment 3 attack lists. (priority, attack, ignore)
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r-- | src/gui/socialwindow.cpp | 43 |
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); |