Mercurial > wow > buffalo2
diff ObjectiveTracker/QuestData.lua @ 45:dd1ae565f559
Hooks and Handlers:
- correct argument mix-ups for AcceptQuest/QUEST_ACCEPTED handlers; fixes auto-watch
- respond to AcknowledgeAutoAcceptQuest; fixes lingering popups
- include Popup and Quest trackers in the response code for CompleteQuest; fixes content artifacts following the rollover of repeating popups seen in Ashran
- clean up wacky OnEvent header
Layout
- add alpha blend options
QuestData
- reset objectives data when a quest is in a completed state; keeps old data from ever reaching the Default.x code
author | Nenue |
---|---|
date | Tue, 26 Apr 2016 14:57:18 -0400 |
parents | 756e8aeb040b |
children | aa693607b813 |
line wrap: on
line diff
--- a/ObjectiveTracker/QuestData.lua Mon Apr 25 19:37:13 2016 -0400 +++ b/ObjectiveTracker/QuestData.lua Tue Apr 26 14:57:18 2016 -0400 @@ -53,9 +53,15 @@ block_schema = 'weekly' end local completionText - if info.isComplete then + + if info.isAutoComplete and info.isComplete then + displayObjectives = false + info.numObjectives = 1 + self:AddLine(block, info.completionText, nil, 'complete') + elseif info.isComplete then if T.Conf.ShowCompletionText then self:AddLine(block, info.completionText, nil, 'complete') + displayObjectives = false end if not T.Conf.ShowObjectivesWhenComplete then displayObjectives = false @@ -64,6 +70,7 @@ block_schema = 'complete' end + Default.UpdateObjectives(self, block, block_schema, displayObjectives) return 0, block_schema end @@ -166,16 +173,20 @@ for index, block in ipairs(self.usedBlocks) do local logIndex = GetQuestLogIndexByID(block.info.questID, 'player') - print('GetNumWatched', '|cFFFF4400'.. index, (block and block:GetName() or '|cFFFF0000-|r'), logIndex or '|cFF444444-|r') -- animating blocks have been evaluated if not block.isAnimating then if not logIndex then self:ClearBlock(block) - print('GetNumWatched', 'trim dropped quest', block:GetName()) + print('GetNumWatched', '|cFF44FF00'.. index, (block and block:GetName() or '|cFFFF0000-|r'), '(trim not active)') elseif not IsQuestWatched(block.info.logIndex) then self:ClearBlock(block) - print('GetNumWatched', 'trim untracked quest', block:GetName()) + print('GetNumWatched', '|cFFFF4400'.. index, (block and block:GetName() or '|cFFFF0000-|r'), '(trim non-watched)') + else + print('GetNumWatched', '|cFF0088FF'.. index, (block and block:GetName() or '|cFFFF0000-|r'), logIndex or '|cFF444444-|r') end + else + + print('GetNumWatched', '|cFF00FFFF'.. index, (block and block:GetName() or '|cFFFF0000-|r'), ' (animating)') end end @@ -266,7 +277,6 @@ if ( isComplete ) then temp_status = 'COMPLETED_OBJECTIVES' --objectives = Quest.GetObjectives(logIndex, numObjectives, true, isSequenced, isStory) - q.objectives = objectives if ( isAutoComplete ) then temp_status = 'AUTOCOMPLETE_OBJECTIVES' completionText = _G.QUEST_WATCH_CLICK_TO_COMPLETE @@ -279,6 +289,9 @@ completionText = _G.QUEST_WATCH_QUEST_READY end end + if not T.Conf.ShowObjectivesWhenComplete then + q.objectives = {} + end elseif ( questFailed ) then temp_status = 'FAILED' -- Case 2: failed quest