diff Turok/Modules/Timer/Presets.lua @ 6:a9b8b0866ece

clear out log jam
author Nenue
date Sun, 21 Feb 2016 08:32:53 -0500
parents
children 9400a0ff8540
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Turok/Modules/Timer/Presets.lua	Sun Feb 21 08:32:53 2016 -0500
@@ -0,0 +1,394 @@
+local ADDON, Tk = ...
+local T = Tk.Addon
+local mod, tinsert, ipairs, pairs = T.modules.TimerControl, tinsert, ipairs, pairs
+local print = function(...) print('TimerPresets', ...) end
+
+
+
+--- Timer config presets
+mod.AddTimer = function(batch, container)
+  if container then
+    Turok.defaults.spirit.containers[container] = {}
+  end
+
+  for i, entry in ipairs(batch) do
+    print(cPink('AddTimer(#=')..cWord(#batch)..cPink(', ')..cWord(container)..cPink(')'))
+    if container then
+      entry.container = container
+      print('  container set to', container)
+    end
+    print('  unpacking', entry.name)
+    tinsert(Turok.defaults.spirit.timers, entry)
+  end
+end
+local tp = mod.index.preset
+
+mod.LoadPresets = function()
+  for setName, setFunc in pairs(tp) do
+    setFunc()
+  end
+end
+
+tp.Containers = function()
+  local defs = {
+    anchor = 'TOPLEFT', parent = 'TekplayerCastBar', anchorTo = 'BOTTOMLEFT', x = 0, y = -3, width = 700,
+    height = 200,
+    spacing = 3,
+    padding = 0,
+    ["default"] = {
+      name = "Default",
+      childAnchor = 'TOPLEFT',
+      childAnchorTo = 'TOPLEFT',
+    },
+    ["DoTs"] = {
+      anchor ='BOTTOM', anchorTo='TOP',
+      parent='TekplayerCastBar',
+      display = 'icon',
+      size = 48,
+      height = 48, width = 48,
+      x = 0, y = 16,
+      padding = 0,
+      spacing = 0,
+      childAnchor = 'BOTTOMLEFT',
+      childAnchorTo = 'BOTTOMLEFT',
+    }
+  }
+  for k,v in pairs(defs) do
+    TurokData.spirit.containers[k] = v
+  end
+end
+
+tp.Rogue = function()
+  mod.AddTimer(
+    {
+      {
+        name = "Vendetta",
+        type = 'cooldown',
+        display = 'icon',
+        unit = 'player',
+        spellID = 79140,
+        playerClass = 'ROGUE',
+        specPage = 1,
+      },
+      {
+        name = "Burst of Speed",
+        type = 'cooldown',
+        display = 'icon',
+        unit = 'player',
+        spellID = 108212,
+        playerClass = 'ROGUE'
+      },
+      {
+        name = "Rupture",
+        type = 'aura',
+        display = 'icon',
+        unit = 'target',
+        spellID = 1943,
+        filters = 'PLAYER|HARMFUL',
+        playerClass = 'ROGUE',
+        specPage = {1,3},
+      },
+      {
+        name = "Slice and Dice",
+        type = 'aura',
+        display = 'icon',
+        spellID = 5171,
+        unit = 'player',
+        filters = 'PLAYER|HELPFUL',
+        playerClass = 'ROGUE',
+        specPage = {2,3},
+      },
+      {
+        name = "Deadly Missing",
+        type = 'aura',
+        spellID = 2823,
+        display = 'icon',
+        unit = 'player',
+        playerClass = 'ROGUE',
+        specPage = {1,3},
+        inverse = true,
+      },
+      {
+        name = "Stealth",
+        type ='aura',
+        spellID = 1784,
+        display = 'icon',
+        unit = 'player',
+        playerClass = 'ROGUE',
+      },
+      {
+        name = "Recuperate",
+        type ='aura',
+        spellID = 73651,
+        display = 'icon',
+        unit = 'player',
+        playerClass = 'ROGUE',
+      },
+    })
+end
+tp.Mage = function()
+  mod.AddTimer({
+    {
+      name = "Rune of Power",
+      type = 'aura',
+      spellID = 116014,
+      unit = 'player',
+      display = 'icon',
+      playerClass = 'MAGE',
+      talentID = 16032,
+    },
+    {
+      name = "Mage Nova",
+      spellID = {157980, 157981, 157997},
+      talentOffset = {5, 3},
+      unit = 'player',
+      type='cooldown',
+      display='icon',
+      playerClass='MAGE',
+      persist = true,
+    },
+    {
+      name = "Mage Bomb",
+      talentOffset = {5, 1},
+      unit = 'target',
+      type= 'aura',
+      display='icon',
+      filters = 'HARMFUL|PLAYER',
+      playerClass='MAGE',
+      persist = true,
+    },
+    {
+      name = "Frozen Orb",
+      spellID = 84714,
+      threschold = 2,
+      unit = 'player',
+      type='cooldown',
+      display='icon',
+      playerClass='MAGE',
+      specPage=3,
+    },
+    {
+      name = 'Arcane Power',
+      type = 'cooldown',
+      display = 'icon',
+      unit = 'player',
+      spellID = 12042,
+      playerClass = 'MAGE',
+      specPage = 1,
+    }
+  })
+end
+tp.UseEffects = function()
+  mod.AddTimer({
+
+    {
+      name = "Trinket 1",
+      type ='cooldown', display = 'icon',
+      unit = 'player',
+      persist = true,
+      inventoryID = 13,
+    },
+    {
+      name = "Maalus Effect", -- Maalus
+      playerClass = {'HUNTER', 'ROGUE'},
+      type = 'aura', display = 'progressbar',
+      unit = 'player', filters = 'HELPFUL',
+      leftText = "%c", rightText=  "%p",
+      duration = 15,
+      spellID = 187615, itemID  = 124636, hideIcon = true,
+
+      sound_active = [[Interface\Addons\Turok\Media\sound\FLASH.mp3]],
+
+      absolute = true, x = 0, y = -10, width = 300, height = 10,
+      anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT',
+      parent = 'TekplayerCastBar', padding = 0, spacing = 0,
+
+      foreground_inset = 0, foreground_color = {1,1,1,1}, foreground_blend = 'ADD',
+      background_color = {0,0,0,0},
+      icon = false,
+    },
+
+    {
+      name = "Maalus CD",
+      type = 'cooldown', display = 'icon',
+      unit = 'player',
+      spellID = 187615, itemID  = 124636,
+      playerClass = 'HUNTER',
+    },
+  })
+end
+
+tp.Hunter = function()
+  mod.AddTimer({
+    ---- Icon templates
+    { virtual = true, name = "Hunter",
+      playerClass = 'HUNTER', unit = 'player', container = 'default', display= 'icon', },
+    { virtual = true, name = "HunterSticky", inherits = "Hunter",
+      showAura = true, persist = true, },
+    { virtual = true, name = "HunterBar",
+      playerClass = 'HUNTER', unit = 'player', },
+    ---- Talents
+    {
+      inherits= "HunterSticky",
+      name = "Heavy Artillery", type = 'cooldown',
+      talentRow = 6,
+      trace = true},
+    {
+      inherits= "HunterSticky",
+      name = "Animal Power", type = 'cooldown',
+      talentRow = 5,
+      trace = true},
+    --- Spells
+    {
+      inherits = 'Hunter', name = "Camouflage",
+      type = 'cooldown', display = 'icon',
+      spellID = 51753, },
+    {
+      inherits = 'Hunter', name = "Ice Trap",
+      type = 'cooldown', display = 'icon',
+      spellID = 13809, },
+    {
+      inherits = 'Hunter', name = "Concussive Shot",
+      type = 'cooldown', display = 'icon',
+      spellID = 5116, },
+    {
+      inherits = 'Hunter', name = "Flare",
+      type = 'cooldown', display = 'icon',
+      spellID = 1543, },
+    {
+      inherits = 'Hunter', name = "Disengage",
+      type = 'cooldown', display = 'icon',
+      spellID = 781, },
+    {
+      inherits = "HunterSticky", name = "Rapid Fire",
+      type = 'cooldown', display = 'icon',
+      spellID = 3045, specPage = 2, },
+    {
+      inherits = 'HunterSticky', name = "Bestial Wrath",
+      type = 'cooldown', display = 'icon',
+      spellID = 19574, specPage = 1,
+      trace = true
+    },
+
+    --- Progress Bars
+    {
+      inherits = 'HunterBar', name = "Chimaera Shot",
+      type = 'cooldown', display = 'progressbar',
+      spellID = 53209, specPage = 2, persist = true,
+
+      hideIcon = true,
+      leftText = "", rightText = "%p",
+      width = 300, height = 8,padding = 0, spacing = 0,
+      absolute = true, x = 0, y = 0, anchor = 'TOPLEFT', anchorTo = 'TOPLEFT', parent = 'TekplayerCastBar', strata='MEDIUM',
+      foreground_color = {1,.125,0.43,1}, foreground_blend = 'ADD', foreground_inset = 0,
+      background_color = {.5,.5,.5,0}, background_blend = 'BLEND',
+    },
+    {
+      inherits = 'HunterBar', name = "Sniper Training (duration)",
+      type = 'aura', display = 'progressbar',
+      spellID = 168811, specPage = 2,
+
+      hideIcon = true,
+      leftText = "", rightText=  "",
+      width= 330, height = 12, padding = 0,
+      absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TekplayerCastBar', level = 1,
+      foreground_color = {1,0,0,1}, foreground_blend = 'BLEND',
+      sound_active = '', sound_hidden = '', sound_passive = '',
+    },
+    {
+      inherits = 'HunterBar', name = "Sniper Training: Recently Moved",
+      type = 'aura', display = 'progressbar',
+      spellID = 168809, specPage = 2,
+
+      hideIcon = true,
+      leftText = "", rightText=  "",
+      height = 12, width= 160, padding = 0,
+      absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TekplayerCastBar', level = 2,
+      foreground_color = {1,1,0,1}, foreground_blend = 'BLEND',
+      sound_active = '', sound_hidden = '', sound_passive = '',
+    },
+
+    --- Static Warnings
+    {
+      inherits='Hunter', name = "Aspect of the Pack",
+      type = 'aura', display = 'icon',
+      spellID = 13159
+    },
+    {
+      inherits = 'Hunter', name = "Trap Launcher",
+      type = 'aura', display = 'icon',
+      spellID = 77769, inverse = true,
+
+      absolute = true, x = 0, y = 200,
+      width = 100, height = 100,
+      foreground_color = {1,1,1, 0.5}, foreground_blend = 'BLEND',
+    },
+  })
+end
+tp.SPriest = function()
+  mod.AddTimer( {
+    {
+      virtual = true, name = "Caster Icon", container = 'DoTs',
+      playerClass = 'PRIEST',
+
+      combatFade = true,
+      height = 48, width = 48,
+      icon = { size = 48, },
+      persist = true,
+    },
+    {
+      inherits = "Caster Icon", name = "Shadowfiend",
+      unit = "player", spellID = 132603,
+      type = 'cooldown', display = 'icon',
+      container ='DoTs',
+    },
+    {
+      inherits = "Caster Icon", name = "Insanity",
+      type = 'aura', display = 'icon',
+      unit = 'player', filters = 'PLAYER|HELPFUL',
+      spellID = 132573, playerClass = 'PRIEST',
+      order = 3,
+    },
+    {
+      name = "Shadow Word: Pain",
+      type = 'aura', display = 'icon',
+      unit = 'target', filters = 'PLAYER|HARMFUL',
+      spellID = 589, playerClass = 'PRIEST', specPage = 3,
+
+      container = 'DoTs',
+      order = 1,
+      sound_active = '',
+    },
+    {
+      name = "Mental Fatigue",
+      type = 'aura', display = 'icon',
+      unit = 'target', filters = 'PLAYER|HARMFUL',
+      spellID = 184915, playerClass = 'PRIEST', specPage = 3,
+
+      parent = 'TekplayerCastBar',
+      container = 'DoTs',
+      order = 1,
+      sound_active = '',
+    },
+    {
+      name = "Vampiric Touch",
+      container = 'DoTs',
+      type = 'aura', display = 'icon',
+      unit = 'target', filters = 'PLAYER|HARMFUL',
+      spellID = 34914, playerClass = 'PRIEST', specPage = 3,
+      order =2,
+    },
+    {
+      name = "PW:Shield",
+      type = 'cooldown', display = 'icon',
+      unit = 'player',
+      spellID = 17, playerClass = 'PRIEST',
+    },
+    {
+      name = "Cascade",
+      type = 'cooldown', display = 'icon',
+      unit = 'player',
+      spellID = 127632, talentID = 21718, playerClass = 'PRIEST',
+    },
+  })
+end
\ No newline at end of file