Skip to content

Commit c8cd4eb

Browse files
committed
implementing icicles finalization
1 parent 2446fff commit c8cd4eb

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

Core.lua

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -493,21 +493,18 @@ function cPointDisplay:UpdatePointDisplay(...)
493493
end
494494
end
495495

496-
-- Point retrieval
497-
local function GetDebuffCount(SpellID, ...)
498-
if not SpellID then return end
499-
local unit = ... or "target"
500-
local _,_,_,count,_,_,_,caster = UnitDebuff(unit, SpellID)
501-
if ( (count == nil) or (caster ~= "player") ) then count = 0 end -- Make sure Count isn't Nil, and only show Debuffs cast by me
502-
return count
503-
end
504-
505-
local function GetBuffCount(SpellID, ...)
506-
if not SpellID then return end
496+
local function GetBuffCount(Spell, ...)
497+
if not Spell then return end
507498
local unit = ... or "player"
508-
local _,_,_,count = UnitAura(unit, SpellID)
509-
if (count == nil) then count = 0 end
510-
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
511508
end
512509

513510
function cPointDisplay:GetPoints(CurClass, CurType)
@@ -554,8 +551,9 @@ function cPointDisplay:GetPoints(CurClass, CurType)
554551
-- Arcane Charges
555552
if CurType == "ac" and PlayerSpec == SPEC_MAGE_ARCANE then
556553
NewPoints = UnitPower("player", Enum.PowerType.ArcaneCharges)
557-
elseif CurType == "ic" and PlayerSpec == SPEC_MAGE_FROST then
558-
NewPoints = GetBuffCount(148022) -- Icicle buff id
554+
-- Icicles
555+
elseif CurType == "ic" and PlayerSpec == 3 then
556+
NewPoints = GetBuffCount(205473) -- Icicle buff id
559557
end
560558
end
561559
Points[CurType] = NewPoints

0 commit comments

Comments
 (0)