diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index e14fb868d..9b80306f0 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -44,17 +44,21 @@ BUGS: --]=] -local IsDragonflight = function() - return select(4, GetBuildInfo()) >= 100000 +local versionString, revision, launchDate, gameVersion = GetBuildInfo() + +local isExpansion_Dragonflight = function() + if (gameVersion >= 100000) then + return true + end end --don't load if it's not retail, emergencial patch due to classic and bcc stuff not transposed yet -if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not IsDragonflight()) then +if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) then return end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 53 +local CONST_LIB_VERSION = 54 LIB_OPEN_RAID_CAN_LOAD = false --declae the library within the LibStub @@ -65,7 +69,7 @@ LIB_OPEN_RAID_CAN_LOAD = false end LIB_OPEN_RAID_CAN_LOAD = true - + --default values openRaidLib.inGroup = false openRaidLib.UnitIDCache = {} @@ -148,7 +152,7 @@ LIB_OPEN_RAID_CAN_LOAD = false for i = 1, select("#", ...) do local clientVersion = select(i, ...) - if (clientVersion == "retail" and (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or IsDragonflight())) then --retail + if (clientVersion == "retail" and (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or isExpansion_Dragonflight())) then --retail return true elseif (clientVersion == "classic_era" and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) then --classic era (vanila) diff --git a/Libs/LibOpenRaid/ThingsToMantain.lua b/Libs/LibOpenRaid/ThingsToMantain.lua index b5b3d4378..166d54053 100644 --- a/Libs/LibOpenRaid/ThingsToMantain.lua +++ b/Libs/LibOpenRaid/ThingsToMantain.lua @@ -1,11 +1,42 @@ --data which main need maintenance over time +--alert the user that something went wrong +C_Timer.After(10, function() + if (not LIB_OPEN_RAID_DATABASE_LOADED) then + print("Details! > LibOpenRaid failed to load, check BugSack for errors and report.") + end +end) + if (not LIB_OPEN_RAID_CAN_LOAD) then return end -local expansionId = GetServerExpansionLevel() +local versionString, revision, launchDate, gameVersion = GetBuildInfo() + +local isExpansion_Dragonflight = function() + if (gameVersion >= 100000) then + return true + end +end + +local isExpansion_Shadowlands = function() + if (gameVersion < 100000 and gameVersion >= 90000) then + return true + end +end + +local isExpansion_LichKing = function() + if (gameVersion < 40000 and gameVersion >= 30000) then + return true + end +end + +local isExpansion_Vanilla = function() + if (gameVersion < 20000) then + return true + end +end --localization local gameLanguage = GetLocale() @@ -80,7 +111,10 @@ elseif (gameLanguage == "zhTW") then L["STRING_CRITICAL_ONLY"] = "致命" end -if (expansionId == LE_EXPANSION_WRATH_OF_THE_LICH_KING) then +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--Wrath of the Lich King + +if (isExpansion_LichKing()) then LIB_OPEN_RAID_BLOODLUST = { [2825] = true, --bloodlust [32182] = true, --heroism @@ -104,7 +138,7 @@ if (expansionId == LE_EXPANSION_WRATH_OF_THE_LICH_KING) then [INVSLOT_HAND] = 3, --strenth only } - LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 0 + LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653 LIB_OPEN_RAID_AUGMENTATED_RUNE = 0 LIB_OPEN_RAID_COVENANT_ICONS = {} @@ -115,7 +149,10 @@ if (expansionId == LE_EXPANSION_WRATH_OF_THE_LICH_KING) then LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {} -elseif (expansionId == LE_EXPANSION_SHADOWLANDS) then +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--Shadowlands + +elseif (isExpansion_Shadowlands()) then LIB_OPEN_RAID_BLOODLUST = { [2825] = true, --bloodlust [32182] = true, --heroism @@ -230,7 +267,10 @@ elseif (expansionId == LE_EXPANSION_SHADOWLANDS) then [5401] = true, --windfury } -elseif (expansionId == LE_EXPANSION_LEVEL_CURRENT) then --latest retail version after LE_EXPANSION_SHADOWLANDS +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--Dragonflight + +elseif (isExpansion_Dragonflight()) then LIB_OPEN_RAID_BLOODLUST = { [2825] = true, --bloodlust [32182] = true, --heroism @@ -788,3 +828,5 @@ LIB_OPEN_RAID_SPELL_DEFAULT_IDS = { --191427 havoc } --need to add mass dispell (32375) + +LIB_OPEN_RAID_DATABASE_LOADED = true \ No newline at end of file diff --git a/boot.lua b/boot.lua index 74514141b..5ff3a0fbe 100644 --- a/boot.lua +++ b/boot.lua @@ -6,8 +6,8 @@ local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 10030 - _detalhes.alpha_build_counter = 10030 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 10031 + _detalhes.alpha_build_counter = 10031 --if this is higher than the regular counter, use it instead _detalhes.dont_open_news = true _detalhes.game_version = version _detalhes.userversion = version .. _detalhes.build_counter