mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 22:00:49 +00:00
libpredict: check for mouseover before using it
This commit is contained in:
+1
-1
@@ -320,7 +320,7 @@ hooksecurefunc("CastSpellByName", function(effect, target)
|
|||||||
if not libpredict.sender.enabled then return end
|
if not libpredict.sender.enabled then return end
|
||||||
local effect, rank = libspell.GetSpellInfo(effect)
|
local effect, rank = libspell.GetSpellInfo(effect)
|
||||||
if not effect then return end
|
if not effect then return end
|
||||||
local mouseover = pfUI and pfUI.uf and pfUI.uf.mouseover.unit
|
local mouseover = pfUI and pfUI.uf and pfUI.uf.mouseover and pfUI.uf.mouseover.unit
|
||||||
mouseover = mouseover and UnitCanAssist("player", mouseover) and UnitName(mouseover)
|
mouseover = mouseover and UnitCanAssist("player", mouseover) and UnitName(mouseover)
|
||||||
|
|
||||||
local default = UnitName("target") and UnitCanAssist("player", "target") and UnitName("target") or UnitName("player")
|
local default = UnitName("target") and UnitCanAssist("player", "target") and UnitName("target") or UnitName("player")
|
||||||
|
|||||||
Reference in New Issue
Block a user