Skip to content

Commit

Permalink
Corrects workaround for initial item of duplicate group loot item mes…
Browse files Browse the repository at this point in the history
…sage server bug.
  • Loading branch information
fondlez committed Nov 16, 2024
1 parent 8b52a14 commit 0d22a89
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion FonzAppraiser.toc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion changelog.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 14 additions & 12 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d22a89

Please sign in to comment.