View Single Post
11-25-18, 07:06 PM   #4
Taet
A Deviate Faerie Dragon
Join Date: Jan 2010
Posts: 17
I use this code, i try rewrite to your koncept. Maybe help you. Sry for eng.

Save dname in function UpdateAuraIcon

lua Code:
  1. button.name = name

lua Code:
  1. if dname and matchdebuff then
  2.     --if dspellid == 209859 or dspellid == 113746 or dspellid == 228287 then return end -- 激勵?
  3.     local exist = false
  4.     if dname == "Bolstering" then
  5.         for index = 1, i do
  6.             if unitFrame.icons[index].name == dname then
  7.                 unitFrame.icons[index].count = unitFrame.icons[index].count + 1
  8.                 exist = true
  9.             end
  10.         end
  11.     elseif not exist then
  12.         if not unitFrame.icons[i] then
  13.             unitFrame.icons[i] = CreateAuraIcon(unitFrame.icons)
  14.         end
  15.             UpdateAuraIcon(unitFrame.icons[i], unit, index, "HARMFUL")
  16.             if i ~= 1 then
  17.                 unitFrame.icons[i]:SetPoint("LEFT", unitFrame.icons[i-1], "RIGHT", 4, 0)
  18.             end
  19.             i = i + 1
  20.     end
  Reply With Quote