From a4ee70af007aca5a59a923454ed340cdb6d1e080 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 14 Oct 2015 15:51:23 +0300 Subject: Add option for show why player disappeared. Can be usefull for GM's. Located in settings / players / Log players actions (for GM) --- src/net/ea/beingrecv.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'src/net/ea/beingrecv.cpp') 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); } -- cgit v1.2.3-70-g09d2