Skip to content

Commit

Permalink
Add specialization check when creating a loadout while inspecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lardeck committed Mar 3, 2024
1 parent f22aedd commit a8e35cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ImprovedTalentLoadouts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1143,13 +1143,15 @@ StaticPopupDialogs["TALENTLOADOUTS_LOADOUT_SAVE"] = {
local exportString
if isInspecting then
local unit = ClassTalentFrame:GetInspectUnit()
if unit then
if unit and GetInspectSpecialization(unit) == self.specID then
exportString = C_Traits.GenerateInspectImportString(unit)
end
end

if not isInspecting or exportString then
return self:ImportLoadout(exportString or self:GetExportStringForTree(), loadoutName, categoryInfo and categoryInfo.key)
elseif isInspecting and not exportString then
TalentLoadouts:Print("Unable to generate the export string. Make sure the specialization of the inspected unit is equalt to your current one.")
end
end

Expand Down

0 comments on commit a8e35cb

Please sign in to comment.