diff --git a/CHANGELOG.md b/CHANGELOG.md index 6abcfa7..7f30e5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # ImproveAny by D4KiR -## [v0.9.41](https://github.com/d4kir92/ImproveAny/tree/v0.9.41) (2024-03-05) -[Full Changelog](https://github.com/d4kir92/ImproveAny/compare/v0.9.36...v0.9.41) [Previous Releases](https://github.com/d4kir92/ImproveAny/releases) +## [v0.9.42](https://github.com/d4kir92/ImproveAny/tree/v0.9.42) (2024-03-05) +[Full Changelog](https://github.com/d4kir92/ImproveAny/compare/v0.9.36...v0.9.42) [Previous Releases](https://github.com/d4kir92/ImproveAny/releases) -- v0.9.41 +- v0.9.42 diff --git a/ImproveAny.toc b/ImproveAny.toc index d0f6db2..d50f57a 100644 --- a/ImproveAny.toc +++ b/ImproveAny.toc @@ -4,7 +4,7 @@ ## Interface-Cata: 40400 ## Interface: 100205 -## Version: 0.9.41 +## Version: 0.9.42 ## Title: ImproveAny by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/ImproveAny_Cata.toc b/ImproveAny_Cata.toc index 259ff22..2f92685 100644 --- a/ImproveAny_Cata.toc +++ b/ImproveAny_Cata.toc @@ -1,5 +1,5 @@ ## Interface: 40400 -## Version: 0.9.41 +## Version: 0.9.42 ## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/ImproveAny_TBC.toc b/ImproveAny_TBC.toc index cd87ae1..f49fd56 100644 --- a/ImproveAny_TBC.toc +++ b/ImproveAny_TBC.toc @@ -1,5 +1,5 @@ ## Interface: 20504 -## Version: 0.9.41 +## Version: 0.9.42 ## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/ImproveAny_Vanilla.toc b/ImproveAny_Vanilla.toc index 0736ef2..dd11f13 100644 --- a/ImproveAny_Vanilla.toc +++ b/ImproveAny_Vanilla.toc @@ -1,5 +1,5 @@ ## Interface: 11501 -## Version: 0.9.41 +## Version: 0.9.42 ## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/ImproveAny_Wrath.toc b/ImproveAny_Wrath.toc index f217fa4..5a1c43b 100644 --- a/ImproveAny_Wrath.toc +++ b/ImproveAny_Wrath.toc @@ -1,5 +1,5 @@ ## Interface: 30403 -## Version: 0.9.41 +## Version: 0.9.42 ## Title: ImproveAny |T136033:16:16:0:0|t by |cff3FC7EBD4KiR |T132115:16:16:0:0|t ## Notes: Improve Any Ui or Frame ## Author: D4KiR diff --git a/core.lua b/core.lua index 540082d..78121e9 100644 --- a/core.lua +++ b/core.lua @@ -346,7 +346,7 @@ function ImproveAny:Event(event, ...) textcolor = "|cFF11FF11" end - if ImproveAny:GetWoWBuild() == "RETAIL" and expacID < GetExpansionLevel() then + if D4:GetWoWBuild() == "RETAIL" and expacID < GetExpansionLevel() then tt:AddDoubleLine(ImproveAny:GT("ADDEDIN"), format(ImproveAny:GT("EXPANSION"), textcolor, _G["EXPANSION_NAME" .. expacID])) end end @@ -442,7 +442,7 @@ function ImproveAny:Event(event, ...) end ) - if ImproveAny:GetWoWBuild() ~= "RETAIL" and ImproveAny:IsEnabled("WIDEFRAMES", false) then + if D4:GetWoWBuild() ~= "RETAIL" and ImproveAny:IsEnabled("WIDEFRAMES", false) then if not warningEnhanceDressup and LeaPlusDB and LeaPlusDB["EnhanceDressup"] and LeaPlusDB["EnhanceDressup"] == "On" then ImproveAny:MSG("LeatrixPlus \"EnhanceDressup\" is enabled, may break WideFrames") warningEnhanceDressup = true @@ -458,7 +458,7 @@ function ImproveAny:Event(event, ...) warningEnhanceTrainers = true end - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then local tall, numTallQuests = 74, 22 UIPanelWindows["QuestLogFrame"] = { area = "override", @@ -596,7 +596,7 @@ function ImproveAny:Event(event, ...) local regions = {_G["TradeSkillFrame"]:GetRegions()} for i, v in pairs(regions) do if i > 1 then - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then if i == 2 then regions[i]:SetSize(1024, 512) regions[i]:SetTexture("Interface\\AddOns\\ImproveAny\\media\\wideframe") @@ -954,9 +954,9 @@ function ImproveAny:Event(event, ...) end end - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then local function InitTSF() - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then TradeSkillFrame.hasMaterial = CreateFrame("CheckButton", "HasMaterial", TradeSkillFrame, "UICheckButtonTemplate") TradeSkillFrame.hasMaterial:SetSize(20, 20) TradeSkillFrame.hasMaterial:SetPoint("TOPLEFT", TradeSkillFrame, "TOPLEFT", 70, -54) @@ -976,7 +976,7 @@ function ImproveAny:Event(event, ...) TradeSkillFrame.hasSkillUp = CreateFrame("CheckButton", "HasSkillUp", TradeSkillFrame, "UICheckButtonTemplate") TradeSkillFrame.hasSkillUp:SetSize(20, 20) - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then TradeSkillFrame.hasSkillUp:SetPoint("TOPLEFT", TradeSkillFrame, "TOPLEFT", 210, -54) else TradeSkillFrame.hasSkillUp:SetPoint("TOPLEFT", TradeSkillFrame, "TOPLEFT", 210, -15) diff --git a/ele/bags.lua b/ele/bags.lua index 085c710..29506c4 100644 --- a/ele/bags.lua +++ b/ele/bags.lua @@ -127,7 +127,7 @@ function ImproveAny:InitBags() end if ImproveAny:GV("BAGMODE", "RETAIL") == "RETAIL" then - if ImproveAny:GetWoWBuild() ~= "RETAIL" and BagsBar then + if D4:GetWoWBuild() ~= "RETAIL" and BagsBar then BagToggle = CreateFrame("BUTTON", "BagToggle", BagsBar or UIParent) local mainBag = _G["MainMenuBarBackpackButton"] if mainBag then diff --git a/ele/castbar.lua b/ele/castbar.lua index d02e4e4..ab0ef60 100644 --- a/ele/castbar.lua +++ b/ele/castbar.lua @@ -72,7 +72,7 @@ function ImproveAny:InitCastBar() name, _, texture = ChannelInfo() end - if ImproveAny:GetWoWBuild() ~= "RETAIL" and texture == 136235 then + if D4:GetWoWBuild() ~= "RETAIL" and texture == 136235 then texture = 136243 -- 136192 end diff --git a/ele/chat.lua b/ele/chat.lua index ef57713..fe169ea 100644 --- a/ele/chat.lua +++ b/ele/chat.lua @@ -4,7 +4,7 @@ local classes = {} C_Timer.After( 0.01, function() - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then races["Troll2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:256:256:128:192:64:128|t" races["NightElf3"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:256:256:192:256:128:192|t" races["Human2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:256:256:0:64:0:64|t" @@ -21,7 +21,7 @@ C_Timer.After( races["Scourge2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:256:256:64:128:64:128|t" races["Tauren2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:256:256:0:64:64:128|t" races["Dwarf2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:256:256:64:128:0:64|t" - elseif ImproveAny:GetWoWBuild() == "TBC" or ImproveAny:GetWoWBuild() == "WRATH" then + elseif D4:GetWoWBuild() == "TBC" or D4:GetWoWBuild() == "WRATH" then races["Troll2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:512:256:128:192:64:128|t" races["Scourge2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:512:256:64:128:64:128|t" races["Tauren3"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:512:256:0:64:192:256|t" @@ -42,7 +42,7 @@ C_Timer.After( races["Draenei2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:512:256:256:320:0:64|t" races["Orc2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:512:256:192:256:64:128|t" races["Dwarf2"] = "|TInterface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races:0:0:0:0:512:256:64:128:0:64|t" - elseif ImproveAny:GetWoWBuild() == "RETAIL" then + elseif D4:GetWoWBuild() == "RETAIL" then races["Human2"] = "|TInterface\\Glues\\CharacterCreate\\CharacterCreateIcons:0:0:0:0:2048:1024:1170:1235:262:327|t" races["Human3"] = "|TInterface\\Glues\\CharacterCreate\\CharacterCreateIcons:0:0:0:0:2048:1024:1170:1235:196:261|t" races["Orc2"] = "|TInterface\\Glues\\CharacterCreate\\CharacterCreateIcons:0:0:0:0:2048:1024:1434:1499:196:261|t" @@ -621,7 +621,7 @@ function ImproveAny:InitChat() hasEditBox = true } - if ImproveAny:GetWoWBuild() == "RETAIL" then + if D4:GetWoWBuild() == "RETAIL" then hooksecurefunc( ItemRefTooltip, "SetHyperlink", diff --git a/ele/itemlevel.lua b/ele/itemlevel.lua index 547c3e3..5207fe3 100644 --- a/ele/itemlevel.lua +++ b/ele/itemlevel.lua @@ -143,7 +143,7 @@ function ImproveAny:PDUpdateItemInfos() end end - if ImproveAny:GetWoWBuild() == "RETAIL" then + if D4:GetWoWBuild() == "RETAIL" then max = max - 1 end @@ -277,7 +277,7 @@ function ImproveAny:InitItemLevel() end end - if ImproveAny:GetWoWBuild() == "RETAIL" then + if D4:GetWoWBuild() == "RETAIL" then max = max - 1 end @@ -442,7 +442,7 @@ function ImproveAny:InitItemLevel() ImproveAny:UpdateBagsIlvl() end - if ImproveAny:GetWoWBuild() ~= "RETAIL" and BagItemSearchBox == nil and BagItemAutoSortButton == nil then + if D4:GetWoWBuild() ~= "RETAIL" and BagItemSearchBox == nil and BagItemAutoSortButton == nil then -- Bag Searchbar if not D4:IsOldWow() then BagItemSearchBox = CreateFrame("EditBox", "BagItemSearchBox", ContainerFrame1, "BagSearchBoxTemplate") diff --git a/ele/minimap.lua b/ele/minimap.lua index 5cabdb9..c61ad81 100644 --- a/ele/minimap.lua +++ b/ele/minimap.lua @@ -288,7 +288,7 @@ function ImproveAny:InitMinimap() btn:SetMovable(true) btn:SetUserPlaced(false) local radius = 80 - if ImproveAny:GetWoWBuild() == "RETAIL" then + if D4:GetWoWBuild() == "RETAIL" then radius = 110 end @@ -421,7 +421,7 @@ function ImproveAny:InitMinimap() MinimapToggleButton:Hide() end - if ImproveAny:GetWoWBuild() ~= "RETAIL" and TimeManagerClockButton then + if D4:GetWoWBuild() ~= "RETAIL" and TimeManagerClockButton then local clocktexture = select(1, TimeManagerClockButton:GetRegions()) if clocktexture and clocktexture.SetTexture then clocktexture:SetTexture(nil) @@ -478,7 +478,7 @@ function ImproveAny:InitMinimap() end if select(4, GetBuildInfo()) < 100000 then - ImproveAny:ConvertToMinimapButton("GameTimeFrame", true, ImproveAny:GetWoWBuild() == "CLASSIC") -- Calendar + ImproveAny:ConvertToMinimapButton("GameTimeFrame", true, D4:GetWoWBuild() == "CLASSIC") -- Calendar end ImproveAny:ConvertToMinimapButton("ExpansionLandingPageMinimapButton", true) -- Sanctum diff --git a/ele/moneybar.lua b/ele/moneybar.lua index e7bd6b4..93158ec 100644 --- a/ele/moneybar.lua +++ b/ele/moneybar.lua @@ -84,7 +84,7 @@ function ImproveAny:InitMoneyBar() end IAMoneyBar:MoneyThink() - if ImproveAny:GetWoWBuild() ~= "RETAIL" and (GOLD_AMOUNT_SYMBOL == nil or GOLD_AMOUNT_SYMBOL == "G") then + if D4:GetWoWBuild() ~= "RETAIL" and (GOLD_AMOUNT_SYMBOL == nil or GOLD_AMOUNT_SYMBOL == "G") then GOLD_AMOUNT_SYMBOL = "|TInterface\\MoneyFrame\\UI-GoldIcon:12:12:2:0|t" SILVER_AMOUNT_SYMBOL = "|TInterface\\MoneyFrame\\UI-SilverIcon:12:12:2:0|t" COPPER_AMOUNT_SYMBOL = "|TInterface\\MoneyFrame\\UI-CopperIcon:12:12:2:0|t" diff --git a/ele/raidframe.lua b/ele/raidframe.lua index 93cf9a0..7b9cefb 100644 --- a/ele/raidframe.lua +++ b/ele/raidframe.lua @@ -1,6 +1,6 @@ local _, ImproveAny = ... function ImproveAny:InitRaidFrames() - if ImproveAny:GetWoWBuild() ~= "RETAIL" then + if D4:GetWoWBuild() ~= "RETAIL" then local raidFrames = {} function ImproveAny:IsCompactRaidFrame(frame) if frame == nil then return false end diff --git a/ele/skillbars.lua b/ele/skillbars.lua index 8d578ce..10faf0a 100644 --- a/ele/skillbars.lua +++ b/ele/skillbars.lua @@ -178,7 +178,7 @@ function ImproveAny:AddStatusBar(func, args) end function ImproveAny:InitSkillBars() - if ImproveAny:GetWoWBuild() ~= "RETAIL" and ImproveAny:IsEnabled("SKILLBARS", false) then + if D4:GetWoWBuild() ~= "RETAIL" and ImproveAny:IsEnabled("SKILLBARS", false) then IASkills = CreateFrame("FRAME", "IASkills", UIParent) IASkills:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 520, 0) IASkills:SetSize(sw, 6 * sh) diff --git a/ele/worldmapframe.lua b/ele/worldmapframe.lua index dbb16da..f5ded33 100644 --- a/ele/worldmapframe.lua +++ b/ele/worldmapframe.lua @@ -22,7 +22,7 @@ end function ImproveAny:InitWorldMapFrame() fontsize = ImproveAny:GV("COORDSFONTSIZE", 10) - if WorldMapFrame and ImproveAny:GetWoWBuild() ~= "RETAIL" then + if WorldMapFrame and D4:GetWoWBuild() ~= "RETAIL" then WorldMapFrame.ScrollContainer.GetCursorPosition = function(fr) local x, y = MapCanvasScrollControllerMixin.GetCursorPosition(fr) local scale = WorldMapFrame:GetScale() @@ -120,7 +120,7 @@ function ImproveAny:InitWorldMapFrame() local w, h = WorldMapFrame.ScrollContainer:GetSize() if x and y then local scale = WorldMapFrame.ScrollContainer.Child:GetScale() - if ImproveAny:GetWoWBuild() == "RETAIL" then + if D4:GetWoWBuild() == "RETAIL" then scale = 1 + WorldMapFrame:GetCanvasZoomPercent() end diff --git a/ele/xpbar.lua b/ele/xpbar.lua index 856ed19..e6b37f2 100644 --- a/ele/xpbar.lua +++ b/ele/xpbar.lua @@ -260,7 +260,7 @@ function ImproveAny:InitXPBar() end end - if ImproveAny:GetWoWBuild() == "CLASSIC" then + if D4:GetWoWBuild() == "CLASSIC" then hooksecurefunc( "QuestLog_Update", function() @@ -269,11 +269,11 @@ function ImproveAny:InitXPBar() ) end - if ImproveAny:GetWoWBuild() == "TBC" then + if D4:GetWoWBuild() == "TBC" then maxlevel = 70 end - if ImproveAny:GetWoWBuild() == "WRATH" then + if D4:GetWoWBuild() == "WRATH" then maxlevel = 80 end diff --git a/libs/db.lua b/libs/db.lua index 14bd582..0ee89e1 100644 --- a/libs/db.lua +++ b/libs/db.lua @@ -1,22 +1,4 @@ local _, ImproveAny = ... -local BuildNr = select(4, GetBuildInfo()) -local Build = "CLASSIC" -if BuildNr >= 100000 then - Build = "RETAIL" -elseif BuildNr > 29999 then - Build = "WRATH" -elseif BuildNr > 19999 then - Build = "TBC" -end - -function ImproveAny:GetWoWBuildNr() - return BuildNr -end - -function ImproveAny:GetWoWBuild() - return Build -end - local COL_R = "|cFFFF0000" local COL_Y = "|cFFFFFF00" function ImproveAny:MSG(msg) diff --git a/settings.lua b/settings.lua index 71b50e7..8918895 100644 --- a/settings.lua +++ b/settings.lua @@ -420,8 +420,8 @@ function ImproveAny:InitIASettings() IASettings:Hide() end - D4:SetVersion(AddonName, 136033, "0.9.41") - IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.41")) + D4:SetVersion(AddonName, 136033, "0.9.42") + IASettings.TitleText:SetText(format("ImproveAny |T136033:16:16:0:0|t v|cff3FC7EB%s", "0.9.42")) IASettings.CloseButton:SetScript( "OnClick", function() @@ -514,7 +514,7 @@ function ImproveAny:InitIASettings() AddSlider(4, "TOP_OFFSET", 116, ImproveAny.UpdateUIParentAttribute, 0.0, 1000.0, 5) AddSlider(4, "LEFT_OFFSET", 16, ImproveAny.UpdateUIParentAttribute, 16.0, 1000.0, 5) AddSlider(4, "PANEl_SPACING_X", 32, ImproveAny.UpdateUIParentAttribute, 10.0, 300.0, 1) - if ImproveAny:GetWoWBuild() ~= "RETAIL" then + if D4:GetWoWBuild() ~= "RETAIL" then AddCategory("XPBAR") AddCheckBox(4, "XPBAR", false) AddCheckBox(24, "XPNUMBERLEVEL", false) @@ -538,7 +538,7 @@ function ImproveAny:InitIASettings() AddCheckBox(24, "REPHIDEARTWORK", false) end - if ImproveAny:GetWoWBuild() ~= "RETAIL" then + if D4:GetWoWBuild() ~= "RETAIL" then AddCategory("UNITFRAMES") AddCheckBox(4, "RAIDFRAMEMOREBUFFS", false) AddSlider(24, "BUFFSCALE", 0.8, ImproveAny.UpdateRaidFrameSize, 0.4, 1.6, 0.1)