mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
unitframes: extend aggro scanner and fix refresh
This commit is contained in:
+7
-2
@@ -26,7 +26,7 @@ for i=1,40 do pfValidUnits["raidpet" .. i .. "target"] = true end
|
|||||||
|
|
||||||
local aggrodata = { }
|
local aggrodata = { }
|
||||||
function pfUI.api.UnitHasAggro(unit)
|
function pfUI.api.UnitHasAggro(unit)
|
||||||
if aggrodata[unit] and GetTime() > aggrodata[unit].check + 1 then
|
if aggrodata[unit] and GetTime() < aggrodata[unit].check + 1 then
|
||||||
return aggrodata[unit].state
|
return aggrodata[unit].state
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -36,7 +36,12 @@ function pfUI.api.UnitHasAggro(unit)
|
|||||||
for u in pairs(pfValidUnits) do
|
for u in pairs(pfValidUnits) do
|
||||||
local t = u .. "target"
|
local t = u .. "target"
|
||||||
local tt = t .. "target"
|
local tt = t .. "target"
|
||||||
if UnitExists(tt) and UnitIsUnit(tt, unit) and UnitCanAttack(t, tt) then
|
|
||||||
|
if UnitExists(t) and UnitIsUnit(t, unit) and UnitCanAttack(u, unit) then
|
||||||
|
aggrodata[unit].state = aggrodata[unit].state + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if UnitExists(tt) and UnitIsUnit(tt, unit) and UnitCanAttack(t, unit) then
|
||||||
aggrodata[unit].state = aggrodata[unit].state + 1
|
aggrodata[unit].state = aggrodata[unit].state + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
## Title: |cff33ffccpf|cffffffffUI
|
## Title: |cff33ffccpf|cffffffffUI
|
||||||
## Author: Shagu
|
## Author: Shagu
|
||||||
## Notes: A complete user interface replacement.
|
## Notes: A complete user interface replacement.
|
||||||
## Version: 3.5.2
|
## Version: 3.5.3
|
||||||
## SavedVariables: pfUI_profiles, pfUI_gold
|
## SavedVariables: pfUI_profiles, pfUI_gold
|
||||||
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user