Skip to content

Commit

Permalink
Merge pull request #696 from Flamanis/Cata-initial-fixes
Browse files Browse the repository at this point in the history
Initial changes to try to fix cata beta.
  • Loading branch information
Tercioo authored Apr 5, 2024
2 parents 1f1e3a9 + cd4a2c7 commit 6ae2042
Show file tree
Hide file tree
Showing 10 changed files with 737 additions and 24 deletions.
18 changes: 7 additions & 11 deletions Libs/DF/fw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ end
---return if the wow version the player is playing is a classic version of wow
---@return boolean
function DF.IsTimewalkWoW()
if (buildInfo < 40000) then return true end
if (buildInfo < 50000) then return true end
return false
end

Expand Down Expand Up @@ -188,15 +188,6 @@ function DF.IsNonRetailWowWithRetailAPI()
end
DF.IsWotLKWowWithRetailAPI = DF.IsNonRetailWowWithRetailAPI -- this is still in use

---return true if the version of wow the player is playing is the shadowlands
function DF.IsShadowlandsWow()
local _, _, _, buildInfo = GetBuildInfo()
if (buildInfo < 100000 and buildInfo >= 90000) then
return true
end
return false
end

---for classic wow, get the role using the texture from the talents frame
local roleBySpecTextureName = {
DruidBalance = "DAMAGER",
Expand Down Expand Up @@ -257,7 +248,12 @@ function DF:GetRoleByClassicTalentTree()
for i = 1, (MAX_TALENT_TABS or 3) do
if (i <= numTabs) then
--tab information
local name, iconTexture, pointsSpent, fileName = GetTalentTabInfo(i)
local id, name, description, iconTexture, pointsSpent, fileName
if DF.IsCataWow() then
id, name, description, iconTexture, pointsSpent, fileName = GetTalentTabInfo(i)
else
name, iconTexture, pointsSpent, fileName = GetTalentTabInfo(i)
end
if (name) then
table.insert(pointsPerSpec, {name, pointsSpent, fileName})
end
Expand Down
4 changes: 2 additions & 2 deletions Libs/DF/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1415,8 +1415,8 @@ elseif (DF.IsWotLKWow()) then
}
DF.FeastIDs = {}
DF.RuneIDs = {}

elseif (DF.IsClassicWow()) then
--~Cata temp
elseif (DF.IsClassicWow() or DF.IsCataWow()) then
DF.PotionIDs = {}
DF.FeastIDs = {}
DF.RuneIDs = {}
Expand Down
698 changes: 698 additions & 0 deletions Libs/LibOpenRaid/ThingsToMantain_Cata.lua

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Libs/LibOpenRaid/lib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<Script file="ThingsToMantain_Shadowlands.lua" />
<Script file="ThingsToMantain_Wrath.lua" />
<Script file="ThingsToMantain_Era.lua" />
<Script file="ThingsToMantain_Cata.lua" />
</Ui>
9 changes: 7 additions & 2 deletions core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ Details.specToRole = {
}

--oldschool talent tree
if (DetailsFramework.IsWotLKWow()) then
if (DetailsFramework.IsWotLKWow() or DetailsFramework.IsCataWow()) then
local talentWatchClassic = CreateFrame("frame")
talentWatchClassic:RegisterEvent("CHARACTER_POINTS_CHANGED")
talentWatchClassic:RegisterEvent("SPELLS_CHANGED")
Expand Down Expand Up @@ -2526,7 +2526,12 @@ if (DetailsFramework.IsWotLKWow()) then
for i = 1, (MAX_TALENT_TABS or 3) do
if (i <= numTabs) then
--tab information
local name, iconTexture, pointsSpent, fileName = GetTalentTabInfo (i)
local id, name, description, iconTexture, pointsSpent, fileName
if DetailsFramework.IsCataWow() then
id, name, description, iconTexture, pointsSpent, fileName = GetTalentTabInfo(i)
else
name, iconTexture, pointsSpent, fileName = GetTalentTabInfo(i)
end
if (name) then
tinsert(pointsPerSpec, {name, pointsSpent, fileName})
end
Expand Down
9 changes: 5 additions & 4 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
local _GetSpellInfo = Details.getspellinfo
local isWOTLK = detailsFramework.IsWotLKWow()
local isERA = detailsFramework.IsClassicWow()
local isCATA = detailsFramework.IsCataWow()
local _tempo = time()
local _, Details222 = ...
_ = nil
Expand Down Expand Up @@ -593,7 +594,7 @@
Details.SpecialSpellActorsName = {}

--add sanguine affix
if (not isWOTLK) then
if (not isWOTLK and not isCATA and not isERA) then
if (Details.SanguineHealActorName) then
Details.SpecialSpellActorsName[Details.SanguineHealActorName] = SPELLID_SANGUINE_HEAL
end
Expand Down Expand Up @@ -2250,7 +2251,7 @@
12/14 21:14:44.545 SPELL_SUMMON,Creature-0-4391-615-3107-15439-00001A8313,"Fire Elemental Totem",0x2112,0x0,Creature-0-4391-615-3107-15438-00001A8313,"Greater Fire Elemental",0x2112,0x0,32982,"Fire Elemental Totem",0x1
]]

if (isWOTLK) then
if (isWOTLK or isCATA) then
if (npcId == 15439) then
Details.tabela_pets:AddPet(petSerial:gsub("%-15439%-", "%-15438%-"), "Greater Fire Elemental", petFlags, sourceSerial, sourceName, sourceFlags)

Expand Down Expand Up @@ -2477,7 +2478,7 @@
effectiveHeal = effectiveHeal + amount - overHealing
end

if (isWOTLK) then
if (isWOTLK or isCATA) then
--earth shield
if (spellId == SPELLID_SHAMAN_EARTHSHIELD_HEAL) then
--get the information of who placed the buff into this actor
Expand Down Expand Up @@ -2924,7 +2925,7 @@
return parser:add_buff_uptime(token, time, sourceSerial, sourceName, sourceFlags, sourceSerial, sourceName, sourceFlags, 0x0, spellId, spellName, "BUFF_UPTIME_IN")
end

if (isWOTLK) then
if (isWOTLK or isCATA) then
if (SHAMAN_EARTHSHIELD_BUFF[spellId]) then
TBC_EarthShieldCache[targetName] = {sourceSerial, sourceName, sourceFlags}

Expand Down
2 changes: 1 addition & 1 deletion frames/anime.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function _detalhes.PlayBestDamageOnGuild (damage)
Portrait.scale:SetStartDelay (0)
Portrait.scale:SetEndDelay (0)

if (DetailsFramework.IsDragonflight() or DetailsFramework.IsWotLKWowWithRetailAPI()) then
if (DetailsFramework.IsDragonflight() or DetailsFramework.IsNonRetailWowWithRetailAPI()) then
Portrait.scale:SetScaleFrom (0, 0)
Portrait.scale:SetScaleTo (1, 1)
else
Expand Down
4 changes: 2 additions & 2 deletions frames/window_eventtracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ function Details:CreateEventTrackerFrame(parentObject, name)
local screenFrame = CreateFrame("frame", name, parentObject or UIParent,"BackdropTemplate")
screenFrame:SetPoint("center", UIParent, "center")

if (not DetailsFramework.IsDragonflight() and not DetailsFramework.IsWotLKWowWithRetailAPI()) then
if (not DetailsFramework.IsDragonflight() and not DetailsFramework.IsNonRetailWowWithRetailAPI()) then
screenFrame:SetMinResize (150, 40)
screenFrame:SetMaxResize (800, 1024)
else
--f:SetResizeBounds(150, 40, 800, 1024)
screenFrame:SetResizeBounds(150, 40, 800, 1024)
end

screenFrame:SetSize(Details.event_tracker.frame.width, Details.event_tracker.frame.height)
Expand Down
12 changes: 12 additions & 0 deletions functions/spellcache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ do
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
}

elseif (DetailsFramework.IsCataWow()) 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]]},
}

elseif (DetailsFramework.IsShadowlandsWow()) then
defaultSpellCustomization = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
Expand Down
4 changes: 2 additions & 2 deletions functions/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ do


}

elseif (DetailsFramework.IsWotLKWow()) then
--~Cata temp
elseif (DetailsFramework.IsWotLKWow() or DetailsFramework.IsCataWow()) then
_detalhes.SpecSpellList = { --~spec

-- Balance Druid:
Expand Down

0 comments on commit 6ae2042

Please sign in to comment.