Skip to content

Commit

Permalink
Cataclysm Classic support and 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisSpomer committed May 3, 2024
1 parent 6c49378 commit 1212a2f
Show file tree
Hide file tree
Showing 18 changed files with 102 additions and 70 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/package-addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
CLASSIC_VERSION: 11501
BURNING_CRUSADE_VERSION: 20504
WRATH_VERSION: 30403
CATACLYSM_VERSION: 40400

jobs:
package:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

6 changes: 3 additions & 3 deletions ClassicHawsJon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

local ScaleProviderName = "Classic"

PawnClassicLastUpdatedVersion = 2.0607
PawnClassicLastUpdatedVersion = 2.0900


function PawnClassicScaleProvider_AddScales()
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GemsWrath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
------------------------------------------------------------


if VgerCore.IsWrath then
if VgerCore.IsWrath or VgerCore.IsCataclysm then


--========================================
Expand Down
2 changes: 1 addition & 1 deletion Localization.deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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$"
Expand Down
10 changes: 5 additions & 5 deletions Localization.es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 =
{
Expand Down Expand Up @@ -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 =
{
Expand All @@ -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

Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Localization.frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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%) : # %- #$",
Expand All @@ -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 =
{
Expand Down
2 changes: 1 addition & 1 deletion Localization.koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand Down
2 changes: 1 addition & 1 deletion Localization.ptBR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand Down
2 changes: 1 addition & 1 deletion Localization.ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Localization.zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand All @@ -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 =
{
Expand Down
4 changes: 2 additions & 2 deletions Localization.zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand Down Expand Up @@ -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 =
{
Expand Down
10 changes: 5 additions & 5 deletions Pawn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-- Main non-UI code
------------------------------------------------------------

PawnVersion = 2.0812
PawnVersion = 2.0900

-- Pawn requires this version of VgerCore:
local PawnVgerCoreVersionRequired = 1.17
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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")
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Pawn.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions PawnUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion Readme.htm
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,16 @@ <h3><span style="text-decoration: underline;">In</span>compatible addons</h3>
</ul>

<h2>Updates</h2>
<h3>Version 2.8.12</h3>
<h3>Version 2.9.0</h3>
<ul>
<li>Cataclysm Classic: Added basic support for Cataclysm Classic. The following important work is <em>not</em> yet done:
<ul>
<li>Updated stat weights (if you know of a good source, please let me know!)</li>
<li>Reforging support</li>
<li>New level 85 gems</li>
<li>I'm not playing Classic, so I'll need your help pointing out remaining things that are broken!</li>
</ul>
</li>
</ul>
<h3>Version 2.8.11</h3>
<ul>
Expand Down
8 changes: 4 additions & 4 deletions ScaleTemplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
function PawnFindScaleTemplate(ClassID, SpecID)
local _, Template

if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then
if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then
for _, Template in pairs(PawnScaleTemplatesClassic) do
if Template.ClassID == ClassID then return Template end
end
Expand All @@ -31,7 +31,7 @@ function PawnGetStatValuesForTemplate(Template, NoStats)
if NoStats then
ScaleValues = {}
else
if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath then
if VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm then
ScaleValues =
{
["Stamina"] = 0.01,
Expand Down Expand Up @@ -142,7 +142,7 @@ function PawnGetStatValuesForTemplate(Template, NoStats)
end

-- Wrath merged some stats together.
if VgerCore.IsWrath then
if VgerCore.IsWrath or VgerCore.IsCataclysm then
ScaleValues.SpellCritRating = nil
ScaleValues.SpellHitRating = nil
ScaleValues.SpellHasteRating = nil
Expand Down Expand Up @@ -182,7 +182,7 @@ function PawnGetStatValuesForTemplate(Template, NoStats)
for _, StatName in pairs(Template.UnusableStats) do
ScaleValues[StatName] = PawnIgnoreStatValue

if (VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath) and StatName == "IsShield" then
if (VgerCore.IsClassic or VgerCore.IsBurningCrusade or VgerCore.IsWrath or VgerCore.IsCataclysm) and StatName == "IsShield" then
ScaleValues.BlockRating = nil
ScaleValues.BlockValue = nil
end
Expand Down
Loading

0 comments on commit 1212a2f

Please sign in to comment.