From 9c1df9de3b6ce36a842a2691807b0b8cbfcdb053 Mon Sep 17 00:00:00 2001 From: Sattva <74269253+Sattva-108@users.noreply.github.com> Date: Mon, 24 Mar 2025 09:29:08 +0300 Subject: [PATCH] v5 - works, doesnt taint? or only on uwow server? I left some code made by Leatrix, which is not perfect, for combat vehicling. followed this commit by Leatrix: https://github.com/leatrix/leatrix-plus/commit/4178b6fca263de759ab8ecd3a744129cd6abf584 I tested on Warmane, Whitemane, no taint. Taints only on UWOW server. --- Leatrix_Plus.lua | 69 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index c5c7e61..66810dd 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -12214,25 +12214,6 @@ _G.TargetFrame_SetLocked = function() end - -- Disable Blizzard animation functions - function PlayerFrame_AnimateOut(self) - -- Instantly update art without animation - PlayerFrame_UpdateArt(self) - end - - function PlayerFrame_AnimFinished(self) - -- No need for animation sequences, update instantly - PlayerFrame_UpdateArt(self) - end - - function PlayerFrame_UpdateArt(self) - if UnitHasVehicleUI("player") then - PlayerFrame_ToVehicleArt(self, UnitVehicleSkin("player")) - else - PlayerFrame_ToPlayerArt(self) - end - end - -- Create frame table (used for local traversal) @@ -12601,6 +12582,56 @@ end end end) + --Fix the blizzard bug with animating + -- the PlayerFrame when entering / leavling Vehicle. + -- This versions taints on some server, but is much more perfect. + -- See below this for actual no-taint code. + + -- Disable Blizzard animation functions + function PlayerFrame_AnimateOut(self) + -- Instantly update art without animation + PlayerFrame_UpdateArt(self) + end + + function PlayerFrame_AnimFinished(self) + -- No need for animation sequences, update instantly + PlayerFrame_UpdateArt(self) + end + + function PlayerFrame_UpdateArt(self) + if UnitHasVehicleUI("player") then + PlayerFrame_ToVehicleArt(self, UnitVehicleSkin("player")) + else + PlayerFrame_ToPlayerArt(self) + end + end + + --Fix for the blizzard bug with animating + -- the PlayerFrame when entering / leavling Vehicle. + -- This versions doesn't taint, but is NOT perfect. + -- See above for perfect but tainted code. + + --do + -- local function FixPlayerFrame() + -- PlayerFrame:ClearAllPoints() + -- PlayerFrame:SetPoint(LeaPlusDB["Frames"]["PlayerFrame"]["Point"], UIParent, LeaPlusDB["Frames"]["PlayerFrame"]["Relative"], LeaPlusDB["Frames"]["PlayerFrame"]["XOffset"], LeaPlusDB["Frames"]["PlayerFrame"]["YOffset"]) + -- end + -- + -- local bugFrame = CreateFrame("FRAME") + -- + -- bugFrame:SetScript("OnEvent", function() + -- FixPlayerFrame() + -- bugFrame:UnregisterEvent("PLAYER_REGEN_ENABLED") + -- end) + -- + -- hooksecurefunc("PlayerFrame_SequenceFinished", function() + -- if UnitAffectingCombat("player") then + -- bugFrame:RegisterEvent("PLAYER_REGEN_ENABLED") + -- else + -- FixPlayerFrame() + -- end + -- end) + --end end