From 89459d5a8316a28eea54e6927c8ff71c6875e321 Mon Sep 17 00:00:00 2001 From: VfX Date: Mon, 1 Sep 2025 22:23:51 -0500 Subject: [PATCH 1/3] Updated Deprecated API Call --- correction.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/correction.lua b/correction.lua index 93699c9..31461f5 100644 --- a/correction.lua +++ b/correction.lua @@ -11,7 +11,7 @@ local C_MountJournal_GetMountInfoByID = _G.C_MountJournal.GetMountInfoByID local C_MountJournal_GetMountIDs = _G.C_MountJournal.GetMountIDs local GetShapeshiftFormID = _G.GetShapeshiftFormID local IsMounted = _G.IsMounted -local UnitBuff = _G.UnitBuff +local UnitBuff = C_TooltipInfo.GetUnitBuff local UnitClass = _G.UnitClass local UnitInVehicle = _G.UnitInVehicle local UnitGUID = _G.UnitGUID @@ -478,3 +478,4 @@ function cosFix:CorrectShoulderOffset(enteringVehicleGuid) end + From 19dff2db8b1cbac4fa6bf05b5ffb350539791f7b Mon Sep 17 00:00:00 2001 From: VfX Date: Mon, 1 Sep 2025 22:27:40 -0500 Subject: [PATCH 2/3] Update correction.lua --- correction.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/correction.lua b/correction.lua index 31461f5..4e5cad5 100644 --- a/correction.lua +++ b/correction.lua @@ -477,5 +477,3 @@ function cosFix:CorrectShoulderOffset(enteringVehicleGuid) return returnValue end - - From c463307085ba92b4975c1532e6f813bce12e7b13 Mon Sep 17 00:00:00 2001 From: VfX Date: Mon, 1 Sep 2025 23:28:16 -0500 Subject: [PATCH 3/3] Fix Invalid Arg Error Added checks for which API is present. Added error catch to return default values if mountID is nil or invalid. --- events.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/events.lua b/events.lua index 4ca870b..508beae 100644 --- a/events.lua +++ b/events.lua @@ -8,7 +8,24 @@ local tremove = _G.tremove local tinsert = _G.tinsert local unpack = _G.unpack -local C_MountJournal_GetMountInfoByID = _G.C_MountJournal.GetMountInfoByID +local function SafeMountInfoByID(mountID) + if not mountID or type(mountID) ~= "number" then + return nil, nil, nil, nil, nil + end + + local f + if C_MountJournal then + f = C_MountJournal.GetMountInfoByID or C_MountJournal.GetMountInfo + end + + if f then + return f(mountID) + end + + return nil, nil, nil, nil, nil +end + +local C_MountJournal_GetMountInfoByID = SafeMountInfoByID local GetShapeshiftFormID = _G.GetShapeshiftFormID local InCombatLockdown = _G.InCombatLockdown local IsIndoors = _G.IsIndoors @@ -907,3 +924,4 @@ function cosFix:RegisterEvents() end +