Skip to content

Commit

Permalink
LRC these dont need to be stored on lib
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 17, 2024
1 parent ada3fac commit 37dc3f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ElvUI_Libraries/Core/LibRangeCheck-3.0/LibRangeCheck-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1298,17 +1298,17 @@ function lib:CVAR_UPDATE(_, cvar)
end

do
local chestSlotItem, legSlotItem
local ChestSlotID = GetInventorySlotInfo("CHESTSLOT")
local LegSlotID = GetInventorySlotInfo("LEGSSLOT")

local chestSlotItem, legSlotItem -- local cache of the items
function lib:UNIT_INVENTORY_CHANGED(event, unit) -- limited to Mages only currently
self.chestSlotItem = GetInventoryItemLink("player", ChestSlotID) -- Mage: Regeneration
self.legSlotItem = GetInventoryItemLink("player", LegSlotID) -- Mage: Mass Regeneration
local ChestItem = GetInventoryItemLink("player", ChestSlotID) -- Mage: Regeneration
local LegItem = GetInventoryItemLink("player", LegSlotID) -- Mage: Mass Regeneration

if self.initialized and unit == "player" and (chestSlotItem ~= self.chestSlotItem or legSlotItem ~= self.legSlotItem) then
chestSlotItem = self.chestSlotID
legSlotItem = self.legSlotID
if self.initialized and unit == "player" and (chestSlotItem ~= ChestItem or legSlotItem ~= LegItem) then
chestSlotItem = ChestItem
legSlotItem = LegItem

self:scheduleInit()
end
Expand Down

0 comments on commit 37dc3f4

Please sign in to comment.