performance tweaks
This commit is contained in:
parent
0c4409fe16
commit
779e81727c
117
Constants.lua
117
Constants.lua
@ -1,13 +1,18 @@
|
||||
local tbl_sort, select = table.sort, select
|
||||
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
local GetLocale = GetLocale
|
||||
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||
|
||||
function Gladdy:GetSpecBuffs()
|
||||
return {
|
||||
Gladdy.CLASSES = {"MAGE", "PRIEST", "DRUID", "SHAMAN", "PALADIN", "WARLOCK", "WARRIOR", "HUNTER", "ROGUE"}
|
||||
tbl_sort(Gladdy.CLASSES)
|
||||
Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"}
|
||||
tbl_sort(Gladdy.RACES)
|
||||
|
||||
local specBuffs = {
|
||||
-- DRUID
|
||||
[GetSpellInfo(45283)] = L["Restoration"], -- Natural Perfection
|
||||
[GetSpellInfo(16880)] = L["Restoration"], -- Nature's Grace; Dreamstate spec in TBC equals Restoration
|
||||
@ -69,11 +74,12 @@ function Gladdy:GetSpecBuffs()
|
||||
[GetSpellInfo(29838)] = L["Arms"], -- Second Wind
|
||||
[GetSpellInfo(12292)] = L["Arms"], -- Death Wish
|
||||
|
||||
}
|
||||
}
|
||||
function Gladdy:GetSpecBuffs()
|
||||
return specBuffs
|
||||
end
|
||||
|
||||
function Gladdy:GetSpecSpells()
|
||||
return {
|
||||
local specSpells = {
|
||||
-- DRUID
|
||||
[GetSpellInfo(33831)] = L["Balance"], -- Force of Nature
|
||||
[GetSpellInfo(33983)] = L["Feral"], -- Mangle (Cat)
|
||||
@ -145,11 +151,12 @@ function Gladdy:GetSpecSpells()
|
||||
[GetSpellInfo(30335)] = L["Fury"], -- Bloodthirst
|
||||
[GetSpellInfo(12809)] = L["Protection"], -- Concussion Blow
|
||||
[GetSpellInfo(30022)] = L["Protection"], -- Devastation
|
||||
}
|
||||
}
|
||||
function Gladdy:GetSpecSpells()
|
||||
return specSpells
|
||||
end
|
||||
|
||||
function Gladdy:GetImportantAuras()
|
||||
return {
|
||||
local importantAuras = {
|
||||
-- Cyclone
|
||||
[GetSpellInfo(33786)] = {
|
||||
track = AURA_TYPE_DEBUFF,
|
||||
@ -631,16 +638,12 @@ function Gladdy:GetImportantAuras()
|
||||
magic = true,
|
||||
spellID = 28730,
|
||||
},
|
||||
}
|
||||
}
|
||||
function Gladdy:GetImportantAuras()
|
||||
return importantAuras
|
||||
end
|
||||
|
||||
Gladdy.CLASSES = {"MAGE", "PRIEST", "DRUID", "SHAMAN", "PALADIN", "WARLOCK", "WARRIOR", "HUNTER", "ROGUE"}
|
||||
tbl_sort(Gladdy.CLASSES)
|
||||
Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"}
|
||||
tbl_sort(Gladdy.RACES)
|
||||
|
||||
function Gladdy:GetCooldownList()
|
||||
return {
|
||||
local cooldownList = {
|
||||
-- Spell Name Cooldown[, Spec]
|
||||
-- Mage
|
||||
["MAGE"] = {
|
||||
@ -841,11 +844,12 @@ function Gladdy:GetCooldownList()
|
||||
["Dwarf"] = {
|
||||
[13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer
|
||||
},
|
||||
}
|
||||
}
|
||||
function Gladdy:GetCooldownList()
|
||||
return cooldownList
|
||||
end
|
||||
|
||||
function Gladdy:Racials()
|
||||
return {
|
||||
local racials = {
|
||||
["Scourge"] = {
|
||||
[7744] = true, -- Will of the Forsaken
|
||||
duration = 120,
|
||||
@ -910,5 +914,78 @@ function Gladdy:Racials()
|
||||
spellName = select(1, GetSpellInfo(20594)),
|
||||
texture = select(3, GetSpellInfo(20594))
|
||||
},
|
||||
}
|
||||
}
|
||||
function Gladdy:Racials()
|
||||
return racials
|
||||
end
|
||||
|
||||
local arenaTimer = {
|
||||
["default"] = {
|
||||
[61] = "One minute until the Arena battle begins!",
|
||||
[31] = "Thirty seconds until the Arena battle begins!",
|
||||
[16] = "Fifteen seconds until the Arena battle begins!",
|
||||
[0] = "The Arena battle has begun!",
|
||||
},
|
||||
["esES"] = {
|
||||
[61] = "¡Un minuto hasta que dé comienzo la batalla en arena!",
|
||||
[31] = "¡Treinta segundos hasta que comience la batalla en arena!",
|
||||
[16] = "¡Quince segundos hasta que comience la batalla en arena!",
|
||||
[0] = "¡La batalla en arena ha comenzado!",
|
||||
},
|
||||
["ptBR"] = {
|
||||
[61] = "Um minuto até a batalha na Arena começar!",
|
||||
[31] = "Trinta segundos até a batalha na Arena começar!",
|
||||
[16] = "Quinze segundos até a batalha na Arena começar!",
|
||||
[0] = "A batalha na Arena começou!",
|
||||
},
|
||||
["deDE"] = {
|
||||
[61] = "Noch eine Minute bis der Arenakampf beginnt!",
|
||||
[31] = "Noch dreißig Sekunden bis der Arenakampf beginnt!",
|
||||
[16] = "Noch fünfzehn Sekunden bis der Arenakampf beginnt!",
|
||||
[0] = "Der Arenakampf hat begonnen!",
|
||||
},
|
||||
["frFR"] = {
|
||||
[60] = "Le combat d'arène commence dans une minute\194\160!",
|
||||
[30] = "Le combat d'arène commence dans trente secondes\194\160!",
|
||||
[15] = "Le combat d'arène commence dans quinze secondes\194\160!",
|
||||
[0] = "Le combat d'arène commence\194\160!",
|
||||
},
|
||||
["ruRU"] = {
|
||||
[61] = "Одна минута до начала боя на арене!",
|
||||
[31] = "Тридцать секунд до начала боя на арене!",
|
||||
[16] = "До начала боя на арене осталось 15 секунд.",
|
||||
[0] = "Бой начался!",
|
||||
},
|
||||
["itIT"] = { -- TODO
|
||||
-- Beta has no itIT version available?
|
||||
},
|
||||
["koKR"] = {
|
||||
[61] = "투기장 전투 시작 1분 전입니다!",
|
||||
[31] = "투기장 전투 시작 30초 전입니다!",
|
||||
[16] = "투기장 전투 시작 15초 전입니다!",
|
||||
[0] = "투기장 전투가 시작되었습니다!",
|
||||
},
|
||||
["zhCN"] = {
|
||||
[61] = "竞技场战斗将在一分钟后开始!",
|
||||
[31] = "竞技场战斗将在三十秒后开始!",
|
||||
[16] = "竞技场战斗将在十五秒后开始!",
|
||||
[0] = "竞技场的战斗开始了!",
|
||||
},
|
||||
["zhTW"] = {
|
||||
[61] = "1分鐘後競技場戰鬥開始!",
|
||||
[31] = "30秒後競技場戰鬥開始!",
|
||||
[16] = "15秒後競技場戰鬥開始!",
|
||||
[0] = "競技場戰鬥開始了!",
|
||||
},
|
||||
}
|
||||
arenaTimer["esMX"] = arenaTimer["esES"]
|
||||
arenaTimer["ptPT"] = arenaTimer["ptBR"]
|
||||
|
||||
function Gladdy:GetArenaTimer()
|
||||
if arenaTimer[GetLocale()] then
|
||||
return arenaTimer[GetLocale()]
|
||||
else
|
||||
return arenaTimer["default"]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user