diff options
-rw-r--r-- | src/net/eathena/packetsin.inc | 1 | ||||
-rw-r--r-- | src/net/eathena/questrecv.cpp | 22 | ||||
-rw-r--r-- | src/net/eathena/questrecv.h | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 4e67ef2f0..03495f4b5 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -824,6 +824,7 @@ if (serverVersion > 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); + packet(SMSG_QUEST_ADD2, 0x0b24, 23, &QuestRecv::processAddQuest2, 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 dc2ed0c18..ca5f706e8 100644 --- a/src/net/eathena/questrecv.cpp +++ b/src/net/eathena/questrecv.cpp @@ -61,6 +61,28 @@ void QuestRecv::processAddQuest(Net::MessageIn &msg) } } +void QuestRecv::processAddQuest2(Net::MessageIn &msg) +{ + 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); + questsWindow->rebuild(true); + } + if (skillDialog) + { + skillDialog->updateQuest(var, val); + skillDialog->playUpdateEffect(var + SKILL_VAR_MIN_ID); + } +} + void QuestRecv::processAddQuests(Net::MessageIn &msg) { msg.readInt16("len"); diff --git a/src/net/eathena/questrecv.h b/src/net/eathena/questrecv.h index 3c17010df..4db7cff50 100644 --- a/src/net/eathena/questrecv.h +++ b/src/net/eathena/questrecv.h @@ -31,6 +31,7 @@ namespace EAthena namespace QuestRecv { void processAddQuest(Net::MessageIn &msg); + void processAddQuest2(Net::MessageIn &msg); void processAddQuests(Net::MessageIn &msg); void processAddQuests2(Net::MessageIn &msg); void processAddQuestsObjectives(Net::MessageIn &msg); |