This commit is contained in:
Bunny67
2020-06-04 23:20:52 +03:00
parent 99c1114efb
commit 26a968f932
9 changed files with 8 additions and 354 deletions
+4 -17
View File
@@ -672,12 +672,8 @@ function WeakAuras.ScanAuras(unit)
end
end
local satisfies_role = true
if data.group_role then
satisfies_role = data.group_role == "ANY" or UnitGroupRolesAssigned(unit) == data.group_role
end
local satisfies_ignoreSelf = not data.ignoreSelf or not UnitIsUnit(unit, "player")
if not satisfies_role or not satisfies_ignoreSelf then
if not satisfies_ignoreSelf then
active = false
end
@@ -715,17 +711,9 @@ function WeakAuras.ScanAuras(unit)
if(data.group_count) then
-- Query count from aura cache
local aura_count = aura_object:GetNumber(id, triggernum, data)
local max
if (data.group_role) then
max = aura_cache[data.group_role]
if (data.ignoreSelf and aura_cache.playerRole == data.group_role) then
max = max - 1;
end
else
max = aura_object:GetMaxNumber();
if (data.ignoreSelf) then
max = max - 1;
end
local max = aura_object:GetMaxNumber();
if (data.ignoreSelf) then
max = max - 1;
end
local satisfies_count = data.group_count(aura_count, max);
@@ -1597,7 +1585,6 @@ function BuffTrigger.Add(data)
hideAlone = trigger.hideAlone,
stack_info = trigger.stack_info,
name_info = trigger.name_info,
group_role = trigger.useGroupRole and trigger.group_role,
ignoreSelf = trigger.ignoreSelf
};
end