summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-26 20:22:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-26 20:22:29 +0300
commitd3010ba93e3f30b4af2314434c21f114459b8ef7 (patch)
treeb9543202b56c239d48588fc4811bb0297a59a2a3 /src/net/eathena
parentb42dbb1ac4b05fc137ca3f18b4af43905ce5bcf0 (diff)
downloadplus-d3010ba93e3f30b4af2314434c21f114459b8ef7.tar.gz
plus-d3010ba93e3f30b4af2314434c21f114459b8ef7.tar.bz2
plus-d3010ba93e3f30b4af2314434c21f114459b8ef7.tar.xz
plus-d3010ba93e3f30b4af2314434c21f114459b8ef7.zip
Add packet SMSG_NPC_SKIN 0x0b1c.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/network.h2
-rw-r--r--src/net/eathena/npcrecv.cpp12
-rw-r--r--src/net/eathena/npcrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc1
4 files changed, 15 insertions, 1 deletions
diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h
index 006ad4a6e..708d80b12 100644
--- a/src/net/eathena/network.h
+++ b/src/net/eathena/network.h
@@ -29,7 +29,7 @@
* Protocol version, reported to the eAthena char and mapserver who can adjust
* the protocol accordingly.
*/
-#define CLIENT_PROTOCOL_VERSION 14
+#define CLIENT_PROTOCOL_VERSION 15
namespace EAthena
{
diff --git a/src/net/eathena/npcrecv.cpp b/src/net/eathena/npcrecv.cpp
index f6058e682..2c0fa6d2f 100644
--- a/src/net/eathena/npcrecv.cpp
+++ b/src/net/eathena/npcrecv.cpp
@@ -25,7 +25,10 @@
#include "being/being.h"
+#include "gui/windows/npcdialog.h"
+
#include "net/messagein.h"
+#include "net/npchandler.h"
#include "net/ea/npcrecv.h"
@@ -100,4 +103,13 @@ void NpcRecv::processProgressBarAbort(Net::MessageIn &msg)
UNIMPLIMENTEDPACKET;
}
+void NpcRecv::processNpcSkin(Net::MessageIn &msg)
+{
+ const int len = msg.readInt16("len");
+ npcHandler->getNpc(msg, NpcAction::Other);
+ const std::string skin = msg.readString(len - 8, "skin");
+ if (Ea::NpcRecv::mDialog)
+ Ea::NpcRecv::mDialog->setSkin(skin);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/npcrecv.h b/src/net/eathena/npcrecv.h
index ed2e2f670..cf25a36e6 100644
--- a/src/net/eathena/npcrecv.h
+++ b/src/net/eathena/npcrecv.h
@@ -37,6 +37,7 @@ namespace EAthena
void processArea(Net::MessageIn &msg);
void processShowDigit(Net::MessageIn &msg);
void processProgressBarAbort(Net::MessageIn &msg);
+ void processNpcSkin(Net::MessageIn &msg);
} // namespace NpcRecv
} // namespace EAthena
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index b1f785e95..7c35c31b1 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -260,6 +260,7 @@ packet(SMSG_NPC_SHOW_DIGIT, 0x01b1, 7, &NpcRecv::processShowDig
packet(SMSG_NPC_SHOW_PROGRESS_BAR, 0x02f0, 10, &NpcRecv::processNpcShowProgressBar);
packet(SMSG_NPC_STR_INPUT, 0x01d4, 6, &Ea::NpcRecv::processNpcStrInput);
packet(SMSG_NPC_VIEWPOINT, 0x0144, 23, &NpcRecv::processNpcViewPoint);
+packet(SMSG_NPC_SKIN, 0x0b1c, -1, &NpcRecv::processNpcSkin);
packet(SMSG_ONLINE_LIST, 0x0b10, -1, &PlayerRecv::processOnlineList);
packet(SMSG_PARTY_CREATE, 0x00fa, 3, &Ea::PartyRecv::processPartyCreate);
packet(SMSG_PARTY_INFO, 0x00fb, -1, &PartyRecv::processPartyInfo);