Skip to content

Commit

Permalink
Fix class and spec loadout import
Browse files Browse the repository at this point in the history
  • Loading branch information
Lardeck committed Nov 11, 2023
1 parent 5fe2a29 commit 309837e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ImprovedTalentLoadouts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ StaticPopupDialogs["TALENTLOADOUTS_LOADOUT_IMPORT_NAME"] = {
local importString, treeType = unpack(data)
local loadoutName = self.editBox:GetText()
local fakeConfigID
if not treeType then
if not treeType or treeType == 1 then
fakeConfigID = TalentLoadouts:ImportLoadout(importString, loadoutName)
elseif treeType == 2 then
loadoutName = string.format("[C] %s", loadoutName)
Expand Down Expand Up @@ -1333,19 +1333,18 @@ local function ImportCustomLoadout(self, apply)
dialog.data = apply
end

local function ImportCustomSpecLoadout(self, apply)
local function ImportCustomClassLoadout(self, apply)
local dialog = StaticPopup_Show("TALENTLOADOUTS_LOADOUT_IMPORT_STRING")
dialog.data = apply
dialog.data2 = 2
end

local function ImportCustomClassLoadout(self, apply)
local function ImportCustomSpecLoadout(self, apply)
local dialog = StaticPopup_Show("TALENTLOADOUTS_LOADOUT_IMPORT_STRING")
dialog.data = apply
dialog.data2 = 3
end


function TalentLoadouts:ImportLoadout(importString, loadoutName, category)
local currentSpecID = self.specID
local fakeConfigID = FindFreeConfigID()
Expand Down Expand Up @@ -1427,7 +1426,6 @@ function TalentLoadouts:ImportClassLoadout(importString, loadoutName, category)
local nodeInfo = C_Traits.GetNodeInfo(configID, loadoutEntryInfo[i].nodeID)
local nodeCost = C_Traits.GetNodeCost(configID, nodeInfo.ID)
if C_Traits.GetTraitCurrencyInfo(nodeCost[1].ID) == Enum.TraitCurrencyFlag.UseClassIcon then
print("class", i)
tinsert(classEntryInfo, loadoutEntryInfo[i])
end
end
Expand Down

0 comments on commit 309837e

Please sign in to comment.