Last active
November 15, 2021 13:08
-
-
Save Zarant/e7f0d30e6fa6b48113cec928097e027b to your computer and use it in GitHub Desktop.
Hearthstone bind location swaps with 10ms batching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local HSframe = CreateFrame("Frame"); | |
local currentFPS = GetCVar("maxfps") | |
local HSstart = 0 | |
local function SwitchBindLocation() | |
if GetTime() - HSstart > 9.995 then | |
ConfirmBinder() | |
HSframe:SetScript("OnUpdate",nil) | |
SetCVar("maxfps",currentFPS) | |
HSstart = 0 | |
end | |
end | |
local function StartHSTimer() | |
if HSstart == 0 then | |
currentFPS = GetCVar("maxfps") | |
SetCVar("maxfps",0) | |
HSstart = GetTime() | |
HSframe:SetScript("OnUpdate",SwitchBindLocation) | |
end | |
end | |
hooksecurefunc("UseContainerItem",function(...) | |
if GetContainerItemID(...) == 6948 then | |
StartHSTimer() | |
end | |
end) | |
hooksecurefunc("UseAction",function(...) | |
local event,id = GetActionInfo(...) | |
if event == "item" and id == 6948 or event == "macro" and IsCurrentSpell(8690) then | |
StartHSTimer() | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment