Skip to content

Commit

Permalink
System - Spell Queue to default target instead of dynamic target
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteOne committed Feb 28, 2017
1 parent c988d1f commit 8c09eb7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
26 changes: 15 additions & 11 deletions Rotations/Warlock/Affliction/AfflictionCuteOne.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ local function createOptions()
br.ui:createSpinner(section, "Pre-Pull Timer", 5, 1, 10, 1, "|cffFFFFFFSet to desired time to start Pre-Pull (DBM Required). Min: 1 / Max: 10 / Interval: 1")
-- Opener
br.ui:createCheckbox(section,"Opener")
-- Pet Management
br.ui:createCheckbox(section, "Pet Management", "|cffFFFFFF Select to enable/disable auto pet management")
-- Summon Pet
br.ui:createDropdownWithout(section, "Summon Pet", {"Imp","Voidwalker","Felhunter","Succubus","Felguard", "Doomguard", "Infernal", "None"}, 1, "|cffFFFFFFSelect default pet to summon.")
-- Grimoire of Service
Expand Down Expand Up @@ -352,8 +354,10 @@ local function runRotation()
if getCombatTime() >= (tonumber(getOptionValue("DPS Testing"))*60) and isDummy() then
StopAttack()
ClearTarget()
PetStopAttack()
PetFollow()
if isChecked("Pet Management") then
PetStopAttack()
PetFollow()
end
Print(tonumber(getOptionValue("DPS Testing")) .." Minute Dummy Test Concluded - Profile Stopped")
profileStop = true
end
Expand Down Expand Up @@ -448,7 +452,7 @@ local function runRotation()
local function actionList_PreCombat()
-- Summon Pet
-- summon_pet,if=!talent.grimoire_of_supremacy.enabled&(!talent.grimoire_of_sacrifice.enabled|buff.demonic_power.down)
if not (IsFlying() or IsMounted()) and (not talent.grimoireOfSacrifice or not buff.demonicPower.exists()) and level >= 5 and br.timer:useTimer("summonPet", getCastTime(spell.summonVoidwalker) + gcd) then
if isChecked("Pet Management") and not (IsFlying() or IsMounted()) and (not talent.grimoireOfSacrifice or not buff.demonicPower.exists()) and level >= 5 and br.timer:useTimer("summonPet", getCastTime(spell.summonVoidwalker) + gcd) then
if (activePetId == 0 or activePetId ~= summonId) and (lastSpell ~= castSummonId or activePetId ~= summonId) then
if summonPet == 1 then
if isKnown(spell.summonFelImp) and lastSpell ~= spell.summonFelImp then
Expand Down Expand Up @@ -511,7 +515,7 @@ local function runRotation()
-- potion,name=deadly_grace
-- TODO
-- Pet Attack/Follow
if UnitExists("target") and not UnitAffectingCombat("pet") then
if isChecked("Pet Management") and UnitExists("target") and not UnitAffectingCombat("pet") then
PetAssistMode()
PetAttack("target")
end
Expand All @@ -538,7 +542,7 @@ local function runRotation()
if not inCombat and not hastar and profileStop==true then
profileStop = false
elseif (inCombat and profileStop==true) or (IsMounted() or IsFlying()) or pause() or mode.rotation==4 then
if not pause() and IsPetAttackActive() then
if not pause() and IsPetAttackActive() and isChecked("Pet Management") then
PetStopAttack()
PetFollow()
end
Expand Down Expand Up @@ -577,7 +581,7 @@ local function runRotation()
---------------------------
if getOptionValue("APL Mode") == 1 then
-- Pet Attack
if UnitIsUnit("target",units.dyn40) and not UnitIsUnit("pettarget",units.dyn40) then
if isChecked("Pet Management") and UnitIsUnit("target",units.dyn40) and not UnitIsUnit("pettarget",units.dyn40) then
PetAttack()
end
-- Reap Souls
Expand Down Expand Up @@ -630,7 +634,7 @@ local function runRotation()
end
-- Service Pet
-- service_pet,if=dot.corruption.remain()s&dot.agony.remain()s
if ObjectExists("target") then
if isChecked("Pet Management") and ObjectExists("target") then
if debuff.corruption.exists() and debuff.agony.exists() and br.timer:useTimer("summonPet", getCastTime(spell.summonVoidwalker)+gcd) then
if grimoirePet == 1 and lastSpell ~= spell.grimoireImp then
if cast.grimoireImp("player") then prevService = "Imp"; return end
Expand Down Expand Up @@ -662,7 +666,7 @@ local function runRotation()
end
-- Summon Doomguard
-- summon_doomguard,if=!talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal<=2&(target.time_to_die>180|target.health.pct<=20|target.time_to_die<30)
if useCDs() and isChecked("Summon Doomguard") and lastSpell ~= spell.summonDoomguard then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Doomguard") and lastSpell ~= spell.summonDoomguard then
if not talent.grimoireOfSupremacy and #enemies.yards8t <= 2
and (ttd(units.dyn40) > 180 or getHP(units.dyn40) <= 20 or ttd(units.dyn40) < 30 or isDummy())
then
Expand All @@ -671,22 +675,22 @@ local function runRotation()
end
-- Summon Infernal
-- summon_infernal,if=!talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal>2
if useCDs() and isChecked("Summon Infernal") and lastSpell ~= spell.summonInfernal then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Infernal") and lastSpell ~= spell.summonInfernal then
if not talent.grimoireOfSupremacy and #enemies.yards8t > 2 then
if cast.summonInfernal() then summonTime = GetTime(); return end
end
end
-- Summon Doomguard
-- summon_doomguard,if=talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal=1&equipped.132379&!cooldown.sindorei_spite_icd.remain()s
if useCDs() and isChecked("Summon Doomguard") and lastSpell ~= spell.summonDoomguard then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Doomguard") and lastSpell ~= spell.summonDoomguard then
if talent.grimoireOfSupremacy and #enemies.yards8t == 1 and hasEquiped(132379) and sindoreiSpiteOffCD and GetTime() > summonTime + 275 then

if cast.summonDoomguard() then summonTime = GetTime(); return end
end
end
-- Summon Infernal
-- summon_infernal,if=talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal>1&equipped.132379&!cooldown.sindorei_spite_icd.remain()s
if useCDs() and isChecked("Summon Infernal") and lastSpell ~= spell.summonInfernal then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Infernal") and lastSpell ~= spell.summonInfernal then
if talent.grimoireOfSupremacy and #enemies.yards8t > 1 and hasEquiped(132379) and sindoreiSpiteOffCD and GetTime() > summonTime + 275 then

if cast.summonInfernal() then summonTime = GetTime(); return end
Expand Down
32 changes: 18 additions & 14 deletions Rotations/Warlock/Destruction/DestructionCuteOne.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ local function createOptions()
br.ui:createCheckbox(section,"Opener")
-- Artifact
br.ui:createDropdownWithout(section,"Artifact", {"|cff00FF00Everything","|cffFFFF00Cooldowns","|cffFF0000Never"}, 1, "|cffFFFFFFWhen to use Artifact Ability.")
-- Pet Management
br.ui:createCheckbox(section, "Pet Management", "|cffFFFFFF Select to enable/disable auto pet management")
-- Summon Pet
br.ui:createDropdownWithout(section, "Summon Pet", {"Imp","Voidwalker","Felhunter","Succubus","Felguard","None"}, 1, "|cffFFFFFFSelect default pet to summon.")
-- Grimoire of Service
Expand Down Expand Up @@ -302,8 +304,10 @@ local function runRotation()
if getCombatTime() >= (tonumber(getOptionValue("DPS Testing"))*60) and isDummy() then
StopAttack()
ClearTarget()
PetStopAttack()
PetFollow()
if isChecked("Pet Management") then
PetStopAttack()
PetFollow()
end
Print(tonumber(getOptionValue("DPS Testing")) .." Minute Dummy Test Concluded - Profile Stopped")
profileStop = true
end
Expand Down Expand Up @@ -398,7 +402,7 @@ local function runRotation()
local function actionList_PreCombat()
-- Summon Pet
-- summon_pet,if=!talent.grimoire_of_supremacy.enabled&(!talent.grimoire_of_sacrifice.enabled|buff.demonic_power.down)
if not (IsFlying() or IsMounted()) and not talent.grimoireOfSupremacy and (not talent.grimoireOfSacrifice or not buff.demonicPower.exists()) then
if isChecked("Pet Management") and not (IsFlying() or IsMounted()) and not talent.grimoireOfSupremacy and (not talent.grimoireOfSacrifice or not buff.demonicPower.exists()) then
if (activePetId == 0 or activePetId ~= summonId) and (lastSpell ~= castSummonId or activePetId ~= summonId) then
if summonPet == 1 then
if isKnown(spell.summonFelImp) then
Expand Down Expand Up @@ -429,7 +433,7 @@ local function runRotation()
-- Food
-- food,type=azshari_salad
-- TODO
if (not isChecked("Opener") or opener == true) then
if isChecked("Pet Management") and (not isChecked("Opener") or opener == true) then
-- Summon Infernal
-- summon_infernal,if=talent.grimoire_of_supremacy.enabled&active_enemies>=3
if useCDs() and isChecked("Summon Infernal") then
Expand Down Expand Up @@ -465,7 +469,7 @@ local function runRotation()
-- potion,name=deadly_grace
-- TODO
-- Pet Attack/Follow
if UnitExists("target") and not UnitAffectingCombat("pet") then
if isChecked("Pet Management") and UnitExists("target") and not UnitAffectingCombat("pet") then
PetAssistMode()
PetAttack("target")
end
Expand All @@ -490,7 +494,7 @@ local function runRotation()
if not inCombat and not hastar and profileStop==true then
profileStop = false
elseif (inCombat and profileStop==true) or (IsMounted() or IsFlying())or pause() or mode.rotation==4 then
if not pause() and IsPetAttackActive() then
if not pause() and IsPetAttackActive() and isChecked("Pet Management") then
PetStopAttack()
PetFollow()
end
Expand Down Expand Up @@ -529,7 +533,7 @@ local function runRotation()
---------------------------
if getOptionValue("APL Mode") == 1 then
-- Pet Attack
if not UnitIsUnit("pettarget","target") then
if isChecked("Pet Management") and not UnitIsUnit("pettarget","target") then
PetAttack()
end
-- Havoc
Expand Down Expand Up @@ -630,7 +634,7 @@ local function runRotation()
end
-- Service Pet
-- service_pet
if ObjectExists(units.dyn40) then
if isChecked("Pet Management") and ObjectExists(units.dyn40) then
if br.timer:useTimer("castGrim", gcd) then
if grimoirePet == 1 then
if cast.grimoireImp() then prevService = "Imp"; return end
Expand All @@ -652,14 +656,14 @@ local function runRotation()
end
-- Summon Infernal
-- summon_infernal,if=artifact.lord_of_flames.rank>0&!buff.lord_of_flames.remain()s
if useCDs() and isChecked("Summon Infernal") then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Infernal") then
if artifact.lordOfFlames and not buff.lordOfFlames.exists() then
if cast.summonInfernal() then return end
end
end
-- Summon Doomguard
-- summon_doomguard,if=!talent.grimoire_of_supremacy.enabled&spell_targets.infernal_awakening<=2&(target.time_to_die>180|target.health.pct<=20|target.time_to_die<30)
if useCDs() and isChecked("Summon Doomguard") then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Doomguard") then
if not talent.grimoireOfSupremacy and #enemies.yards8 <= 2
and (ttd(units.dyn40) > 180 or getHP(units.dyn40) <= 20 or ttd(units.dyn40) < 30)
then
Expand All @@ -668,27 +672,27 @@ local function runRotation()
end
-- Summon Infernal
-- summon_infernal,if=!talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal>2
if useCDs() and isChecked("Summon Infernal") then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Infernal") then
if not talent.grimoireOfSupremacy and #enemies.yards8 > 2 then
if cast.summonInfernal() then return end
end
end
-- Summon Doomguard
-- summon_doomguard,if=talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal=1&artifact.lord_of_flames.rank>0&buff.lord_of_flames.remain()s&!pet.doomguard.active
if talent.grimoireOfSupremacy and #enemies.yards8 < 3 and artifact.lordOfFlames and buff.lordOfFlames.exists() then
if isChecked("Pet Management") and talent.grimoireOfSupremacy and #enemies.yards8 < 3 and artifact.lordOfFlames and buff.lordOfFlames.exists() then
if cast.summonDoomguard() then return end
end
-- Summon Doomguard
-- summon_doomguard,if=talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal<3&equipped.132379&!cooldown.sindorei_spite_icd.remain()s
if useCDs() and isChecked("Summon Doomguard") then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Doomguard") then
if talent.grimoireOfSupremacy and #enemies.yards8 < 3 and hasEquiped(132379) and GetTime() > summonTime + 275 then
interruptDrain()
if cast.summonDoomguard() then summonTime = GetTime(); return end
end
end
-- Summon Infernal
-- summon_infernal,if=talent.grimoire_of_supremacy.enabled&spell_targets.summon_infernal>=3&equipped.132379&!cooldown.sindorei_spite_icd.remain()s
if useCDs() and isChecked("Summon Infernal") then
if isChecked("Pet Management") and useCDs() and isChecked("Summon Infernal") then
if talent.grimoireOfSupremacy and #enemies.yards8 >= 3 and hasEquiped(132379) and GetTime() > summonTime + 275 then
interruptDrain()
if cast.summonInfernal() then summonTime = GetTime(); return end
Expand Down
9 changes: 2 additions & 7 deletions System/GeneralFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -833,10 +833,10 @@ function castQueue()
elseif thisUnit == nil then
if IsUsableSpell(spellCast) and isKnown(spellCast) then
if maxRange ~= nil and maxRange > 0 then
thisUnit = dynamicTarget(maxRange, true)
thisUnit = "target" --dynamicTarget(maxRange, true)
amIinRange = getDistance(thisUnit) < maxRange
else
thisUnit = dynamicTarget(5, true)
thisUnit = "target" --dynamicTarget(5, true)
amIinRange = getDistance(thisUnit) < 5
end
end
Expand All @@ -845,11 +845,6 @@ function castQueue()
else
amIinRange = IsSpellInRange(spellName,thisUnit) == 1
end
if not IsHarmfulSpell(spellName) and thisUnit == nil then
if not UnitIsFriend(thisUnit,"player") and ObjectExists("target") then
thisUnit = "target"
end
end
-- Cast if able
if amIinRange then
if UnitIsDeadOrGhost(thisUnit) then
Expand Down

0 comments on commit 8c09eb7

Please sign in to comment.