From ebb9c10a9871207fbc911f15b7a0a57fdf1bdd3f Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 14 Jul 2022 19:41:49 -0300 Subject: [PATCH] Blind fixes for WotLK Classic, I don't have access to beta so these fixes may work or not --- Libs/DF/fw.lua | 12 ++++++++++-- boot.lua | 3 ++- functions/slash.lua | 8 +++++++- functions/spellcache.lua | 12 ++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index e7930886..567fe058 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 322 +local dversion = 323 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) @@ -52,7 +52,7 @@ if (not PixelUtil) then end function DF.IsTimewalkWoW() - return DF.IsClassicWow() or DF.IsTBCWow() + return DF.IsClassicWow() or DF.IsTBCWow() or DF.IsWotLKWow() end function DF.IsClassicWow() @@ -71,6 +71,14 @@ function DF.IsTBCWow() return false end +function DF.IsWotLKWow() + local gameVersion = GetBuildInfo() + if (gameVersion:match ("%d") == "3") then + return true + end + return false +end + local roleBySpecTextureName = { DruidBalance = "DAMAGER", DruidFeralCombat = "DAMAGER", diff --git a/boot.lua b/boot.lua index f3605f9e..17fcb724 100644 --- a/boot.lua +++ b/boot.lua @@ -8,7 +8,8 @@ _detalhes.build_counter = 9825 _detalhes.alpha_build_counter = 9825 --if this is higher than the regular counter, use it instead - _detalhes.bcc_counter = 40 + _detalhes.bcc_counter = 41 + _detalhes.wotlk_counter = 1 _detalhes.dont_open_news = true _detalhes.game_version = version _detalhes.userversion = version .. _detalhes.build_counter diff --git a/functions/slash.lua b/functions/slash.lua index 88d49f22..2ad19435 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -1704,7 +1704,13 @@ function SlashCmdList.DETAILS (msg, editbox) --print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WORLDBOSS"] .. "|r: " .. Loc ["STRING_SLASH_WORLDBOSS_DESC"]) print (" ") - if (DetailsFramework.IsTBCWow()) then + if (DetailsFramework.IsWotLKWow()) then + --wraft of the lich kind classic + local v = _detalhes.game_version .. "." .. (_detalhes.wotlk_counter) + print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00BCC" .. _detalhes.wotlk_counter) + print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00GAME VERSION|r: |cFFFFAA00" .. _detalhes.game_version) + + elseif (DetailsFramework.IsTBCWow()) then --the burning crusade classic local v = _detalhes.game_version .. "." .. (_detalhes.bcc_counter) print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00BCC" .. _detalhes.bcc_counter) diff --git a/functions/spellcache.lua b/functions/spellcache.lua index 10e6e545..5af413b5 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -131,6 +131,18 @@ do [8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]}, } + elseif (DetailsFramework.IsWotLKWow()) then + defaultSpellCustomization = { + [1] = {name = _G["MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]}, + [2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]}, + [3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]}, + [4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]}, + [5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]}, + [6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]}, + [7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]}, + [8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]}, + } + else defaultSpellCustomization = { [1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},