changeset 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 67b90544a7b7
children 4cb1d2a0c110
files Modules/ArtifactPower.lua Modules/Currency.lua Modules/GuildInfo.lua Modules/PaperDoll.lua
diffstat 4 files changed, 16 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Modules/ArtifactPower.lua	Sun Oct 22 18:29:09 2017 -0400
+++ b/Modules/ArtifactPower.lua	Mon Nov 20 12:01:52 2017 -0500
@@ -506,13 +506,10 @@
 
           local questTitle, factionID, capped = C_TaskQuest.GetQuestInfoByQuestID(questID)
           --print(questTitle, HaveQuestRewardData(questID))
-          if HaveQuestRewardData(questID) then
+          if HaveQuestRewardData(questID) and not IsQuestComplete(questID) then
 
 
-            local numQuestRewards = GetNumQuestLogRewards(questID);
-
-            if numQuestRewards > 0 then
-              for i = 1, numQuestRewards do
+              for i = 1, GetNumQuestLogRewards(questID) or 0 do
                 local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(i, questID)
                 if IsArtifactPowerItem(itemID) then
                   local _, link = GetItemInfo(itemID)
@@ -535,8 +532,6 @@
 
               end
 
-            end
-
 
           else
             C_TaskQuest.RequestPreloadRewardData(questID);
@@ -992,7 +987,7 @@
 
   print('tier:', artifact.tier)
   print('current:', self.level, self.currentXP, '/', self.currentCost)
-  while actualXP >= actualCost do
+  while (actualXP >= actualCost) and (actualCost > 0) do
     actualXP = actualXP - actualCost
     actualLevel = actualLevel + 1
     actualCost = C_ArtifactUI.GetCostForPointAtRank(actualLevel, artifact.tier)
@@ -1010,7 +1005,7 @@
   local nextCost = artifact.currentCost
   print(totalXP, totalCost)
   if remaining > nextCost then
-    while remaining >= nextCost do
+    while (remaining >= nextCost) and (nextCost > 0) do
       totalLevel = totalLevel + 1
       remaining = remaining - nextCost
       nextCost = C_ArtifactUI.GetCostForPointAtRank(totalLevel, artifact.tier)
--- a/Modules/Currency.lua	Sun Oct 22 18:29:09 2017 -0400
+++ b/Modules/Currency.lua	Mon Nov 20 12:01:52 2017 -0500
@@ -134,15 +134,18 @@
       end
     end
   end
+
+  self:RegisterEvent('PLAYER_REGEN_ENABLED')
+  self:RegisterEvent('PLAYER_REGEN_DISABLED')
 end
 
 function module:OnEvent (event, arg)
-  print(self:GetName(), 'OnEvent', event, arg)
+  --print(self:GetName(), 'OnEvent', event, arg)
   self:Update()
 end
 
 function module:Update()
-  print(self:GetName(), 'Reanchor()')
+  --print(self:GetName(), 'Reanchor()')
   if InCombatLockdown() then
     self:SetShown(false)
     return
--- a/Modules/GuildInfo.lua	Sun Oct 22 18:29:09 2017 -0400
+++ b/Modules/GuildInfo.lua	Mon Nov 20 12:01:52 2017 -0500
@@ -72,6 +72,11 @@
 end
 
 -- cheevos to link
+local overlaps = {
+  [11781] = 11875,
+
+
+}
 local cheevos = {
   -- Mythic Prog: Tomb
   {
--- a/Modules/PaperDoll.lua	Sun Oct 22 18:29:09 2017 -0400
+++ b/Modules/PaperDoll.lua	Mon Nov 20 12:01:52 2017 -0500
@@ -331,12 +331,13 @@
   local numLines = tooltip:NumLines()
   local numTextures = 0
   local itemLevel
+  local ignoreIL = IsAddOnLoaded("DejaCharacterStats")
   local itemLevelLine
     --print('|cFFFFFF00Sockets scan:', numLines)
     for i = 1, numLines do
       local line = _G['VeneerPaperDollTooltipTextLeft'..i]
       local text = line and line:GetText()
-      if text then
+      if text and not ignoreIL then
         itemLevel = text:match('Item Level (%d+)')
         if itemLevel then
           self.ItemLevel:SetText(itemLevel)