From 0d22a8941e0b4ad6a54e9a9f99cf7b49c1dfc538 Mon Sep 17 00:00:00 2001 From: fondlez Date: Sat, 16 Nov 2024 15:48:27 +0000 Subject: [PATCH] Corrects workaround for initial item of duplicate group loot item message server bug. --- FonzAppraiser.toc | 2 +- changelog.lua | 5 ++++- changelog.md | 6 ++++++ core.lua | 26 ++++++++++++++------------ 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/FonzAppraiser.toc b/FonzAppraiser.toc index f864713..193e30f 100644 --- a/FonzAppraiser.toc +++ b/FonzAppraiser.toc @@ -2,7 +2,7 @@ ## Title: FonzAppraiser ## Notes: Tracks the value of personal loot. Command: /fa. ## Author: fondlez -## Version: 3.1.2 +## Version: 3.1.3 ## OptionalDeps: aux-addon, Auctioneer, Auc-Advanced, Auctionator, TradeSkillMaster ## X-Website: http://github.com/fondlez ## X-Category: Inventory diff --git a/changelog.lua b/changelog.lua index ae0b9f1..fc92543 100644 --- a/changelog.lua +++ b/changelog.lua @@ -1,6 +1,9 @@ local A = FonzAppraiser -A.HELP_VERSION = [[Version 3.1.2 - 2024-11-16 |cffffffff +A.HELP_VERSION = [[Version 3.1.3 - 2024-11-16 |cffffffff +[*] Correction for initial item of duplicate group loot item message server bug. + +|rVersion 3.1.2 - 2024-11-16 |cffffffff [*] Improved workaround for duplicate group loot item message server bug. |rVersion 3.1.1 - 2024-11-16 |cffffffff diff --git a/changelog.md b/changelog.md index dfd6610..a73c36b 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.3] - 2024-11-16 + +### Fixed + +- Correction for initial item of duplicate group loot item message server bug. + ## [3.1.2] - 2024-11-16 ### Fixed diff --git a/core.lua b/core.lua index 6c47636..4067de4 100644 --- a/core.lua +++ b/core.lua @@ -105,22 +105,24 @@ do if code then -- Check for immediate duplicate item loot messages across loot types if last_loot_time then - if loot_type == LOOT_TYPE_SELF then - last_self_code = code - if last_won_code and code == last_won_code - and seenTooSoon(last_loot_time) then - return - end - elseif loot_type == LOOT_TYPE_WON then - last_won_code = code - if last_self_code and code == last_self_code - and seenTooSoon(last_loot_time) then - return - end + if loot_type == LOOT_TYPE_SELF + and last_won_code and code == last_won_code + and seenTooSoon(last_loot_time) then + return + elseif loot_type == LOOT_TYPE_WON + and last_self_code and code == last_self_code + and seenTooSoon(last_loot_time) then + return end end + -- Record last sucessful loot last_loot_time = GetTime() + if loot_type == LOOT_TYPE_SELF then + last_self_code = code + elseif loot_type == LOOT_TYPE_WON then + last_won_code = code + end local token = makeStoreToken(code) local _, _, count = find(loot_string, PATTERN_ITEM_LOOT_SELF_COUNT)