From 1212a2fcc23c69a72b5fd3a380bc38822c11bfa9 Mon Sep 17 00:00:00 2001 From: Travis Spomer <16262858+TravisSpomer@users.noreply.github.com> Date: Thu, 2 May 2024 22:05:04 -0700 Subject: [PATCH] Cataclysm Classic support and 2.9 --- .github/workflows/package-addon.yml | 22 +++++++++++ ClassicHawsJon.lua | 6 +-- GemsWrath.lua | 2 +- Localization.deDE.lua | 2 +- Localization.es.lua | 10 ++--- Localization.frFR.lua | 8 ++-- Localization.koKR.lua | 2 +- Localization.ptBR.lua | 2 +- Localization.ruRU.lua | 2 +- Localization.zhCN.lua | 4 +- Localization.zhTW.lua | 4 +- Pawn.lua | 10 ++--- Pawn.toc | 2 +- PawnUI.lua | 6 +-- Readme.htm | 10 ++++- ScaleTemplates.lua | 8 ++-- UIStrings.lua | 61 +++++++++++++++-------------- VgerCore/VgerCore.lua | 11 +++--- 18 files changed, 102 insertions(+), 70 deletions(-) diff --git a/.github/workflows/package-addon.yml b/.github/workflows/package-addon.yml index b8a6f80..65cd590 100644 --- a/.github/workflows/package-addon.yml +++ b/.github/workflows/package-addon.yml @@ -11,6 +11,7 @@ env: CLASSIC_VERSION: 11501 BURNING_CRUSADE_VERSION: 20504 WRATH_VERSION: 30403 + CATACLYSM_VERSION: 40400 jobs: package: @@ -70,6 +71,16 @@ jobs: zip -9 -r ${{steps.init.outputs.tag_name}}-Wrath.zip ${{steps.init.outputs.addon_name}} cd .. + - name: Replace TOC version for Cataclysm + run: | + sed -i 's/Interface: *[0-9]\+/Interface: ${{env.CATACLYSM_VERSION}}/g' .releases/${{steps.init.outputs.addon_name}}/${{steps.init.outputs.addon_name}}.toc + + - name: Create Cataclysm zip + run: | + cd .releases + zip -9 -r ${{steps.init.outputs.tag_name}}-Cataclysm.zip ${{steps.init.outputs.addon_name}} + cd .. + - name: Tag this version id: create_release uses: actions/create-release@v1 @@ -121,3 +132,14 @@ jobs: asset_path: .releases/${{steps.init.outputs.tag_name}}-Wrath.zip asset_name: ${{steps.init.outputs.tag_name}}-Wrath.zip asset_content_type: application/zip + + - name: Add Cataclysm zip to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: .releases/${{steps.init.outputs.tag_name}}-Cataclysm.zip + asset_name: ${{steps.init.outputs.tag_name}}-Cataclysm.zip + asset_content_type: application/zip + \ No newline at end of file diff --git a/ClassicHawsJon.lua b/ClassicHawsJon.lua index aa22e32..cd52be7 100644 --- a/ClassicHawsJon.lua +++ b/ClassicHawsJon.lua @@ -9,7 +9,7 @@ local ScaleProviderName = "Classic" -PawnClassicLastUpdatedVersion = 2.0607 +PawnClassicLastUpdatedVersion = 2.0900 function PawnClassicScaleProvider_AddScales() @@ -317,7 +317,7 @@ function PawnClassicScaleProvider_AddScales() Stamina=1, Health=0.09, Hp5=2, Armor=0.02, DefenseRating=DefenseRatingPer*0.81, DodgeRating=DodgeRatingPer*0.7, ParryRating=ParryRatingPer*0.58, BlockRating=BlockRatingPer*0.59, BlockValue=0.35, ResilienceRating=0.2, AllResist=1, FireResist=0.2, FrostResist=0.2, ArcaneResist=0.2, ShadowResist=0.2, NatureResist=0.2, MetaSocketEffect=36, } ) - elseif VgerCore.IsWrath then ------------------------------------------------------------ + elseif VgerCore.IsWrath or VgerCore.IsCataclysm then ------------------------------------------------------------ local Scale @@ -687,7 +687,7 @@ end -- PawnClassicScaleProvider_AddScales ------------------------------------------------------------ -if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then -- Scales for all versions of WoW Classic are in this file. PawnAddPluginScaleProvider(ScaleProviderName, PawnLocal.UI.StarterProvider, PawnClassicScaleProvider_AddScales) else diff --git a/GemsWrath.lua b/GemsWrath.lua index b499150..46265f0 100644 --- a/GemsWrath.lua +++ b/GemsWrath.lua @@ -7,7 +7,7 @@ ------------------------------------------------------------ -if VgerCore.IsWrath then +if VgerCore.IsWrath or VgerCore.IsCataclysm then --======================================== diff --git a/Localization.deDE.lua b/Localization.deDE.lua index 59945a8..6c487b5 100644 --- a/Localization.deDE.lua +++ b/Localization.deDE.lua @@ -690,7 +690,7 @@ Weitere Informationen zu dieser Einstellung findest du in der Readme-Datei.]=], -- Special case: weapon speed and Mail use different words on Classic. -- So, patch things up here. -if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then PawnLocal.Mail = "Schwere Rüstung" PawnLocal.MailInfo = "Punkte, die zugewiesen werden sollen, wenn der Gegenstand Schwere Rüstung ist." PawnLocal.TooltipParsing.Mail = "^Schwere Rüstung$" diff --git a/Localization.es.lua b/Localization.es.lua index a65bfa8..190550a 100644 --- a/Localization.es.lua +++ b/Localization.es.lua @@ -819,7 +819,7 @@ if GetLocale() == "esES" then PawnLocal.ThousandsSeparator = "" PawnLocal.DecimalSeparator = "," - if VgerCore.IsWrath then + if VgerCore.IsWrath or VgerCore.IsCataclysm then -- Wrath Classic on esES has an incorrect LARGE_NUMBER_SEPERATOR. PawnLocal.ThousandsSeparator = "," end @@ -871,7 +871,7 @@ if GetLocale() == "esES" then end end - if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then + if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_Classic = { @@ -920,7 +920,7 @@ if GetLocale() == "esES" then end end - if VgerCore.IsBurningCrusade or VgerCore.IsWrath then + if VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_BurningCrusade = { @@ -940,7 +940,7 @@ if GetLocale() == "esES" then end end - if VgerCore.IsMainline or VgerCore.IsBurningCrusade or VgerCore.IsWrath then + if VgerCore.IsMainline or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then PawnLocal.TooltipParsing.Block = "^%+?# bloqueo$" end @@ -949,7 +949,7 @@ elseif GetLocale() == "esMX" then PawnLocal.ThousandsSeparator = "," PawnLocal.DecimalSeparator = "." - if VgerCore.IsBurningCrusade or VgerCore.IsWrath then + if VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then PawnLocal.TooltipParsing.Block = "^%+?# bloqueo$" end end diff --git a/Localization.frFR.lua b/Localization.frFR.lua index e4e8c6d..e0f5f4b 100644 --- a/Localization.frFR.lua +++ b/Localization.frFR.lua @@ -694,15 +694,15 @@ Cette commande ne peut etre défaite!]=], -- Special case: wands actually use different text on live versus classic. -- So, patch things up here. -if VgerCore.IsClassic then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade then PawnLocal.ThousandsSeparator = "NBSP" PawnLocal.DecimalSeparator = "." -elseif VgerCore.IsWrath then +elseif VgerCore.IsWrath or VgerCore.IsCataclysm then PawnLocal.ThousandsSeparator = "" PawnLocal.DecimalSeparator = "," end -if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_Classic = { ["WeaponDamageArcane"] = "^Dégâts %(Arcanes%) : # %- #$", @@ -725,7 +725,7 @@ if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then end end -if VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_BurningCrusade = { diff --git a/Localization.koKR.lua b/Localization.koKR.lua index 5867e5d..cc1d731 100644 --- a/Localization.koKR.lua +++ b/Localization.koKR.lua @@ -708,7 +708,7 @@ Pawn이 상점에 판매했거나, 파괴했거나, 다른 방법으로 더이 -- Special case: wands actually use different text on live versus classic. -- So, patch things up here. -if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_Classic = { diff --git a/Localization.ptBR.lua b/Localization.ptBR.lua index dc16ea0..bc6167f 100644 --- a/Localization.ptBR.lua +++ b/Localization.ptBR.lua @@ -774,7 +774,7 @@ PawnLocal.Specs = -- Special case: wands actually use different text on live versus classic. -- So, patch things up here. -if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_Classic = { diff --git a/Localization.ruRU.lua b/Localization.ruRU.lua index 4b3532d..24f1ee8 100644 --- a/Localization.ruRU.lua +++ b/Localization.ruRU.lua @@ -767,7 +767,7 @@ PawnLocal.Specs = }, } -if VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then PawnLocal.DecimalSeparator = "," PawnLocal.ThousandsSeparator = "," end diff --git a/Localization.zhCN.lua b/Localization.zhCN.lua index 2285251..be5a753 100644 --- a/Localization.zhCN.lua +++ b/Localization.zhCN.lua @@ -704,7 +704,7 @@ Pawn插件默认已经参考AskMrRobot给所有职业的专精建立了标准评 -- Special case: wands use different text on Classic. -- So, patch things up here. -if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_Classic = { @@ -730,7 +730,7 @@ if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then end end -if VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_BurningCrusade = { diff --git a/Localization.zhTW.lua b/Localization.zhTW.lua index 9c4213b..9c1f2a2 100644 --- a/Localization.zhTW.lua +++ b/Localization.zhTW.lua @@ -755,7 +755,7 @@ if VgerCore.IsClassic then end end -if VgerCore.IsBurningCrusade or VgerCore.IsWrath then +if VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_BurningCrusade = { @@ -784,7 +784,7 @@ if VgerCore.IsBurningCrusade or VgerCore.IsWrath then end end -if VgerCore.IsWrath then +if VgerCore.IsWrath or VgerCore.IsCataclysm then local TooltipParsing_Wrath = { diff --git a/Pawn.lua b/Pawn.lua index c47bf0c..6689025 100644 --- a/Pawn.lua +++ b/Pawn.lua @@ -7,7 +7,7 @@ -- Main non-UI code ------------------------------------------------------------ -PawnVersion = 2.0812 +PawnVersion = 2.0900 -- Pawn requires this version of VgerCore: local PawnVgerCoreVersionRequired = 1.17 @@ -736,7 +736,7 @@ function PawnInitializeOptions() if FrostDK then FrostDK.DoNotShow2HUpgrades = false end end if ((VgerCore.IsMainline) and PawnCommon.LastVersion < PawnMrRobotLastUpdatedVersion) or - ((VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath) and PawnCommon.LastVersion < PawnClassicLastUpdatedVersion) then + ((VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm) and PawnCommon.LastVersion < PawnClassicLastUpdatedVersion) then -- If the Ask Mr. Robot scales have been updated since the last time they used Pawn, re-scan gear. PawnInvalidateBestItems() end @@ -3180,7 +3180,7 @@ function PawnCorrectScaleErrors(ScaleName) end -- Spell power appeared in Wrath but disappeared again later. - if not VgerCore.IsWrath then + if not VgerCore.IsWrath or VgerCore.IsCataclysm then ThisScale.SpellPower = nil end @@ -3201,7 +3201,7 @@ function PawnCorrectScaleErrors(ScaleName) ThisScale.DominationSocket = nil -- Wrath Classic merges SpellDamage and Healing into SpellPower, and melee and spell ratings. - if VgerCore.IsWrath then + if VgerCore.IsWrath or VgerCore.IsCataclysm then PawnCombineStats(ThisScale, "SpellPower", "SpellDamage") PawnCombineStats(ThisScale, "SpellPower", "Healing") PawnCombineStats(ThisScale, "HitRating", "SpellHitRating") @@ -5672,7 +5672,7 @@ end -- Wraps the GetSpecializationInfoForClassID function so that it can be called on WoW Classic. -- On WoW Classic, this only returns: _, LocalizedSpecName, _, IconID, Role function PawnGetSpecializationInfoForClassID(ClassID, SpecID) - if GetSpecializationInfoForClassID then return GetSpecializationInfoForClassID(ClassID, SpecID) end + if VgerCore.IsMainline then return GetSpecializationInfoForClassID(ClassID, SpecID) end local SpecInfo = PawnLocal.Specs[ClassID][SpecID] -- The second-to-last parameter should be SpecInfo.Icon, but many of the icons used in BfA aren't valid on Classic. diff --git a/Pawn.toc b/Pawn.toc index e3ef0a5..4d6fe55 100644 --- a/Pawn.toc +++ b/Pawn.toc @@ -1,6 +1,6 @@ ## Interface: 100206 ## Title: Pawn -## Version: 2.8.12 +## Version: 2.9.0 ## Notes: Pawn helps you compare items and find upgrades. ## OptionalDependencies: Ace3, ArkInventoryRules, AtlasLoot, EQCompare, EquipCompare, LinkWrangler, MobInfo2, MultiTips, Outfitter ## SavedVariables: PawnCommon diff --git a/PawnUI.lua b/PawnUI.lua index 2be99b1..978cea8 100644 --- a/PawnUI.lua +++ b/PawnUI.lua @@ -66,9 +66,9 @@ local PawnUIFrameNeedsScaleSelector = { true, true, true, true, false, false, fa function PawnUI_InventoryPawnButton_Move() if PawnCommon.ButtonPosition == PawnButtonPositionRight then PawnUI_InventoryPawnButton:ClearAllPoints() - if PaperDollFrame.ExpandButton then + if VgerCore.IsCataclysm or PaperDollFrame.ExpandButton then -- DejaCharacterStats compatibility - PawnUI_InventoryPawnButton:SetPoint("TOPRIGHT", "CharacterTrinket1Slot", "BOTTOMRIGHT", -31, -8) + PawnUI_InventoryPawnButton:SetPoint("TOPRIGHT", "CharacterTrinket1Slot", "BOTTOMRIGHT", -25, -8) else PawnUI_InventoryPawnButton:SetPoint("TOPRIGHT", "CharacterTrinket1Slot", "BOTTOMRIGHT", -1, -8) end @@ -1455,7 +1455,7 @@ function PawnUI_CompareItems(IsAutomatedRefresh) -- Hack for WoW Classic: after a moment, refresh the whole thing, because we might have gotten -- incomplete data from the tooltip the first time. - if not IsAutomatedRefresh and (VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath) then + if not IsAutomatedRefresh and (VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm) then local AutomatedRefresh = function() if PawnUIComparisonItems[1] then PawnUIComparisonItems[1] = PawnGetItemData(PawnUIComparisonItems[1].Link) end if PawnUIComparisonItems[2] then PawnUIComparisonItems[2] = PawnGetItemData(PawnUIComparisonItems[2].Link) end diff --git a/Readme.htm b/Readme.htm index f664a0f..cc60838 100644 --- a/Readme.htm +++ b/Readme.htm @@ -307,8 +307,16 @@

Incompatible addons

Updates

-

Version 2.8.12

+

Version 2.9.0

Version 2.8.11