Skip to content

Commit 3fb90d0

Browse files
committed
!keys now also works in legion remix
1 parent 360efaa commit 3fb90d0

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

KeystoneUtil.lua

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ KSUtil = Util;
66

77
local BNSendGameData = C_BattleNet and C_BattleNet.SendGameData or BNSendGameData
88

9+
local IS_LEMIX = PlayerGetTimerunningSeasonID() == 2;
10+
911
local CTL = ChatThrottleLib;
1012

1113
Util.BNET_WHISPER_CHANNEL = 'BNET_WHISPER';
@@ -40,12 +42,14 @@ function Util:GetOwnedKeystone()
4042
end
4143

4244
function Util:GetKeystoneLink()
43-
local mapID, level = self:GetOwnedKeystone();
44-
if not mapID or not level then
45-
return nil;
46-
end
47-
if self.keystoneLinkCache[mapID] and self.keystoneLinkCache[mapID][level] then
48-
return self.keystoneLinkCache[mapID][level];
45+
if not IS_LEMIX then
46+
local mapID, level = self:GetOwnedKeystone();
47+
if not mapID or not level then
48+
return nil;
49+
end
50+
if self.keystoneLinkCache[mapID] and self.keystoneLinkCache[mapID][level] then
51+
return self.keystoneLinkCache[mapID][level];
52+
end
4953
end
5054

5155
local keyLink;
@@ -303,7 +307,8 @@ do
303307
end
304308

305309
function frame:ITEM_CHANGED(fromItem, toItem)
306-
if string.match(toItem, '|Hitem:180653') then
310+
local itemID = C_Item.GetItemIDForItemInfo(toItem);
311+
if C_Item.IsItemKeystoneByID(itemID) then
307312
local mapID, level = Util:GetMapIDAndLevelFromKeystoneLink(toItem);
308313

309314
if mapID and level and (mapID ~= self.lastKnownKeystoneMapID or level ~= self.lastKnownKeystoneLevel) then

0 commit comments

Comments
 (0)