Mercurial > wow > worldplan
comparison QuestPOI.lua @ 48:c0b88bd1e40b
- Fixed frame update flagging after proper reward data is processed, which probably also fixes the issue of loaded data mysteriously vanishing.
author | Nenue |
---|---|
date | Tue, 27 Dec 2016 19:46:40 -0500 |
parents | 733785e306a3 |
children | dbd81d49af02 |
comparison
equal
deleted
inserted
replaced
47:733785e306a3 | 48:c0b88bd1e40b |
---|---|
300 end | 300 end |
301 elseif worldQuestType == LE_QUEST_TAG_TYPE_DUNGEON then | 301 elseif worldQuestType == LE_QUEST_TAG_TYPE_DUNGEON then |
302 tagAtlas = "worldquest-icon-dungeon" | 302 tagAtlas = "worldquest-icon-dungeon" |
303 end | 303 end |
304 self.worldQuestType = worldQuestType | 304 self.worldQuestType = worldQuestType |
305 | |
306 self.tagAtlas = tagAtlas | 305 self.tagAtlas = tagAtlas |
307 | |
308 | 306 |
309 self:SetRewardInfo() | 307 self:SetRewardInfo() |
310 | 308 |
311 -- force throttle on success | 309 -- force throttle on success |
312 --qprint(' |cFF00FFFF'..questID..'|r hasUpdate:', hasUpdate, 'isPending:', isPending, 'isShown', self:IsShown()) | 310 --qprint(' |cFF00FFFF'..questID..'|r hasUpdate:', hasUpdate, 'isPending:', isPending, 'isShown', self:IsShown()) |
315 | 313 |
316 if self.itemTexture and self.itemName and self.title then | 314 if self.itemTexture and self.itemName and self.title then |
317 self.isPending = nil | 315 self.isPending = nil |
318 self.throttle = 1 | 316 self.throttle = 1 |
319 self.updateRate = PIN_REFRESH_DELAY | 317 self.updateRate = PIN_REFRESH_DELAY |
318 self.isStale = true | |
320 end | 319 end |
321 end | 320 end |
322 | 321 |
323 self.isCriteria = WorldMapFrame.UIElementsFrame.BountyBoard:IsWorldQuestCriteriaForSelectedBounty(questID) | 322 self.isCriteria = WorldMapFrame.UIElementsFrame.BountyBoard:IsWorldQuestCriteriaForSelectedBounty(questID) |
324 | 323 |
358 self.itemName = rewardName or self.itemName | 357 self.itemName = rewardName or self.itemName |
359 | 358 |
360 -- flag unresolved info | 359 -- flag unresolved info |
361 if not (rewardIcon and rewardName) then | 360 if not (rewardIcon and rewardName) then |
362 self.isPending = true | 361 self.isPending = true |
363 return true, nil | 362 self.isStale = nil |
364 --WorldPlan:print('|cFFFFFF00'..tostring(self.title)..'|r waiting on texture info') | 363 --WorldPlan:print('|cFFFFFF00'..tostring(self.title)..'|r waiting on texture info') |
365 else | 364 else |
366 if (rewardIcon and rewardName) and self.isPending then | 365 if (rewardIcon and rewardName) and self.isPending then |
367 --WorldPlan:print('|cFF00FF00'..tostring(self.title)..'|r has info', rewardIcon, rewardName) | 366 --WorldPlan:print('|cFF00FF00'..tostring(self.title)..'|r has info', rewardIcon, rewardName) |
368 self.isStale = true | 367 self.isStale = true |
369 end | 368 end |
370 self.isPending = nil | 369 self.isPending = nil |
371 end | 370 end |
372 | 371 |
373 end | 372 end |
374 return self.isStale, self.isPending | |
375 | |
376 end | 373 end |
377 | 374 |
378 -- run from OnShow if .isNew is set | 375 -- run from OnShow if .isNew is set |
379 function QuestPOI:OnNew() | 376 function QuestPOI:OnNew() |
380 | 377 |
396 self.FadeIn:Play() | 393 self.FadeIn:Play() |
397 end | 394 end |
398 end | 395 end |
399 | 396 |
400 function QuestPOI:OnShow () | 397 function QuestPOI:OnShow () |
401 if self.isNew or self.isStale then | |
402 self:Refresh() | |
403 end | |
404 | 398 |
405 if self.isNew then | 399 if self.isNew then |
406 qprint('|cFFFFFF00'..tostring(self:GetName())..':OnShow()|r update:', self.isStale, 'new:', self.isNew, 'animation:', self.isAnimating) | 400 qprint('|cFFFFFF00'..tostring(self:GetName())..':OnShow()|r update:', self.isStale, 'new:', self.isNew, 'animation:', self.isAnimating) |
407 --qprint('|cFFFFFF00popping new pin handler') | 401 --qprint('|cFFFFFF00popping new pin handler') |
408 self:OnNew() | 402 self:OnNew() |
409 elseif not self.isAnimating then | 403 elseif not self.isAnimating then |
410 self:SetAlpha(1) -- fix stuck alpha | 404 self:SetAlpha(1) -- fix stuck alpha |
411 end | 405 end |
412 | 406 |
407 if self.isNew or self.isStale then | |
408 self:Refresh() | |
409 end | |
413 --WorldPlan:print(self:GetAlpha()) | 410 --WorldPlan:print(self:GetAlpha()) |
414 | 411 |
415 end | 412 end |
416 function QuestPOI:OnHide() | 413 function QuestPOI:OnHide() |
417 --qprint('|cFFFFFF00["'..tostring(self.title)..'"]|r:OnHide()') | 414 --qprint('|cFFFFFF00["'..tostring(self.title)..'"]|r:OnHide()') |