summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-03 01:55:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commitafb32d7896cf03603d15802bc237fc53f7681444 (patch)
tree124c32967659be8ff6f79007a2109481100be207 /src/net
parentc92bd42d51d305d64519d16d3f83c5412c34fe2e (diff)
downloadManaVerse-afb32d7896cf03603d15802bc237fc53f7681444.tar.gz
ManaVerse-afb32d7896cf03603d15802bc237fc53f7681444.tar.bz2
ManaVerse-afb32d7896cf03603d15802bc237fc53f7681444.tar.xz
ManaVerse-afb32d7896cf03603d15802bc237fc53f7681444.zip
eathena: impliment packet SMSG_QUEST_REMOVE 0x02b4.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/questhandler.cpp24
-rw-r--r--src/net/eathena/questhandler.h2
4 files changed, 28 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index b3a65f7fe..a4e64a408 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -96,7 +96,7 @@ int16_t packet_lengths[] =
0, 0, 0, 6, 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, -1, -1, 107, 0, -1, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, 107, 6, -1, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0,
// #0x02C0
0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 923d2ee9c..1a6d91d53 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -187,6 +187,7 @@
#define SMSG_QUEST_LIST 0x02b1
#define SMSG_QUEST_LIST_OBJECTIVES 0x02b2
#define SMSG_QUEST_UPDATE_OBJECTIVES 0x02b5
+#define SMSG_QUEST_REMOVE 0x02b4
#define SMSG_MVP 0x010c
diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp
index 3dee91b3f..3d6cde34f 100644
--- a/src/net/eathena/questhandler.cpp
+++ b/src/net/eathena/questhandler.cpp
@@ -41,6 +41,7 @@ QuestHandler::QuestHandler() :
SMSG_QUEST_LIST,
SMSG_QUEST_LIST_OBJECTIVES,
SMSG_QUEST_UPDATE_OBJECTIVES,
+ SMSG_QUEST_REMOVE,
0
};
handledMessages = _messages;
@@ -67,6 +68,10 @@ void QuestHandler::handleMessage(Net::MessageIn &msg)
processUpdateQuestsObjectives(msg);
break;
+ case SMSG_QUEST_REMOVE:
+ processRemoveQuest(msg);
+ break;
+
default:
break;
}
@@ -152,4 +157,23 @@ void QuestHandler::processUpdateQuestsObjectives(Net::MessageIn &msg)
}
}
+void QuestHandler::processRemoveQuest(Net::MessageIn &msg)
+{
+ const int var = msg.readInt32("quest id");
+ const int val = -1;
+
+ // not removing quest, because this is impossible,
+ // but changing status to -1
+ if (questsWindow)
+ {
+ questsWindow->updateQuest(var, val);
+ questsWindow->rebuild(true);
+ }
+ if (skillDialog)
+ {
+ skillDialog->updateQuest(var, val);
+ skillDialog->playUpdateEffect(var + SKILL_VAR_MIN_ID);
+ }
+}
+
} // namespace TmwAthena
diff --git a/src/net/eathena/questhandler.h b/src/net/eathena/questhandler.h
index a3782e75b..47b774ad7 100644
--- a/src/net/eathena/questhandler.h
+++ b/src/net/eathena/questhandler.h
@@ -43,6 +43,8 @@ class QuestHandler final : public MessageHandler
static void processAddQuestsObjectives(Net::MessageIn &msg);
static void processUpdateQuestsObjectives(Net::MessageIn &msg);
+
+ static void processRemoveQuest(Net::MessageIn &msg);
};
} // namespace EAthena