summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-14 13:38:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-14 13:38:08 +0300
commit12ae270e892d8d7cef9813031e7359c93009ed02 (patch)
tree1803915e60cdf910d1bec5eeaf129d7d36f79710 /src
parentdc5e757b8ef36c1d3b083a67f4a55aead37b706c (diff)
downloadmanaplus-12ae270e892d8d7cef9813031e7359c93009ed02.tar.gz
manaplus-12ae270e892d8d7cef9813031e7359c93009ed02.tar.bz2
manaplus-12ae270e892d8d7cef9813031e7359c93009ed02.tar.xz
manaplus-12ae270e892d8d7cef9813031e7359c93009ed02.zip
eathena: add partial support for packet SMSG_QUEST_NPC_EFFECT 0x0446.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/questhandler.cpp16
-rw-r--r--src/net/eathena/questhandler.h2
4 files changed, 20 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index a818b5313..96f0f356a 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -132,7 +132,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 25,
// #0x0440
- 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index e6c0e18bc..ec141ab20 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -227,6 +227,7 @@
#define SMSG_QUEST_UPDATE_OBJECTIVES 0x02b5
#define SMSG_QUEST_REMOVE 0x02b4
#define SMSG_QUEST_ACTIVATE 0x02b7
+#define SMSG_QUEST_NPC_EFFECT 0x0446
#define SMSG_MVP 0x010c
#define SMSG_RANKS_LIST 0x097d
diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp
index 5c27cbe00..796663bde 100644
--- a/src/net/eathena/questhandler.cpp
+++ b/src/net/eathena/questhandler.cpp
@@ -45,6 +45,7 @@ QuestHandler::QuestHandler() :
SMSG_QUEST_UPDATE_OBJECTIVES,
SMSG_QUEST_REMOVE,
SMSG_QUEST_ACTIVATE,
+ SMSG_QUEST_NPC_EFFECT,
0
};
handledMessages = _messages;
@@ -80,6 +81,10 @@ void QuestHandler::handleMessage(Net::MessageIn &msg)
processActivateQuest(msg);
break;
+ case SMSG_QUEST_NPC_EFFECT:
+ processNpcQuestEffect(msg);
+ break;
+
default:
break;
}
@@ -194,6 +199,17 @@ void QuestHandler::processActivateQuest(Net::MessageIn &msg)
msg.readUInt8("activate");
}
+void QuestHandler::processNpcQuestEffect(Net::MessageIn &msg)
+{
+ // this packed mostly useless, because manaplus can show any
+ // kind of effects based on quest states.
+ msg.readInt32("npc id");
+ msg.readInt16("x");
+ msg.readInt16("y");
+ msg.readInt16("state");
+ msg.readInt16("color");
+}
+
void QuestHandler::setQeustActiveState(const int questId,
const bool active) const
{
diff --git a/src/net/eathena/questhandler.h b/src/net/eathena/questhandler.h
index a588e18ce..7185d0700 100644
--- a/src/net/eathena/questhandler.h
+++ b/src/net/eathena/questhandler.h
@@ -52,6 +52,8 @@ class QuestHandler final : public MessageHandler, public Net::QuestHandler
static void processRemoveQuest(Net::MessageIn &msg);
static void processActivateQuest(Net::MessageIn &msg);
+
+ static void processNpcQuestEffect(Net::MessageIn &msg);
};
} // namespace EAthena