Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function target_unit(id)
- if dark_addon.luaboxdev then
- __LB__.UnitTagHandler(TargetUnit, id)
- elseif dark_addon.adv_protected then
- local obj = GetObjectWithGUID(id)
- TargetUnit(GetObjectWithGUID(id))
- end
- faceTarget()
- end
- setfenv(target_unit, dark_addon.environment.env)
- local function spreadMyDots()
- if not toggle("interrupts", false) then
- return
- end
- if not castable("Corruption") then
- return
- end
- if checkDOTz() == false then
- return
- end
- local multi = dark_addon.settings.fetch("classic_warlock_multiTarget", false)
- local saved_target = nil
- local unit = nil
- if target.exists and target.alive and multi then
- saved_target = target.guid
- end
- if multi then
- unit =
- enemies.match(
- function(unit)
- return unit.exists and unit.alive and unit.in_range("Corruption") and unit.combat
- end
- )
- elseif target.exists and target.alive and target.in_range("Corruption") and target.combat then
- unit = target
- else
- unit = false
- end
- if unit ~= false and IsSpellKnown(172) and not spell("Corruption").lastcast and canCast("Corruption") and target.debuff("Corruption").down and GetTime() - timeForCorruption > 1.5 then
- timeForCorruption = GetTime() then
- if multi then
- target_unit(unit.guid)
- end
- cast("Corruption", "target")
- if saved_target ~= nil and multi then
- target_unit(saved_target)
- end
- return true
- end
- if unit ~= false and target.debuff("Immolate").down then
- if multi then
- target_unit(unit.guid)
- end
- cast("Immolate", "target")
- if saved_target ~= nil and multi then
- target_unit(saved_target)
- end
- return true
- end
- if unit ~= false and target.debuff("Curse of Agony").down then
- if multi then
- target_unit(unit.guid)
- end
- cast("Curse of Agony", "target")
- if saved_target ~= nil and multi then
- target_unit(saved_target)
- end
- return true
- end
- if unit ~= false and target.debuff("Siphon Life").down then
- if multi then
- target_unit(unit.guid)
- end
- cast("Siphon Life", "target")
- if saved_target ~= nil and multi then
- target_unit(saved_target)
- end
- return true
- end
- return false
- end
- setfenv(spreadMyDots, dark_addon.environment.env)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement