@@ -40,7 +40,7 @@ local DBOpt = LibStub("AceDBOptions-3.0")
4040local media = LibStub (" LibSharedMedia-3.0" )
4141local mod = MagicTargets
4242local comm = LibStub (" MagicComm-1.0" )
43-
43+ local UnitAura = UnitAura
4444local CreateFrame = CreateFrame
4545local GetInventoryItemLink = GetInventoryItemLink
4646local GetItemInfo = GetItemInfo
397397 end
398398 local _ , class = UnitClass (unit )
399399 local auras = tankAura [class ]
400- -- if mod.debug then mod:debug("Tank check: Class = %s,auras = %s, type(auras) = %s",
401- -- class, mod:Dump(auras), type(auras))
402- -- end
400+ -- if mod.debug then mod:debug("Tank check: Class = %s,auras = %s, type(auras) = %s",
401+ -- class, mod:Dump(auras), type(auras))
402+ -- end
403403 if not auras then
404404-- mod:debug("Found no auras for class %s", class)
405405 unitTanks [name ] = false
408408
409409 if type (auras ) == " function" then
410410 unitTanks [name ] = auras (unit )
411- -- mod:debug("Found that %s [%s] is %s", name, unit, tostring(auras(unit)))
411+ -- mod:debug("Found that %s [%s] is %s", name, unit, tostring(auras(unit)))
412412 return unitTanks [name ]
413413 else
414- for aura in pairs (auras ) do
415- if AuraUtil .FindAuraByName (unit , aura ) then
414+ for idx = 1 , 40 do
415+ local aura = UnitAura (unit , idx , " HELPFUL" )
416+ if not aura then
417+ break
418+ end
419+ -- mod:debug("Scanning: Found %s ", mod:Dump(aura) or "nil")
420+
421+ if auras [aura ] then
416422 unitTanks [name ] = true
417423 return true
418424 end
0 commit comments