Skip to content

Commit

Permalink
Fix Reputation CanLevelUp (hasRewardPending)
Browse files Browse the repository at this point in the history
references #12
  • Loading branch information
DJScias committed Sep 10, 2024
1 parent 491900c commit c4896dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ 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.2.1] - Unreleased
## [6.2.1] - 2024-09-10

### Changed
- Updated some reputation colors (mainly friendships that don't stick by the normal reputation namings).
- From my checks, they seem to all be using the "friendly" green color for every rank. Please report if different of course!

### Fixed
- Fix reputation `CanLevelUp`, `C_Reputation.GetFactionParagonInfo` does not return a data struct, so `hasRewardPending` retrieval failed.
- Should fix [#12](https://github.com/DJScias/Experiencer2/issues/12).

## [6.2.0] - 2024-09-07

Expand Down
3 changes: 2 additions & 1 deletion modules/reputation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ end
function module:CanLevelUp()
local factionData = C_Reputation.GetWatchedFactionData()
if factionData and C_Reputation.IsFactionParagon(factionData.factionID) then
return C_Reputation.GetFactionParagonInfo(factionData.factionID).hasRewardPending
local hasRewardPending = select(4, C_Reputation.GetFactionParagonInfo(factionData.factionID));
return hasRewardPending;
end
return false
end
Expand Down

0 comments on commit c4896dc

Please sign in to comment.