add DRList-1.0 as lib

This commit is contained in:
Sumsebrum 2022-07-29 07:45:46 +02:00
parent 23097951e3
commit f1652e2b42
6 changed files with 1119 additions and 1 deletions

View File

@ -0,0 +1,400 @@
--[[
Name: DRList-1.0
Description: Diminishing returns categorization. Fork of outdated DRData-1.0.
Website: https://github.com/wardz/DRList-1.0/
Documentation: https://wardz.github.io/DRList-1.0/
Dependencies: LibStub
License: MIT
]]
--- DRList-1.0
-- @module DRList-1.0
local MAJOR, MINOR = "DRList-1.0", 40 -- Don't forget to change this in Spells.lua aswell!
local Lib = assert(LibStub, MAJOR .. " requires LibStub."):NewLibrary(MAJOR, MINOR)
if not Lib then return end -- already loaded
-------------------------------------------------------------------------------
-- *** LOCALIZATIONS ARE AUTOMATICALLY GENERATED ***
-- Please see Curseforge localization page if you'd like to help translate.
-- https://www.curseforge.com/wow/addons/drlist-1-0/localization
local L = {}
Lib.L = L
L["DISARMS"] = "Disarms"
L["DISORIENTS"] = "Disorients"
L["INCAPACITATES"] = "Incapacitates"
L["KNOCKBACKS"] = "Knockbacks"
L["ROOTS"] = "Roots"
L["SILENCES"] = "Silences"
L["STUNS"] = "Stuns"
L["TAUNTS"] = "Taunts"
L["FEARS"] = "Fears"
L["RANDOM_ROOTS"] = "Random roots"
L["RANDOM_STUNS"] = "Random stuns"
L["OPENER_STUN"] = "Opener Stuns"
L["HORROR"] = "Horrors"
L["SCATTERS"] = "Scatters"
L["SLEEPS"] = GetSpellInfo(1090) or "Sleep"
L["MIND_CONTROL"] = GetSpellInfo(605) or "Mind Control"
L["FROST_SHOCK"] = GetSpellInfo(15089) or "Frost Shock"
L["KIDNEY_SHOT"] = GetSpellInfo(408) or "Kidney Shot"
L["DEATH_COIL"] = GetSpellInfo(28412) or "Death Coil"
L["UNSTABLE_AFFLICTION"] = GetSpellInfo(31117) or "Unstable Affliction"
L["CHASTISE"] = GetSpellInfo(44041) or "Chastise"
L["COUNTERATTACK"] = GetSpellInfo(19306) or "Counterattack"
L["CYCLONE"] = GetSpellInfo(33786) or "Cyclone"
L["BANISH"] = GetSpellInfo(710) or "Banish"
L["CHARGE"] = GetSpellInfo(100) or "Charge"
-- luacheck: push ignore 542
local locale = GetLocale()
if locale == "deDE" then
L["FEARS"] = "Furchteffekte"
L["KNOCKBACKS"] = "Rückstoßeffekte"
L["ROOTS"] = "Bewegungsunfähigkeitseffekte"
L["SILENCES"] = "Stilleeffekte"
L["STUNS"] = "Betäubungseffekte"
L["TAUNTS"] = "Spotteffekte"
elseif locale == "frFR" then
L["FEARS"] = "Peurs"
L["KNOCKBACKS"] = "Projections"
L["ROOTS"] = "Immobilisations"
L["SILENCES"] = "Silences"
L["STUNS"] = "Etourdissements"
L["TAUNTS"] = "Provocations"
elseif locale == "itIT" then
--@localization(locale="itIT", namespace="Categories", format="lua_additive_table", handle-unlocalized="ignore")@
elseif locale == "koKR" then
L["DISORIENTS"] = "방향 감각 상실"
L["INCAPACITATES"] = "행동 불가"
L["KNOCKBACKS"] = "밀쳐내기"
L["ROOTS"] = "이동 불가"
L["SILENCES"] = "침묵"
L["STUNS"] = "기절"
elseif locale == "ptBR" then
--@localization(locale="ptBR", namespace="Categories", format="lua_additive_table", handle-unlocalized="ignore")@
elseif locale == "ruRU" then
L["DISARMS"] = "Разоружение"
L["DISORIENTS"] = "Дезориентация"
L["FEARS"] = "Опасения"
L["INCAPACITATES"] = "Паралич"
L["KNOCKBACKS"] = "Отбрасывание"
L["RANDOM_ROOTS"] = "Случайные корни"
L["RANDOM_STUNS"] = "Случайные оглушения"
L["ROOTS"] = "Сковывание"
L["SILENCES"] = "Немота"
L["STUNS"] = "Оглушение"
L["TAUNTS"] = "Насмешки"
elseif locale == "esES" or locale == "esMX" then
L["DISARMS"] = "Desarmar"
L["DISORIENTS"] = "Desorientar"
L["FEARS"] = "Miedos"
L["INCAPACITATES"] = "Incapacitar"
L["KNOCKBACKS"] = "Derribos"
L["RANDOM_ROOTS"] = "Raíces aleatorias"
L["RANDOM_STUNS"] = "Aturdir aleatorio"
L["ROOTS"] = "Raíces"
L["SILENCES"] = "Silencios"
L["STUNS"] = "Aturdimientos"
L["TAUNTS"] = "Provocaciones"
elseif locale == "zhCN" then
L["DISARMS"] = "缴械"
L["DISORIENTS"] = "迷惑"
L["FEARS"] = "恐惧"
L["INCAPACITATES"] = "瘫痪"
L["KNOCKBACKS"] = "击退"
L["RANDOM_ROOTS"] = "随机定身"
L["RANDOM_STUNS"] = "随机眩晕"
L["ROOTS"] = "定身"
L["SILENCES"] = "沉默"
L["STUNS"] = "昏迷"
L["TAUNTS"] = "嘲讽"
elseif locale == "zhTW" then
L["DISARMS"] = "繳械"
L["DISORIENTS"] = "迷惑"
L["FEARS"] = "恐懼"
L["INCAPACITATES"] = "癱瘓"
L["KNOCKBACKS"] = "擊退"
L["RANDOM_ROOTS"] = "隨機定身"
L["RANDOM_STUNS"] = "隨機昏迷"
L["ROOTS"] = "定身"
L["SILENCES"] = "沉默"
L["STUNS"] = "昏迷"
L["TAUNTS"] = "嘲諷"
end
-- luacheck: pop
-------------------------------------------------------------------------------
-- Check what game version we're running
Lib.gameExpansion = ({
[WOW_PROJECT_MAINLINE] = "retail",
[WOW_PROJECT_CLASSIC] = "classic",
[WOW_PROJECT_BURNING_CRUSADE_CLASSIC or 5] = "tbc",
})[WOW_PROJECT_ID]
local tocVersion = select(4, GetBuildInfo())
if tocVersion >= 30400 and tocVersion < 40000 then
Lib.gameExpansion = "wotlk" -- temporary check for wotlk build until new constant is added
end
-- How long it takes for a DR to expire, in seconds.
Lib.resetTimes = {
retail = {
["default"] = 18.5, -- 18 sec + 0.5 latency
["npc"] = 23, -- Against mobs it seems to last slightly longer, depending on server load
["knockback"] = 10, -- Knockbacks are immediately immune and only DRs for 10s
},
classic = {
["default"] = 19, -- dynamic between 15 and 20s
["npc"] = 23,
},
tbc = {
["default"] = 19, -- dynamic between 15 and 20s
["npc"] = 23,
},
wotlk = {
["default"] = 19, -- dynamic between 15 and 20s
["npc"] = 23,
},
}
-- List of all DR categories, english -> localized.
Lib.categoryNames = {
retail = {
["disorient"] = L.DISORIENTS,
["incapacitate"] = L.INCAPACITATES,
["silence"] = L.SILENCES,
["stun"] = L.STUNS,
["root"] = L.ROOTS,
["disarm"] = L.DISARMS,
["taunt"] = L.TAUNTS,
["knockback"] = L.KNOCKBACKS,
},
classic = {
["incapacitate"] = L.INCAPACITATES,
["stun"] = L.STUNS, -- controlled stun
["root"] = L.ROOTS, -- controlled root
["random_stun"] = L.RANDOM_STUNS, -- random proc stun, usually short (<3s)
["random_root"] = L.RANDOM_ROOTS,
["fear"] = L.FEARS,
["mind_control"] = L.MIND_CONTROL,
["frost_shock"] = L.FROST_SHOCK,
["kidney_shot"] = L.KIDNEY_SHOT,
},
tbc = {
["disorient"] = L.DISORIENTS,
["incapacitate"] = L.INCAPACITATES,
["stun"] = L.STUNS,
["random_stun"] = L.RANDOM_STUNS,
["random_root"] = L.RANDOM_ROOTS,
["root"] = L.ROOTS,
["disarm"] = L.DISARMS,
["fear"] = L.FEARS,
["scatter"] = L.SCATTERS,
["mind_control"] = L.MIND_CONTROL,
["kidney_shot"] = L.KIDNEY_SHOT,
["death_coil"] = L.DEATH_COIL,
["unstable_affliction"] = L.UNSTABLE_AFFLICTION,
["chastise"] = L.CHASTISE,
["counterattack"] = L.COUNTERATTACK,
},
wotlk = { -- WORK IN PROGRESS
["incapacitate"] = L.INCAPACITATES,
["stun"] = L.STUNS,
["random_stun"] = L.RANDOM_STUNS,
["random_root"] = L.RANDOM_ROOTS,
["root"] = L.ROOTS,
["disarm"] = L.DISARMS,
["fear"] = L.FEARS,
["scatter"] = L.SCATTERS,
["silence"] = L.SILENCES,
["horror"] = L.HORROR,
["mind_control"] = L.MIND_CONTROL,
["cyclone"] = L.CYCLONE,
["banish"] = L.BANISH,
["charge"] = L.CHARGE,
["opener_stun"] = L.OPENER_STUN,
},
}
-- Categories that have DR against normal mobs.
-- Note that this is only for normal mobs on retail. Special mobs or pets have DR on all categories,
-- see UnitClassification() and UnitIsQuestBoss().
Lib.categoriesPvE = {
retail = {
["taunt"] = L.TAUNTS, -- Lib.categoryNames.retail.taunt
["stun"] = L.STUNS,
["root"] = L.ROOTS,
},
classic = {
["stun"] = L.STUNS,
["kidney_shot"] = L.KIDNEY_SHOT,
},
tbc = {
["stun"] = L.STUNS,
["random_stun"] = L.RANDOM_STUNS,
["kidney_shot"] = L.KIDNEY_SHOT,
},
wotlk = {
--["taunt"] = L.TAUNTS,
["stun"] = L.STUNS,
["random_stun"] = L.RANDOM_STUNS,
["opener_stun"] = L.OPENER_STUN,
},
}
-- Successives diminished durations
Lib.diminishedDurations = {
retail = {
-- Decreases by 50%, immune at the 4th application
["default"] = { 0.50, 0.25 },
-- Decreases by 35%, immune at the 5th application
["taunt"] = { 0.65, 0.42, 0.27 },
-- Immediately immune
["knockback"] = {},
},
classic = {
["default"] = { 0.50, 0.25 },
},
tbc = {
["default"] = { 0.50, 0.25 },
},
wotlk = {
["default"] = { 0.50, 0.25 },
},
}
-------------------------------------------------------------------------------
-- Public API
-------------------------------------------------------------------------------
--- Get table of all spells that DRs.
-- Key is the spellID, and value is the unlocalized DR category.
-- For Classic the key is the localized spell name instead, and value
-- is a table containing both the DR category and spell ID. (Classic has no spellID payload in the combat log)
-- @see IterateSpellsByCategory
-- @treturn ?table {number=string}|table {string=table}
function Lib:GetSpells()
return Lib.spellList
end
--- Get table of all DR categories.
-- Key is unlocalized name used for API functions, value is localized name used for UI.
-- @treturn table {string=string}
function Lib:GetCategories()
return Lib.categoryNames[Lib.gameExpansion]
end
--- Get table of all categories that DRs in PvE only.
-- Key is unlocalized name used for API functions, value is localized name used for UI.
-- Note that this is only for normal mobs on retail. Special mobs or pets have DR on all categories,
-- see UnitClassification() and UnitIsQuestBoss().
-- Tip: you can combine :GetPvECategories() and :IterateSpellsByCategory() to get spellIDs only for PvE aswell.
-- @treturn table {string=string}
function Lib:GetPvECategories()
return Lib.categoriesPvE[Lib.gameExpansion]
end
--- Get constant for how long a DR lasts for a given category.
-- @tparam[opt="default"] string category Unlocalized category name, or "npc" for PvE timer.
-- @treturn number
function Lib:GetResetTime(category)
return Lib.resetTimes[Lib.gameExpansion][category or "default"] or Lib.resetTimes[Lib.gameExpansion].default
end
--- Get unlocalized DR category by spell ID.
-- For Classic (vanilla) you should pass in the spell name instead of ID.
-- For Classic you also get an optional second return value
-- which is the hardcoded spell ID of the spell name you passed in.
-- You should use this ID to query additional info from Blizzard API if needed, as
-- spell names only works for the player if they have the spell in their current spellbook.
-- @tparam number spellID
-- @treturn[1] string|nil The category name.
-- @treturn[2] number|nil The spell ID. (Classic only)
function Lib:GetCategoryBySpellID(spellID)
if Lib.gameExpansion == "classic" then
-- special case for classic as CLEU doesn't provide spellIDs
local data = Lib.spellList[spellID]
if not data then return end
return data.category, data.spellID
end
return Lib.spellList[spellID]
end
--- Get localized category from unlocalized category name, case sensitive.
-- @tparam string category Unlocalized category name
-- @treturn ?string|nil The localized category name.
function Lib:GetCategoryLocalization(category)
return Lib.categoryNames[Lib.gameExpansion][category]
end
--- Check if a category has DR against mobs.
-- Note that this is only for normal mobs on retail. Special mobs or pets have DR on all categories,
-- see UnitClassification() and UnitIsQuestBoss().
-- @tparam string category Unlocalized category name
-- @treturn bool
function Lib:IsPvECategory(category)
return Lib.categoriesPvE[Lib.gameExpansion][category] and true or false -- make sure bool is always returned here
end
--- Get next successive diminished duration
-- @tparam number diminished How many times the DR has been applied so far
-- @tparam[opt="default"] string category Unlocalized category name
-- @usage local reduction = DRList:GetNextDR(1) -- returns 0.50, half duration on debuff
-- @treturn number DR percentage in decimals. Returns 0 if max DR is reached or arguments are invalid.
function Lib:GetNextDR(diminished, category)
local durations = Lib.diminishedDurations[Lib.gameExpansion][category or "default"]
if not durations and Lib.categoryNames[Lib.gameExpansion][category] then
-- Redirect to default when "stun", "root" etc is passed
durations = Lib.diminishedDurations[Lib.gameExpansion]["default"]
end
return durations and durations[diminished] or 0
end
do
local next = _G.next
local function CategoryIterator(category, index)
local spellList, newCat = Lib.spellList
repeat
index, newCat = next(spellList, index)
if index then
if newCat == category or newCat.category == category then
return index, category
end
end
until not index
end
--- Iterate through the spells of a given category.
-- @tparam string category Unlocalized category name
-- @usage for spellID in DRList:IterateSpellsByCategory("root") do print(spellID) end
-- @warning Slow function, do not use for frequent combat related stuff unless you cache results.
-- @return Iterator function
function Lib:IterateSpellsByCategory(category)
assert(Lib.categoryNames[Lib.gameExpansion][category], "invalid category")
return CategoryIterator, category
end
end
-- keep same API as DRData-1.0 for easier transitions
Lib.GetCategoryName = Lib.GetCategoryLocalization
Lib.IsPVE = Lib.IsPvECategory
Lib.NextDR = Lib.GetNextDR
Lib.GetSpellCategory = Lib.GetCategoryBySpellID
Lib.IterateSpells = Lib.IterateSpellsByCategory
Lib.RESET_TIME = Lib.resetTimes[Lib.gameExpansion].default
Lib.pveDR = Lib.categoriesPvE

View File

@ -0,0 +1,23 @@
## Interface: 90205
## Interface-Classic: 11402
## Interface-BCC: 20504
## Interface-Wrath: 30400
## Title: Lib: DRList-1.0
## Version: @project-version@
## X-Category: Library
## X-License: MIT
## X-Curse-Project-ID: 315757
## X-Wago-ID: 9rN4BxKD
#@no-lib-strip@
libs\LibStub\LibStub.lua
#@end-no-lib-strip@
DRList-1.0.xml
#@do-not-package@
tests\engine.lua
tests\test-retail.lua
tests\test-classic.lua
tests\test-tbc.lua
tests\test-wotlk.lua
#@end-do-not-package@

View File

@ -0,0 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="DRList-1.0.lua"/>
<Script file="Spells.lua"/>
</Ui>

689
Libs/DRList-1.0/Spells.lua Normal file
View File

@ -0,0 +1,689 @@
local Lib, version = LibStub("DRList-1.0")
if Lib.spellList and version >= 40 then return end
if Lib.gameExpansion == "retail" then
-- SpellID list for mainline aka retail WoW
Lib.spellList = {
[207167] = "disorient", -- Blinding Sleet
[207685] = "disorient", -- Sigil of Misery
[33786] = "disorient", -- Cyclone
[1513] = "disorient", -- Scare Beast
[31661] = "disorient", -- Dragon's Breath
[198909] = "disorient", -- Song of Chi-ji
[202274] = "disorient", -- Incendiary Brew
[105421] = "disorient", -- Blinding Light
[10326] = "disorient", -- Turn Evil
[605] = "disorient", -- Mind Control
[8122] = "disorient", -- Psychic Scream
[226943] = "disorient", -- Mind Bomb
[2094] = "disorient", -- Blind
[118699] = "disorient", -- Fear
[5484] = "disorient", -- Howl of Terror
[261589] = "disorient", -- Seduction (Grimoire of Sacrifice)
[6358] = "disorient", -- Seduction (Succubus)
[5246] = "disorient", -- Intimidating Shout 1
[316593] = "disorient", -- Intimidating Shout 2 (TODO: not sure which one is correct in 9.0.1)
[316595] = "disorient", -- Intimidating Shout 3
[331866] = "disorient", -- Agent of Chaos (Venthyr Covenant)
[217832] = "incapacitate", -- Imprison
[221527] = "incapacitate", -- Imprison (Honor talent)
[2637] = "incapacitate", -- Hibernate
[99] = "incapacitate", -- Incapacitating Roar
[3355] = "incapacitate", -- Freezing Trap
[203337] = "incapacitate", -- Freezing Trap (Honor talent)
[213691] = "incapacitate", -- Scatter Shot
[118] = "incapacitate", -- Polymorph
[28271] = "incapacitate", -- Polymorph (Turtle)
[28272] = "incapacitate", -- Polymorph (Pig)
[61025] = "incapacitate", -- Polymorph (Snake)
[61305] = "incapacitate", -- Polymorph (Black Cat)
[61780] = "incapacitate", -- Polymorph (Turkey)
[61721] = "incapacitate", -- Polymorph (Rabbit)
[126819] = "incapacitate", -- Polymorph (Porcupine)
[161353] = "incapacitate", -- Polymorph (Polar Bear Cub)
[161354] = "incapacitate", -- Polymorph (Monkey)
[161355] = "incapacitate", -- Polymorph (Penguin)
[161372] = "incapacitate", -- Polymorph (Peacock)
[277787] = "incapacitate", -- Polymorph (Baby Direhorn)
[277792] = "incapacitate", -- Polymorph (Bumblebee)
[82691] = "incapacitate", -- Ring of Frost
[115078] = "incapacitate", -- Paralysis
[20066] = "incapacitate", -- Repentance
[9484] = "incapacitate", -- Shackle Undead
[200196] = "incapacitate", -- Holy Word: Chastise
[1776] = "incapacitate", -- Gouge
[6770] = "incapacitate", -- Sap
[51514] = "incapacitate", -- Hex
[196942] = "incapacitate", -- Hex (Voodoo Totem)
[210873] = "incapacitate", -- Hex (Raptor)
[211004] = "incapacitate", -- Hex (Spider)
[211010] = "incapacitate", -- Hex (Snake)
[211015] = "incapacitate", -- Hex (Cockroach)
[269352] = "incapacitate", -- Hex (Skeletal Hatchling)
[309328] = "incapacitate", -- Hex (Living Honey)
[277778] = "incapacitate", -- Hex (Zandalari Tendonripper)
[277784] = "incapacitate", -- Hex (Wicker Mongrel)
[197214] = "incapacitate", -- Sundering
[710] = "incapacitate", -- Banish
[6789] = "incapacitate", -- Mortal Coil
[107079] = "incapacitate", -- Quaking Palm (Pandaren racial)
[47476] = "silence", -- Strangulate
[204490] = "silence", -- Sigil of Silence
-- [78675] = "silence", -- Solar Beam (doesn't seem to DR)
[202933] = "silence", -- Spider Sting
[356727] = "silence", -- Spider Venom
[217824] = "silence", -- Shield of Virtue
[15487] = "silence", -- Silence
[1330] = "silence", -- Garrote
[196364] = "silence", -- Unstable Affliction Silence Effect
[210141] = "stun", -- Zombie Explosion
[334693] = "stun", -- Absolute Zero (Breath of Sindragosa)
[108194] = "stun", -- Asphyxiate (Unholy)
[221562] = "stun", -- Asphyxiate (Blood)
[91800] = "stun", -- Gnaw (Ghoul)
[91797] = "stun", -- Monstrous Blow (Mutated Ghoul)
[287254] = "stun", -- Dead of Winter
[179057] = "stun", -- Chaos Nova
[205630] = "stun", -- Illidan's Grasp (Primary effect)
[208618] = "stun", -- Illidan's Grasp (Secondary effect)
[211881] = "stun", -- Fel Eruption
[200166] = "stun", -- Metamorphosis (PvE stun effect)
[203123] = "stun", -- Maim
[163505] = "stun", -- Rake (Prowl)
[5211] = "stun", -- Mighty Bash
[202244] = "stun", -- Overrun
[325321] = "stun", -- Wild Hunt's Charge
[357021] = "stun", -- Consecutive Concussion
[24394] = "stun", -- Intimidation
[119381] = "stun", -- Leg Sweep
[202346] = "stun", -- Double Barrel
[853] = "stun", -- Hammer of Justice
[255941] = "stun", -- Wake of Ashes
[64044] = "stun", -- Psychic Horror
[200200] = "stun", -- Holy Word: Chastise Censure
[1833] = "stun", -- Cheap Shot
[408] = "stun", -- Kidney Shot
[118905] = "stun", -- Static Charge (Capacitor Totem)
[118345] = "stun", -- Pulverize (Primal Earth Elemental)
[305485] = "stun", -- Lightning Lasso
[89766] = "stun", -- Axe Toss
[171017] = "stun", -- Meteor Strike (Infernal)
[171018] = "stun", -- Meteor Strike (Abyssal)
[30283] = "stun", -- Shadowfury
[46968] = "stun", -- Shockwave
[132168] = "stun", -- Shockwave (Protection)
[145047] = "stun", -- Shockwave (Proving Grounds PvE)
[132169] = "stun", -- Storm Bolt
[199085] = "stun", -- Warpath
[20549] = "stun", -- War Stomp (Tauren)
[255723] = "stun", -- Bull Rush (Highmountain Tauren)
[287712] = "stun", -- Haymaker (Kul Tiran)
[332423] = "stun", -- Sparkling Driftglobe Core (Kyrian Covenant)
[204085] = "root", -- Deathchill (Chains of Ice)
[233395] = "root", -- Deathchill (Remorseless Winter)
[339] = "root", -- Entangling Roots
[170855] = "root", -- Entangling Roots (Nature's Grasp)
[102359] = "root", -- Mass Entanglement
[117526] = "root", -- Binding Shot
[162480] = "root", -- Steel Trap
[273909] = "root", -- Steelclaw Trap
-- [190927] = "root_harpoon", -- Harpoon (TODO: confirm)
[212638] = "root", -- Tracker's Net
[201158] = "root", -- Super Sticky Tar
[122] = "root", -- Frost Nova
[33395] = "root", -- Freeze
[198121] = "root", -- Frostbite
[342375] = "root", -- Tormenting Backlash (Torghast PvE)
[233582] = "root", -- Entrenched in Flame
[116706] = "root", -- Disable
[324382] = "root", -- Clash
[64695] = "root", -- Earthgrab (Totem effect)
[285515] = "root", -- Surge of Power
[39965] = "root", -- Frost Grenade (Item)
[75148] = "root", -- Embersilk Net (Item)
[55536] = "root", -- Frostweave Net (Item)
[268966] = "root", -- Hooked Deep Sea Net (Item)
[209749] = "disarm", -- Faerie Swarm (Balance Honor Talent)
[207777] = "disarm", -- Dismantle
[233759] = "disarm", -- Grapple Weapon
[236077] = "disarm", -- Disarm
[56222] = "taunt", -- Dark Command
[51399] = "taunt", -- Death Grip (Taunt Effect)
[185245] = "taunt", -- Torment
[6795] = "taunt", -- Growl (Druid)
[2649] = "taunt", -- Growl (Hunter Pet) (TODO: confirm)
[20736] = "taunt", -- Distracting Shot
[116189] = "taunt", -- Provoke
[118635] = "taunt", -- Provoke (Black Ox Statue)
[196727] = "taunt", -- Provoke (Niuzao)
[204079] = "taunt", -- Final Stand
[62124] = "taunt", -- Hand of Reckoning
[17735] = "taunt", -- Suffering (Voidwalker) (TODO: confirm)
[355] = "taunt", -- Taunt
-- Experimental
[108199] = "knockback", -- Gorefiend's Grasp
[202249] = "knockback", -- Overrun
[61391] = "knockback", -- Typhoon
[102793] = "knockback", -- Ursol's Vortex
[186387] = "knockback", -- Bursting Shot
[236777] = "knockback", -- Hi-Explosive Trap
[157981] = "knockback", -- Blast Wave
[237371] = "knockback", -- Ring of Peace
[204263] = "knockback", -- Shining Force
[51490] = "knockback", -- Thunderstorm
-- [287712] = "knockback", -- Haywire (Kul'Tiran Racial)
}
elseif Lib.gameExpansion == "tbc" then
-- SpellID list for The Burning Crusade
-- spellID for every rank is used over spell name to avoid name collisions, and faster lookups
Lib.spellList = {
[2637] = "incapacitate", -- Hibernate (Rank 1)
[18657] = "incapacitate", -- Hibernate (Rank 2)
[18658] = "incapacitate", -- Hibernate (Rank 3)
[22570] = "incapacitate", -- Maim
[3355] = "incapacitate", -- Freezing Trap Effect (Rank 1)
[14308] = "incapacitate", -- Freezing Trap Effect (Rank 2)
[14309] = "incapacitate", -- Freezing Trap Effect (Rank 3)
[19386] = "incapacitate", -- Wyvern Sting (Rank 1)
[24132] = "incapacitate", -- Wyvern Sting (Rank 2)
[24133] = "incapacitate", -- Wyvern Sting (Rank 3)
[27068] = "incapacitate", -- Wyvern Sting (Rank 4)
[118] = "incapacitate", -- Polymorph (Rank 1)
[12824] = "incapacitate", -- Polymorph (Rank 2)
[12825] = "incapacitate", -- Polymorph (Rank 3)
[12826] = "incapacitate", -- Polymorph (Rank 4)
[28271] = "incapacitate", -- Polymorph: Turtle
[28272] = "incapacitate", -- Polymorph: Pig
[20066] = "incapacitate", -- Repentance
[6770] = "incapacitate", -- Sap (Rank 1)
[2070] = "incapacitate", -- Sap (Rank 2)
[11297] = "incapacitate", -- Sap (Rank 3)
[1776] = "incapacitate", -- Gouge (Rank 1)
[1777] = "incapacitate", -- Gouge (Rank 2)
[8629] = "incapacitate", -- Gouge (Rank 3)
[11285] = "incapacitate", -- Gouge (Rank 4)
[11286] = "incapacitate", -- Gouge (Rank 5)
[38764] = "incapacitate", -- Gouge (Rank 6)
[13327] = "incapacitate", -- Reckless Charge (Rocket Helmet)
[4064] = "incapacitate", -- Rough Copper Bomb
[4065] = "incapacitate", -- Large Copper Bomb
[4066] = "incapacitate", -- Small Bronze Bomb
[4067] = "incapacitate", -- Big Bronze Bomb
[4068] = "incapacitate", -- Iron Grenade
[12421] = "incapacitate", -- Mithril Frag Bomb
[4069] = "incapacitate", -- Big Iron Bomb
[12562] = "incapacitate", -- The Big One
[12543] = "incapacitate", -- Hi-Explosive Bomb
[19769] = "incapacitate", -- Thorium Grenade
[19784] = "incapacitate", -- Dark Iron Bomb
[30216] = "incapacitate", -- Fel Iron Bomb
[30461] = "incapacitate", -- The Bigger One
[30217] = "incapacitate", -- Adamantite Grenade
[33786] = "disorient", -- Cyclone
[2094] = "disorient", -- Blind
[5211] = "stun", -- Bash (Rank 1)
[6798] = "stun", -- Bash (Rank 2)
[8983] = "stun", -- Bash (Rank 3)
[9005] = "stun", -- Pounce (Rank 1)
[9823] = "stun", -- Pounce (Rank 2)
[9827] = "stun", -- Pounce (Rank 3)
[27006] = "stun", -- Pounce (Rank 4)
[24394] = "stun", -- Intimidation
[853] = "stun", -- Hammer of Justice (Rank 1)
[5588] = "stun", -- Hammer of Justice (Rank 2)
[5589] = "stun", -- Hammer of Justice (Rank 3)
[10308] = "stun", -- Hammer of Justice (Rank 4)
[1833] = "stun", -- Cheap Shot
[30283] = "stun", -- Shadowfury (Rank 1)
[30413] = "stun", -- Shadowfury (Rank 2)
[30414] = "stun", -- Shadowfury (Rank 3)
[12809] = "stun", -- Concussion Blow
[7922] = "stun", -- Charge Stun
[20253] = "stun", -- Intercept Stun (Rank 1)
[20614] = "stun", -- Intercept Stun (Rank 2)
[20615] = "stun", -- Intercept Stun (Rank 3)
[25273] = "stun", -- Intercept Stun (Rank 4)
[25274] = "stun", -- Intercept Stun (Rank 5)
[20549] = "stun", -- War Stomp (Racial)
[13237] = "stun", -- Goblin Mortar
[835] = "stun", -- Tidal Charm
[16922] = "random_stun", -- Celestial Focus (Starfire Stun)
[19410] = "random_stun", -- Improved Concussive Shot
[12355] = "random_stun", -- Impact
[20170] = "random_stun", -- Seal of Justice Stun
[15269] = "random_stun", -- Blackout
[18093] = "random_stun", -- Pyroclasm
[39796] = "random_stun", -- Stoneclaw Stun
[12798] = "random_stun", -- Revenge Stun
[5530] = "random_stun", -- Mace Stun Effect (Mace Specialization)
[15283] = "random_stun", -- Stunning Blow (Weapon Proc)
[56] = "random_stun", -- Stun (Weapon Proc)
[34510] = "random_stun", -- Stormherald/Deep Thunder (Weapon Proc)
[10326] = "fear", -- Turn Evil (Might be PvE only until wotlk, adding just incase)
[8122] = "fear", -- Psychic Scream (Rank 1)
[8124] = "fear", -- Psychic Scream (Rank 2)
[10888] = "fear", -- Psychic Scream (Rank 3)
[10890] = "fear", -- Psychic Scream (Rank 4)
[5782] = "fear", -- Fear (Rank 1)
[6213] = "fear", -- Fear (Rank 2)
[6215] = "fear", -- Fear (Rank 3)
[6358] = "fear", -- Seduction (Succubus)
[5484] = "fear", -- Howl of Terror (Rank 1)
[17928] = "fear", -- Howl of Terror (Rank 2)
[1513] = "fear", -- Scare Beast (Rank 1)
[14326] = "fear", -- Scare Beast (Rank 2)
[14327] = "fear", -- Scare Beast (Rank 3)
[5246] = "fear", -- Intimidating Shout
[5134] = "fear", -- Flash Bomb Fear (Item)
[339] = "root", -- Entangling Roots (Rank 1)
[1062] = "root", -- Entangling Roots (Rank 2)
[5195] = "root", -- Entangling Roots (Rank 3)
[5196] = "root", -- Entangling Roots (Rank 4)
[9852] = "root", -- Entangling Roots (Rank 5)
[9853] = "root", -- Entangling Roots (Rank 6)
[26989] = "root", -- Entangling Roots (Rank 7)
[19975] = "root", -- Nature's Grasp (Rank 1)
[19974] = "root", -- Nature's Grasp (Rank 2)
[19973] = "root", -- Nature's Grasp (Rank 3)
[19972] = "root", -- Nature's Grasp (Rank 4)
[19971] = "root", -- Nature's Grasp (Rank 5)
[19970] = "root", -- Nature's Grasp (Rank 6)
[27010] = "root", -- Nature's Grasp (Rank 7)
[122] = "root", -- Frost Nova (Rank 1)
[865] = "root", -- Frost Nova (Rank 2)
[6131] = "root", -- Frost Nova (Rank 3)
[10230] = "root", -- Frost Nova (Rank 4)
[27088] = "root", -- Frost Nova (Rank 5)
[33395] = "root", -- Freeze (Water Elemental)
[39965] = "root", -- Frost Grenade (Item)
[605] = "mind_control", -- Mind Control (Rank 1)
[10911] = "mind_control", -- Mind Control (Rank 2)
[10912] = "mind_control", -- Mind Control (Rank 3)
[13181] = "mind_control", -- Gnomish Mind Control Cap
[14251] = "disarm", -- Riposte
[34097] = "disarm", -- Riposte 2 (TODO: Check which ID is the correct one)
[676] = "disarm", -- Disarm
[12494] = "random_root", -- Frostbite
[23694] = "random_root", -- Improved Hamstring
[19229] = "random_root", -- Improved Wing Clip
[19185] = "random_root", -- Entrapment
[19503] = "scatter", -- Scatter Shot
[31661] = "scatter", -- Dragon's Breath (Rank 1)
[33041] = "scatter", -- Dragon's Breath (Rank 2)
[33042] = "scatter", -- Dragon's Breath (Rank 3)
[33043] = "scatter", -- Dragon's Breath (Rank 4)
-- Spells that DR with itself only
[408] = "kidney_shot", -- Kidney Shot (Rank 1)
[8643] = "kidney_shot", -- Kidney Shot (Rank 2)
[43523] = "unstable_affliction", -- Unstable Affliction 1
[31117] = "unstable_affliction", -- Unstable Affliction 2
[6789] = "death_coil", -- Death Coil (Rank 1)
[17925] = "death_coil", -- Death Coil (Rank 2)
[17926] = "death_coil", -- Death Coil (Rank 3)
[27223] = "death_coil", -- Death Coil (Rank 4)
[44041] = "chastise", -- Chastise (Rank 1)
[44043] = "chastise", -- Chastise (Rank 2)
[44044] = "chastise", -- Chastise (Rank 3)
[44045] = "chastise", -- Chastise (Rank 4)
[44046] = "chastise", -- Chastise (Rank 5)
[44047] = "chastise", -- Chastise (Rank 6)
[19306] = "counterattack", -- Counterattack (Rank 1)
[20909] = "counterattack", -- Counterattack (Rank 2)
[20910] = "counterattack", -- Counterattack (Rank 3)
[27067] = "counterattack", -- Counterattack (Rank 4)
}
elseif Lib.gameExpansion == "wotlk" then -- STILL WORK IN PROGRESS, I DON'T HAVE BETA ACCESS
-- SpellID list for Wrath of the Lich King.
-- spellID for every rank is used over spell name to avoid name collisions, and faster lookups
Lib.spellList = {
[49203] = "incapacitate", -- Hungering Cold
[2637] = "incapacitate", -- Hibernate (Rank 1)
[18657] = "incapacitate", -- Hibernate (Rank 2)
[18658] = "incapacitate", -- Hibernate (Rank 3)
[60210] = "incapacitate", -- Freezing Arrow Effect (Rank 1)
[3355] = "incapacitate", -- Freezing Trap Effect (Rank 1)
[14308] = "incapacitate", -- Freezing Trap Effect (Rank 2)
[14309] = "incapacitate", -- Freezing Trap Effect (Rank 3)
[19386] = "incapacitate", -- Wyvern Sting (Rank 1)
[24132] = "incapacitate", -- Wyvern Sting (Rank 2)
[24133] = "incapacitate", -- Wyvern Sting (Rank 3)
[27068] = "incapacitate", -- Wyvern Sting (Rank 4)
[49011] = "incapacitate", -- Wyvern Sting (Rank 5)
[49012] = "incapacitate", -- Wyvern Sting (Rank 6)
[31661] = "incapacitate", -- Dragon's Breath (Rank 1) -- TODO: ??
[33041] = "incapacitate", -- Dragon's Breath (Rank 2)
[33042] = "incapacitate", -- Dragon's Breath (Rank 3)
[33043] = "incapacitate", -- Dragon's Breath (Rank 4)
[42949] = "incapacitate", -- Dragon's Breath (Rank 5)
[42950] = "incapacitate", -- Dragon's Breath (Rank 6)
[118] = "incapacitate", -- Polymorph (Rank 1)
[12824] = "incapacitate", -- Polymorph (Rank 2)
[12825] = "incapacitate", -- Polymorph (Rank 3)
[12826] = "incapacitate", -- Polymorph (Rank 4)
[28271] = "incapacitate", -- Polymorph: Turtle
[28272] = "incapacitate", -- Polymorph: Pig
[61721] = "incapacitate", -- Polymorph: Rabbit
[61780] = "incapacitate", -- Polymorph: Turkey
[61305] = "incapacitate", -- Polymorph: Black Cat
[20066] = "incapacitate", -- Repentance
[1776] = "incapacitate", -- Gouge
[6770] = "incapacitate", -- Sap (Rank 1)
[2070] = "incapacitate", -- Sap (Rank 2)
[11297] = "incapacitate", -- Sap (Rank 3)
[51724] = "incapacitate", -- Sap (Rank 4)
[9484] = "incapacitate", -- Shackle Undead (Rank 1)
[9485] = "incapacitate", -- Shackle Undead (Rank 2)
[10955] = "incapacitate", -- Shackle Undead (Rank 3)
[51514] = "incapacitate", -- Hex
[13327] = "incapacitate", -- Reckless Charge (Rocket Helmet)
[4064] = "incapacitate", -- Rough Copper Bomb
[4065] = "incapacitate", -- Large Copper Bomb
[4066] = "incapacitate", -- Small Bronze Bomb
[4067] = "incapacitate", -- Big Bronze Bomb
[4068] = "incapacitate", -- Iron Grenade
[12421] = "incapacitate", -- Mithril Frag Bomb
[4069] = "incapacitate", -- Big Iron Bomb
[12562] = "incapacitate", -- The Big One
[12543] = "incapacitate", -- Hi-Explosive Bomb
[19769] = "incapacitate", -- Thorium Grenade
[19784] = "incapacitate", -- Dark Iron Bomb
[30216] = "incapacitate", -- Fel Iron Bomb
[30461] = "incapacitate", -- The Bigger One
[30217] = "incapacitate", -- Adamantite Grenade
[47481] = "stun", -- Gnaw (Ghoul Pet)
[5211] = "stun", -- Bash (Rank 1)
[6798] = "stun", -- Bash (Rank 2)
[8983] = "stun", -- Bash (Rank 3)
[22570] = "stun", -- Maim (Rank 1)
[49802] = "stun", -- Maim (Rank 2)
[24394] = "stun", -- Intimidation
[50519] = "stun", -- Sonic Blast (Pet Rank 1)
[53564] = "stun", -- Sonic Blast (Pet Rank 2)
[53565] = "stun", -- Sonic Blast (Pet Rank 3)
[53566] = "stun", -- Sonic Blast (Pet Rank 4)
[53567] = "stun", -- Sonic Blast (Pet Rank 5)
[53568] = "stun", -- Sonic Blast (Pet Rank 6)
[50518] = "stun", -- Ravage (Pet Rank 1)
[53558] = "stun", -- Ravage (Pet Rank 2)
[53559] = "stun", -- Ravage (Pet Rank 3)
[53560] = "stun", -- Ravage (Pet Rank 4)
[53561] = "stun", -- Ravage (Pet Rank 5)
[53562] = "stun", -- Ravage (Pet Rank 6)
[44572] = "stun", -- Deep Freeze
[853] = "stun", -- Hammer of Justice (Rank 1)
[5588] = "stun", -- Hammer of Justice (Rank 2)
[5589] = "stun", -- Hammer of Justice (Rank 3)
[10308] = "stun", -- Hammer of Justice (Rank 4)
[2812] = "stun", -- Holy Wrath (Rank 1)
[10318] = "stun", -- Holy Wrath (Rank 2)
[27139] = "stun", -- Holy Wrath (Rank 3)
[48816] = "stun", -- Holy Wrath (Rank 4)
[48817] = "stun", -- Holy Wrath (Rank 5)
[408] = "stun", -- Kidney Shot (Rank 1)
[8643] = "stun", -- Kidney Shot (Rank 2)
[58861] = "stun", -- Bash (Spirit Wolves)
[30283] = "stun", -- Shadowfury (Rank 1)
[30413] = "stun", -- Shadowfury (Rank 2)
[30414] = "stun", -- Shadowfury (Rank 3)
[47846] = "stun", -- Shadowfury (Rank 4)
[47847] = "stun", -- Shadowfury (Rank 5)
[12809] = "stun", -- Concussion Blow
[60995] = "stun", -- Demon Charge
[30153] = "stun", -- Intercept (Felguard Rank 1)
[30195] = "stun", -- Intercept (Felguard Rank 2)
[30197] = "stun", -- Intercept (Felguard Rank 3)
[47995] = "stun", -- Intercept (Felguard Rank 4)
[20253] = "stun", -- Intercept Stun (Rank 1)
[20614] = "stun", -- Intercept Stun (Rank 2)
[20615] = "stun", -- Intercept Stun (Rank 3)
[25273] = "stun", -- Intercept Stun (Rank 4)
[25274] = "stun", -- Intercept Stun (Rank 5)
[46968] = "stun", -- Shockwave
[20549] = "stun", -- War Stomp (Racial)
[16922] = "random_stun", -- Celestial Focus (Starfire Stun)
[28445] = "random_stun", -- Improved Concussive Shot
[12355] = "random_stun", -- Impact
[20170] = "random_stun", -- Seal of Justice Stun
[18093] = "random_stun", -- Pyroclasm
[39796] = "random_stun", -- Stoneclaw Stun
[12798] = "random_stun", -- Revenge Stun
[5530] = "random_stun", -- Mace Stun Effect (Mace Specialization)
[15283] = "random_stun", -- Stunning Blow (Weapon Proc)
[56] = "random_stun", -- Stun (Weapon Proc)
[34510] = "random_stun", -- Stormherald/Deep Thunder (Weapon Proc)
[1513] = "fear", -- Scare Beast (Rank 1)
[14326] = "fear", -- Scare Beast (Rank 2)
[14327] = "fear", -- Scare Beast (Rank 3)
[10326] = "fear", -- Turn Evil
[8122] = "fear", -- Psychic Scream (Rank 1)
[8124] = "fear", -- Psychic Scream (Rank 2)
[10888] = "fear", -- Psychic Scream (Rank 3)
[10890] = "fear", -- Psychic Scream (Rank 4)
[2094] = "fear", -- Blind
[5782] = "fear", -- Fear (Rank 1)
[6213] = "fear", -- Fear (Rank 2)
[6215] = "fear", -- Fear (Rank 3)
[6358] = "fear", -- Seduction (Succubus)
[5484] = "fear", -- Howl of Terror (Rank 1)
[17928] = "fear", -- Howl of Terror (Rank 2)
[5246] = "fear", -- Intimidating Shout
[5134] = "fear", -- Flash Bomb Fear (Item)
[339] = "root", -- Entangling Roots (Rank 1)
[1062] = "root", -- Entangling Roots (Rank 2)
[5195] = "root", -- Entangling Roots (Rank 3)
[5196] = "root", -- Entangling Roots (Rank 4)
[9852] = "root", -- Entangling Roots (Rank 5)
[9853] = "root", -- Entangling Roots (Rank 6)
[26989] = "root", -- Entangling Roots (Rank 7)
[53308] = "root", -- Entangling Roots (Rank 8)
[19975] = "root", -- Nature's Grasp (Rank 1)
[19974] = "root", -- Nature's Grasp (Rank 2)
[19973] = "root", -- Nature's Grasp (Rank 3)
[19972] = "root", -- Nature's Grasp (Rank 4)
[19971] = "root", -- Nature's Grasp (Rank 5)
[19970] = "root", -- Nature's Grasp (Rank 6)
[27010] = "root", -- Nature's Grasp (Rank 7)
[53312] = "root", -- Nature's Grasp (Rank 8)
[50245] = "root", -- Pin (Rank 1)
[53544] = "root", -- Pin (Rank 2)
[53545] = "root", -- Pin (Rank 3)
[53546] = "root", -- Pin (Rank 4)
[53547] = "root", -- Pin (Rank 5)
[53548] = "root", -- Pin (Rank 6)
[33395] = "root", -- Freeze (Water Elemental)
[122] = "root", -- Frost Nova (Rank 1)
[865] = "root", -- Frost Nova (Rank 2)
[6131] = "root", -- Frost Nova (Rank 3)
[10230] = "root", -- Frost Nova (Rank 4)
[27088] = "root", -- Frost Nova (Rank 5)
[42917] = "root", -- Frost Nova (Rank 6)
[39965] = "root", -- Frost Grenade (Item)
[12494] = "random_root", -- Frostbite
[55080] = "random_root", -- Shattered Barrier
[58373] = "random_root", -- Glyph of Hamstring
[23694] = "random_root", -- Improved Hamstring
[47168] = "random_root", -- Improved Wing Clip
[19185] = "random_root", -- Entrapment
[53359] = "disarm", -- Chimera Shot (Scorpid)
[50541] = "disarm", -- Snatch (Rank 1)
[53537] = "disarm", -- Snatch (Rank 2)
[53538] = "disarm", -- Snatch (Rank 3)
[53540] = "disarm", -- Snatch (Rank 4)
[53542] = "disarm", -- Snatch (Rank 5)
[53543] = "disarm", -- Snatch (Rank 6)
[64058] = "disarm", -- Psychic Horror Disarm Effect
[51722] = "disarm", -- Dismantle
[676] = "disarm", -- Disarm
[47476] = "silence", -- Strangulate
[34490] = "silence", -- Silencing Shot
[35334] = "silence", -- Nether Shock 1 -- TODO: verify
[44957] = "silence", -- Nether Shock 2 -- TODO: verify
[18469] = "silence", -- Silenced - Improved Counterspell (Rank 1)
[55021] = "silence", -- Silenced - Improved Counterspell (Rank 2)
[63529] = "silence", -- Silenced - Shield of the Templar
[15487] = "silence", -- Silence
[1330] = "silence", -- Garrote - Silence
[18425] = "silence", -- Silenced - Improved Kick
[24259] = "silence", -- Spell Lock
[43523] = "silence", -- Unstable Affliction 1
[31117] = "silence", -- Unstable Affliction 2
[18498] = "silence", -- Silenced - Gag Order 1
[74347] = "silence", -- Silenced - Gag Order 1
[50613] = "silence", -- Arcane Torrent (Racial, Runic Power)
[28730] = "silence", -- Arcane Torrent (Racial, Mana)
[25046] = "silence", -- Arcane Torrent (Racial, Energy)
[64044] = "horror", -- Psychic Horror
[6789] = "horror", -- Death Coil (Rank 1)
[17925] = "horror", -- Death Coil (Rank 2)
[17926] = "horror", -- Death Coil (Rank 3)
[27223] = "horror", -- Death Coil (Rank 4)
[47859] = "horror", -- Death Coil (Rank 5)
[47860] = "horror", -- Death Coil (Rank 6)
[1833] = "opener_stun", -- Cheap Shot
[9005] = "opener_stun", -- Pounce (Rank 1)
[9823] = "opener_stun", -- Pounce (Rank 2)
[9827] = "opener_stun", -- Pounce (Rank 3)
[27006] = "opener_stun", -- Pounce (Rank 4)
[49803] = "opener_stun", -- Pounce (Rank 5)
-- Spells that DR with itself only
[33786] = "cyclone", -- Cyclone
[710] = "banish", -- Banish (Rank 1)
[18647] = "banish", -- Banish (Rank 2)
[605] = "mind_control", -- Mind Control
[13181] = "mind_control", -- Gnomish Mind Control Cap
[19503] = "scatter", -- Scatter Shot
[7922] = "charge", -- Charge Stun
-- TODO: frost shock?, slow?, counterattack?, profession stuff
-- TODO: Storm, Earth and Fire proc
-- TODO: verify all
}
elseif Lib.gameExpansion == "classic" then
-- SpellID list for Classic Era (vanilla)
-- In Classic the spell ID payload is gone from the combat log, so we need the key here to be
-- spell name instead. We also provide spell ID in the table value so it's possible to retrieve
-- for example spell icon using GetSpellTexture(spellID) later on. (These functions only accept
-- spell names if the player has the spell in their spell book)
local GetSpellInfo = _G.GetSpellInfo -- upvalue
Lib.spellList = {
-- Controlled roots
[GetSpellInfo(339)] = { category = "root", spellID = 339 }, -- Entangling Roots
[GetSpellInfo(19306)] = { category = "root", spellID = 19306 }, -- Counterattack
[GetSpellInfo(122)] = { category = "root", spellID = 122 }, -- Frost Nova
-- [GetSpellInfo(13099)] = { category = "root", spellID = 13099 }, -- Net-o-Matic
-- [GetSpellInfo(8312)] = { category = "root", spellID = 8312 }, -- Trap
-- Controlled stuns
[GetSpellInfo(5211)] = { category = "stun", spellID = 5211 }, -- Bash
[GetSpellInfo(24394)] = { category = "stun", spellID = 24394 }, -- Intimidation
[GetSpellInfo(853)] = { category = "stun", spellID = 853 }, -- Hammer of Justice
[GetSpellInfo(9005)] = { category = "stun", spellID = 9005 }, -- Pounce
[GetSpellInfo(1833)] = { category = "stun", spellID = 1833 }, -- Cheap Shot
[GetSpellInfo(12809)] = { category = "stun", spellID = 12809 }, -- Concussion Blow
[GetSpellInfo(20253)] = { category = "stun", spellID = 20253 }, -- Intercept Stun
[GetSpellInfo(7922)] = { category = "stun", spellID = 7922 }, -- Charge Stun
[GetSpellInfo(20549)] = { category = "stun", spellID = 20549 }, -- War Stomp (Racial)
[GetSpellInfo(4068)] = { category = "stun", spellID = 4068 }, -- Iron Grenade
[GetSpellInfo(19769)] = { category = "stun", spellID = 19769 }, -- Thorium Grenade
[GetSpellInfo(13808)] = { category = "stun", spellID = 13808 }, -- M73 Frag Grenade
[GetSpellInfo(4069)] = { category = "stun", spellID = 4069 }, -- Big Iron Bomb
[GetSpellInfo(12543)] = { category = "stun", spellID = 12543 }, -- Hi-Explosive Bomb
[GetSpellInfo(4064)] = { category = "stun", spellID = 4064 }, -- Rough Copper Bomb
[GetSpellInfo(12421)] = { category = "stun", spellID = 12421 }, -- Mithril Frag Bomb
[GetSpellInfo(19784)] = { category = "stun", spellID = 19784 }, -- Dark Iron Bomb
[GetSpellInfo(4067)] = { category = "stun", spellID = 4067 }, -- Big Bronze Bomb
[GetSpellInfo(4066)] = { category = "stun", spellID = 4066 }, -- Small Bronze Bomb
[GetSpellInfo(4065)] = { category = "stun", spellID = 4065 }, -- Large Copper Bomb
[GetSpellInfo(13237)] = { category = "stun", spellID = 13237 }, -- Goblin Mortar
[GetSpellInfo(835)] = { category = "stun", spellID = 835 }, -- Tidal Charm
[GetSpellInfo(12562)] = { category = "stun", spellID = 12562 }, -- The Big One
-- Incapacitates
[GetSpellInfo(2637)] = { category = "incapacitate", spellID = 2637 }, -- Hibernate
[GetSpellInfo(3355)] = { category = "incapacitate", spellID = 3355 }, -- Freezing Trap
[GetSpellInfo(19503)] = { category = "incapacitate", spellID = 19503 }, -- Scatter Shot
[GetSpellInfo(19386)] = { category = "incapacitate", spellID = 19386 }, -- Wyvern Sting
[GetSpellInfo(28271)] = { category = "incapacitate", spellID = 28271 }, -- Polymorph: Turtle
[GetSpellInfo(28272)] = { category = "incapacitate", spellID = 28272 }, -- Polymorph: Pig
[GetSpellInfo(118)] = { category = "incapacitate", spellID = 118 }, -- Polymorph
[GetSpellInfo(20066)] = { category = "incapacitate", spellID = 20066 }, -- Repentance
[GetSpellInfo(1776)] = { category = "incapacitate", spellID = 1776 }, -- Gouge
[GetSpellInfo(6770)] = { category = "incapacitate", spellID = 6770 }, -- Sap
[GetSpellInfo(1090)] = { category = "incapacitate", spellID = 1090 }, -- Sleep
[GetSpellInfo(13327)] = { category = "incapacitate", spellID = 13327 }, -- Reckless Charge (Rocket Helmet)
[GetSpellInfo(26108)] = { category = "incapacitate", spellID = 26108 }, -- Glimpse of Madness
-- Fears
[GetSpellInfo(1513)] = { category = "fear", spellID = 1513 }, -- Scare Beast
[GetSpellInfo(8122)] = { category = "fear", spellID = 8122 }, -- Psychic Scream
[GetSpellInfo(5782)] = { category = "fear", spellID = 5782 }, -- Fear
[GetSpellInfo(5484)] = { category = "fear", spellID = 5484 }, -- Howl of Terror
[GetSpellInfo(6358)] = { category = "fear", spellID = 6358 }, -- Seduction
[GetSpellInfo(5246)] = { category = "fear", spellID = 5246 }, -- Intimidating Shout
[GetSpellInfo(5134)] = { category = "fear", spellID = 5134 }, -- Flash Bomb Fear
-- Random/short roots
[GetSpellInfo(19229)] = { category = "random_root", spellID = 19229 }, -- Improved Wing Clip
-- [GetSpellInfo(27868)] = { category = "random_root", spellID = 12494 }, -- Frostbite
[GetSpellInfo(23694)] = { category = "random_root", spellID = 23694 }, -- Improved Hamstring
[GetSpellInfo(27868)] = { category = "random_root", spellID = 27868 }, -- Freeze (Item proc and set bonus)
-- Random/short stuns
[GetSpellInfo(16922)] = { category = "random_stun", spellID = 16922 }, -- Improved Starfire
[GetSpellInfo(19410)] = { category = "random_stun", spellID = 19410 }, -- Improved Concussive Shot
[GetSpellInfo(12355)] = { category = "random_stun", spellID = 12355 }, -- Impact
[GetSpellInfo(20170)] = { category = "random_stun", spellID = 20170 }, -- Seal of Justice Stun
[GetSpellInfo(15269)] = { category = "random_stun", spellID = 15269 }, -- Blackout
[GetSpellInfo(18093)] = { category = "random_stun", spellID = 18093 }, -- Pyroclasm
[GetSpellInfo(12798)] = { category = "random_stun", spellID = 12798 }, -- Revenge Stun
[GetSpellInfo(5530)] = { category = "random_stun", spellID = 5530 }, -- Mace Stun Effect (Mace Specialization)
[GetSpellInfo(15283)] = { category = "random_stun", spellID = 15283 }, -- Stunning Blow (Weapon Proc)
[GetSpellInfo(56)] = { category = "random_stun", spellID = 56 }, -- Stun (Weapon Proc)
[GetSpellInfo(21152)] = { category = "random_stun", spellID = 21152 }, -- Earthshaker (Weapon Proc)
-- Spells that DRs with itself only
[GetSpellInfo(408)] = { category = "kidney_shot", spellID = 408 }, -- Kidney Shot
[GetSpellInfo(605)] = { category = "mind_control", spellID = 605 }, -- Mind Control
[GetSpellInfo(13181)] = { category = "mind_control", spellID = 13181 }, -- Gnomish Mind Control Cap
[GetSpellInfo(8056)] = { category = "frost_shock", spellID = 8056 }, -- Frost Shock
}
else
print("DRList-1.0: Unsupported game expansion loaded.") -- luacheck: ignore
end
-- Alias for DRData-1.0
Lib.spells = Lib.spellList

View File

@ -7,7 +7,8 @@ local CreateFrame = CreateFrame
local GetTime = GetTime local GetTime = GetTime
local Gladdy = LibStub("Gladdy") local Gladdy = LibStub("Gladdy")
local DRData = LibStub("DRData-1.0-BCC") --local DRData = LibStub("DRData-1.0-BCC")
local DRData = LibStub("DRList-1.0")
local L = Gladdy.L local L = Gladdy.L
local function defaultCategories() local function defaultCategories()
local categories = {} local categories = {}

View File

@ -13,6 +13,7 @@
<Include file="libs\LibSharedMedia-3.0\lib.xml"/> <Include file="libs\LibSharedMedia-3.0\lib.xml"/>
<Include file="libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/> <Include file="libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
<Include file="libs\DRData-1.0\DRData-1.0.xml"/> <Include file="libs\DRData-1.0\DRData-1.0.xml"/>
<Include file="libs\DRList-1.0\DRList-1.0.xml"/>
<Include file="libs\LibClassAuras-1.0\lib.xml"/> <Include file="libs\LibClassAuras-1.0\lib.xml"/>
<Include file="libs\LibSpellRange-1.0\lib.xml"/> <Include file="libs\LibSpellRange-1.0\lib.xml"/>
</Ui> </Ui>