diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 6ad005f7..e1efba7c 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 340 +local dversion = 341 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) @@ -56,31 +56,31 @@ function DF.IsDragonflight() end function DF.IsTimewalkWoW() - return DF.IsClassicWow() or DF.IsTBCWow() or DF.IsWotLKWow() + local _, _, _, buildInfo = GetBuildInfo() + if (buildInfo < 40000) then + return true + end end function DF.IsClassicWow() - local gameVersion = GetBuildInfo() - if (gameVersion:match ("%d") == "1") then - return true - end - return false + local _, _, _, buildInfo = GetBuildInfo() + if (buildInfo < 20000) then + return true + end end function DF.IsTBCWow() - local gameVersion = GetBuildInfo() - if (gameVersion:match ("%d") == "2") then - return true - end - return false + local _, _, _, buildInfo = GetBuildInfo() + if (buildInfo < 30000 and buildInfo >= 20000) then + return true + end end function DF.IsWotLKWow() - local gameVersion = GetBuildInfo() - if (gameVersion:match ("%d") == "3") then - return true - end - return false + local _, _, _, buildInfo = GetBuildInfo() + if (buildInfo < 40000 and buildInfo >= 30000) then + return true + end end local roleBySpecTextureName = { diff --git a/Libs/LibOpenRaid/GetPlayerInformation.lua b/Libs/LibOpenRaid/GetPlayerInformation.lua index 89d59d0a..e792e8cc 100644 --- a/Libs/LibOpenRaid/GetPlayerInformation.lua +++ b/Libs/LibOpenRaid/GetPlayerInformation.lua @@ -12,14 +12,22 @@ end local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0") local isTimewalkWoW = function() - local gameVersion = GetBuildInfo() - if (gameVersion:match("%d") == "1" or gameVersion:match("%d") == "2" or gameVersion:match("%d") == "3") then + local _, _, _, buildInfo = GetBuildInfo() + if (buildInfo < 40000) then return true end end +local IsDragonflight = function() + return select(4, GetBuildInfo()) >= 100000 +end + --creates two tables, one with indexed talents and another with pairs values ([talentId] = true) function openRaidLib.UnitInfoManager.GetPlayerTalentsAsPairsTable() + if (IsDragonflight()) then + return {} + end + local talentsPairs = {} for i = 1, 7 do for o = 1, 3 do @@ -30,10 +38,15 @@ function openRaidLib.UnitInfoManager.GetPlayerTalentsAsPairsTable() end end end + return talentsPairs end function openRaidLib.UnitInfoManager.GetPlayerTalents() + if (IsDragonflight()) then + return {} + end + local talents = {0, 0, 0, 0, 0, 0, 0} for talentTier = 1, 7 do for talentColumn = 1, 3 do @@ -44,10 +57,15 @@ function openRaidLib.UnitInfoManager.GetPlayerTalents() end end end + return talents end function openRaidLib.UnitInfoManager.GetPlayerPvPTalents() + if (IsDragonflight()) then + return {} + end + local talentsPvP = {0, 0, 0} local talentList = C_SpecializationInfo.GetAllSelectedPvpTalentIDs() for talentIndex, talentId in ipairs(talentList) do @@ -75,6 +93,11 @@ function openRaidLib.GetPlayerSpecId() end function openRaidLib.UnitInfoManager.GetPlayerConduits() + + if (IsDragonflight()) then + return {} + end + local conduits = {} local soulbindID = C_Soulbinds.GetActiveSoulbindID() @@ -121,10 +144,10 @@ end function openRaidLib.GearManager.GetPlayerItemLevel() if (_G.GetAverageItemLevel) then - local _, _itemLevel = GetAverageItemLevel() - itemLevel = floor(_itemLevel) + local _, itemLevel = GetAverageItemLevel() + itemLevel = floor(itemLevel) else - itemLevel = 0 + return 0 end return itemLevel end diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index ccedd6ff..bf37c102 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -133,8 +133,8 @@ LIB_OPEN_RAID_CAN_LOAD = false end local isTimewalkWoW = function() - local gameVersion = GetBuildInfo() - if (gameVersion:match("%d") == "1" or gameVersion:match("%d") == "2" or gameVersion:match("%d") == "3") then + local _, _, _, buildInfo = GetBuildInfo() + if (buildInfo < 40000) then return true end end diff --git a/frames/toolbar_button.xml b/frames/toolbar_button.xml index 62dd1742..12bf7a53 100644 --- a/frames/toolbar_button.xml +++ b/frames/toolbar_button.xml @@ -31,8 +31,8 @@ - - + +