GetArenaUnit add unify parameter
This commit is contained in:
parent
7d86078c8c
commit
14dc227c86
11
Util.lua
11
Util.lua
@ -160,14 +160,23 @@ function Gladdy:isFeignDeath(unit)
|
|||||||
return AuraUtil.FindAuraByName(feignDeath, unit)
|
return AuraUtil.FindAuraByName(feignDeath, unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:GetArenaUnit(unitCaster)
|
function Gladdy:GetArenaUnit(unitCaster, unify)
|
||||||
if unitCaster then
|
if unitCaster then
|
||||||
for i=1,5 do
|
for i=1,5 do
|
||||||
local arenaUnit = "arena" .. i
|
local arenaUnit = "arena" .. i
|
||||||
local arenaUnitPet = "arenapet" .. i
|
local arenaUnitPet = "arenapet" .. i
|
||||||
|
if unify then
|
||||||
if unitCaster and (UnitIsUnit(arenaUnit, unitCaster) or UnitIsUnit(arenaUnitPet, unitCaster)) then
|
if unitCaster and (UnitIsUnit(arenaUnit, unitCaster) or UnitIsUnit(arenaUnitPet, unitCaster)) then
|
||||||
return arenaUnit
|
return arenaUnit
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if unitCaster and UnitIsUnit(arenaUnit, unitCaster) then
|
||||||
|
return arenaUnit
|
||||||
|
end
|
||||||
|
if unitCaster and UnitIsUnit(arenaUnitPet, unitCaster) then
|
||||||
|
return arenaUnitPet
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user