fix bad class icon
This commit is contained in:
+5
-4
@@ -122,9 +122,10 @@ local roleBySpecTextureName = {
|
|||||||
---@return string
|
---@return string
|
||||||
function DF.UnitGroupRolesAssigned(unitId, bUseSupport, specId)
|
function DF.UnitGroupRolesAssigned(unitId, bUseSupport, specId)
|
||||||
local _, class = UnitClass(unitId)
|
local _, class = UnitClass(unitId)
|
||||||
if class == "HERO" then
|
local role = UnitGroupRolesAssignedKey(unitId)
|
||||||
return UnitGroupRolesAssignedKey(unitId)
|
if role and role ~= "NONE" then
|
||||||
else
|
return role
|
||||||
|
elseif class ~= "HERO" then
|
||||||
local specInfo = C_ClassInfo.GetSpecInfoByID(specId)
|
local specInfo = C_ClassInfo.GetSpecInfoByID(specId)
|
||||||
|
|
||||||
if specInfo then
|
if specInfo then
|
||||||
@@ -1128,7 +1129,7 @@ end
|
|||||||
---@return number, number, number, number, string
|
---@return number, number, number, number, string
|
||||||
function DF:GetClassTCoordsAndTexture(class)
|
function DF:GetClassTCoordsAndTexture(class)
|
||||||
local l, r, t, b = unpack(CLASS_ICON_TCOORDS[class])
|
local l, r, t, b = unpack(CLASS_ICON_TCOORDS[class])
|
||||||
return l, r, t, b, [[Interface\WORLDSTATEFRAME\Icons-Classes]]
|
return l, r, t, b, [[Interface\GLUES\CHARACTERCREATE\UI-CharacterCreate-Classes]]
|
||||||
end
|
end
|
||||||
|
|
||||||
---create a string with the spell icon and the spell name using |T|t scape codes to add the icon inside the string
|
---create a string with the spell icon and the spell name using |T|t scape codes to add the icon inside the string
|
||||||
|
|||||||
@@ -358,9 +358,6 @@ end
|
|||||||
if (not dataTypePrefix) then
|
if (not dataTypePrefix) then
|
||||||
openRaidLib.DiagnosticError("Invalid dataTypePrefix from player:", sender, "data:", data, "dataTypePrefix:", dataTypePrefix)
|
openRaidLib.DiagnosticError("Invalid dataTypePrefix from player:", sender, "data:", data, "dataTypePrefix:", dataTypePrefix)
|
||||||
return
|
return
|
||||||
elseif (openRaidLib.commPrefixDeprecated[dataTypePrefix]) then
|
|
||||||
openRaidLib.DiagnosticError("Invalid dataTypePrefix from player:", sender, "data:", data, "dataTypePrefix:", dataTypePrefix)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--if this is isn't a keystone data comm, check if the lib can receive comms
|
--if this is isn't a keystone data comm, check if the lib can receive comms
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
local FormatTooltipNumber = ToKFunctions[8]
|
local FormatTooltipNumber = ToKFunctions[8]
|
||||||
local TooltipMaximizedMethod = 1
|
local TooltipMaximizedMethod = 1
|
||||||
|
|
||||||
--local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
|
|
||||||
local is_player_class = Details.player_class
|
local is_player_class = Details.player_class
|
||||||
|
|
||||||
Details.tooltip_key_overlay1 = {1, 1, 1, .2}
|
Details.tooltip_key_overlay1 = {1, 1, 1, .2}
|
||||||
|
|||||||
@@ -1819,7 +1819,7 @@ function healingClass:MontaInfoHealTaken()
|
|||||||
|
|
||||||
--hes:UpdadeInfoBar(row, index, spellid, name, value, max, percent, icon, detalhes)
|
--hes:UpdadeInfoBar(row, index, spellid, name, value, max, percent, icon, detalhes)
|
||||||
|
|
||||||
local texCoords = CLASS_ICON_TCOORDS [tabela[4]]
|
local texCoords = Details.class_coords[tabela[4]]
|
||||||
if (not texCoords) then
|
if (not texCoords) then
|
||||||
texCoords = _detalhes.class_coords ["UNKNOW"]
|
texCoords = _detalhes.class_coords ["UNKNOW"]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -650,9 +650,9 @@ function atributo_misc:UpdateDeathRow(deathTable, whichRowLine, rankPosition, in
|
|||||||
thisRow.icone_classe:SetTexture(instanceObject.row_info.spec_file)
|
thisRow.icone_classe:SetTexture(instanceObject.row_info.spec_file)
|
||||||
thisRow.icone_classe:SetTexCoord(unpack(_detalhes.class_specs_coords[spec]))
|
thisRow.icone_classe:SetTexCoord(unpack(_detalhes.class_specs_coords[spec]))
|
||||||
else
|
else
|
||||||
if (CLASS_ICON_TCOORDS [deathTable[4]]) then
|
if (Details.class_coords[deathTable[4]]) then
|
||||||
thisRow.icone_classe:SetTexture(instanceObject.row_info.icon_file)
|
thisRow.icone_classe:SetTexture(instanceObject.row_info.icon_file)
|
||||||
thisRow.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [deathTable[4]]))
|
thisRow.icone_classe:SetTexCoord(unpack(Details.class_coords[deathTable[4]]))
|
||||||
else
|
else
|
||||||
local texture, l, r, t, b = Details:GetUnknownClassIcon()
|
local texture, l, r, t, b = Details:GetUnknownClassIcon()
|
||||||
thisRow.icone_classe:SetTexture(texture)
|
thisRow.icone_classe:SetTexture(texture)
|
||||||
@@ -660,9 +660,9 @@ function atributo_misc:UpdateDeathRow(deathTable, whichRowLine, rankPosition, in
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (CLASS_ICON_TCOORDS [deathTable[4]]) then
|
if (Details.class_coords[deathTable[4]]) then
|
||||||
thisRow.icone_classe:SetTexture(instanceObject.row_info.icon_file)
|
thisRow.icone_classe:SetTexture(instanceObject.row_info.icon_file)
|
||||||
thisRow.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [deathTable[4]]))
|
thisRow.icone_classe:SetTexCoord(unpack(Details.class_coords[deathTable[4]]))
|
||||||
else
|
else
|
||||||
local texture, l, r, t, b = Details:GetUnknownClassIcon()
|
local texture, l, r, t, b = Details:GetUnknownClassIcon()
|
||||||
thisRow.icone_classe:SetTexture(texture)
|
thisRow.icone_classe:SetTexture(texture)
|
||||||
|
|||||||
+3
-3
@@ -1704,7 +1704,7 @@ function Details.Database.StoreEncounter(combat)
|
|||||||
|
|
||||||
|
|
||||||
--check for heroic and mythic
|
--check for heroic and mythic
|
||||||
if (storageDebug or (diff == 15 or diff == 16 or diff == 14)) then --test on raid finder: ' or diff == 17' -- normal mode: diff == 14 or
|
if (storageDebug or (diff == 1 or diff == 2 or diff == 3 or diff == 4)) then --test on raid finder: ' or diff == 17' -- normal mode: diff == 14 or
|
||||||
|
|
||||||
--check the guild name
|
--check the guild name
|
||||||
local match = 0
|
local match = 0
|
||||||
@@ -1757,7 +1757,7 @@ function Details.Database.StoreEncounter(combat)
|
|||||||
local role = UnitGroupRolesAssigned("raid" .. i)
|
local role = UnitGroupRolesAssigned("raid" .. i)
|
||||||
|
|
||||||
if (UnitIsInMyGuild ("raid" .. i)) then
|
if (UnitIsInMyGuild ("raid" .. i)) then
|
||||||
if (role == "DAMAGER" or role == "TANK") then
|
if (role == "NONE" or role == "DAMAGER" or role == "TANK") then
|
||||||
local player_name = Details:GetFullName("raid" .. i)
|
local player_name = Details:GetFullName("raid" .. i)
|
||||||
local _, _, class = Details:GetUnitClassFull(player_name)
|
local _, _, class = Details:GetUnitClassFull(player_name)
|
||||||
|
|
||||||
@@ -1767,7 +1767,7 @@ function Details.Database.StoreEncounter(combat)
|
|||||||
this_combat_data.damage [player_name] = {floor(damage_actor.total), _detalhes.item_level_pool [guid] and _detalhes.item_level_pool [guid].ilvl or 0, class or 0}
|
this_combat_data.damage [player_name] = {floor(damage_actor.total), _detalhes.item_level_pool [guid] and _detalhes.item_level_pool [guid].ilvl or 0, class or 0}
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif (role == "HEALER") then
|
elseif (role == "HEALER" or role == "SUPPORT") then
|
||||||
local player_name = Details:GetFullName("raid" .. i)
|
local player_name = Details:GetFullName("raid" .. i)
|
||||||
|
|
||||||
local _, _, class = Details:GetUnitClassFull(player_name)
|
local _, _, class = Details:GetUnitClassFull(player_name)
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
local _GetSpellInfo = _detalhes.getspellinfo --details api
|
local _GetSpellInfo = _detalhes.getspellinfo --details api
|
||||||
|
|
||||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--constants
|
--constants
|
||||||
|
|
||||||
@@ -359,7 +357,7 @@
|
|||||||
local class_color = "|cFFFF3333"
|
local class_color = "|cFFFF3333"
|
||||||
|
|
||||||
if (class) then
|
if (class) then
|
||||||
local coords = CLASS_ICON_TCOORDS [class]
|
local coords = Details.class_coords[class]
|
||||||
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]/2*128 .. ":" .. coords[2]/2*128 .. ":" .. coords[3]/2*128 .. ":" .. coords[4]/2*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
|
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]/2*128 .. ":" .. coords[2]/2*128 .. ":" .. coords[3]/2*128 .. ":" .. coords[4]/2*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -464,12 +462,12 @@
|
|||||||
local class_color2 = "|cFFFFFFFF"
|
local class_color2 = "|cFFFFFFFF"
|
||||||
|
|
||||||
if (class) then
|
if (class) then
|
||||||
local coords = CLASS_ICON_TCOORDS [class]
|
local coords = Details.class_coords[class]
|
||||||
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]/2*128 .. ":" .. coords[2]/2*128 .. ":" .. coords[3]/2*128 .. ":" .. coords[4]/2*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
|
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]/2*128 .. ":" .. coords[2]/2*128 .. ":" .. coords[3]/2*128 .. ":" .. coords[4]/2*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
|
||||||
end
|
end
|
||||||
|
|
||||||
if (class2) then
|
if (class2) then
|
||||||
local coords = CLASS_ICON_TCOORDS [class2]
|
local coords = Details.class_coords[class2]
|
||||||
class_color2 = " -> |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]/2*128 .. ":" .. coords[2]/2*128 .. ":" .. coords[3]/2*128 .. ":" .. coords[4]/2*128 .. "|t |c" .. RAID_CLASS_COLORS [class2].colorStr
|
class_color2 = " -> |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]/2*128 .. ":" .. coords[2]/2*128 .. ":" .. coords[3]/2*128 .. ":" .. coords[4]/2*128 .. "|t |c" .. RAID_CLASS_COLORS [class2].colorStr
|
||||||
alvo_name = _detalhes:GetOnlyName(alvo_name)
|
alvo_name = _detalhes:GetOnlyName(alvo_name)
|
||||||
else
|
else
|
||||||
@@ -560,7 +558,7 @@
|
|||||||
local class_color = "|cFFFFFFFF"
|
local class_color = "|cFFFFFFFF"
|
||||||
|
|
||||||
if (class) then
|
if (class) then
|
||||||
local coords = CLASS_ICON_TCOORDS [class]
|
local coords = Details.class_coords [class]
|
||||||
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:256:256:" .. coords[1]/2*256 .. ":" .. coords[2]/2*256 .. ":" .. coords[3]/2*256 .. ":" .. coords[4]/2*256 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
|
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:256:256:" .. coords[1]/2*256 .. ":" .. coords[2]/2*256 .. ":" .. coords[3]/2*256 .. ":" .. coords[4]/2*256 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
|
||||||
end
|
end
|
||||||
msg = "Death: " .. class_color .. alvo_name .. "|r ->"
|
msg = "Death: " .. class_color .. alvo_name .. "|r ->"
|
||||||
|
|||||||
+3
-11
@@ -2110,22 +2110,14 @@ local iconFrame_OnEnter = function(self)
|
|||||||
GameCooltip:AddLine(format(localizedItemLevelString, 0))
|
GameCooltip:AddLine(format(localizedItemLevelString, 0))
|
||||||
GameCooltip:AddIcon([[]], 1, 1, 1, 20)
|
GameCooltip:AddIcon([[]], 1, 1, 1, 20)
|
||||||
Details:AddTooltipBackgroundStatusbar()
|
Details:AddTooltipBackgroundStatusbar()
|
||||||
gotInfo = true
|
gotInfo = false
|
||||||
end
|
end
|
||||||
|
|
||||||
local localizedTalentsString = _G.TALENTS
|
local height = 54
|
||||||
|
|
||||||
if (gotInfo) then
|
|
||||||
GameCooltip:AddLine(format(localizedItemLevelString, Loc["STRING_QUERY_INSPECT_REFRESH"]))
|
|
||||||
GameCooltip:AddIcon([[]], 1, 1, 1, 24)
|
|
||||||
Details:AddTooltipBackgroundStatusbar()
|
|
||||||
end
|
|
||||||
|
|
||||||
local height = 66
|
|
||||||
if (not gotInfo) then
|
if (not gotInfo) then
|
||||||
GameCooltip:AddLine(Loc["STRING_QUERY_INSPECT"], nil, 1, "orange")
|
GameCooltip:AddLine(Loc["STRING_QUERY_INSPECT"], nil, 1, "orange")
|
||||||
GameCooltip:AddIcon([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, iconSize, 8/512, 70/512, 224/512, 306/512)
|
GameCooltip:AddIcon([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, iconSize, 8/512, 70/512, 224/512, 306/512)
|
||||||
height = 54
|
height = 66
|
||||||
end
|
end
|
||||||
|
|
||||||
local combat = instance:GetShowingCombat()
|
local combat = instance:GetShowingCombat()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
local UnitAura = UnitAura
|
|
||||||
local UnitBuff = UnitBuff
|
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local UnitClass = UnitClass
|
local UnitClass = UnitClass
|
||||||
local UnitName = UnitName
|
local UnitName = UnitName
|
||||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
|
||||||
|
|
||||||
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
|
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
|
||||||
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
|
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
|
||||||
|
|||||||
Reference in New Issue
Block a user