summaryrefslogtreecommitdiff
path: root/src/net/ea/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-14 15:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-14 15:51:23 +0300
commita4ee70af007aca5a59a923454ed340cdb6d1e080 (patch)
treeece6e48e91962ca807d1671766dfcce80f8cc28b /src/net/ea/beingrecv.cpp
parent4ba35c456af28479b547f2ab2c0bd02c40c292f6 (diff)
downloadplus-a4ee70af007aca5a59a923454ed340cdb6d1e080.tar.gz
plus-a4ee70af007aca5a59a923454ed340cdb6d1e080.tar.bz2
plus-a4ee70af007aca5a59a923454ed340cdb6d1e080.tar.xz
plus-a4ee70af007aca5a59a923454ed340cdb6d1e080.zip
Add option for show why player disappeared. Can be usefull for GM's.
Located in settings / players / Log players actions (for GM)
Diffstat (limited to 'src/net/ea/beingrecv.cpp')
-rw-r--r--src/net/ea/beingrecv.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp
index f09979e58..cfae77247 100644
--- a/src/net/ea/beingrecv.cpp
+++ b/src/net/ea/beingrecv.cpp
@@ -23,13 +23,17 @@
#include "net/ea/beingrecv.h"
#include "actormanager.h"
+#include "configuration.h"
#include "game.h"
+#include "notifymanager.h"
#include "party.h"
#include "being/localplayer.h"
#include "being/playerrelation.h"
#include "being/playerrelations.h"
+#include "enums/resources/notifytypes.h"
+
#include "enums/resources/map/mapitemtype.h"
#include "gui/viewport.h"
@@ -100,6 +104,40 @@ void BeingRecv::processBeingRemove(Net::MessageIn &msg)
{
if (socialWindow)
socialWindow->updateActiveList();
+ const std::string name = dstBeing->getName();
+ if (!name.empty() && config.getBoolValue("logPlayerActions"))
+ {
+ switch (type)
+ {
+ case 0:
+ break;
+ case 1:
+ NotifyManager::notify(
+ NotifyTypes::BEING_REMOVE_DIED,
+ name);
+ break;
+ case 2:
+ NotifyManager::notify(
+ NotifyTypes::BEING_REMOVE_LOGGED_OUT,
+ name);
+ break;
+ case 3:
+ NotifyManager::notify(
+ NotifyTypes::BEING_REMOVE_WARPED,
+ name);
+ break;
+ case 4:
+ NotifyManager::notify(
+ NotifyTypes::BEING_REMOVE_TRICK_DEAD,
+ name);
+ break;
+ default:
+ NotifyManager::notify(
+ NotifyTypes::BEING_REMOVE_UNKNOWN,
+ name);
+ break;
+ }
+ }
}
actorManager->destroy(dstBeing);
}