Since prepatch I am having issue with micromenu moving script when entering vehicles, it seems to work ok out of combat, but when i enter a vehicle menu in combat, it has some troubles with working properly, i made a quick video to illustrate this issue, and script is below.
https://youtu.be/1ItYG7JrgYQ?t=6
Lua Code:
local function SetPoint(frame)
if frame.lockPoint then
local p = frame.lockPoint
frame.lockPoint = nil
frame:ClearAllPoints()
frame:SetPoint(unpack(p))
frame.lockPoint = p
end
end
local function LockPoint(frame)
if not frame.lockPoint then
if not frame.lockPointHook then
hooksecurefunc(frame, "SetPoint", function(self)
SetPoint(self)
end)
frame.lockPointHook = true
end
frame.lockPoint = {frame:GetPoint(1)}
end
end
local function UnlockPoint(frame)
frame.lockPoint = nil
end
local children = {
CharacterMicroButton,
SpellbookMicroButton,
TalentMicroButton,
AchievementMicroButton,
QuestLogMicroButton,
GuildMicroButton,
LFDMicroButton,
CollectionsMicroButton,
EJMicroButton,
StoreMicroButton,
MainMenuMicroButton
}
CharacterMicroButton:ClearAllPoints()
CharacterMicroButton:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 806, 2)
for i = 1, #children, 1 do
LockPoint(children[i])
end
OverrideActionBar:HookScript("OnShow", function(self)
for i = 1, #children, 1 do
UnlockPoint(children[i])
children[i]:ClearAllPoints()
if i == 1 then
children[i]:SetPoint("LEFT", OverrideActionBarLeaveFrame, "LEFT", - 170, 20)
elseif children[i] == LFDMicroButton then
children[i]:SetPoint("LEFT", CharacterMicroButton, "LEFT", 0, - 34)
else
children[i]:SetPoint("LEFT", children[i - 1], "RIGHT", - 3, 0)
end
LockPoint(children[i])
end
end)
OverrideActionBar:HookScript("OnHide", function(self)
for i = 1, #children, 1 do
UnlockPoint(children[i])
children[i]:ClearAllPoints()
if i == 1 then
children[i]:SetPoint( "BOTTOMLEFT", UIParent, "BOTTOMLEFT", 806, 2)
else
children[i]:SetPoint("LEFT", children[i - 1], "RIGHT", - 3, 0)
end
LockPoint(children[i])
end
end)
PetBattleFrame:HookScript("OnShow", function(self)
for i = 1, #children, 1 do
UnlockPoint(children[i])
children[i]:ClearAllPoints()
if i == 1 then
children[i]:SetPoint("LEFT", OverrideActionBarLeaveFrame, "LEFT", - 143, 20)
elseif children[i] == LFDMicroButton then
children[i]:SetPoint("LEFT", CharacterMicroButton, "LEFT", 0, - 34)
else
children[i]:SetPoint("LEFT", children[i - 1], "RIGHT", - 3, 0)
end
LockPoint(children[i])
end
end)
PetBattleFrame:HookScript("OnHide", function(self)
for i = 1, #children, 1 do
UnlockPoint(children[i])
children[i]:ClearAllPoints()
if i == 1 then
children[i]:SetPoint( "BOTTOMLEFT", UIParent, "BOTTOMLEFT", 806, 2)
else
children[i]:SetPoint("LEFT", children[i - 1], "RIGHT", - 3, 0)
end
LockPoint(children[i])
end
end)
Buggrabber shows:
Code:
[ADDON_ACTION_BLOCKED] AddOn 'EVUI' tried to call the protected function 'MultiBarBottomLeft:Show()'.
[12:48:25] Interface\AddOns\!BugGrabber\BugGrabber.lua:573: in function <Interface\AddOns\!BugGrabber\BugGrabber.lua:573>
[C]: in function `Show'
Interface\FrameXML\MultiActionBars.lua:37: in function `MultiActionBar_Update'
Interface\FrameXML\ActionBarController.lua:174: in function `ValidateActionBarTransition'
Interface\FrameXML\ActionBarController.lua:142: in function `ActionBarController_UpdateAll'
Interface\FrameXML\ActionBarController.lua:64: in function <Interface\FrameXML\ActionBarController.lua:53>