From 6c4ff824a680308a9ea294216fcc8a5cac76d8d3 Mon Sep 17 00:00:00 2001 From: memus Date: Sun, 19 Nov 2017 10:04:46 +0000 Subject: [PATCH] Added possibility to choose between account name or character name in ultimates window --- RaidNotifier.lua | 5 ++--- UI.lua | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RaidNotifier.lua b/RaidNotifier.lua index a87ad05..4f477cb 100644 --- a/RaidNotifier.lua +++ b/RaidNotifier.lua @@ -232,10 +232,9 @@ do ---------------------- function RaidNotifier.OnUltimateReceived(unitTag, ultimateCurrent, ultimateCost) --, ultimateGroupId, isSelf) local self = RaidNotifier - local userName = GetUnitDisplayName(unitTag) - ultimates[userName] = + ultimates[unitTag] = { - userName = userName, + unitTag = unitTag, name = GetUnitName(unitTag), roles = {GetGroupMemberRoles(unitTag)}, current = ultimateCurrent, diff --git a/UI.lua b/UI.lua index b8f13e0..b8ee24e 100644 --- a/UI.lua +++ b/UI.lua @@ -107,10 +107,12 @@ do -------------------- local settings = self.Vars.ultimate + local GetName = settings.useDisplayName and GetUnitDisplayName or GetUnitName + if sortedUlti then local text = "Ultimates:" --TODO: grab text from abilityId?? for i, data in ipairs(sortedUlti) do - local name = data.userName + local name = GetName(data.unitTag) local c1,c2 = "","" if settings.useColor then if data.percent >= 100 then @@ -576,4 +578,4 @@ do ----------------- end end -end \ No newline at end of file +end