mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Added boss/rare classification to TargetInfo
This commit is contained in:
@ -468,6 +468,16 @@ function TargetInfo.prototype:TargetChanged()
|
|||||||
self.classLocale, self.classEnglish = UnitClass(target)
|
self.classLocale, self.classEnglish = UnitClass(target)
|
||||||
self.isPlayer = UnitIsPlayer(target)
|
self.isPlayer = UnitIsPlayer(target)
|
||||||
|
|
||||||
|
local classification = UnitClassification(target)
|
||||||
|
if (string.find(classification, "boss")) then
|
||||||
|
self.classification = " |cffcc1111Boss|r"
|
||||||
|
elseif(string.find(classification, "rare")) then
|
||||||
|
self.classification = " |cffcc11ccRare|r"
|
||||||
|
else
|
||||||
|
self.classification = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local guildName, guildRankName, guildRankIndex = GetGuildInfo(target);
|
local guildName, guildRankName, guildRankIndex = GetGuildInfo(target);
|
||||||
self.guild = guildName and "<" .. guildName .. ">" or ""
|
self.guild = guildName and "<" .. guildName .. ">" or ""
|
||||||
|
|
||||||
@ -479,7 +489,7 @@ function TargetInfo.prototype:TargetChanged()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
self.leader = UnitIsPartyLeader(target) and " Leader" or ""
|
self.leader = UnitIsPartyLeader(target) and " |cffcccc11Leader|r" or ""
|
||||||
|
|
||||||
|
|
||||||
-- pass "internal" as a paramater so event handler code doesn't execute
|
-- pass "internal" as a paramater so event handler code doesn't execute
|
||||||
@ -575,8 +585,8 @@ function TargetInfo.prototype:Update(unit)
|
|||||||
local line1 = string.format("|c%s%s|r", reactionColor, self.name or '')
|
local line1 = string.format("|c%s%s|r", reactionColor, self.name or '')
|
||||||
self.frame.targetName:SetText(line1)
|
self.frame.targetName:SetText(line1)
|
||||||
|
|
||||||
local line2 = string.format("%s %s%s%s%s",
|
local line2 = string.format("%s %s%s%s%s%s",
|
||||||
self.level or '', self.classLocale or '', self.pvp or '', self.leader or '', self.combat or '')
|
self.level or '', self.classLocale or '', self.pvp or '', self.leader or '', self.classification or '', self.combat or '')
|
||||||
self.frame.targetInfo:SetText(line2)
|
self.frame.targetInfo:SetText(line2)
|
||||||
|
|
||||||
local realm = self.realm and " " .. self.realm or ""
|
local realm = self.realm and " " .. self.realm or ""
|
||||||
|
Reference in New Issue
Block a user