Skip to content

Commit

Permalink
System - Update for latest wow api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteOne committed Jan 20, 2024
1 parent c35ea45 commit ab8eff4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Rotations/Demon Hunter/Havoc/HavocCuteOne.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
------------------------------------------------------
-- Author = CuteOne
-- Patch = 10.0
-- Patch = 10.2
-- Patch should be the latest patch you've updated the rotation for (i.e., 9.2.5)
-- Coverage = 100%
-- Coverage should be your estimated percent coverage for class mechanics (i.e., 100%)
Expand Down
8 changes: 4 additions & 4 deletions Rotations/Druid/Feral/FeralCuteOne.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-------------------------------------------------------
-- Author = CuteOne
-- Patch = 10.0
-- Patch = 10.2
-- Patch should be the latest patch you've updated the rotation for (i.e., 9.2.5)
-- Coverage = 100%
-- Coverage should be your estimated percent coverage for class mechanics (i.e., 100%)
Expand Down Expand Up @@ -755,7 +755,7 @@ actionList.PreCombat = function()
end
-- Heart of the Wild
-- heart_of_the_wild
if cast.able.heartOfTheWild() then
if cast.able.heartOfTheWild() and unit.valid("target") and unit.exists("target") and unit.distance("target") < 5 then
if cast.heartOfTheWild() then ui.debug("Casting Heart Of The Wild [Precombat]") return true end
end
-- Use Item - Algethar Puzzle Box
Expand Down Expand Up @@ -845,7 +845,7 @@ actionList.Combat = function()
if actionList.Variables() then return true end
-- Tigers Fury
-- tigers_fury,target_if=min:target.time_to_die,if=!set_bonus.tier31_4pc&talent.convoke_the_spirits.enabled|!buff.tigers_fury.up|energy.deficit>65|set_bonus.tier31_2pc&action.feral_frenzy.ready|target.time_to_die<15&talent.predator.enabled
if cast.able.tigersFury() and ((not equiped.tier(31,4) and talent.convokeTheSpirits
if cast.able.tigersFury() and unit.exists(units.dyn5) and unit.distance(units.dyn5) < 5 and ((not equiped.tier(31,4) and talent.convokeTheSpirits
or not buff.tigersFury.exists() or energy.deficit()>65 or equiped.tier(31,2)
and cast.able.feralFrenzy() or unit.ttd(var.minTTDUnit)<15 and talent.predator))
then
Expand All @@ -863,7 +863,7 @@ actionList.Combat = function()
end
-- Auto Attack
-- auto_attack,if=!buff.prowl.up&!buff.shadowmeld.up
if cast.able.autoAttack(units.dyn5) and not buff.prowl.exists() and not buff.shadowmeld.exists() then
if cast.able.autoAttack(units.dyn5) and unit.exists(units.dyn5) and unit.distance(units.dyn5) < 5 and not buff.prowl.exists() and not buff.shadowmeld.exists() then
if cast.autoAttack(units.dyn5) then ui.debug("Casting Auto Attack") return true end
end
-- Natures Vigil
Expand Down
17 changes: 15 additions & 2 deletions System/Functions/Aura.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
local _, br = ...
function br.AuraData(unit, index, filter)
local auraData = br._G.C_UnitAuras.GetAuraDataByIndex(unit, index, filter)
if not auraData then return nil end
return AuraUtil.UnpackAuraData(auraData)
end
-- Overwrite UnitBuff
function br.UnitBuff(unit, index, filter)
return br.AuraData(unit, index, filter)
end
-- Overwrite UnitDebuff
function br.UnitDebuff(unit, index, filter)
return br.AuraData(unit, index, filter)
end
function br.CancelUnitBuffID(unit, spellID, filter)
-- local spellName = GetSpellInfo(spellID)
for i = 1, 40 do
Expand Down Expand Up @@ -29,10 +42,10 @@ function br.UnitBuffID(unit, spellID, filter)
local exactSearch = filter ~= nil and br._G.strfind(br._G.strupper(filter), "EXACT")
if exactSearch then
for i = 1, 40 do
local buffName, _, _, _, _, _, _, _, _, buffSpellID = br._G.UnitBuff(unit, i, "player")
local buffName, _, _, _, _, _, _, _, _, buffSpellID = br.UnitBuff(unit, i, "player")
if buffName == nil then return nil end
if buffSpellID == spellID then
return br._G.UnitBuff(unit, i)
return br.UnitBuff(unit, i)
end
end
else
Expand Down
2 changes: 1 addition & 1 deletion System/Functions/Misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ function br.pause(skipCastingCheck)
local eating = false
local pausekey
for i = 1, #food do
if br.UnitBuffID("player",i) then
if br.UnitBuffID("player",food[i]) then
eating = true
break
end
Expand Down
31 changes: 17 additions & 14 deletions System/Functions/Range.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ function br.getDistanceCalc(Unit1,Unit2,option)
-- Melee Range Bypass
if br.player ~= nil then
-- Modifier for Balance Affinity range change (Druid - Not Balance)
if br.player.talent.balanceAffinity ~= nil then
if br.player.talent.balanceAffinity and option ~= "noMod" then
rangeMod = 3
if br.player.talent.astralInfluence ~= nil then
if br.player.talent.astralInfluence and option ~= "noMod" then
rangeMod = br.player.talent.rank.astralInfluence == 1 and 1 or 3
end
end
end
Expand Down Expand Up @@ -136,17 +136,20 @@ function br.getDistanceCalc(Unit1,Unit2,option)
if option == "dist3" then return dist3 end
if option == "dist4" then return dist4 end
if option == "meleeRange" then return meleeRange end
if dist > 13 then
currentDist = dist
elseif dist2 > 8 and dist3 > 8 then
currentDist = dist2
elseif dist3 > 5 and dist4 > 5 then
currentDist = dist3
elseif dist4 > meleeRange then -- Thanks Ssateneth
currentDist = dist4
else
currentDist = 0
end
-- if (br._G.UnitIsUnit("target",Unit1) or br._G.UnitIsUnit("target",Unit2)) then
-- br._G.print("Dist: "..tostring(br.round2(dist,0)))
-- end
-- if dist > 13 then
currentDist = br._G.max(0,dist)
-- elseif dist2 > 8 and dist3 > 8 then
-- currentDist = dist2
-- elseif dist3 > 5 and dist4 > 5 then
-- currentDist = dist3
-- elseif dist4 > meleeRange then -- Thanks Ssateneth
-- currentDist = dist4
-- else
-- currentDist = 0
-- end
-- Modifier for Mastery: Sniper Training (Hunter - Marksmanship)
-- if currentDist < 100 and br.isKnown(193468) and option ~= "noMod" and (Unit1 == "player" or Unit2 == "player") then
-- currentDist = currentDist - (currentDist * (GetMasteryEffect() / 100))
Expand Down

0 comments on commit ab8eff4

Please sign in to comment.