summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-27 20:54:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-27 20:54:14 +0300
commita86a068c3a5d97377deee915c93c5a29889f1a59 (patch)
tree63790d35acc1656808d60f1efb76a964f7d5e654 /src/net/eathena/playerrecv.cpp
parent9d583528aefbbdcfac9e6027aa162153cd5b6a05 (diff)
downloadmanaplus-a86a068c3a5d97377deee915c93c5a29889f1a59.tar.gz
manaplus-a86a068c3a5d97377deee915c93c5a29889f1a59.tar.bz2
manaplus-a86a068c3a5d97377deee915c93c5a29889f1a59.tar.xz
manaplus-a86a068c3a5d97377deee915c93c5a29889f1a59.zip
Add packet SMSG_PLAYER_KILLED_BY 0x0b1d.
Change protocol version to 17.
Diffstat (limited to 'src/net/eathena/playerrecv.cpp')
-rw-r--r--src/net/eathena/playerrecv.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index f7a6e637d..b58872712 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -22,6 +22,7 @@
#include "net/eathena/playerrecv.h"
+#include "actormanager.h"
#include "configuration.h"
#include "notifymanager.h"
#include "party.h"
@@ -37,9 +38,12 @@
#include "gui/windows/statuswindow.h"
#include "gui/windows/whoisonline.h"
-#include "net/messagein.h"
+#include "gui/widgets/tabs/chat/chattab.h"
#include "net/eathena/sp.h"
+#include "net/messagein.h"
+
+#include "utils/gettext.h"
#include "debug.h"
@@ -428,4 +432,28 @@ void PlayerRecv::processDressRoomOpen(Net::MessageIn &msg)
msg.readInt16("view");
}
+void PlayerRecv::processKilledBy(Net::MessageIn &msg)
+{
+ const BeingId id = msg.readBeingId("killer id");
+ Being *const dstBeing = actorManager->findBeing(id);
+ if (id == BeingId_zero)
+ {
+ debugMsg(strprintf(
+ // TRANSLATORS: player killed message
+ _("You were killed by unknown source.")));
+ }
+ else
+ {
+ std::string name;
+ if (dstBeing)
+ name = dstBeing->getName();
+ else
+ name = strprintf("?%u", CAST_U32(id));
+ debugMsg(strprintf(
+ // TRANSLATORS: player killed message
+ _("You were killed by %s."),
+ name.c_str()));
+ }
+}
+
} // namespace EAthena