nameplates: reduce target scanning

This commit is contained in:
shagu
2017-01-07 17:38:01 +01:00
parent 3b807ff4f9
commit 5699677bc8
+2 -2
View File
@@ -213,7 +213,7 @@ pfUI:RegisterModule("nameplates", function ()
local name = name:GetText()
-- target
if pfUI.nameplates.targets[name] == nil and UnitName("target") == nil then
if not pfUI_playerDB[name] and pfUI.nameplates.targets[name] == nil and UnitName("target") == nil then
TargetByName(name, true)
if UnitIsPlayer("target") then
local _, class = UnitClass("target")
@@ -228,7 +228,7 @@ pfUI:RegisterModule("nameplates", function ()
end
-- mouseover
if pfUI.nameplates.targets[name] == nil and UnitName("mouseover") == name then
if not pfUI_playerDB[name] and pfUI.nameplates.targets[name] == nil and UnitName("mouseover") == name then
if UnitIsPlayer("mouseover") then
local _, class = UnitClass("mouseover")
pfUI_playerDB[name] = {}