Skip to content

WotLK Classic, Hunter request #22

@Road-block

Description

@Road-block

I hope the Hunter "execute" Kill Shot can be added to the base addon.

I edited my local copy with the addition of

AddSpellName("KillShot", 61006, 61005, 53351)
function ns.KillShotCheck(self, event, unit)
    if UnitExists("target") and not UnitIsFriend("player", "target") then
        local h = UnitHealth("target")
        local hm = UnitHealthMax("target")
        local killshotID = ns.findHighestRank("KillShot")

        if h > 0 and (h/hm < 0.2 or IsUsableSpell(killshotID)) then
            f:Activate("KillShot", "Health", 10)
        else
            f:Deactivate("KillShot", "Health")
        end
    else
        f:Deactivate("KillShot", "Health")
    end
end

and

    if ns.findHighestRank("KillShot") then
        self:RegisterEvent("PLAYER_TARGET_CHANGED")
        self:RegisterUnitEvent("UNIT_HEALTH", "target")
        self.PLAYER_TARGET_CHANGED = ns.KillShotCheck
        self.UNIT_HEALTH = ns.KillShotCheck
    else
        self:UnregisterEvent("PLAYER_TARGET_CHANGED")
        self:UnregisterEvent("UNIT_HEALTH")
    end

added to ns.configs.HUNTER function.

Tested it out seems to work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions