Skip to content

Commit 87ba151

Browse files
committed
Revert "fix range check not working when you load in with spell ranks off (this uses the same method we use in LibDispel)"
This reverts commit 6a9205d.
1 parent 8522f97 commit 87ba151

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

ElvUI_Libraries/Core/LibRangeCheck-3.0/LibRangeCheck-3.0.lua

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ local GetSpellBookItemInfo = GetSpellBookItemInfo
7171
local GetSpellInfo = GetSpellInfo
7272
local GetSpellTabInfo = GetSpellTabInfo
7373
local GetTime = GetTime
74-
local GetCVar = GetCVar
75-
local SetCVar = SetCVar
7674
local InCombatLockdown = InCombatLockdown
7775
local IsItemInRange = IsItemInRange
7876
local IsSpellInRange = IsSpellInRange
@@ -1021,10 +1019,6 @@ function lib:init(forced)
10211019
local _, playerClass = UnitClass("player")
10221020
local _, playerRace = UnitRace("player")
10231021

1024-
-- this will fix a problem where spells dont show as existing because they are 'hidden' (fix from LibDispel)
1025-
lib.skipRanks = true -- ignore the cvar calling scheduleInit
1026-
local undoRanks = (not isRetail and GetCVar('ShowAllSpellRanks') ~= '1') and SetCVar('ShowAllSpellRanks', '1')
1027-
10281022
local interactList = InteractLists[playerRace] or DefaultInteractList
10291023
self.handSlotItem = GetInventoryItemLink("player", HandSlotId)
10301024
local changed = false
@@ -1049,12 +1043,6 @@ function lib:init(forced)
10491043
if updateCheckers(self.petRC, self.petRCInCombat, createCheckerList(PetSpells[playerClass], nil, interactList)) then
10501044
changed = true
10511045
end
1052-
1053-
if undoRanks then -- fix from LibDispel
1054-
SetCVar('ShowAllSpellRanks', '0')
1055-
end
1056-
lib.skipRanks = false -- allow cvar again
1057-
10581046
if changed and self.callbacks then
10591047
self.callbacks:Fire(self.CHECKERS_CHANGED)
10601048
end
@@ -1265,7 +1253,7 @@ function lib:SPELLS_CHANGED()
12651253
end
12661254

12671255
function lib:CVAR_UPDATE(_, cvar)
1268-
if cvar == "ShowAllSpellRanks" and not lib.skipRanks then
1256+
if cvar == "ShowAllSpellRanks" then
12691257
self:scheduleInit()
12701258
end
12711259
end

0 commit comments

Comments
 (0)