Skip to content

Commit fc158a6

Browse files
committed
Added support for Mists of Pandaria Classic. GH-12
1 parent 35e211b commit fc158a6

File tree

6 files changed

+80
-5
lines changed

6 files changed

+80
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2 July 2025
2+
- Added support for Mists of Pandaria Classic.
3+
14
# 20 September 2024
25
- Fixed bug with identifying spells by spell ID.
36

Conditions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ end
394394
function MOD.CheckSpec(spec, specList)
395395
local stat = MOD.status
396396
local currentSpec = stat.specialization
397-
local currentName = currentSpec and (MOD.ExpansionIsOrAbove(LE_EXPANSION_MISTS_OF_PANDARIA) and select(2, GetSpecializationInfo(currentSpec))) or "none"
397+
local currentName = currentSpec and (MOD.ExpansionIsOrAbove(LE_EXPANSION_MISTS_OF_PANDARIA) and select(2, SHIM:GetSpecializationInfo(currentSpec))) or "none"
398398
if specList then
399399
for _, name in pairs(specList) do
400400
local id = tonumber(name)
@@ -723,7 +723,7 @@ function MOD:UpdateConditions()
723723
stat.isMounted = CheckMounted()
724724

725725
if MOD.ExpansionIsOrAbove(LE_EXPANSION_MISTS_OF_PANDARIA) then
726-
stat.specialization = GetSpecialization()
726+
stat.specialization = SHIM:GetSpecialization()
727727
elseif MOD.ExpansionIsOrAbove(LE_EXPANSION_CATACLYSM) then
728728
stat.specialization = GetPrimaryTalentTree()
729729
end

Main.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ local optionsFailed = false -- set if loading the option panel module failed
3333
MOD.isVanilla = LE_EXPANSION_LEVEL_CURRENT == 0;
3434
MOD.isWrath = LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_WRATH_OF_THE_LICH_KING
3535
MOD.isCata = LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_CATACLYSM
36-
MOD.isClassic = MOD.isWrath or MOD.isVanilla or MOD.isCata
36+
MOD.isMists = LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_MISTS_OF_PANDARIA
37+
MOD.isClassic = MOD.isWrath or MOD.isVanilla or MOD.isCata or MOD.isMists
3738
MOD.isModernUI = LE_EXPANSION_LEVEL_CURRENT >= LE_EXPANSION_DRAGONFLIGHT
3839

3940
function MOD.ExpansionIsOrAbove(exp)
@@ -1064,12 +1065,12 @@ end
10641065

10651066
-- Create cache of talent info
10661067
local function InitializeTalents()
1067-
if not MOD.ExpansionIsOrAbove(LE_EXPANSION_MISTS_OF_PANDARIA) then talentsInitialized = true; return end -- not supported in classic
1068+
if not MOD.ExpansionIsOrAbove(LE_EXPANSION_SHADOWLANDS) then talentsInitialized = true; return end -- not supported in classic
10681069

10691070
local tabs = GetNumSpecializations(false, false)
10701071
if tabs == 0 then return end
10711072

1072-
local currentSpec = GetSpecialization()
1073+
local currentSpec = SHIM:GetSpecialization()
10731074
talentsInitialized = true;
10741075
doUpdate = true
10751076

Raven-Mists.toc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Interface: 50500
2+
## Title: Raven
3+
## Notes: Monitors buffs, debuffs and cooldowns and provides timer bars and icons plus helpful notifications
4+
## Author: Tomber, Dicebar, Dorana
5+
## Version: @project-version@
6+
## DefaultState: enabled
7+
## OptionalDependencies: Masque
8+
## SavedVariables: RavenDB
9+
10+
#@no-lib-strip@
11+
embeds.xml
12+
#@end-no-lib-strip@
13+
14+
Localizations\enUS.lua
15+
Localizations\ruRU.lua
16+
17+
Main.lua
18+
Profile.lua
19+
Conditions.lua
20+
Values.lua
21+
Bars.lua
22+
Cancel.lua
23+
Nest.lua
24+
Shims.lua
25+
26+
Presets\DeathKnight.lua
27+
Presets\DemonHunter.lua
28+
Presets\Druid.lua
29+
Presets\Hunter.lua
30+
Presets\Mage.lua
31+
Presets\Monk.lua
32+
Presets\Paladin.lua
33+
Presets\Priest.lua
34+
Presets\Rogue.lua
35+
Presets\Shaman.lua
36+
Presets\Warlock.lua
37+
Presets\Warrior.lua
38+
Presets\General.lua
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Interface: 50500
2+
## Title: Raven Options
3+
## Notes: Load on demand options panel for Raven
4+
## Author: Tomber, Dicebar, Dorana
5+
## Version: @project-version@
6+
## Dependencies: Raven
7+
## LoadOnDemand: 1
8+
9+
#@no-lib-strip@
10+
embeds.xml
11+
#@end-no-lib-strip@
12+
13+
Options.lua

Shims.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,23 @@ function SHIM:GetSpellChargesByID(spellID)
306306

307307
return GetSpellCharges(spellID)
308308
end
309+
310+
function SHIM:GetSpecialization()
311+
if _G.GetSpecialization then
312+
return _G.GetSpecialization()
313+
elseif C_SpecializationInfo and C_SpecializationInfo.GetSpecialization then
314+
return C_SpecializationInfo.GetSpecialization()
315+
elseif _G.GetPrimaryTalentTree then
316+
return _G.GetPrimaryTalentTree()
317+
end
318+
319+
return 1
320+
end
321+
322+
function SHIM:GetSpecializationInfo(specIndex)
323+
if _G.C_SpecializationInfo.GetSpecializationInfo ~= nil then
324+
return C_SpecializationInfo.GetSpecialization(specIndex)
325+
end
326+
327+
return GetSpecializationInfo(specIndex)
328+
end

0 commit comments

Comments
 (0)