Skip to content

Commit

Permalink
Pushing release for Flamanis fixes on for classic pet, av and other b…
Browse files Browse the repository at this point in the history
…ugs.
  • Loading branch information
Tercioo committed Aug 4, 2024
1 parent d753c34 commit 37fe6c7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Libs/DF/math.lua
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@ end
function DF:GetBezierPoint(value, point1, point2, point3)
return DF.Math.GetBezierPoint(value, point1, point2, point3)
end

function DF:GetVectorLength(vectorX, vectorY, vectorZ)
if (not vectorZ) then
return (vectorX * vectorX + vectorY * vectorY) ^ 0.5
end
return (vectorX * vectorX + vectorY * vectorY + vectorZ * vectorZ) ^ 0.5
end

--normalized value 0-1 result in the value on the range given, e.g 200-400 range with a value of .5 result in 300
function DF:LerpNorm(minValue, maxValue, value)
return (minValue + value * (maxValue - minValue))
Expand Down
12 changes: 9 additions & 3 deletions Libs/DF/schedules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,12 @@ end
---execute each frame a small portion of a big task
---the callback function receives a payload, the current iteration index and the max iterations
---if the callback function return true, the task is finished
---callback function signature: fun(payload: table, iterationCount:number, maxIterations:number):boolean return true if the task is finished
---payload table is the same table passed as argument to LazyExecute()
---@param callback function
---@param payload table?
---@param maxIterations number?
---@param onEndCallback function?
---@param onEndCallback function? execute when the task is finished or when maxIterations is reached
function detailsFramework.Schedules.LazyExecute(callback, payload, maxIterations, onEndCallback)
assert(type(callback) == "function", "DetailsFramework.Schedules.LazyExecute() param #1 'callback' must be a function.")
maxIterations = maxIterations or 100000
Expand All @@ -235,12 +237,16 @@ function detailsFramework.Schedules.LazyExecute(callback, payload, maxIterations
if (not bIsFinished) then
iterationIndex = iterationIndex + 1
if (iterationIndex > maxIterations) then
detailsFramework:QuickDispatch(onEndCallback, payload)
if (onEndCallback) then
detailsFramework:QuickDispatch(onEndCallback, payload)
end
return
end
C_Timer.After(0, function() wrapFunc() end)
else
detailsFramework:QuickDispatch(onEndCallback, payload)
if (onEndCallback) then
detailsFramework:QuickDispatch(onEndCallback, payload)
end
return
end
end
Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
local addonName, Details222 = ...
local version, build, date, tvs = GetBuildInfo()

Details.build_counter = 12827
Details.alpha_build_counter = 12827 --if this is higher than the regular counter, use it instead
Details.build_counter = 12828
Details.alpha_build_counter = 12828 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
2 changes: 1 addition & 1 deletion functions/profiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ function Details:ExportCurrentProfile()
local playerData = {}
--data saved for the account
local defaultGlobalData = Details.default_global_data
local globaData = {}
local globaData = {} --typo: 'globalData' was intended, cannot be fixed due to export strings compatibility

--fill player and global data tables
for key, _ in pairs(defaultPlayerData) do
Expand Down

0 comments on commit 37fe6c7

Please sign in to comment.