From 7398bab9ead86d9c175779a89f0a2349a2100d66 Mon Sep 17 00:00:00 2001 From: GreenComfyTea Date: Sun, 12 May 2024 10:26:43 +0300 Subject: [PATCH] [Buff UI] Fix buffs not working when Sorting by Timer/Duration is selected --- .../autorun/MHR_Overlay/UI/Modules/buff_UI.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua b/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua index e653d5a..452863e 100644 --- a/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua +++ b/reframework/autorun/MHR_Overlay/UI/Modules/buff_UI.lua @@ -205,7 +205,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) if infinite_buffs_location == "First" then if left.is_infinite and right.is_infinite then - return left.timer < right.timer; + return left.name < right.name; elseif left.is_infinite then return true; elseif right.is_infinite then @@ -217,7 +217,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) elseif infinite_buffs_location == "Last" then if left.is_infinite and right.is_infinite then - return left.timer < right.timer; + return left.name < right.name; elseif left.is_infinite then return false; elseif right.is_infinite then @@ -236,7 +236,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) if infinite_buffs_location == "First" then if left.is_infinite and right.is_infinite then - return left.timer > right.timer; + return left.name > right.name; elseif left.is_infinite then return false; elseif right.is_infinite then @@ -248,7 +248,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) elseif infinite_buffs_location == "Last" then if left.is_infinite and right.is_infinite then - return left.timer > right.timer; + return left.name > right.name; elseif left.is_infinite then return true; elseif right.is_infinite then @@ -269,7 +269,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) if infinite_buffs_location == "First" then if left.is_infinite and right.is_infinite then - return left.duration < right.duration; + return left.name < right.name; elseif left.is_infinite then return true; elseif right.is_infinite then @@ -281,7 +281,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) elseif infinite_buffs_location == "Last" then if left.is_infinite and right.is_infinite then - return left.duration < right.duration; + return left.name < right.name; elseif left.is_infinite then return false; elseif right.is_infinite then @@ -300,7 +300,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) if infinite_buffs_location == "First" then if left.is_infinite and right.is_infinite then - return left.duration > right.duration; + return left.name > right.name; elseif left.is_infinite then return false; elseif right.is_infinite then @@ -312,7 +312,7 @@ function this.sort_buffs(_displayed_buffs, cached_config) elseif infinite_buffs_location == "Last" then if left.is_infinite and right.is_infinite then - return left.duration > right.duration; + return left.name > right.name; elseif left.is_infinite then return true; elseif right.is_infinite then