Hekili Priority Helper

Hekili Priority Helper

44M Downloads

WarlockDestruction.lua

Markoolio opened this issue ยท 1 comments

commented

logics that seem to need a change

buff.backdraft.up and 0.7 or 1
should be
(buff.backdraft.up and 0.7) or (buff.backdraft.up and 1)

similar to:
talent.flashover.enabled and 4 or 2
should be if talent.flashover.enabled returns a number
(talent.flashover.enabled and 4) or (talent.flashover.enabled and 2)

talent.darkfury.enabled and 45 or 60
-> if talent.darkfury.enabled returns a number
(talent.darkfury.enabled and 45) or (talent.darkfury.enabled and 60)

essence.vision_of_perfection.enabled and 0.87 or 1
-> if essence.vision_of_perfection.enabled is a number
(essence.vision_of_perfection.enabled and 0.87) or (essence.vision_of_perfection.enabled and 1)

talent.fire_and_brimstone.enabled and ( ( true_active_enemies - 1 ) * 0.1 ) or 0
-> ?
talent.fire_and_brimstone.enabled and ( ( true_active_enemies - 1 ) * 0.1 )

commented

No. Those all just take advantage of short-circuiting logic to act like a ternary operator:

return buff.backdraft.up and 0.7 or 1

returns values equivalent to

if buff.backdraft.up then return 0.7 else return 1 end