AdiButtonAuras

AdiButtonAuras

404k Downloads

Shaman rules: Active totems

ckaotik opened this issue ยท 4 comments

commented

Hey again,

I've added some rules for shaman's totems, i.e. display duration and activity of any totem of the button's totem type. While this is not the exact same behavior as in InlineAuras (where a totem spell only displays its own totem's duration, not that of any active totem of its type), I think it might be sensible to help players avoid unintentionally canceling/overwriting their totems.

Configure {
    "FireTotems",
    format(L["Show %s duration."], L["fire totems"]),
    {3599, 8190, 2894}, -- Searing, Magma, Fire Elemental Totem
    "player",
    "PLAYER_TOTEM_UPDATE",
    function(units, model)
        local haveTotem, name, startTime, duration, icon = GetTotemInfo(FIRE_TOTEM_SLOT)
        if haveTotem then
            model.highlight = "good"
            model.expiration = startTime + duration
        end
    end,
    {3599, 8190, 2894},
},
Configure {
    "EarthTotems",
    format(L["Show %s duration."], L["earth totems"]),
    {2484, 8143, 51485, 108270, 2062}, -- Earthbind, Tremor, Earthgrab, Stone Bulwark, Earth Elemental Totem
    "player",
    "PLAYER_TOTEM_UPDATE",
    function(units, model)
        local haveTotem, name, startTime, duration, icon = GetTotemInfo(EARTH_TOTEM_SLOT)
        if haveTotem then
            model.highlight = "good"
            model.expiration = startTime + duration
        end
    end,
    {2484, 8143, 51485, 108270, 2062},
},
Configure {
    "WaterTotems",
    format(L["Show %s duration."], L["water totems"]),
    {16190, 108280, 5394}, -- Mana Tide, Healing Tide, Healing Stream Totem
    "player",
    "PLAYER_TOTEM_UPDATE",
    function(units, model)
        local haveTotem, name, startTime, duration, icon = GetTotemInfo(WATER_TOTEM_SLOT)
        if haveTotem then
            model.highlight = "good"
            model.expiration = startTime + duration
        end
    end,
    {16190, 108280, 5394},
},
Configure {
    "AirTotems",
    format(L["Show %s duration."], L["air totems"]),
    {98008, 120668, 108269, 8177, 108273}, -- Spirit Link, Stormlash, Capacitator, Grounding, Windwalk Totem
    "player",
    "PLAYER_TOTEM_UPDATE",
    function(units, model)
        local haveTotem, name, startTime, duration, icon = GetTotemInfo(AIR_TOTEM_SLOT)
        if haveTotem then
            model.highlight = "good"
            model.expiration = startTime + duration
        end
    end,
    {98008, 120668, 108269, 8177, 108273},
},

Similar totem rules might be useful for Mistweaver Monks, Deathknights and Druids, too! Especially for a Restoration Druid, adding the mushroom's duration as well as its current charge might be incredibly useful? Considering "popping" mushrooms at maximum potency (which can most likely be calculated from player's max health and effective healing from hots - out of scope?) seems easier when knowing the current charge, maybe a 0-100 "rating" (in percent)?

Absolutely a side note, but probably not worth an extra ticket: There's a typo (enmey instead of enemy) in https://github.com/Adirelle/AdiButtonAuras/blob/master/RuleDSL.lua#L608

commented

I've already added totem rules for Mistweaver and Brewmaster monks. I didn't know Druids' Mushrooms were also handled by totems. However I couldn't find the actual charge of the healing one in return values. I'll try to merge your changes tomorrow. (Have you considered using the Github website or even git to submit pull requests ?)

commented

I have seen two methods of getting the stored overhealing. One consists of manually tracking rejuv's overhealing (check out http://www.wowace.com/addons/weakauras/forum/57804-mushroom-bloom-value/) while the other relies on checking Blizzard's spell highlighting (as can be seen here: http://wow.curseforge.com/addons/tellmewhen/forum/druid/53075-restoration-track-when-wild-mushroom-bloom-is-fully/)

I've used the pull request thingie from GitHub before, however I have a tendency to mess things up ... So I try to stay away from it. I do understand that would probably be easier for you, though.

commented

Tracking the overheal is probably the best way, through I'm not fond of listening to combat log events. Moreover, this isn't quite possible with AdiButtonAuras, it is maybe a bit far from its purpose.

commented

Closed by #11.