WoW:API hooksecurefunc: Difference between revisions
Jump to navigation
Jump to search
→Example: Use the 3.0 print.
(→Notes) |
(→Example: Use the 3.0 print.) |
||
Line 11: | Line 11: | ||
==Example== | ==Example== | ||
hooksecurefunc("CastSpellByName", print); -- Hooks the global CastSpellByName | |||
hooksecurefunc(GameTooltip, "SetUnitBuff", print); -- Hooks GameTooltip.SetUnitBuff | |||
hooksecurefunc("CastSpellByName", | |||
hooksecurefunc(GameTooltip, "SetUnitBuff", | |||
===Result=== | ===Result=== | ||
Hooks CastSpellByName and GameTooltip.SetUnitBuff without compromising their secure status. When those functions are called, prints their argument list into the default chat frame. | Hooks CastSpellByName and GameTooltip.SetUnitBuff without compromising their secure status. When those functions are called, prints their argument list into the default chat frame. |