Disabled Bindings.xml to avoid taints in 10.0

This commit is contained in:
Tercio Jose
2022-10-20 09:47:48 -03:00
parent 33e6a45f8d
commit a9e858d864
76 changed files with 1200 additions and 1411 deletions
+15 -15
View File
@@ -8,9 +8,9 @@ do
local _detalhes = _G._detalhes
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
local _rawget = rawget
local _rawset = rawset
local _setmetatable = setmetatable
local rawget = rawget
local rawset = rawset
local setmetatable = setmetatable
local _GetSpellInfo = GetSpellInfo
local _unpack = unpack
@@ -61,9 +61,9 @@ do
--reset spell cache
function _detalhes:ClearSpellCache()
_detalhes.spellcache = _setmetatable({},
_detalhes.spellcache = setmetatable({},
{__index = function(tabela, valor)
local esta_magia = _rawget (tabela, valor)
local esta_magia = rawget (tabela, valor)
if (esta_magia) then
return esta_magia
end
@@ -85,19 +85,19 @@ do
end})
--default overwrites
--_rawset (_detalhes.spellcache, 1, {Loc ["STRING_MELEE"], 1, "Interface\\AddOns\\Details\\images\\melee.tga"})
--_rawset (_detalhes.spellcache, 2, {Loc ["STRING_AUTOSHOT"], 1, "Interface\\AddOns\\Details\\images\\autoshot.tga"})
--rawset (_detalhes.spellcache, 1, {Loc ["STRING_MELEE"], 1, "Interface\\AddOns\\Details\\images\\melee.tga"})
--rawset (_detalhes.spellcache, 2, {Loc ["STRING_AUTOSHOT"], 1, "Interface\\AddOns\\Details\\images\\autoshot.tga"})
--built-in overwrites
for spellId, spellTable in pairs(_detalhes.SpellOverwrite) do
local name, _, icon = _GetSpellInfo(spellId)
_rawset (_detalhes.spellcache, spellId, {spellTable.name or name, 1, spellTable.icon or icon})
rawset (_detalhes.spellcache, spellId, {spellTable.name or name, 1, spellTable.icon or icon})
end
--user overwrites
-- [1] spellid [2] spellname [3] spellicon
for index, spellTable in ipairs(_detalhes.savedCustomSpells) do
_rawset (_detalhes.spellcache, spellTable [1], {spellTable [2], 1, spellTable [3]})
rawset (_detalhes.spellcache, spellTable [1], {spellTable [2], 1, spellTable [3]})
end
end
@@ -194,7 +194,7 @@ do
local t = _detalhes.savedCustomSpells[index]
if (t) then
t [2], t [3] = name or t [2], icon or t [3]
return _rawset (_detalhes.spellcache, t [1], {t [2], 1, t [3]})
return rawset (_detalhes.spellcache, t [1], {t [2], 1, t [3]})
else
return false
end
@@ -218,7 +218,7 @@ do
icon = [[Interface\InventoryItems\WoWUnknownItem01]]
end
_rawset (_detalhes.spellcache, spellid, {name, 1, icon})
rawset (_detalhes.spellcache, spellid, {name, 1, icon})
t[2] = name
t[3] = icon
@@ -267,7 +267,7 @@ do
if (not is_overwrite) then
tinsert(_detalhes.savedCustomSpells, {spellid, name, icon})
end
return _rawset (_detalhes.spellcache, spellid, {name, 1, icon})
return rawset (_detalhes.spellcache, spellid, {name, 1, icon})
end
function _detalhes:UserCustomSpellRemove (index)
@@ -276,7 +276,7 @@ do
local spellid = t [1]
local name, _, icon = _GetSpellInfo(spellid)
if (name) then
_rawset (_detalhes.spellcache, spellid, {name, 1, icon})
rawset (_detalhes.spellcache, spellid, {name, 1, icon})
end
return tremove(_detalhes.savedCustomSpells, index)
end
@@ -294,9 +294,9 @@ do
local spellName, rank, spellIcon = _GetSpellInfo(spellid)
if (spellName) then
_rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon})
rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon})
else
_rawset (_detalhes.spellcache, spellid, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]})
rawset (_detalhes.spellcache, spellid, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]})
end
end