Request for deathknight pressence support #10


  • New
  • Enhancment
Open
Assigned to ckknight
  • mangeg created this issue Mar 4, 2009

    What is the enhancement in mind? How should it look and feel?
    Would like to request support for Deathknight presences as a tag.

    Please provide any additional information below.

    What I did to get it working is a quick hack added to Auras.lua as follows:

    local function DKStance(unit)
        local _, c = UnitClass(unit)
        if c ~= "DEATHKNIGHT" then
            return nil
        end
        local icon, name, blood, frost, unholy
        icon, name, blood = GetShapeshiftFormInfo(1)
        icon, name, frost = GetShapeshiftFormInfo(2)
        icon, name, unholy = GetShapeshiftFormInfo(3)
        if blood then
            return "Blood Presence"
        elseif frost then
            return "Frost Presence"
        elseif unholy then
            return "Unholy Presence"
        end
        return nil
    end

    DogTag:AddTag("Unit", "DKStance", {
        code = DKStance,
        arg = {
            'unit', 'string;undef', 'player'
        },
        ret = "string;nil",
        events = "UPDATE_SHAPESHIFT_FORM",
        doc = L["Return the DK stance form the unit is in if unit is a DK"],
        example = ('[DKStance] => %q; [DKStance] => %q; [DKStance] => ""'):format("Blood Presence", "Frost Presence"),
        category = L["Auras"]
    })

    And I am sure the same thing would be possible to make for warrior stances as well

  • mangeg added the tags New Enhancment Mar 4, 2009
  • mangeg edited description Mar 4, 2009

To post a comment, please login or register a new account.