summaryrefslogtreecommitdiff
path: root/src/net/eathena/questhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/questhandler.cpp')
-rw-r--r--src/net/eathena/questhandler.cpp24
1 files changed, 24 insertions, 0 deletions
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