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
This commit is contained in:
Kudlaty
2009-05-22 17:43:14 +02:00
parent ab5b273d3c
commit 3bd9858417
6 changed files with 17 additions and 6 deletions

View File

@@ -499,7 +499,7 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
SpellClickInfoMap const& map = objmgr.mSpellClickInfoMap;
for(SpellClickInfoMap::const_iterator itr = map.lower_bound(unit->GetEntry()); itr != map.upper_bound(unit->GetEntry()); ++itr)
{
if(itr->second.questId == 0 || _player->GetQuestStatus(itr->second.questId) == QUEST_STATUS_INCOMPLETE)
if(itr->second.questId == 0 || _player->GetQuestStatus(itr->second.questId) == itr->second.questStatus)
{
Unit *caster = (itr->second.castFlags & 0x1) ? (Unit*)_player : (Unit*)unit;
Unit *target = (itr->second.castFlags & 0x2) ? (Unit*)_player : (Unit*)unit;