Add all shared achievements

This commit is contained in:
2024-10-21 15:21:00 +02:00
parent 3339dfe4f4
commit ec158a5e3b
2 changed files with 207 additions and 63 deletions

View File

@@ -4,6 +4,11 @@ function()
if not targetGuid then return end
if not string.match(targetGuid, "Player") then return end
local targetName = UnitName("target")
if not aura_env.config.recsan and WeakAurasSaved.Cyka.AchievementSniffer[targetName] then return end
local should = false
if not WeakAurasSaved.Cyka.AchievementSniffer[targetName] then should = true end
if aura_env.config.rescan then should = true end
if not should then return end
aura_env.Scan(targetName)
end

View File

@@ -10,63 +10,184 @@ if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.AchievementSniffer then WeakAurasSaved.Cyka.AchievementSniffer = {} end
aura_env.achievements = {
522, -- Somebody Likes Me
523, -- 5 Exalted Reputations
524, -- 10 Exalted Reputations
521, -- 15 Exalted Reputations
520, -- 20 Exalted Reputations
519, -- 25 Exalted Reputations
518, -- 30 Exalted Reputations
1556, -- 25 Fish
1557, -- 50 Fish
1558, -- 100 Fish
238, -- An Honorable Kill
513, -- 100 Honorable Kills
515, -- 500 Honorable Kills
516, -- 1000 Honorable Kills
512, -- 5000 Honorable Kills
509, -- 10000 Honorable Kills
239, -- 25000 Honorable Kills
503, -- 50 Quests Completed
504, -- 100 Quests Completed
505, -- 250 Quests Completed
506, -- 500 Quests Completed
507, -- 1000 Quests Completed
1017, -- Can I Keep Him?
15, -- Plenty of Pets
1248, -- Plethora of Pets
1250, -- Shop Smart, Shop Pet...Smart
2516, -- Lil' Game Hunter
5876, -- Petting Zoo
11188, -- Broken Isles Explorer
11190, -- Broken Isles Pathfinder, Part One
11157, -- Loremaster of Legion
10763, -- Azsuna Matata
10790, -- Vrykul Story, Bro
11124, -- Good Suramaritan
10059, -- Ain't No Mountain High Enough
10698, -- That's Val'sharah Folks!
10672, -- Broken Isles Diplomat
10665, -- Explore Azsuna
10666, -- Explore Val'sharah
10667, -- Explore Highmountain
10668, -- Explore Stormheim
10669, -- Explore Suramar
12069, -- Explore Argus
2141, -- Stable Keeper
2142, -- Filling Up The Barn
2143, -- Leading the Cavalry
7382, -- Dynamic Duo
7383, -- Terrific Trio
7384, -- Quintessential Quintet
245, -- That Takes Class
15,
153,
245,
506,
507,
513,
524,
648,
649,
651,
655,
657,
660,
661,
667,
668,
669,
671,
676,
678,
681,
682,
697,
777,
958,
974,
975,
1017,
1266,
1556,
1557,
1558,
1576,
2078,
2141,
2200,
4477,
4478,
4624,
4914,
4958,
4960,
5455,
5456,
5749,
5752,
6456,
6460,
6753,
6757,
6758,
6835,
7382,
7383,
7384,
7437,
7948,
8929,
8952,
8956,
8966,
8967,
8969,
8978,
8979,
8980,
8981,
8982,
8983,
9017,
9038,
9132,
9493,
9507,
10059,
10079,
10278,
10460,
10581,
10585,
10595,
10597,
10617,
10657,
10666,
10667,
10668,
10672,
10682,
10684,
10688,
10689,
10692,
10693,
10698,
10706,
10746,
10755,
10756,
10763,
10772,
10775,
10790,
10800,
10818,
10819,
10820,
10875,
10994,
11124,
11126,
11127,
11128,
11153,
11157,
11164,
11188,
11189,
11190,
11214,
11220,
11298,
11338,
11394,
11446,
11473,
11545,
11559,
11610,
11611,
11653,
11657,
11658,
11659,
11660,
11674,
11773,
11787,
11789,
11790,
11796,
11992,
11993,
11994,
11995,
11996,
11997,
11998,
11999,
12000,
12001,
12008,
12015,
12020,
12026,
12028,
12030,
12072,
12074,
12085,
12086,
12103,
12110,
12445,
12447,
12448,
}
aura_env.TryInspect = function()
local targetPlayer = UnitIsPlayer("target")
if not targetPlayer then return end
local targetName = UnitName("target")
if not aura_env.config.recsan and WeakAurasSaved.Cyka.AchievementSniffer[targetName] then return end
local should = false
if not WeakAurasSaved.Cyka.AchievementSniffer[targetName] then should = true end
if aura_env.config.rescan then should = true end
if not should then return end
local canInspect = CheckInteractDistance("target", 1)
if canInspect then
SetAchievementComparisonUnit("target")
@@ -76,17 +197,34 @@ end
---@param playerName string
aura_env.Scan = function(playerName)
WeakAurasSaved.Cyka.AchievementSniffer[playerName] = {}
for i, aid in ipairs(aura_env.achievements) do
local completed, month, day, year = GetAchievementComparisonInfo(aid)
local date = ""
if playerName == "Bonkleta" or playerName == "Pinkleta" or playerName == "Blindleta" then
for id = 1, 40000 do
local completed, month, day, year = GetAchievementComparisonInfo(id)
if completed then
---@type string
local yearstr = "" .. year
if year < 100 then yearstr = "20" .. year end
date = string.format("%04d-%02d-%02d", yearstr, month, day)
local date = string.format("%04d-%02d-%02d", yearstr, month, day)
local data = {
id = id,
date = date,
completed = completed,
}
WeakAurasSaved.Cyka.AchievementSniffer[playerName][id] = data
end
end
return
end
for i, aid in ipairs(aura_env.achievements) do
local completed, month, day, year = GetAchievementComparisonInfo(aid)
if completed then
---@type string
local yearstr = "" .. year
if year < 100 then yearstr = "20" .. year end
local date = string.format("%04d-%02d-%02d", yearstr, month, day)
local data = {
id = aid,
@@ -95,7 +233,8 @@ aura_env.Scan = function(playerName)
}
WeakAurasSaved.Cyka.AchievementSniffer[playerName][aid] = data
end
end
end
--/run WeakAurasSaved.Cyka.AchievementSniffer = {}
--/dump WeakAurasSaved.Cyka.AchievementSniffer["Ichbinpal"]
--/dump WeakAurasSaved.Cyka.AchievementSniffer["Pinkleta"]