aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorShinDarth <borzifrancesco@gmail.com>2014-10-18 13:05:47 +0200
committerShinDarth <borzifrancesco@gmail.com>2014-10-18 18:37:39 +0200
commite806fc8a02dbde324dd9654b0165a7cac5ae7086 (patch)
tree1eda6d5ec3adc207cbbdac6860ec20d63d7b5cb1 /src/server/scripts
parent2523b476190438e446f76c522efbdce329dd08bf (diff)
Core/Quest: implement Quest Tracker
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_quest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp
index dc75e0aedab..fb486128049 100644
--- a/src/server/scripts/Commands/cs_quest.cpp
+++ b/src/server/scripts/Commands/cs_quest.cpp
@@ -238,6 +238,17 @@ public:
if (ReqOrRewMoney < 0)
player->ModifyMoney(-ReqOrRewMoney);
+ if (sWorld->getBoolConfig(CONFIG_QUEST_ENABLE_QUEST_TRACKER)) // check if Quest Tracker is enabled
+ {
+ // prepare Quest Tracker datas
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_QUEST_TRACK_GM_COMPLETE);
+ stmt->setUInt32(0, quest->GetQuestId());
+ stmt->setUInt32(1, player->GetGUIDLow());
+
+ // add to Quest Tracker
+ CharacterDatabase.Execute(stmt);
+ }
+
player->CompleteQuest(entry);
return true;
}