mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-18 10:40:48 +00:00
Restore hooksecurefunc
This commit is contained in:
+3
-3
@@ -897,7 +897,7 @@ local INSTANT_HOT_COOLDOWN = 1.0 -- 1 Sekunde Cooldown (GCD ist 1.5s)
|
||||
local pendingHots = {}
|
||||
|
||||
-- Gather Data by User Actions
|
||||
pfUI.hooksecurefunc("CastSpell", function(id, bookType)
|
||||
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
|
||||
@@ -950,7 +950,7 @@ pfUI.hooksecurefunc("CastSpell", function(id, bookType)
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
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
|
||||
@@ -1014,7 +1014,7 @@ pfUI.hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.hooksecurefunc("UseAction", function(slot, target, selfcast)
|
||||
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)
|
||||
|
||||
+1
-1
@@ -54,6 +54,6 @@ end
|
||||
|
||||
pfUI.api.libtooltip = libtooltip
|
||||
|
||||
pfUI.hooksecurefunc(GameTooltip, "SetBagItem", function(self, container, slot)
|
||||
hooksecurefunc(GameTooltip, "SetBagItem", function(self, container, slot)
|
||||
_, libtooltip.itemCount = GetContainerItemInfo(container, slot)
|
||||
end)
|
||||
|
||||
+3
-3
@@ -241,14 +241,14 @@ pfUI.libdebuff_spell_go_hooks["libtotem"] = function(spellId)
|
||||
end
|
||||
|
||||
-- Hook CastSpellByName to store pending name/icon per slot
|
||||
pfUI.hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
hooksecurefunc("CastSpellByName", function(effect, target)
|
||||
local name, rank, icon, _, _, _, spellId = libspell.GetSpellInfo(effect)
|
||||
if not name then return end
|
||||
libtotem:CheckAddQueue(name, rank, icon, spellId)
|
||||
end)
|
||||
|
||||
-- Hook CastSpell to store pending name/icon per slot
|
||||
pfUI.hooksecurefunc("CastSpell", function(id, bookType)
|
||||
hooksecurefunc("CastSpell", function(id, bookType)
|
||||
if not id or not bookType then return end
|
||||
if bookType ~= BOOKTYPE_SPELL and bookType ~= BOOKTYPE_PET then return end
|
||||
local name, rank, icon, _, _, _, spellId = libspell.GetSpellInfo(id, bookType)
|
||||
@@ -259,7 +259,7 @@ end)
|
||||
-- Hook UseAction. GetActionInfo + GetMacroSpell give us the spellID
|
||||
-- directly for both spell-action and macro-action slots, so the
|
||||
-- tooltip-scan fallback (and the "no spellId available" caveat) goes away.
|
||||
pfUI.hooksecurefunc("UseAction", function(slot, target, selfcast)
|
||||
hooksecurefunc("UseAction", function(slot, target, selfcast)
|
||||
if not IsCurrentAction(slot) then return end
|
||||
local kind, id = GetActionInfo(slot)
|
||||
local name, rank, spellID
|
||||
|
||||
Reference in New Issue
Block a user