@@ -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
493494end
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
510508end
511509
512510function 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
0 commit comments