From 44ea4c8b3fac3bd77b7797acf0e35faeb0c76153 Mon Sep 17 00:00:00 2001 From: Jesse Manelius Date: Wed, 23 Jan 2019 04:32:37 +0200 Subject: [PATCH] Avoid leaking weekly best data from another char (wtf??, how is this even possible) fix reaping messing up with weekly resets --- iKeystones.lua | 15 ++++++++++++--- iKeystones.toc | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/iKeystones.lua b/iKeystones.lua index 7107e68..84d96a5 100644 --- a/iKeystones.lua +++ b/iKeystones.lua @@ -31,6 +31,7 @@ iKS.currentMax = 0 iKS.frames = {} local shouldBeCorrectInfoForWeekly = false local player = UnitGUID('player') +local unitName = UnitName('player') iKS.apFromDungeons = { [1] = { -- Lesser @@ -120,6 +121,7 @@ local sortedAffixes = { --[15] = ?, --Relentless [16] = 4, --Infested + [117] = 4, --Reaping } iKS.affixCycles = { @@ -284,9 +286,16 @@ function iKS:scanCharacterMaps() local maps = C_ChallengeMode.GetMapTable() local maxCompleted = 0 for _, mapID in pairs(maps) do - local _, level, _, affixes = C_MythicPlus.GetWeeklyBestForMap(mapID) - if level and level > maxCompleted then - maxCompleted = level + local _, level, _, affixes, members = C_MythicPlus.GetWeeklyBestForMap(mapID) + if members then + for _,member in pairs(members) do -- Avoid leaking from another char (wtf??, how is this even possible) + if member.name == unitName then + if level and level > maxCompleted then + maxCompleted = level + end + break; + end + end end end if iKeystonesDB[player].maxCompleted and iKeystonesDB[player].maxCompleted < maxCompleted then diff --git a/iKeystones.toc b/iKeystones.toc index 2f90fe7..3850952 100644 --- a/iKeystones.toc +++ b/iKeystones.toc @@ -2,7 +2,7 @@ ## Title: iKeystones ## Notes: Tracks your keystones ## Author: Ironi -## Version: 1.715 +## Version: 1.720 ## DefaultState: enabled ## SavedVariables: iKeystonesDB, iKeystonesConfig -- 1.7.9.5