- Updated flask and food list to BFA.

- Framework update.
- RaidCheck plugin updated.
- API added: _detalhes:GetSpecFromSerial (guid)
- API added: _detalhes:GetIconTexture (iconType, withAlpha)
- API added: _detalhes:GetRoleIcon (role)
- API added: _detalhes:GetSpecIcon (spec)
This commit is contained in:
Tercio
2018-08-19 15:27:19 -03:00
parent e3e63dcd67
commit 5217fdd9b2
9 changed files with 529 additions and 467 deletions
+37 -1
View File
@@ -12,6 +12,25 @@ do
local unknown_class_coords = {0.75, 1, 0.75, 1}
function _detalhes:GetIconTexture (iconType, withAlpha)
iconType = string.lower (iconType)
if (iconType == "spec") then
if (withAlpha) then
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]]
else
return [[Interface\AddOns\Details\images\spec_icons_normal]]
end
elseif (iconType == "class") then
if (withAlpha) then
return [[Interface\AddOns\Details\images\classes_small_alpha]]
else
return [[Interface\AddOns\Details\images\classes_small]]
end
end
end
-- try get the class from actor name
function _detalhes:GetClass (name)
local _, class = _UnitClass (name)
@@ -38,6 +57,17 @@ do
end
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
local roles = {
DAMAGER = {421/512, 466/512, 381/512, 427/512},
HEALER = {467/512, 512/512, 381/512, 427/512},
TANK = {373/512, 420/512, 381/512, 427/512},
NONE = {0, 50/512, 110/512, 150/512},
}
function _detalhes:GetRoleIcon (role)
return [[Interface\AddOns\Details\images\icons2]], unpack (roles [role])
end
function _detalhes:GetClassIcon (class)
local c
@@ -63,6 +93,12 @@ do
end
end
function _detalhes:GetSpecIcon (spec)
if (spec) then
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack (_detalhes.class_specs_coords [spec])
end
end
local default_color = {1, 1, 1, 1}
function _detalhes:GetClassColor (class)
if (self.classe) then
@@ -179,7 +215,7 @@ do
-- try get the spec from actor name
function _detalhes:GetSpec (name)
local guid = UnitGUID (name)
if (guid) then
local spec = _detalhes.cached_specs [guid]