summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/socialattacktab.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabs/socialattacktab.h')
-rw-r--r--src/gui/widgets/tabs/socialattacktab.h64
1 files changed, 10 insertions, 54 deletions
diff --git a/src/gui/widgets/tabs/socialattacktab.h b/src/gui/widgets/tabs/socialattacktab.h
index 0f902caaf..01921b016 100644
--- a/src/gui/widgets/tabs/socialattacktab.h
+++ b/src/gui/widgets/tabs/socialattacktab.h
@@ -23,65 +23,21 @@
#include "gui/widgets/tabs/socialtab.h"
+#include "actormanager.h"
+
+#include "being/localplayer.h"
+
+#include "gui/models/beingslistmodel.h"
+
+#include "gui/widgets/tabs/socialtabbase.h"
+
+#include "resources/map/mapitem.h"
+
#include "utils/delete2.h"
#include "utils/gettext.h"
#include "localconsts.h"
-class BeingsListModel;
-
-#define addAvatars(mob, str, type) \
-{\
- ava = new Avatar(str);\
- ava->setOnline(false);\
- ava->setLevel(-1);\
- ava->setType(MapItem::SEPARATOR);\
- ava->setX(0);\
- ava->setY(0);\
- avatars->push_back(ava);\
- mobs = actorManager->get##mob##s();\
- i = mobs.begin();\
- i_end = mobs.end();\
- while (i != i_end)\
- {\
- std::string name;\
- int level = -1;\
- if (*i == "")\
- {\
- name = _("(default)");\
- level = 0;\
- }\
- else\
- {\
- name = *i;\
- }\
- ava = new Avatar(name);\
- ava->setOnline(true);\
- ava->setLevel(level);\
- ava->setType(MapItem::type);\
- ava->setX(0);\
- ava->setY(0);\
- avatars->push_back(ava);\
- ++ i;\
- }\
-}
-
-#define updateAtkListStart() \
- if (!socialWindow || !player_node || !actorManager)\
- return;\
- std::vector<Avatar*> *const avatars = mBeings->getMembers();\
- std::vector<Avatar*>::iterator ia = avatars->begin();\
- while (ia != avatars->end())\
- {\
- delete *ia;\
- ++ ia;\
- }\
- avatars->clear();\
- Avatar *ava = nullptr;\
- std::list<std::string> mobs;\
- std::list<std::string>::const_iterator i;\
- std::list<std::string>::const_iterator i_end;
-
class SocialAttackTab final : public SocialTab
{
public: