From 5422306c93e4db7be11bbcc90a1bb7fa852fccd7 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sat, 12 Jul 2014 01:26:04 +0400 Subject: [PATCH] Namepaltes. CAn't really test atm but no errors so far --- ElvUI_SLE/modules/nameplates.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ElvUI_SLE/modules/nameplates.lua b/ElvUI_SLE/modules/nameplates.lua index 3900a7c..1f4ad2a 100644 --- a/ElvUI_SLE/modules/nameplates.lua +++ b/ElvUI_SLE/modules/nameplates.lua @@ -79,32 +79,32 @@ hooksecurefunc(NP, 'GetThreatReaction', function(self, frame) end end) -function NP:AddToRoster(unitId) +local function AddToRoster(unitId) local unitName = UnitName(unitId) if unitName then self.GroupMembers[unitName] = unitId end end -function NP:UpdateRoster() +local function UpdateRoster() twipe(self.GroupMembers) local groupSize = IsInRaid() and GetNumGroupMembers() or IsInGroup() and GetNumSubgroupMembers() or 0 local groupType = IsInRaid() and "raid" or IsInGroup() and "party" or "solo" for index = 1, groupSize do - self:AddToRoster(groupType..index) + AddToRoster(groupType..index) end if groupType == 'party' then - self:AddToRoster('player') + AddToRoster('player') end end -function NP:StartRosterUpdate() +local function StartRosterUpdate() if not rosterTimer or NP:TimeLeft(rosterTimer) == 0 then - rosterTimer = NP:ScheduleTimer('UpdateRoster', 1) + rosterTimer = NP:ScheduleTimer(UpdateRoster, 1) end end -NP:RegisterEvent("GROUP_ROSTER_UPDATE", "StartRosterUpdate") \ No newline at end of file +NP:RegisterEvent("GROUP_ROSTER_UPDATE", StartRosterUpdate) \ No newline at end of file -- 1.7.9.5