mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-11 08:00:01 +00:00
Route hooksecurefunc callers through pfUI.hooksecurefunc; global belongs to ClassicAPI
pfUI's Lua hooksecurefunc lived in pfUI.env and shadowed ClassicAPI's C global for all pfUI code. Replace it with a thin pfUI.hooksecurefunc shim that keeps the missing-target no-op our call sites rely on (ClassicAPI errors on a nil target) and delegates the actual hook to _G.hooksecurefunc. Migrated all 70 internal call sites (modules/libs/skins) to pfUI.hooksecurefunc; bare hooksecurefunc now resolves to ClassicAPI's C version everywhere. Dropped the unused prepend path and the orphaned pfUI.hooks table.
This commit is contained in:
+3
-3
@@ -899,7 +899,7 @@ local INSTANT_HOT_COOLDOWN = 1.0 -- 1 Sekunde Cooldown (GCD ist 1.5s)
|
||||
local pendingHots = {}
|
||||
|
||||
-- Gather Data by User Actions
|
||||
hooksecurefunc("CastSpell", function(id, bookType)
|
||||
pfUI.hooksecurefunc("CastSpell", function(id, bookType)
|
||||
if not libpredict.sender.enabled then return end
|
||||
local effect, rank = libspell.GetSpellInfo(id, bookType)
|
||||
if not effect then return end
|
||||
@@ -952,7 +952,7 @@ hooksecurefunc("CastSpell", function(id, bookType)
|
||||
end
|
||||
end)
|
||||
|
||||
hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
pfUI.hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
if not libpredict.sender.enabled then return end
|
||||
local effect, rank = libspell.GetSpellInfo(effect)
|
||||
if not effect then return end
|
||||
@@ -1016,7 +1016,7 @@ hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
end
|
||||
end)
|
||||
|
||||
hooksecurefunc("UseAction", function(slot, target, selfcast)
|
||||
pfUI.hooksecurefunc("UseAction", function(slot, target, selfcast)
|
||||
if not libpredict.sender.enabled then return end
|
||||
if not IsCurrentAction(slot) then return end
|
||||
local kind, id = GetActionInfo(slot)
|
||||
|
||||
Reference in New Issue
Block a user