Code:
if not cTar
then
for i=1,40 do
cTar = {
"target",
"focus",
"mouseover",
"party1target", "party2target", "party3target", "party4target", "party5target",
"raid"..i .."target",
"arena1","arena2","arena3","arena4","arena5",
"arenapet1","arenapet2","arenapet3","arenapet4","arenapet5",
"boss1","boss2","boss3","boss4",
"raidpet"..i.."target",
"partypet1target", "partypet2target", "partypet3target", "partypet4target", "partypet5target",
"pettarget"
}
end
end
Code:
function SoulSwapGainedFrom(t)
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster = UnitBuffID("player",86211) -- Soul Swap buff on player after casting Soul Swap on target
if unitCaster==t
then
return true
end
end
that means unitCaster == Soul Swapped target that cannot be soul swapped again
Code:
function SSEXHALEIT(t)
if UnitExists(t)
and not SoulSwapGainedFrom(t)
and HaveBuff("player",86211,0)
then
CastSpellByName(GetSpellInfo(86213),t)
end
end
for i=1 , #cTar do
if SSEXHALEIT(cTar[i])
then
end
end
So everything works great when im targeting my soulswapped target, the problem begins when more than one Unit from cTar are targeting my soulswapped Unit, the rotation go crazy and [starts to execute Soul Swap Exhale. How would i change it?