Mercurial > wow > buffalo2
comparison Modules/ArtifactPower.lua @ 131:15a7f27b11e6 v7.3.2-20111027
- Fixed an infinite loop occurring with Artifact XP calculations on fresh 110 toons
- Fixed combat state response
- Mask out redundant cheevos (Cutting Edge/AotC and end boss)
author | Nenue |
---|---|
date | Mon, 20 Nov 2017 12:01:52 -0500 |
parents | 9f2cf5609420 |
children | 86621c60512b |
comparison
equal
deleted
inserted
replaced
130:67b90544a7b7 | 131:15a7f27b11e6 |
---|---|
504 for i, info in ipairs(taskInfo) do | 504 for i, info in ipairs(taskInfo) do |
505 local questID = info.questId | 505 local questID = info.questId |
506 | 506 |
507 local questTitle, factionID, capped = C_TaskQuest.GetQuestInfoByQuestID(questID) | 507 local questTitle, factionID, capped = C_TaskQuest.GetQuestInfoByQuestID(questID) |
508 --print(questTitle, HaveQuestRewardData(questID)) | 508 --print(questTitle, HaveQuestRewardData(questID)) |
509 if HaveQuestRewardData(questID) then | 509 if HaveQuestRewardData(questID) and not IsQuestComplete(questID) then |
510 | 510 |
511 | 511 |
512 local numQuestRewards = GetNumQuestLogRewards(questID); | 512 for i = 1, GetNumQuestLogRewards(questID) or 0 do |
513 | |
514 if numQuestRewards > 0 then | |
515 for i = 1, numQuestRewards do | |
516 local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(i, questID) | 513 local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(i, questID) |
517 if IsArtifactPowerItem(itemID) then | 514 if IsArtifactPowerItem(itemID) then |
518 local _, link = GetItemInfo(itemID) | 515 local _, link = GetItemInfo(itemID) |
519 if link then | 516 if link then |
520 local ap = self:GetItemAP(itemID, link) | 517 local ap = self:GetItemAP(itemID, link) |
532 | 529 |
533 --print(self.worldQuestAP) | 530 --print(self.worldQuestAP) |
534 end | 531 end |
535 | 532 |
536 end | 533 end |
537 | |
538 end | |
539 | 534 |
540 | 535 |
541 else | 536 else |
542 C_TaskQuest.RequestPreloadRewardData(questID); | 537 C_TaskQuest.RequestPreloadRewardData(questID); |
543 self.waitingForQuestRewardData = true | 538 self.waitingForQuestRewardData = true |
990 local actualLevel = artifact.level | 985 local actualLevel = artifact.level |
991 local actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier) | 986 local actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier) |
992 | 987 |
993 print('tier:', artifact.tier) | 988 print('tier:', artifact.tier) |
994 print('current:', self.level, self.currentXP, '/', self.currentCost) | 989 print('current:', self.level, self.currentXP, '/', self.currentCost) |
995 while actualXP >= actualCost do | 990 while (actualXP >= actualCost) and (actualCost > 0) do |
996 actualXP = actualXP - actualCost | 991 actualXP = actualXP - actualCost |
997 actualLevel = actualLevel + 1 | 992 actualLevel = actualLevel + 1 |
998 actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier) | 993 actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier) |
999 | 994 |
1000 print('* ', actualLevel, actualXP, actualCost, totalCost) | 995 print('* ', actualLevel, actualXP, actualCost, totalCost) |
1008 | 1003 |
1009 local remaining = totalXP | 1004 local remaining = totalXP |
1010 local nextCost = artifact.currentCost | 1005 local nextCost = artifact.currentCost |
1011 print(totalXP, totalCost) | 1006 print(totalXP, totalCost) |
1012 if remaining > nextCost then | 1007 if remaining > nextCost then |
1013 while remaining >= nextCost do | 1008 while (remaining >= nextCost) and (nextCost > 0) do |
1014 totalLevel = totalLevel + 1 | 1009 totalLevel = totalLevel + 1 |
1015 remaining = remaining - nextCost | 1010 remaining = remaining - nextCost |
1016 nextCost = C_ArtifactUI.GetCostForPointAtRank(totalLevel, artifact.tier) | 1011 nextCost = C_ArtifactUI.GetCostForPointAtRank(totalLevel, artifact.tier) |
1017 print('|cFFFFFF00+ ', totalLevel, remaining, '/', totalCost) | 1012 print('|cFFFFFF00+ ', totalLevel, remaining, '/', totalCost) |
1018 end | 1013 end |