Added Details:GetUntitClass(unitId), this call handles the Ambiguate in combatlog's player name when calling UnitClass
This commit is contained in:
@@ -1514,10 +1514,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
|
||||
for playername, potspellid in pairs(pot_usage) do
|
||||
local name, _, icon = _GetSpellInfo(potspellid)
|
||||
local _, class = UnitClass(playername)
|
||||
local unitClass = Details:GetUnitClass(playername)
|
||||
local class_color = ""
|
||||
if (class and RAID_CLASS_COLORS [class]) then
|
||||
class_color = RAID_CLASS_COLORS [class].colorStr
|
||||
if (unitClass and RAID_CLASS_COLORS[unitClass]) then
|
||||
class_color = RAID_CLASS_COLORS[unitClass].colorStr
|
||||
end
|
||||
string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t "
|
||||
end
|
||||
@@ -1586,10 +1586,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
|
||||
for playername, potspellid in pairs(pot_usage) do
|
||||
local name, _, icon = _GetSpellInfo(potspellid)
|
||||
local _, class = UnitClass(playername)
|
||||
local unitClass = Details:GetUnitClass(playername)
|
||||
local class_color = ""
|
||||
if (class and RAID_CLASS_COLORS [class]) then
|
||||
class_color = RAID_CLASS_COLORS [class].colorStr
|
||||
if (unitClass and RAID_CLASS_COLORS[unitClass]) then
|
||||
class_color = RAID_CLASS_COLORS[unitClass].colorStr
|
||||
end
|
||||
string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t "
|
||||
end
|
||||
@@ -1627,10 +1627,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
local string_output = "pre-potion: "
|
||||
for playername, potspellid in pairs(pot_usage) do
|
||||
local name, _, icon = _GetSpellInfo(potspellid)
|
||||
local _, class = UnitClass(playername)
|
||||
local unitClass = Details:GetUnitClass(playername)
|
||||
local class_color = ""
|
||||
if (class and RAID_CLASS_COLORS [class]) then
|
||||
class_color = RAID_CLASS_COLORS [class].colorStr
|
||||
if (unitClass and RAID_CLASS_COLORS[unitClass]) then
|
||||
class_color = RAID_CLASS_COLORS[unitClass].colorStr
|
||||
end
|
||||
string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t "
|
||||
end
|
||||
|
||||
@@ -458,7 +458,7 @@ end
|
||||
Details222.GuessSpecSchedules.Schedules[#Details222.GuessSpecSchedules.Schedules+1] = newTimer
|
||||
end
|
||||
|
||||
local _, engClass = UnitClass(actorName or "")
|
||||
local engClass = Details:GetUnitClass(actorName or "")
|
||||
|
||||
if (engClass) then
|
||||
actorObject.classe = engClass
|
||||
|
||||
Reference in New Issue
Block a user