Skip to content

Commit 232ce1d

Browse files
committed
Fix a rare error with GetDiscBeltSpell and rename the func
1 parent 4a97cef commit 232ce1d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Simulationcraft.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## IconTexture: Interface\Addons\SimulationCraft\logo
44
## Notes: Constructs SimC export strings
55
## Author: Theck, navv_, seriallos
6-
## Version: 11.1.7-01
6+
## Version: 11.1.7-02
77
## OptionalDependencies: Ace3, LibRealmInfo, LibDBIcon, LibDataBroker-1.1
88
## SavedVariables: SimulationCraftDB
99

core.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,10 @@ local function GetItemStringFromItemLink(slotNum, itemLink, debugOutput)
520520

521521
-- 11.1.7 Belt
522522
if itemId == 242664 or itemId == 245964 or itemId == 245965 or itemId == 245966 then
523-
simcItemOptions[#simcItemOptions + 1] = 'titan_disc_id=' .. Simulationcraft:GetDiscBeltSpell()
523+
local titanDiscId = Simulationcraft:GetTitanDiscBeltSpell()
524+
if titanDiscId then
525+
simcItemOptions[#simcItemOptions + 1] = 'titan_disc_id=' .. titanDiscId
526+
end
524527
end
525528

526529
local itemStr = ''
@@ -712,7 +715,7 @@ function LoadSpellsAsync(callback)
712715
end
713716

714717
-- This requires the SpellCache with the right spell IDs to be loaded
715-
function Simulationcraft:GetDiscBeltSpell()
718+
function Simulationcraft:GetTitanDiscBeltSpell()
716719
local activeSpell = nil
717720
local beltDescription = SpellCache[Simulationcraft.discBeltSpell]:GetSpellDescription()
718721
if not beltDescription then

0 commit comments

Comments
 (0)