Skip to content

Commit 33e67c5

Browse files
committed
Implementing arcane charges.
1 parent 8e09921 commit 33e67c5

3 files changed

Lines changed: 29 additions & 5 deletions

File tree

Core.lua

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,26 @@ SimplePointDisplay.Types = {
77
name = "General",
88
points = {
99
[1] = {name = "Combo Points", id = "cp", barcount = 5},
10-
},
10+
}
1111
},
1212
["PALADIN"] = {
1313
name = "Paladin",
1414
points = {
1515
[1] = {name = "Holy Power", id = "hp", barcount = 5},
16-
},
16+
}
1717
},
1818
["WARLOCK"] = {
1919
name = "Warlock",
2020
points = {
2121
[1] = {name = "Soul Shards", id = "ss", barcount = 5},
22-
},
22+
}
2323
},
24+
["MAGE"] = {
25+
name = "Mage",
26+
points = {
27+
[1] = {name = "Arcane Charges", id = "ac", barcount = 4}
28+
}
29+
}
2430
}
2531
local Types = SimplePointDisplay.Types
2632

@@ -514,6 +520,12 @@ function SimplePointDisplay:GetPoints(CurClass, CurType)
514520
if CurType == "ss" then
515521
NewPoints = UnitPower("player", SPELL_POWER_SOUL_SHARDS)
516522
end
523+
-- Mage
524+
elseif CurClass == "MAGE" and PlayerSpec == SPEC_MAGE_ARCANE then
525+
-- Arcane Charges
526+
if CurType == "ac" then
527+
NewPoints = UnitPower("player", SPELL_POWER_ARCANE_CHARGES)
528+
end
517529
end
518530
Points[CurType] = NewPoints
519531
end
@@ -962,6 +974,14 @@ function SimplePointDisplay:HideUIElements()
962974
SSF:SetScript("OnShow", function(self) self:Hide() end)
963975
end
964976
end
977+
978+
if db["MAGE"].types["ac"].enabled and db["MAGE"].types["ac"].general.hideui then
979+
local APF = _G["ArcaneChargesFrame"]
980+
if APF then
981+
APF:Hide()
982+
APF:SetScript("OnShow", function(self) self:Hide() end)
983+
end
984+
end
965985
end
966986

967987
function SimplePointDisplay:UpdateSpec()
@@ -1016,6 +1036,9 @@ function SimplePointDisplay:PLAYER_LOGIN()
10161036
tinsert(EventList, "UNIT_POWER")
10171037
tinsert(EventList, "UNIT_DISPLAYPOWER")
10181038
end
1039+
if (PlayerClass == "MAGE") then
1040+
tinsert(EventList, "UNIT_POWER")
1041+
end
10191042
local UpdateSpeed = (1 / db.updatespeed)
10201043
self:RegisterBucketEvent(EventList, UpdateSpeed, "UpdatePoints")
10211044
-- Instant Events

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Then open the renamed file and change the string `nibPointDisplayDB` to `SimpleP
1212
- Combo Points
1313
- Holy Power
1414
- Soul Shards
15+
- Arcane Charges *(new)*
1516

1617
###Requests
1718

SimplePowerDisplay.toc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Interface: 70000
22
## Title: |cFFFF9933Simple|rPointDisplay
33
## Author: Nibelheim, ChronosSF
4-
## Notes: Customizable graphical point display (Combo Points, Holy Power, Soul Shards). Fan update of nibPointDisplay by Nibelheim.
5-
## Version: 0.1.0
4+
## Notes: Customizable graphical point display (Combo Points, Holy Power, Soul Shards, Arcane Power). Fan update of nibPointDisplay by Nibelheim.
5+
## Version: 0.2.0
66
## SavedVariables: SimplePointDisplayDB
77
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
88

0 commit comments

Comments
 (0)