mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-02 00:46:57 +00:00
Read nameplate units directly instead of scanning by name
This commit is contained in:
+4
-1
@@ -59,7 +59,10 @@ pfUI:RegisterModule("afkcam", function ()
|
||||
if not this:IsVisible() then return end
|
||||
local info = _G.ChatTypeInfo[string.gsub(event,"CHAT_MSG_","")]
|
||||
if not info then return end
|
||||
local class = GetUnitInfo(arg2 or "")
|
||||
-- the engine name-queries a chat sender before the event fires, so the
|
||||
-- sender's GUID (arg12) always resolves
|
||||
local _, class
|
||||
if arg12 and arg12 ~= "" then _, class = GetPlayerInfoByGUID(arg12) end
|
||||
local author, msg
|
||||
if class and class ~= UNKNOWN then
|
||||
local class_color = PFUI_CLASS_COLORS[class]:GenerateHexColorMarkup()
|
||||
|
||||
Reference in New Issue
Block a user