mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-12 08:30:00 +00:00
Don't need to worry about caching player guid anymore
This commit is contained in:
@@ -13,15 +13,6 @@ pfUI:RegisterModule("innervatecall", function ()
|
||||
|
||||
local INNERVATE_SPELLID = 29166
|
||||
|
||||
-- Cache player GUID
|
||||
local playerGuid = nil
|
||||
local function GetPlayerGuid()
|
||||
if not playerGuid and UnitGUID then
|
||||
playerGuid = UnitGUID("player")
|
||||
end
|
||||
return playerGuid
|
||||
end
|
||||
|
||||
-- GUID → name resolution for the target. UnitTokenFromGUID walks the
|
||||
-- engine's known unit tokens (player, party, raid, target, ...) and
|
||||
-- returns the first one currently bound to the GUID, so we don't have
|
||||
@@ -75,7 +66,7 @@ pfUI:RegisterModule("innervatecall", function ()
|
||||
if spellId ~= INNERVATE_SPELLID then return end
|
||||
|
||||
-- Only announce our own casts
|
||||
if casterGuid ~= GetPlayerGuid() then return end
|
||||
if not IsPlayerGuid(casterGuid) then return end
|
||||
|
||||
-- Resolve target name from GUID
|
||||
local targetName = ResolveTargetName(targetGuid) or "Unknown"
|
||||
|
||||
Reference in New Issue
Block a user