Skip to content

Commit

Permalink
achievement points fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Krowi authored and Krowi committed Jan 21, 2025
1 parent c5989c8 commit 126563c
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## 81.4 - 2025-01-21
### Fixed
- Achievement points should once again be counted "correctly" (dev note: a feature to show other faction achievements as completed for meta achievements resulted in also counting those as completed resulting in high numbers; this feature is removed for the time being until a proper fix can be developed)

## 81.3 - 2025-01-16
### Fixed
- Resolved an error when both the Achievement Window and the Calendar are open
Expand Down
5 changes: 4 additions & 1 deletion Changelogs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@
- Resolved an error when both the Achievement Window and the Calendar are open

### Removed (81.3)
- Plunderstorm event
- Plunderstorm event

### Fixed (81.4)
- Achievement points should once again be counted "correctly" (dev note: a feature to show other faction achievements as completed for meta achievements resulted in also counting those as completed resulting in high numbers; this feature is removed for the time being until a proper fix can be developed)
4 changes: 4 additions & 0 deletions Changelogs/CurseForge.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@
<p><h3>Removed (81.3)</h3></p>
<ul>
<li>Plunderstorm event</li>
</ul>
<p><h3>Fixed (81.4)</h3></p>
<ul>
<li>Achievement points should once again be counted "correctly" (dev note: a feature to show other faction achievements as completed for meta achievements resulted in also counting those as completed resulting in high numbers; this feature is removed for the time being until a proper fix can be developed)</li>
</ul>
5 changes: 4 additions & 1 deletion Changelogs/Wago.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@
- Resolved an error when both the Achievement Window and the Calendar are open

### Removed (81.3)
- Plunderstorm event
- Plunderstorm event

### Fixed (81.4)
- Achievement points should once again be counted "correctly" (dev note: a feature to show other faction achievements as completed for meta achievements resulted in also counting those as completed resulting in high numbers; this feature is removed for the time being until a proper fix can be developed)
5 changes: 5 additions & 0 deletions Changelogs/WowInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@
[B]Removed (81.3)[/B]
[LIST]
[*]Plunderstorm event
[/LIST]

[B]Fixed (81.4)[/B]
[LIST]
[*]Achievement points should once again be counted "correctly" (dev note: a feature to show other faction achievements as completed for meta achievements resulted in also counting those as completed resulting in high numbers; this feature is removed for the time being until a proper fix can be developed)
[/LIST]
20 changes: 10 additions & 10 deletions Globals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -665,16 +665,16 @@ function addon.GetAchievementInfo(achievementId) -- Returns an additional bool i
if id == 18849 or id == 18850 then
flags.IsTracking = true;
end
if addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted then
if flags.IsAccountWide and KrowiAF_Achievements.Completed[achievementId] and KrowiAF_Achievements.Completed[achievementId].FirstCompletedOn then
local date = date("*t", KrowiAF_Achievements.Completed[achievementId].FirstCompletedOn);
completed = true;
month = date.month;
day = date.day;
year = date.year - 2000;
wasEarnedByMe = true;
end
end
-- if addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted then
-- if flags.IsAccountWide and KrowiAF_Achievements.Completed[achievementId] and KrowiAF_Achievements.Completed[achievementId].FirstCompletedOn then
-- local date = date("*t", KrowiAF_Achievements.Completed[achievementId].FirstCompletedOn);
-- completed = true;
-- month = date.month;
-- day = date.day;
-- year = date.year - 2000;
-- wasEarnedByMe = true;
-- end
-- end
return id, name, points, completed, month, day, year, description, flags, icon, rewardText, isGuild, wasEarnedByMe, earnedBy, isStatistic, true;
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ function KrowiAF_AchievementsObjectivesOtherAchievementMixin:OnEnter()
GameTooltip:SetOwner(self, "ANCHOR_NONE");
GameTooltip:SetPoint("TOPLEFT", self, "BOTTOMLEFT");
local link = GetAchievementLink(self.Id);
if addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted then
if self.Completed and not addon.GetAchievementInfoTable(self.Id).IsCompleted and KrowiAF_Achievements.Completed[self.Id] then
local date = date("*t", KrowiAF_Achievements.Completed[self.Id].FirstCompletedOn);
link = link:gsub(":0:0:0:%-1", ":1:" .. date.month .. ":" .. date.day .. ":" .. tostring(date.year - 2000));
end
end
-- if addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted then
-- if self.Completed and not addon.GetAchievementInfoTable(self.Id).IsCompleted and KrowiAF_Achievements.Completed[self.Id] then
-- local date = date("*t", KrowiAF_Achievements.Completed[self.Id].FirstCompletedOn);
-- link = link:gsub(":0:0:0:%-1", ":1:" .. date.month .. ":" .. date.day .. ":" .. tostring(date.year - 2000));
-- end
-- end
GameTooltip:SetHyperlink(link);
GameTooltip:Show();
if GameTooltip:GetTop() > self:GetBottom() then
Expand Down
2 changes: 1 addition & 1 deletion Krowi_AchievementFilter.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Krowi's |cFF1D92C2Achievement Filter|r
## X-Prefix: KrowiAF
## X-Acronym: KAF
## Version: 81.3
## Version: 81.4
## Author: Krowi-Frostmane EU
## SavedVariables: KrowiAF_DebugTable, KrowiAF_Options, KrowiAF_SavedData, KrowiAF_Filters, KrowiAF_SearchOptions, KrowiAF_Achievements
## OptionalDeps: BetterWardrobe, ElvUI, GW2_UI, InstanceAchievementTracker
Expand Down
2 changes: 1 addition & 1 deletion Krowi_AchievementFilter_Cata.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Krowi's |cFF1D92C2Achievement Filter|r
## X-Prefix: KrowiAF
## X-Acronym: KAF
## Version: 81.3
## Version: 81.4
## Author: Krowi-Frostmane EU
## SavedVariables: KrowiAF_DebugTable, KrowiAF_Options, KrowiAF_SavedData, KrowiAF_Filters, KrowiAF_SearchOptions, KrowiAF_Achievements
## Notes: Filters your achievements.
Expand Down
2 changes: 1 addition & 1 deletion Options/Defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ addon.Options.Defaults = {
TabPriority = 5,
ShowWarbandIcon = true,
WarbandHeaderColor = true,
ShowOtherFactionWarbandAsCompleted = true
-- ShowOtherFactionWarbandAsCompleted = true
},
RightClickMenu = {
ShowButtonOnAchievement = false,
Expand Down
25 changes: 13 additions & 12 deletions Options/Layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1085,18 +1085,19 @@ local achievementsOptions = {
get = function() return addon.Options.db.profile.Achievements.HideDateCompleted; end,
set = function(_, value) addon.Options.db.profile.Achievements.HideDateCompleted = value; end,
},
ShowOtherFactionWarbandAsCompleted = {
order = OrderPP(), type = "toggle", width = AdjustedWidth(1.35),
name = addon.L["Show Other Faction Warband as Completed"],
desc = function() return addon.L["Show Other Faction Warband as Completed Desc"]:K_ReplaceVars{
hordeIntro = addon.GetAchievmentName(12555),
allianceIntro = addon.GetAchievmentName(12582),
warStories = addon.GetAchievmentName(40955),
}:KAF_AddDefaultValueText("Achievements.ShowOtherFactionWarbandAsCompleted")
end,
get = function() return addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted; end,
set = function(_, value) addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted = value; end,
},
-- ShowOtherFactionWarbandAsCompleted = {
-- order = OrderPP(), type = "toggle", width = AdjustedWidth(1.35),
-- name = addon.L["Show Other Faction Warband as Completed"],
-- desc = function() return addon.L["Show Other Faction Warband as Completed Desc"]:K_ReplaceVars{
-- hordeIntro = addon.GetAchievmentName(12555),
-- allianceIntro = addon.GetAchievmentName(12582),
-- warStories = addon.GetAchievmentName(40955),
-- }:KAF_AddDefaultValueText("Achievements.ShowOtherFactionWarbandAsCompleted")
-- end,
-- get = function() return addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted; end,
-- set = function(_, value) addon.Options.db.profile.Achievements.ShowOtherFactionWarbandAsCompleted = value; end,
-- },
Blank0 = {order = OrderPP(), type = "description", width = AdjustedWidth(1.35), name = ""},
ShowAllianceFactionIcon = {
order = OrderPP(), type = "toggle", width = AdjustedWidth(1.35),
name = addon.L["Show Faction Faction Icon"]:K_ReplaceVars(addon.L["Alliance"]),
Expand Down

0 comments on commit 126563c

Please sign in to comment.