Mercurial > wow > buffalo2
comparison ObjectiveTracker/Quests.lua @ 31:48b3e3959a0a
- clean up method arguments
| author | Nenue |
|---|---|
| date | Thu, 14 Apr 2016 19:39:05 -0400 |
| parents | 7583684becf4 |
| children | a3afe6c3771e |
comparison
equal
deleted
inserted
replaced
| 30:7583684becf4 | 31:48b3e3959a0a |
|---|---|
| 75 end | 75 end |
| 76 | 76 |
| 77 Quest.UpdateLine = function(handler, block, line, data) | 77 Quest.UpdateLine = function(handler, block, line, data) |
| 78 local print = lprint | 78 local print = lprint |
| 79 local objectiveType = data.type | 79 local objectiveType = data.type |
| 80 local r, g, b, a = 0, 1, 1, 1 | 80 return data.text, nil, objectiveType |
| 81 | |
| 82 line.progress = 0 | |
| 83 if data.finished then | |
| 84 line.progress = 2 | |
| 85 r, g, b, a = 0, 1, 0, 1 | |
| 86 elseif objectiveType == 'monster' then | |
| 87 r, g, b, a = 1, .55, .2, 1 | |
| 88 elseif objectiveType == 'item' then | |
| 89 r, g, b, a = .8, .8, .8, 1 | |
| 90 elseif objectiveType == 'object' then | |
| 91 r, g, b, a = 1, 1, 1, 1 | |
| 92 elseif objectiveType == 'player' then | |
| 93 r, g, b, a = 0, 0.8, 1, 1 | |
| 94 end | |
| 95 print(format(' |cFF%02X%02X%02X%0.1f, %0.1f, %0.1f|r', (r * 255), g * 255, b * 255, r, g, b)) | |
| 96 | |
| 97 line.displayColor = {r, g, b, a} | |
| 98 line.status:SetTextColor(r, g, b, a) | |
| 99 line.displayText = data.text | |
| 100 | |
| 101 return data.text, nil | |
| 102 end | 81 end |
| 103 | 82 |
| 104 ----------------------------- | 83 ----------------------------- |
| 105 --- QUEST | 84 --- QUEST |
| 106 Quest.QuestBlock = {} | 85 Quest.QuestBlock = {} |
| 211 text = text, | 190 text = text, |
| 212 finished = false, | 191 finished = false, |
| 213 requiredMoney = requiredMoney, | 192 requiredMoney = requiredMoney, |
| 214 playerMoney = playerMoney, | 193 playerMoney = playerMoney, |
| 215 } | 194 } |
| 195 tinsert(objectives, moneyInfo) | |
| 216 end | 196 end |
| 217 | 197 |
| 218 -- time limit | 198 -- time limit |
| 219 if ( failureTime ) then | 199 if ( failureTime ) then |
| 220 temp_status = temp_status .. '_TIMED' | 200 temp_status = temp_status .. '_TIMED' |
| 223 type = 'timer', | 203 type = 'timer', |
| 224 finished = false, | 204 finished = false, |
| 225 timeElapsed = timeElapsed, | 205 timeElapsed = timeElapsed, |
| 226 failureTime = failureTime, | 206 failureTime = failureTime, |
| 227 } | 207 } |
| 208 tinsert(objectives, timerInfo) | |
| 228 end | 209 end |
| 229 end | 210 end |
| 230 end | 211 end |
| 231 q.numObjectives = numObjectives | 212 q.numObjectives = numObjectives |
| 232 q.objectives = objectives | 213 q.objectives = objectives |
| 361 q.hasLocalPOI = hasLocalPOI | 342 q.hasLocalPOI = hasLocalPOI |
| 362 q.frequency = frequency | 343 q.frequency = frequency |
| 363 q.isComplete = isComplete | 344 q.isComplete = isComplete |
| 364 q.isStory = isStory | 345 q.isStory = isStory |
| 365 q.isTask = isTask | 346 q.isTask = isTask |
| 347 q.statusKey = temp_status | |
| 366 | 348 |
| 367 q.selected = (questID == superTrackQuestID) -- call directly so artifact data doesn't become an issue | 349 q.selected = (questID == superTrackQuestID) -- call directly so artifact data doesn't become an issue |
| 368 self.WatchInfo[watchIndex] = q | 350 self.WatchInfo[watchIndex] = q |
| 369 self.LogInfo[questLogIndex] = q | 351 self.LogInfo[questLogIndex] = q |
| 370 | 352 |
