View Single Post
01-15-15, 04:06 PM   #6
sticklord
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 57
Yeah thats actually what i do:
Lua Code:
  1. local function UpdateAurasByGuid(dstGUID, spellID, expire, count, srcGUID, duration, texture) -- Shit way
  2.     local _, instance = IsInInstance()
  3.     local buUnit = instance == "arena" and "arena" or "boss"
  4.  
  5.     if dstGUID == UnitGUID("mouseover") then
  6.         return UpdateAuraByUnit("mouseover", dstGUID);
  7.     else
  8.         for i = 1, 5 do
  9.             if dstGUID == UnitGUID(buUnit..i) then
  10.                 return UpdateAuraByUnit(buUnit..i, dstGUID);
  11.             end
  12.         end
  13.     end
  14.     -- No match, lets try some more
  15.     local plate = ns.GetNameplateByGuid(dstGUID)
  16.     if not plate then return; end
  17.     -- We have the plate at least
  18.     UpdateAuraButton(plate, spellID, texture, count, duration, expire, true)
  19. end
  Reply With Quote