Skip to content

Commit

Permalink
add initial TWW Achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyphie24 committed Sep 1, 2024
1 parent d70b834 commit 18c0ebb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# WQAchievements

## [v11.0.2-2](https://github.com/Urtgard/WQAchievements/tree/v11.0.2-2) (2024-09-01)
[Full Changelog](https://github.com/Urtgard/WQAchievements/compare/v11.0.2-1...v11.0.2-2) [Previous Releases](https://github.com/Urtgard/WQAchievements/releases)

- Merge pull request #160 from Zeeda17/add-11.0-xpac
Adds new zones for War Within
- adds new zones for War Within
25 changes: 16 additions & 9 deletions WQAchievements.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ function WQA:OnInitialize()
itemLevelUpgradeMin = 1,
PercentUpgradeMin = 1,
unknownSource = false,
azeriteTraits = ""
azeriteTraits = "",
conduit = false
},
general = {
gold = false,
Expand Down Expand Up @@ -229,7 +230,7 @@ function WQA:OnEnable()
end
)

LoadAddOn("Blizzard_GarrisonUI")
C_AddOns.LoadAddOn("Blizzard_GarrisonUI")
end

WQA:RegisterChatCommand("wqa", "slash")
Expand Down Expand Up @@ -1554,21 +1555,27 @@ function WQA:CheckReward(questID, isEmissary, rewardIndex)
end

function WQA:CheckCurrencies(questID, isEmissary)
local uniqueCurrencyIDs = { }
local currencyRewards = C_QuestLog.GetQuestRewardCurrencies(questID)
for index, currencyReward in ipairs(currencyRewards) do
local rarity = C_CurrencyInfo.GetCurrencyInfo(currencyReward.currencyID).quality;
local firstInstance = not uniqueCurrencyIDs[currencyReward.currencyID];
local questRewardCurrencies = C_QuestLog.GetQuestRewardCurrencies(questID)

for _, currencyInfo in ipairs(questRewardCurrencies) do
local currencyID = currencyInfo.currencyID
local amount = currencyInfo.totalRewardAmount

if self.db.profile.options.reward.currency[currencyID] then
local currency = { currencyID = currencyID, amount = numItems }
local currency = { currencyID = currencyID, amount = amount }
self:AddRewardToQuest(questID, "CURRENCY", currency, isEmissary)
end

-- Reputation Currency
local factionID = ReputationCurrencyList[currencyID] or nil
if factionID then
if self.db.profile.options.reward.reputation[factionID] == true then
local reputation = { name = name, currencyID = currencyID, amount = numItems, factionID = factionID }
local reputation = {
name = currencyInfo.name,
currencyID = currencyID,
amount = amount,
factionID = factionID
}
self:AddRewardToQuest(questID, "REPUTATION", reputation, isEmissary)
end
end
Expand Down
2 changes: 1 addition & 1 deletion WQAchievements.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 110002
## Title: WQAchievements
## Author: Urtgard
## Version: @project-version@
## Version: v11.0.2-2
## SavedVariables: WQADB
## X-Curse-Project-ID: 272039
## X-WoWI-ID: 24566
Expand Down

0 comments on commit 18c0ebb

Please sign in to comment.