From 3bd98584170536d16cc7e09ee5e8921b9a3de9fb Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Fri, 22 May 2009 17:43:14 +0200 Subject: Add a column to npc_spellclick_spells table to check if quest is completed/rewarded or incompleted 1: completed or rewarded; 3: incompleted; default 3 --HG-- branch : trunk --- src/game/ObjectMgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/game/ObjectMgr.cpp') diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 02da82cb5fb..ca3b35a1cf3 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -6253,7 +6253,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() mSpellClickInfoMap.clear(); - QueryResult *result = WorldDatabase.Query("SELECT npc_entry, spell_id, quest_id, cast_flags FROM npc_spellclick_spells"); + QueryResult *result = WorldDatabase.Query("SELECT npc_entry, spell_id, quest_id, quest_status, cast_flags FROM npc_spellclick_spells"); if(!result) { @@ -6302,10 +6302,13 @@ void ObjectMgr::LoadNPCSpellClickSpells() } - uint8 castFlags = fields[3].GetUInt8(); + uint32 queststatus = fields[3].GetUInt32(); + + uint8 castFlags = fields[4].GetUInt8(); SpellClickInfo info; info.spellId = spellid; info.questId = quest; + info.questStatus = queststatus; info.castFlags = castFlags; mSpellClickInfoMap.insert(SpellClickInfoMap::value_type(npc_entry, info)); ++count; -- cgit v1.2.3