Mercurial > wow > buffalo2
comparison ObjectiveTracker/Quests.lua @ 35:69d03f8e293e
- separated layout and data logic between Frame.lua and Update.lua
- solved disappearing tracker mystery
author | Nenue |
---|---|
date | Sun, 17 Apr 2016 11:07:48 -0400 |
parents | 9856ebc63fa4 |
children | e84d645c8ab8 |
comparison
equal
deleted
inserted
replaced
34:9856ebc63fa4 | 35:69d03f8e293e |
---|---|
103 failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) | 103 failureTime, timeElapsed, questType, isTask, isStory, isOnMap, hasLocalPOI = GetQuestWatchInfo(watchIndex) |
104 if ( not questID ) then | 104 if ( not questID ) then |
105 return | 105 return |
106 end | 106 end |
107 | 107 |
108 tprint(' |cFFFFBB00GetInfo:|r', watchIndex, '|cFFFF2299'..title..'|r') | 108 tprint(' |cFFFFBB00GetInfo:|r', watchIndex, '|cFFFF2299'..title..'|r') |
109 local _, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, _, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questLogIndex) | 109 local _, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, _, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle(questLogIndex) |
110 | 110 |
111 Quest.Info[questID] = Quest.Info[questID] or {} | 111 Quest.Info[questID] = Quest.Info[questID] or {} |
112 | 112 |
113 | 113 |
404 print('nearest quest is', minTitle, 'by', sqrt(minDist)) | 404 print('nearest quest is', minTitle, 'by', sqrt(minDist)) |
405 return minID, minTitle, minDist | 405 return minID, minTitle, minDist |
406 end | 406 end |
407 | 407 |
408 Quest.OnTurnIn = function(self, questID, xp, money) | 408 Quest.OnTurnIn = function(self, questID, xp, money) |
409 | 409 end |
410 end | |
411 | |
412 | 410 |
413 Quest.Select = function (handler, block) | 411 Quest.Select = function (handler, block) |
414 if block.info.isAutoComplete and block.info.isComplete then | 412 if block.info.isAutoComplete and block.info.isComplete then |
415 ShowQuestComplete(block.info.logIndex) | 413 ShowQuestComplete(block.info.logIndex) |
416 else | 414 else |
417 SetSuperTrackedQuestID(block.info.questID) | 415 SetSuperTrackedQuestID(block.info.questID) |
418 end | 416 end |
419 end | 417 end |
420 | 418 |
421 Quest.Link = function(handler, block) | 419 Quest.Link = function(handler, block) |
422 | |
423 local questLink = GetQuestLink(block.info.logIndex); | 420 local questLink = GetQuestLink(block.info.logIndex); |
424 if ( questLink ) then | 421 if ( questLink ) then |
425 ChatEdit_InsertLink(questLink); | 422 ChatEdit_InsertLink(questLink); |
426 end | 423 end |
427 end | 424 end |
428 | 425 |
429 Quest.Open = function(handler, block) | 426 Quest.Open = function(handler, block) |
430 | |
431 QuestMapFrame_OpenToQuestDetails(block.info.questID) | 427 QuestMapFrame_OpenToQuestDetails(block.info.questID) |
432 end | 428 end |
433 | 429 |
434 Quest.Remove = function(handler, block) | 430 Quest.Remove = function(handler, block) |
435 | |
436 print('removing', block.info.logIndex, 'from watcher') | 431 print('removing', block.info.logIndex, 'from watcher') |
437 RemoveQuestWatch(block.info.logIndex) | 432 RemoveQuestWatch(block.info.logIndex) |
438 end | 433 end |