mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 14:00:48 +00:00
fixed castbar to work properly for spells like Volley
This commit is contained in:
+5
-3
@@ -107,6 +107,8 @@ pfUI:RegisterModule("castbar", "vanilla", function ()
|
|||||||
local focusGuid = nil
|
local focusGuid = nil
|
||||||
if this.unitstr and string.find(this.unitstr, "^0x") then
|
if this.unitstr and string.find(this.unitstr, "^0x") then
|
||||||
focusGuid = this.unitstr
|
focusGuid = this.unitstr
|
||||||
|
elseif this.unitstr and this.unitstr == "player" and GetUnitGUID then
|
||||||
|
focusGuid = GetUnitGUID("player")
|
||||||
elseif this.unitstr and this.unitstr ~= "player" then
|
elseif this.unitstr and this.unitstr ~= "player" then
|
||||||
local guid = GetUnitGUID(this.unitstr)
|
local guid = GetUnitGUID(this.unitstr)
|
||||||
if guid then focusGuid = guid end
|
if guid then focusGuid = guid end
|
||||||
@@ -139,12 +141,12 @@ pfUI:RegisterModule("castbar", "vanilla", function ()
|
|||||||
query = UnitName("player")
|
query = UnitName("player")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Fallback: pfGetCastInfo only when no focusGuid (Nampower not available for this unit)
|
-- Fallback: pfGetCastInfo only when no focusGuid or no cast found via libdebuff
|
||||||
if not cast and not castBlocked and not focusGuid and pfGetCastInfo then
|
if not cast and not castBlocked and pfGetCastInfo then
|
||||||
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = pfGetCastInfo(query)
|
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = pfGetCastInfo(query)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not cast and not castBlocked and not focusGuid and pfGetChannelInfo then
|
if not cast and not castBlocked and pfGetChannelInfo then
|
||||||
channel, nameSubtext, text, texture, startTime, endTime, isTradeSkill = pfGetChannelInfo(this.unitstr or this.unitname)
|
channel, nameSubtext, text, texture, startTime, endTime, isTradeSkill = pfGetChannelInfo(this.unitstr or this.unitname)
|
||||||
cast = channel
|
cast = channel
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user