Mercurial > wow > buffalo2
comparison ObjectiveTracker/ObjectiveTracker.lua @ 39:92534dc793f2
- restore the previous QuestLogSelection after pulling for selection-restricted quest data; fixes icon mixups while quest map is open
- moved progressbar builders into the schema environment, with all the other Frame.lua functions; prep for configuration access
- relegate the various removal events to a framescript in their corresponding blocks; this takes care of resolving dead frames
author | Nenue |
---|---|
date | Thu, 21 Apr 2016 16:43:37 -0400 |
parents | 1f8f9cc3d956 |
children | 03ed70f846de |
comparison
equal
deleted
inserted
replaced
38:1f8f9cc3d956 | 39:92534dc793f2 |
---|---|
262 T.orderedHandlers[index] = handler | 262 T.orderedHandlers[index] = handler |
263 return true | 263 return true |
264 end | 264 end |
265 | 265 |
266 local Event = {} | 266 local Event = {} |
267 | |
267 Event.QUEST_LOG_UPDATE = function() | 268 Event.QUEST_LOG_UPDATE = function() |
268 return OBJECTIVE_TRACKER_UPDATE_MODULE_QUEST + OBJECTIVE_TRACKER_UPDATE_MODULE_BONUS_OBJECTIVE | 269 return OBJECTIVE_TRACKER_UPDATE_QUEST |
269 end | 270 end |
270 local GetNumQuestWatches, AddQuestWatch, SetSuperTrackedQuestID = GetNumQuestWatches, AddQuestWatch, SetSuperTrackedQuestID | 271 local GetNumQuestWatches, AddQuestWatch, SetSuperTrackedQuestID = GetNumQuestWatches, AddQuestWatch, SetSuperTrackedQuestID |
271 Event.QUEST_ACCEPTED = function(questLogIndex, questID, added) | 272 Event.QUEST_ACCEPTED = function(questLogIndex, questID, added) |
272 if ( IsQuestTask(questID) ) then | 273 if ( IsQuestTask(questID) ) then |
273 return OBJECTIVE_TRACKER_UPDATE_QUEST_ADDED + OBJECTIVE_TRACKER_UPDATE_TASK_ADDED, questID, added | 274 return OBJECTIVE_TRACKER_UPDATE_QUEST_ADDED + OBJECTIVE_TRACKER_UPDATE_TASK_ADDED, questID, added |
274 else | 275 else |
275 return OBJECTIVE_TRACKER_UPDATE_QUEST_ADDED, questID, added | 276 return OBJECTIVE_TRACKER_UPDATE_QUEST_ADDED, questID, added |
276 end | 277 end |
277 AddQuestWatch(questID) | 278 AddQuestWatch(questID) |
278 end | |
279 | |
280 Event.QUEST_REMOVED = function(questLogIndex, questID) | |
281 return OBJECTIVE_TRACKER_UPDATE_QUEST, questID, false | |
282 end | 279 end |
283 | 280 |
284 Event.QUEST_WATCH_LIST_CHANGED = function(questID, added) | 281 Event.QUEST_WATCH_LIST_CHANGED = function(questID, added) |
285 if ( added == true ) then | 282 if ( added == true ) then |
286 if ( not IsQuestTask(questID) ) then | 283 if ( not IsQuestTask(questID) ) then |
375 ['AcknowledgeAutoAcceptQuest'] = 'AcknowledgeAutoAcceptQuest', | 372 ['AcknowledgeAutoAcceptQuest'] = 'AcknowledgeAutoAcceptQuest', |
376 ['AddAutoQuestPopUp'] = 'AddAutoQuestPopUp', | 373 ['AddAutoQuestPopUp'] = 'AddAutoQuestPopUp', |
377 ['RemoveAutoQuestPopUp'] = 'RemoveAutoQuestPopUp', | 374 ['RemoveAutoQuestPopUp'] = 'RemoveAutoQuestPopUp', |
378 ['AddTrackedAchievement'] = 'AddTrackedAchievement', | 375 ['AddTrackedAchievement'] = 'AddTrackedAchievement', |
379 ['RemoveTrackedAchievement'] = 'RemoveTrackedAchievement', | 376 ['RemoveTrackedAchievement'] = 'RemoveTrackedAchievement', |
380 ['SetSuperTrackedQuestID'] = 'SetSuperTrackedQuestID' | 377 ['SetSuperTrackedQuestID'] = 'SetSuperTrackedQuestID', |
378 ['SelectQuestLogEntry'] = 'SelectQuestLogEntry', | |
381 } | 379 } |
382 local VeneerData | 380 local VeneerData |
383 | 381 |
384 T.SetWatchMoney = function(watchMoney, reason) | 382 T.SetWatchMoney = function(watchMoney, reason) |
385 if watchMoney then | 383 if watchMoney then |
401 local numQuestChoices = GetNumQuestLogChoices(); | 399 local numQuestChoices = GetNumQuestLogChoices(); |
402 local skillName, skillIcon, skillPoints = GetQuestLogRewardSkillPoints(); | 400 local skillName, skillIcon, skillPoints = GetQuestLogRewardSkillPoints(); |
403 local xp = GetQuestLogRewardXP(); | 401 local xp = GetQuestLogRewardXP(); |
404 local playerTitle = GetQuestLogRewardTitle(); | 402 local playerTitle = GetQuestLogRewardTitle(); |
405 ProcessQuestLogRewardFactions(); | 403 ProcessQuestLogRewardFactions(); |
406 if previousSelection then | |
407 SelectQuestLogEntry(previousSelection) | |
408 end | |
409 | 404 |
410 local rewards = {} | 405 local rewards = {} |
411 local texture, name, isTradeskillSpell, isSpellLearned, hideSpellLearnText, isBoostSpell, garrFollowerID = GetQuestLogRewardSpell(questID) | 406 local texture, name, isTradeskillSpell, isSpellLearned, hideSpellLearnText, isBoostSpell, garrFollowerID = GetQuestLogRewardSpell(questID) |
412 if name then | 407 if name then |
413 tinsert(rewards,{ | 408 tinsert(rewards,{ |
414 type = 'spell', | 409 type = 'spell', |
415 name = name, | 410 name = name, |
416 texture = texture, | 411 texture = texture, |
417 }) | 412 }) |
413 end | |
414 if previousSelection then | |
415 SelectQuestLogEntry(previousSelection) | |
418 end | 416 end |
419 | 417 |
420 t.numCurrencies = GetNumQuestLogRewardCurrencies(questID) | 418 t.numCurrencies = GetNumQuestLogRewardCurrencies(questID) |
421 for i = 1, t.numCurrencies do | 419 for i = 1, t.numCurrencies do |
422 local name, texture, count = GetQuestLogRewardCurrencyInfo(i, questID) | 420 local name, texture, count = GetQuestLogRewardCurrencyInfo(i, questID) |