From 116fc716a92ee8e27e5cb68f0b7c7e66526bfa3a Mon Sep 17 00:00:00 2001 From: Jesse Manelius Date: Tue, 7 Aug 2018 20:45:36 +0300 Subject: [PATCH] fix 4th affix causing error during pre-patch (and maybe off seasons?) --- iKeystones.lua | 8 ++++---- iKeystones.toc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iKeystones.lua b/iKeystones.lua index 23547e6..1163b7c 100644 --- a/iKeystones.lua +++ b/iKeystones.lua @@ -231,12 +231,12 @@ function iKS:scanInventory(requestingSlots, requestingItemLink) ['map'] = _map, ['level'] = _level, } - if iKS.keyLevel and iKS.keyLevel < _level then + if iKS.keyLevel and iKS.keyLevel < _level or not iKS.keyLevel then local itemLink = iKS.getKeystoneLink(_level, _map) print('iKS: New keystone - ' .. itemLink) end - iKS.keyLevel = C_MythicPlus.GetOwnedKeystoneLevel() - iKS.mapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID() + iKS.keyLevel = _level + iKS.mapID = _map end function iKS:getItemColor(level) if level < 4 then -- Epic @@ -260,7 +260,7 @@ function iKS:getZoneInfo(mapID, zone) end end function iKS:getKeystoneLink(keyLevel, map) - return string.format('%s|Hkeystone:%d:%d:%d:%d:%d:%d|h[%s (%s)]|h|r', iKS:getItemColor(keyLevel), map, keyLevel, (keyLevel >= 4 and iKS.currentAffixes[2] or 0), (keyLevel >= 7 and iKS.currentAffixes[3] or 0), iKS.currentAffixes[1],(keyLevel >= 10 and iKS.currentAffixes[4] or 0), iKS:getZoneInfo(map), keyLevel) + return string.format('%s|Hkeystone:%d:%d:%d:%d:%d:%d|h[%s (%s)]|h|r', iKS:getItemColor(keyLevel), map, keyLevel, (keyLevel >= 4 and iKS.currentAffixes[2] or 0), (keyLevel >= 7 and iKS.currentAffixes[3] or 0), iKS.currentAffixes[1],((keyLevel >= 10 and iKS.currentAffixes[4]) and iKS.currentAffixes[4] or 0), iKS:getZoneInfo(map), keyLevel) end function iKS:printKeystones() local allCharacters = {} diff --git a/iKeystones.toc b/iKeystones.toc index eb56695..e3e1554 100644 --- a/iKeystones.toc +++ b/iKeystones.toc @@ -2,7 +2,7 @@ ## Title: iKeystones ## Notes: Tracks your keystones ## Author: Ironi -## Version: 1.701 +## Version: 1.702 ## DefaultState: enabled ## SavedVariables: iKeystonesDB, iKeystonesConfig -- 1.7.9.5