diff --git a/CHANGELOG.md b/CHANGELOG.md index b1c1512..4696d4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ 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.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.1.8] - 2024-09-06 + +### Fixed +- Warband (Account-Wide) reputation gains were not properly counted and auto-switching did not work as a result (fully fixes [#10](https://github.com/DJScias/Experiencer2/issues/10)). + ## [6.1.7] - 2024-09-05 ### Fixed diff --git a/modules/reputation.lua b/modules/reputation.lua index 4fccdba..7ac2d07 100644 --- a/modules/reputation.lua +++ b/modules/reputation.lua @@ -973,11 +973,19 @@ function module:UPDATE_FACTION() end local reputationPattern = FACTION_STANDING_INCREASED:gsub("%%s", "(.-)"):gsub("%%d", "(%%d*)%%"); +local warbandReputationPattern = FACTION_STANDING_INCREASED_ACCOUNT_WIDE:gsub("%%s", "(.-)"):gsub("%%d", "(%%d*)%%"); function module:CHAT_MSG_COMBAT_FACTION_CHANGE(event, message, ...) local reputation, amount = message:match(reputationPattern); amount = tonumber(amount) or 0; + -- If no reputation is found, check for warband (account-wide). + if not reputation then + reputation, amount = message:match(warbandReputationPattern); + amount = tonumber(amount) or 0; + end + + -- If not char-specific or warband reputation or keeping track of recent rep, end here. if not reputation or not module.recentReputations then return end local isGuild = false;