Add NumBuffs WeakAura.

This commit is contained in:
Casper V. Kristensen 2020-05-11 18:09:25 +02:00
parent 3687e0b82e
commit 6342b2640a
Signed by: caspervk
GPG key ID: 289CA03790535054
3 changed files with 430 additions and 0 deletions

View file

@ -0,0 +1 @@
!LR1EZPnss8VlCBQZPoBcc)mPQ8haghJdg8IK3S5YgbdsdWel0qnAKFTj6Z(19m6jiHD2lzRRQZUmintp9mt)4x39m22W2Y2CPTPRTzGTzZ6ghxFF8nO1hgoBwavApOzJg2M3sfbmUV9GtSnf05WJwpSIcK(GpzjZzUGhUY2K4ZwsKiDiBjm13sfH(CFK8qHQ)X6gdOoCFxyMPKaQvo6W3nLcQ)C5c7b7BlbALeH8hi)MX8zbl(XXqGLESLmqGDiooVzxXz(qJwdVQF3ZGPju4zBUqkxf8Mx9Q7iZ51z8xn(lxU61S3z((xbcwIWPFchpce6Hb0(kwo128(e1XrO6ykx4sf98vTyKi4P2THhdLl4IHRWDraS9KjuBYEKcAtq)rCzHbXkwy)nJnppDDDNdBqJOjxXUNclzbxQ1PdaYdCiEu1uQu59CW2n2)WxFYXjJVd3JlagcebJaMq8Z9vFEa2imrmWEBq4Y2HWEkAYTg1Bu)efhVZ280HFyaqHVKk8jE)wIDxZxNWFuAeIC4c67fN0AQ88V0ehmZvRGgDkkpCaHqSgOt3bwDhbdN4CJRGVA7lWg1pmtwKi0pqpbFG5IkNdrXMx4sFZvehT0iGdgNX2gGL685W6ujVcNos5UeRkioj6fylYK6gtmTZBvQmOqJpwofzaDj4ickhuGThiYKCNuptdJ9BaRZzcYs00KijQvgiuZwMECIY5oyf1r5Jg6jzPZMhjiyJwdqZM1BeSmhRjFQAx5XM7BBQTZLcgU9d0sy0W3pUj9Mi7fCz451ZnE3PD5iGhytCqG0XCLh5bCdtVLIAYZPepqbGsvvlxjOZy3BBAEv3(9ZA2eSRWMh3PLP1ytRwJG5cWPOXtKlDkqH2A58U9V6SR7R2wPQ92XwkaN5EOPM2E6mu0QhMzNrD7oa3bkr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Hf3U4jdvFtaEeixX7D1pJ)fWdfo0bA5Y4T8N6u)gKEqv8LtjY(85VJk7ekeatvNltp)z8DkdBopo5Ns51NFQ0JNr8cOvigt5DMsjB3ujNRG4Q0JzevL2CBzSx6CDrfzRLxQ82T2lex1yD2Kbjx499kH01da8x1YCDa0kTgD5JWtj6L5fwPAV4oJ1xXo0AyKakDjusdcgkOUHUeePCMhzoQcca1dqZDuKfkOtHMpisiItMcFPqU(RzJPsh1Jsq0WqTPg0G2GxXyFynSz6sXMazOl5IguEAtkftAK71wspx1xHL(tbIUcQwuUJQ2RMnNACGtYnW9vbKiTsNu7LBX045FcRQAaoN56s9TnhaGyJwRKH4sduNsbEb241U77(8UcBIyZc9lqx2kiU0M9BGxM7Qf6R3j)9qYfmqVgFXhNpCuV)9WbwT6hFXhTTnFKdBwS(MsUzM1V3i8ejvhOqv3yZ63BK6imFgNyIAZyLCCO9sIF)hDibsWBPnr8hx3BVS32Zuvmw5xdf2I6KTtUmUkU3TYUIU)gUmUsVNSFSx1vsLNLICLeUSy80eFHYXf)K6Tpxs8yLxtv3RFHBvBR3oMQNaBZFuz(UX)6b5UMoT0zC2n7rdJVUDDtjspNfuNBsy0tCTCQlZ)SEV3Do1W3YyESjD8XHA0OIBIUW)LaTvNlpENCK58ENcsOKllaA0()a

View file

@ -0,0 +1,423 @@
{
"m": "d",
"s": "2.17.3",
"d": {
"yOffset": 200,
"version": 8,
"regionType": "dynamicgroup",
"animation": {
"main": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
},
"start": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
},
"finish": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
}
},
"limit": 5,
"selfPoint": "TOPLEFT",
"url": "https://wago.io/_jMp9iGSK/8",
"arcLength": 360,
"useLimit": false,
"xOffset": 600,
"borderInset": 1,
"animate": true,
"authorOptions": [],
"radius": 200,
"gridType": "RD",
"rowSpace": 1,
"space": 0,
"rotation": 0,
"uid": "JeKr8AbtHj2",
"groupIcon": 135987,
"anchorPoint": "CENTER",
"stagger": 0,
"grow": "DOWN",
"internalVersion": 29,
"border": false,
"config": [],
"id": "NumBuffs v1.0.8",
"borderBackdrop": "Solid",
"anchorFrameType": "SCREEN",
"borderOffset": 4,
"constantFactor": "RADIUS",
"gridWidth": 5,
"sort": "none",
"frameStrata": 1,
"tocversion": 11304,
"semver": "1.0.8-8",
"conditions": [],
"actions": {
"init": [],
"start": [],
"finish": []
},
"subRegions": [],
"columnSpace": 1,
"backdropColor": [
0,
0,
0,
0.5
],
"load": {
"size": {
"multi": []
},
"class": {
"multi": []
},
"use_class": false,
"spec": {
"multi": []
}
},
"align": "LEFT",
"triggers": [
{
"untrigger": [],
"trigger": {
"spellIds": [],
"subeventPrefix": "SPELL",
"unit": "player",
"event": "Health",
"debuffType": "HELPFUL",
"subeventSuffix": "_CAST_START",
"names": [],
"type": "aura2"
}
}
],
"borderColor": [
0,
0,
0,
1
],
"scale": 1,
"borderEdge": "1 Pixel",
"borderSize": 2
},
"v": 1421,
"c": [
{
"yOffset": 0,
"outline": "OUTLINE",
"version": 8,
"id": "NumBuffs_Title",
"color": [
0.13333333333333,
0.69411764705882,
0.29803921568628,
1
],
"wordWrap": "WordWrap",
"customTextUpdate": "event",
"regionType": "text",
"animation": {
"main": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
},
"start": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
},
"finish": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
}
},
"conditions": [],
"selfPoint": "BOTTOM",
"anchorPoint": "CENTER",
"justify": "LEFT",
"authorOptions": [],
"uid": "d7shNzQ1nSt",
"url": "https://wago.io/_jMp9iGSK/8",
"config": [],
"frameStrata": 1,
"displayText": "#Buffs",
"anchorFrameType": "SCREEN",
"xOffset": 0,
"internalVersion": 29,
"tocversion": 11304,
"fixedWidth": 200,
"semver": "1.0.8-8",
"load": {
"use_size": false,
"class": {
"multi": []
},
"size": {
"multi": {
"flexible": true,
"party": true,
"twenty": true,
"fortyman": true,
"twentyfive": true,
"ten": true
}
},
"spec": {
"multi": []
}
},
"subRegions": [],
"triggers": {
"1": {
"untrigger": [],
"trigger": {
"unit": "player",
"debuffType": "HELPFUL",
"subeventPrefix": "SPELL",
"unevent": "auto",
"spellIds": [],
"use_alwaystrue": true,
"names": [],
"event": "Conditions",
"type": "status",
"subeventSuffix": "_CAST_START",
"use_unit": true,
"duration": "1"
}
},
"activeTriggerMode": -10
},
"font": "Friz Quadrata TT",
"automaticWidth": "Auto",
"actions": {
"init": {
"custom": "-- add clickable frame\nlocal buttonFrame = CreateFrame(\"Button\", \"WA_\" .. aura_env.id .. \"_Button\", aura_env.region)\nbuttonFrame:EnableMouse(true)\nbuttonFrame:RegisterForClicks(\"RightButtonUp\")\nbuttonFrame:SetAllPoints(aura_env.region)\nbuttonFrame:SetScript(\"OnClick\", function(self, button)\n WeakAuras.ScanEvents(\"NUM_BUFFS_RESET\", true)\nend)",
"do_custom": true
},
"start": [],
"finish": []
},
"fontSize": 14
},
{
"yOffset": 0,
"desaturate": false,
"sparkOffsetX": 0,
"regionType": "aurabar",
"animation": {
"main": {
"type": "none",
"duration_type": "seconds",
"easeType": "none",
"easeStrength": 3
},
"start": {
"preset": "fade",
"easeStrength": 3,
"type": "preset",
"duration_type": "seconds",
"easeType": "none"
},
"finish": {
"preset": "fade",
"easeStrength": 3,
"type": "preset",
"duration_type": "seconds",
"easeType": "none"
}
},
"selfPoint": "CENTER",
"url": "https://wago.io/_jMp9iGSK/8",
"texture": "Blizzard",
"xOffset": 0,
"actions": {
"init": {
"custom": "-- config\nlocal trackedBuffs = {\n [\"Power Word: Fortitude\"] = true,\n [\"Prayer of Fortitude\"] = true,\n [\"Divine Spirit\"] = true,\n [\"Prayer of Spirit\"] = true,\n [\"Shadow Protection\"] = true,\n [\"Prayer of Shadow Protection\"] = true,\n}\n\n\n\n-- helper utils\nlocal function sum(table)\n local sum = 0\n for _, v in pairs(table) do\n sum = sum + v\n end\n return sum\nend\n\n\nlocal function createStateStructure(name)\n if not _G.WA_NUM_BUFFS[name] then\n _G.WA_NUM_BUFFS[name] = {}\n for buff, _ in pairs(trackedBuffs) do\n _G.WA_NUM_BUFFS[name][buff] = 0\n end\n end\n return {\n show = true,\n changed = true,\n name = name,\n index = -sum(_G.WA_NUM_BUFFS[name]),\n numBuffs = _G.WA_NUM_BUFFS[name],\n }\nend\n\n\n\n-- event handlers\n-- WA_INIT COMBAT_LOG_EVENT_UNFILTERED:SPELL_CAST_SUCCESS NUM_BUFFS_RESET\naura_env.eventHandlers = {}\n\naura_env.eventHandlers.WA_INIT = function(allStates)\n -- The \"WA_INIT\" event doesn't actually exist, but since WA sends a blank version of each subscribed event\n -- when the interface is loaded or options are closed, this allows us to catch this case.\n if not _G.WA_NUM_BUFFS then\n _G.WA_NUM_BUFFS = {}\n end\n -- restore allStates state\n for name, numBuffs in pairs(_G.WA_NUM_BUFFS) do\n allStates[name] = createStateStructure(name)\n end\n return true\nend\n\n\naura_env.eventHandlers.COMBAT_LOG_EVENT_UNFILTERED = function(allStates, ...)\n local _, event, _, _, sourceName, _, _, _, _, _, _, _, spellName = CombatLogGetCurrentEventInfo()\n if not trackedBuffs[spellName] then\n return false\n end\n if not allStates[sourceName] then\n allStates[sourceName] = createStateStructure(sourceName)\n end\n \n local state = allStates[sourceName]\n state.numBuffs[spellName] = state.numBuffs[spellName] + 1\n state.index = state.index - 1\n state.changed = true\n return true\nend\n\n\naura_env.eventHandlers.NUM_BUFFS_RESET = function(allStates, doReset) \n if not doReset then -- this seemingly redudant flag ensures we don't reset on WA options close\n return false\n end\n -- clear out all current clones\n for _, state in pairs(allStates) do\n state.show = false\n state.changed = true\n end\n _G.WA_NUM_BUFFS = {}\n print(\"|cff22b14cNumBuffs|r: Reset\")\n return true\nend",
"do_custom": true
},
"start": [],
"finish": []
},
"internalVersion": 29,
"semver": "1.0.8-8",
"subRegions": [
{
"type": "aurabar_bar"
},
{
"text_visible": true,
"text_automaticWidth": "Auto",
"rotateText": "NONE",
"anchorXOffset": 0,
"text_fontType": "None",
"text_shadowYOffset": -1,
"text_fixedWidth": 64,
"text_font": "Friz Quadrata TT",
"text_justify": "CENTER",
"text_wordWrap": "WordWrap",
"text_selfPoint": "AUTO",
"text_text": "%n",
"anchorYOffset": 0,
"text_shadowColor": [
0,
0,
0,
1
],
"text_anchorPoint": "INNER_LEFT",
"text_color": [
1,
1,
1,
1
],
"type": "subtext",
"text_fontSize": 12,
"text_shadowXOffset": 1
},
{
"text_visible": true,
"text_automaticWidth": "Auto",
"rotateText": "NONE",
"anchorXOffset": 0,
"text_fontType": "None",
"text_shadowYOffset": -1,
"text_fixedWidth": 64,
"text_font": "Fira Mono Medium",
"text_justify": "CENTER",
"text_wordWrap": "WordWrap",
"text_selfPoint": "AUTO",
"text_text": "%c",
"anchorYOffset": 0,
"text_shadowColor": [
0,
0,
0,
1
],
"text_anchorPoint": "INNER_RIGHT",
"text_color": [
1,
1,
1,
1
],
"type": "subtext",
"text_anchorXOffset": 0,
"text_fontSize": 12,
"text_shadowXOffset": 1
}
],
"orientation": "HORIZONTAL",
"alpha": 1,
"inverse": false,
"uid": "FIKdge1nT1g",
"height": 15,
"config": [],
"sparkOffsetY": 0,
"width": 240,
"sparkRotation": 0,
"spark": false,
"sparkBlendMode": "ADD",
"anchorFrameType": "SCREEN",
"sparkHidden": "NEVER",
"sparkRotationMode": "AUTO",
"backgroundColor": [
0,
0,
0,
0.5
],
"barColor": [
1,
0,
0,
0
],
"zoom": 0,
"anchorPoint": "CENTER",
"id": "NumBuffs_Bar",
"tocversion": 11304,
"sparkTexture": "Interface\\CastingBar\\UI-CastingBar-Spark",
"auto": true,
"authorOptions": [],
"frameStrata": 1,
"icon": false,
"sparkWidth": 10,
"conditions": [],
"icon_color": [
1,
1,
1,
1
],
"triggers": {
"1": {
"untrigger": [],
"trigger": {
"unit": "player",
"debuffType": "HELPFUL",
"names": [],
"custom_type": "stateupdate",
"spellIds": [],
"custom": "function(allStates, event, ...)\n return aura_env.eventHandlers[event](allStates, ...)\nend",
"events": "WA_INIT COMBAT_LOG_EVENT_UNFILTERED:SPELL_CAST_SUCCESS NUM_BUFFS_RESET",
"event": "Health",
"type": "custom",
"subeventSuffix": "_CAST_START",
"subeventPrefix": "SPELL",
"check": "event"
}
},
"activeTriggerMode": -10
},
"version": 8,
"sparkHeight": 30,
"load": {
"use_size": false,
"spec": {
"multi": []
},
"size": {
"multi": {
"flexible": true,
"party": true,
"twenty": true,
"fortyman": true,
"twentyfive": true,
"ten": true
}
},
"class": {
"multi": []
}
},
"customText": "function()\n if WeakAuras.IsOptionsOpen() then\n return \"-\"\n end\n local state = aura_env.state\n return string.format(\n \"|cffffffff%2$2d|r%1$s|cffffffff%3$-2d|r |cff0080ff%4$2d|r%1$s|cff0080ff%5$-2d|r |cffdc00dc%6$2d|r%1$s|cffdc00dc%7$-2d|r\", -- lol\n \"|cff666666/|r\", -- seperator\n state.numBuffs[\"Power Word: Fortitude\"],\n state.numBuffs[\"Prayer of Fortitude\"],\n state.numBuffs[\"Divine Spirit\"],\n state.numBuffs[\"Prayer of Spirit\"],\n state.numBuffs[\"Shadow Protection\"],\n state.numBuffs[\"Prayer of Shadow Protection\"]\n )\nend",
"adjustedMax": "0",
"useAdjustededMin": false,
"sparkColor": [
1,
1,
1,
1
],
"useAdjustededMax": false,
"icon_side": "RIGHT"
}
],
"wagoID": "_jMp9iGSK"
}

6
WA-NumBuffs/README.md Executable file
View file

@ -0,0 +1,6 @@
# NumBuffs
Counts the number of buffs cast by priests.
Right click the title to reset counts.
https://wago.io/_jMp9iGSK