Hekili Priority Helper

Hekili Priority Helper

53M Downloads

[REC] Hammer of Light cast a consecration under your feet/target that is not tracked by Hekili

danmarzola opened this issue ยท 2 comments

commented

Before You Begin

  • I confirm that I have downloaded the latest version of the addon.
  • I am not playing on a private server.
  • I checked for an existing, open ticket for this issue and was not able to find one.
  • I edited the title of this issue (above) so that it describes the issue I am reporting.

Spec

Paladin - Protection

Describe the Issue

Hammer of Light cast a free consecration on use at your target/feet, but hekili keep recommending using another consecration

How to Reproduce

For faster test, move up consecration in priority under hammer of light,

use the following conditions
!buff.consecration.up | buff.consecration.remains < 3
as you don't want to cast a consecration if you are under one/no need to refresh

Cast Eye of Tyr
Cast Hammer of Light
Check that next recommendation is consecration, but you are under consecration already

Snapshot (Link)

https://pastebin.com/TQ7ZHWE1

Raidbots Sim Report (Link)

No response

Additional Information

Snapshot from a custom priority create by myself, but the ideia is hammer of light should register a consecration buff/cast, as know it keeps recommending another gcd on consecration

Contact Information

No response

commented

So after some testing, consecration from hol is not a totem? for whatever reason. So a did a few modifications to reach a better result, besides for a half second it recomends using consecration as buff take a few frames to show up

Create a new RegisterStateExpr for Hammer of Light -> last_hammer_of_light
Remove totem check and replace by last cast to check duration

    consecration = {
        id = 26573,
        duration = function()
            return talent.consecration_in_flame.enabled and 14 or 12
        end,
        tick_time = 1,
        type = "Magic",
        max_stack = 1,
        generate = function(c, type)
            if type == "buff" and FindUnitBuffByID("player", 188370) then
                
                local dropped, expires
                if last_hammer_of_light > last_consecration then
                    dropped = last_hammer_of_light
                else
                    dropped = last_consecration
                end
                expires = dropped + duration

                if dropped and expires > query_time then
                    c.expires = expires
                    c.applied = dropped
                    c.count = 1
                    c.caster = "player"
                    return
                end
            end
            c.count = 0
            c.expires = 0
            c.applied = 0
            c.caster = "unknown"
        end
    }

Add consecration buff to hammer of light handler

    hammer_of_light = {
        id = 427453,
        known = 387174,
        flash = 387174,
        cast = 0.0,
        cooldown = 0.0,
        gcd = "spell",

        spend = function()
            if buff.divine_purpose.up or buff.hammer_of_light_free.up then
                return 0
            end
            return 3
        end,
        spendType = "holy_power",

        startsCombat = true,
        buff = function()
            return buff.hammer_of_light_free.up and "hammer_of_light_free" or "hammer_of_light_ready"
        end,

        handler = function()
            last_hammer_of_light = query_time
            removeBuff("divine_purpose")
            if buff.divine_guidance.up then
                removeBuff("divine_guidance")
            end
            applyBuff("consecration")
            applyDebuff("target", "consecration_dot")
            if talent.undisputed_ruling.enabled then
                spec.abilities.consecration.handler()
                applyBuff("shield_of_the_righteous", buff.shield_of_the_righteous.remains + 4.5)
            end

            if buff.hammer_of_light_free.up then
                removeBuff("hammer_of_light_free")
            else
                removeBuff("hammer_of_light_ready")

                if buff.lights_deliverance.stack_pct == 100 then
                    removeBuff("lights_deliverance")
                    applyBuff("hammer_of_light_free")
                end
            end
        end,

        bind = {"wake_of_ashes", "eye_of_tyr"}
    }
commented

I think I have a solution, will work on it tonight.