Skip to content

Commit

Permalink
AddonSet recognize <No Set>
Browse files Browse the repository at this point in the history
  • Loading branch information
derfloh205 committed Nov 29, 2023
1 parent 6b2af69 commit ba8863c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LoadoutReminder.toc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## X-Wago-ID: n6VPOLGd
## X-WoWI-ID: 26653
## SavedVariablesPerCharacter: LoadoutReminderDBV2, LoadoutReminderGGUIConfig, LoadoutReminderOptions
## Version: 4.0.1
## Version: 4.0.2
## OptionalDeps: BetterAddonList, AddonControlPanel, TalentLoadoutManager

embeds.xml
Expand Down
11 changes: 8 additions & 3 deletions Modules/Addons/Addons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function LoadoutReminder.ADDONS:CheckInstanceAddonSet()

local currentSet, assignedSet = LoadoutReminder.UTIL:CheckCurrentSetAgainstInstanceSetList(CURRENT_SET, GENERAL_SETS)

currentSet = currentSet or LoadoutReminder.CONST.NO_SET_NAME

if currentSet and assignedSet then
local macroText = LoadoutReminder.ADDONS:GetMacroTextByListAddon(assignedSet)
local buttonText = 'Switch Addons to: '
Expand All @@ -50,9 +52,12 @@ function LoadoutReminder.ADDONS:CheckBossAddonSet(boss)
return nil
end

local currentSet = LoadoutReminder.ADDONS:GetCurrentSet()
local macroText = LoadoutReminder.ADDONS:GetMacroTextByListAddon(bossSet)
return LoadoutReminder.ReminderInfo(LoadoutReminder.CONST.REMINDER_TYPES.ADDONS, 'Detected Boss: ', macroText, 'Switch Addons to: ', "Addon Set", currentSet, bossSet)
local currentSet = LoadoutReminder.ADDONS:GetCurrentSet() or LoadoutReminder.CONST.NO_SET_NAME

if currentSet and bossSet then
local macroText = LoadoutReminder.ADDONS:GetMacroTextByListAddon(bossSet)
return LoadoutReminder.ReminderInfo(LoadoutReminder.CONST.REMINDER_TYPES.ADDONS, 'Detected Boss: ', macroText, 'Switch Addons to: ', "Addon Set", currentSet, bossSet)
end
end

-- Wrapper
Expand Down
4 changes: 2 additions & 2 deletions Modules/Equip/Equip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function LoadoutReminder.EQUIP:CheckInstanceEquipSet()
-- print("equip: ")
-- print("currentSet: " .. tostring(currentSet))
-- print("assignedSet: " .. tostring(assignedSet))
local currentSetName = (currentSetID and LoadoutReminder.EQUIP:GetEquipSetNameByID(currentSetID)) or LoadoutReminder.CONST.NO_EQUIP_SET
local currentSetName = (currentSetID and LoadoutReminder.EQUIP:GetEquipSetNameByID(currentSetID)) or LoadoutReminder.CONST.NO_SET_NAME
local assignedSetName = (assignedSetID and LoadoutReminder.EQUIP:GetEquipSetNameByID(assignedSetID)) or nil

if currentSetName and assignedSetName then
Expand All @@ -54,7 +54,7 @@ function LoadoutReminder.EQUIP:CheckBossEquipSet(boss)
end

local currentSet = LoadoutReminder.EQUIP:GetCurrentSet()
local currentSetName = (currentSet and LoadoutReminder.EQUIP:GetEquipSetNameByID(currentSet)) or LoadoutReminder.CONST.NO_EQUIP_SET
local currentSetName = (currentSet and LoadoutReminder.EQUIP:GetEquipSetNameByID(currentSet)) or LoadoutReminder.CONST.NO_SET_NAME
local bossSetName = LoadoutReminder.EQUIP:GetEquipSetNameByID(bossSet)
if bossSetName then
local macroText = LoadoutReminder.EQUIP:GetMacroTextBySet(bossSet)
Expand Down
2 changes: 1 addition & 1 deletion Util/Const.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LoadoutReminder.CONST.FRAMES = {

LoadoutReminder.CONST.STARTER_BUILD = "Starter Build"
LoadoutReminder.CONST.LABEL_NO_SET = '-'
LoadoutReminder.CONST.NO_EQUIP_SET = '<No Set>'
LoadoutReminder.CONST.NO_SET_NAME = '<No Set>'

LoadoutReminder.CONST.DEFAULT_BACKDROP_OPTIONS = {
bgFile = "Interface\\CharacterFrame\\UI-Party-Background",
Expand Down

0 comments on commit ba8863c

Please sign in to comment.