diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-26 01:57:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-26 01:57:34 +0300 |
commit | 199aabc0a0af0bfd591b1d85b9a12e4cc383b1eb (patch) | |
tree | 937e065ee92d92babcfb51078b544e5363b72927 /src | |
parent | 248aa66d1065b99ae8b138ef7929f1573c56f79b (diff) | |
download | plus-199aabc0a0af0bfd591b1d85b9a12e4cc383b1eb.tar.gz plus-199aabc0a0af0bfd591b1d85b9a12e4cc383b1eb.tar.bz2 plus-199aabc0a0af0bfd591b1d85b9a12e4cc383b1eb.tar.xz plus-199aabc0a0af0bfd591b1d85b9a12e4cc383b1eb.zip |
Add packet SMSG_QUEST_LIST2 0x0b23.
Increase packet version to 20.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/network.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 1 | ||||
-rw-r--r-- | src/net/eathena/questrecv.cpp | 23 | ||||
-rw-r--r-- | src/net/eathena/questrecv.h | 1 |
4 files changed, 26 insertions, 1 deletions
diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h index ec8890cfc..494641e63 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 19 +#define CLIENT_PROTOCOL_VERSION 20 namespace EAthena { diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index d180a84a4..4e67ef2f0 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -823,6 +823,7 @@ if (serverVersion > 0) packet(SMSG_PLAYER_UPDATE_SKILL2, 0x0b20, -1, &SkillRecv::processSkillUpdate2, 0); packet(SMSG_WALK_ERROR, 0x0b21, 10, &PlayerRecv::processWalkError, 0); packet(SMSG_HOMUNCULUS_EXP, 0x0b22, 10, &HomunculusRecv::processHomunculusExp, 0); + packet(SMSG_QUEST_LIST2, 0x0b23, -1, &QuestRecv::processAddQuests2, 0); // char server packet(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0); diff --git a/src/net/eathena/questrecv.cpp b/src/net/eathena/questrecv.cpp index 206ed7798..dc2ed0c18 100644 --- a/src/net/eathena/questrecv.cpp +++ b/src/net/eathena/questrecv.cpp @@ -85,6 +85,29 @@ void QuestRecv::processAddQuests(Net::MessageIn &msg) questsWindow->rebuild(false); } +void QuestRecv::processAddQuests2(Net::MessageIn &msg) +{ + msg.readInt16("len"); + const int num = msg.readInt32("quests count"); + for (int f = 0; f < num; f ++) + { + const int var = msg.readInt32("quest id"); + msg.readUInt8("state"); + const int val = msg.readInt32("count1"); + // +++ need use all this fields + msg.readInt32("count2"); + msg.readInt32("count3"); + msg.readInt32("time"); + if (questsWindow) + questsWindow->updateQuest(var, val); + if (skillDialog) + skillDialog->updateQuest(var, val); + } + + if (questsWindow) + questsWindow->rebuild(false); +} + void QuestRecv::processAddQuestsObjectives(Net::MessageIn &msg) { msg.readInt16("len"); diff --git a/src/net/eathena/questrecv.h b/src/net/eathena/questrecv.h index 246bd4ddd..3c17010df 100644 --- a/src/net/eathena/questrecv.h +++ b/src/net/eathena/questrecv.h @@ -32,6 +32,7 @@ namespace EAthena { void processAddQuest(Net::MessageIn &msg); void processAddQuests(Net::MessageIn &msg); + void processAddQuests2(Net::MessageIn &msg); void processAddQuestsObjectives(Net::MessageIn &msg); void processUpdateQuestsObjectives(Net::MessageIn &msg); void processRemoveQuest(Net::MessageIn &msg); |