From 819ca8e9ea6ff86335ece1ada041fd4bf66dadd6 Mon Sep 17 00:00:00 2001 From: Poszer <41213210+poszer@users.noreply.github.com> Date: Fri, 5 Apr 2019 19:27:19 +0200 Subject: [PATCH] feat(Core/Commands): Quest Add (#1673) Do not allow to take same quest XX times. --- src/server/scripts/Commands/cs_quest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index cbfe15b6b..f40dc69e8 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -64,6 +64,12 @@ public: handler->SetSentErrorMessage(true); return false; } + + if (player->IsActiveQuest(entry)) + { + handler->PSendSysMessage("This quest is already active!"); + return false; + } // check item starting quest (it can work incorrectly if added without item in inventory) ItemTemplateContainer const* itc = sObjectMgr->GetItemTemplateStore();