Skip to content

Commit

Permalink
fixed some unit types again
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain-P committed Feb 28, 2018
1 parent 2a211aa commit cd09bff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion priest_disc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ if not defined then
-- Spell list to swd when casted on yu
SWD_CASTING_CONTROL = {
ENABLED = true,
PERCENT = 80, -- swd at 90% of the castbar
PERCENT = 90, -- swd at 90% of the castbar
SPELL_LIST = {
Auras.Seduction_1,
Auras.Seduction_2,
Expand Down
10 changes: 7 additions & 3 deletions shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ if not shared then shared = true
overpowered = nil
end

return overpowered ~= nil and GetTime() - overpowered < 0.5
return overpowered ~= nil and GetTime() - overpowered < 0.2
end

-- same as HasAura but with an array, returns array of spellIds that matched, empty if none
Expand Down Expand Up @@ -425,6 +425,8 @@ if not shared then shared = true

-- Return true if the given unit is casting on you
function IsCastingOnMe(unit)
if not ValidUnit(unit, enemy) then return end

local infos
local real = Configuration.Shared.REAL_TARGET_CHECK.ENABLED

Expand All @@ -449,7 +451,7 @@ if not shared then shared = true
function SetupRealTargetFeature()
ListenSpellsAndThen(dangerousSpells, nil, Configuration.Shared.REAL_TARGET_CHECK.ENABLED,
function(event, type, srcName, targetGuid, targetName, spellId, object, x, y, z)
if type ~= "SPELL_CAST_START" then return end
if type ~= "SPELL_CAST_START" or not ValidUnit(object, enemy) then return end

oldTarget = WorldObjects[current_target]
ClearTarget()
Expand Down Expand Up @@ -655,6 +657,8 @@ if not shared then shared = true
function(event, type, srcName, targetGuid, targetName, spellId, object, x, y, z)
local hold = Warriors[object]

if not ValidUnit(object, enemy) then return end

if targetName == player_name or hold == nil or hold.ITIME == nil or
(spellId == WarriorSpells.BERZERK_STANCE and MeleeRange(object)
and hold.ITIME + hold.IDURATION < GetTime() and ValidUnit(object, enemy)) then
Expand Down Expand Up @@ -691,7 +695,7 @@ if not shared then shared = true
Configuration.Shared.INTELLIGENT_BREAKS.ENABLED and Configuration.Shared.INTELLIGENT_BREAKS.STOPCASTING,

function(_, _, _, _, _, _, object, _, _, _)
if not ValidUnit(object, enemy) or not InLos(player, object) then return end
if not ValidUnit(object, enemy) or GetDistanceBetweenObjects(player, object) > 30 or not InLos(player, object) then return end

StopCasting()
end
Expand Down

0 comments on commit cd09bff

Please sign in to comment.