Skip to content

Commit fb621c0

Browse files
authored
Merge pull request #13 from ChronosSF/frost-mage-icicles
Frost mage icicles
2 parents eddfebe + c8cd4eb commit fb621c0

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

Core.lua

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ cPointDisplay.Types = {
2525
["MAGE"] = {
2626
name = "Mage",
2727
points = {
28-
[1] = {name = "Arcane Charges", id = "ac", barcount = 4}
28+
[1] = {name = "Arcane Charges", id = "ac", barcount = 4},
29+
[2] = {name = "Icicles", id = "ic", barcount = 5}
2930
}
3031
},
3132
["MONK"] = {
@@ -492,21 +493,18 @@ function cPointDisplay:UpdatePointDisplay(...)
492493
end
493494
end
494495

495-
-- Point retrieval
496-
local function GetDebuffCount(SpellID, ...)
497-
if not SpellID then return end
498-
local unit = ... or "target"
499-
local _,_,_,count,_,_,_,caster = UnitDebuff(unit, SpellID)
500-
if ( (count == nil) or (caster ~= "player") ) then count = 0 end -- Make sure Count isn't Nil, and only show Debuffs cast by me
501-
return count
502-
end
503-
504-
local function GetBuffCount(SpellID, ...)
505-
if not SpellID then return end
496+
local function GetBuffCount(Spell, ...)
497+
if not Spell then return end
506498
local unit = ... or "player"
507-
local _,_,_,count = UnitAura(unit, SpellID)
508-
if (count == nil) then count = 0 end
509-
return count
499+
for i = 1, 255 do
500+
local name, _, count, _, _, _, _, _, _, id = UnitAura(unit, i, "HELPFUL")
501+
if not name then return end
502+
if Spell == id or Spell == name then
503+
if (count == nil) then count = 0 end
504+
return count
505+
end
506+
end
507+
return 0
510508
end
511509

512510
function cPointDisplay:GetPoints(CurClass, CurType)
@@ -549,10 +547,13 @@ function cPointDisplay:GetPoints(CurClass, CurType)
549547
NewPoints = UnitPower("player", Enum.PowerType.SoulShards)
550548
end
551549
-- Mage
552-
elseif CurClass == "MAGE" and PlayerSpec == SPEC_MAGE_ARCANE then
550+
elseif CurClass == "MAGE" then
553551
-- Arcane Charges
554-
if CurType == "ac" then
552+
if CurType == "ac" and PlayerSpec == SPEC_MAGE_ARCANE then
555553
NewPoints = UnitPower("player", Enum.PowerType.ArcaneCharges)
554+
-- Icicles
555+
elseif CurType == "ic" and PlayerSpec == 3 then
556+
NewPoints = GetBuffCount(205473) -- Icicle buff id
556557
end
557558
end
558559
Points[CurType] = NewPoints

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Then open the renamed file and change the string `nibPointDisplayDB` to `cPointD
1414
- Soul Shards
1515
- Arcane Charges
1616
- Chi
17-
- ~~Mongoose Bite Charges~~ (removed for 8.0)
17+
- *Icicles (new)*
1818

1919
### Requests
2020

cPointDisplay.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Title: |cFFFF9933c|rPointDisplay
33
## Author: Nibelheim, ChronosSF
44
## Notes: Customizable graphical point display (Combo Points, Holy Power, Soul Shards, etc.). Fan update of nibPointDisplay by Nibelheim.
5-
## Version: 8.0.0
5+
## Version: 8.0.3
66
## SavedVariables: cPointDisplayDB
77
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
88

0 commit comments

Comments
 (0)