Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

current draft for primal storm pets #659

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 196 additions & 0 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,202 @@ function R:IsAttemptAllowed(item)
return false
end

local buffedNPCS = {
rdw-software marked this conversation as resolved.
Show resolved Hide resolved
184444,
184453,
184461,
185147,
185168,
185350,
185353,
185357,
185465,
186109,
186239,
186512,
186594,
186598,
186599,
186600,
186602,
186604,
186605,
186606,
186607,
186609,
186612,
186620,
186624,
186626,
186627,
186628,
186630,
186632,
186638,
186684,
186724,
186727,
186728,
186735,
186783,
186859,
187306,
187366,
187599,
187600,
187602,
187813,
187867,
187868,
187886,
187889,
187919,
187923,
187928,
187932,
188009,
188014,
188044,
190737,
190738,
190776,
190778,
190779,
190780,
190991,
190995,
190996,
191129,
191476,
191479,
191507,
191508,
191637,
191654,
191658,
191661,
191677,
191678,
191680,
191898,
191899,
191902,
191940,
192340,
192341,
192582,
192694,
192696,
192699,
192700,
192702,
192703,
193198,
193244,
193522,
193664,
193688,
193967,
194119,
194120,
194797,
194798,
194912,
195448,
195814,
195815,
195836,
195837,
195839,
196336,
196398,
196772,
196835,
196972,
196973,
197075,
197076,
197088,
197118,
197119,
197120,
197121,
197122,
197123,
197124,
197125,
197126,
197128,
197129,
197130,
197131,
197132,
197133,
197134,
197135,
197138,
197139,
197142,
197169,
197344,
197353,
197354,
197356,
198343,
199298,
201535,
201537,
201538,
201540,
201549,
201550,
201552,
201554,
201555,
201556,
201557,
201558,
201559,
203744,
}
local requiredAuraFound = false

if item.requiredAura then
local unit = "target"
local npcid = tonumber((select(6, strsplit("-", UnitGUID("target")))) or 0)
rdw-software marked this conversation as resolved.
Show resolved Hide resolved

local buffedNPCMatch = false
for _, id in pairs(buffedNPCS) do
if id == npcid then
buffedNPCMatch = true
Rarity:Debug("Buffed NPC ID match")
AuraUtil.ForEachAura(unit, "HELPFUL", nil, function(_, _, _, _, _, _, _, _, _, spellId)
if item.requiredAura[spellId] then
Rarity:Debug("Required aura found for item: " .. item.name)
requiredAuraFound = true
end
end)
break
end
end

if not buffedNPCMatch then
for _, id in pairs(item.npcs) do
if id == npcid then
Rarity:Debug("Unbuffed NPC ID match")

requiredAuraFound = true
break
end
end
end

if not requiredAuraFound then
Rarity:Debug("Required aura NOT found for item: " .. item.name)
return false
end
end

local activeCovenantID = C_Covenants.GetActiveCovenantID()
if item.requiresCovenant and item.requiredCovenantID and activeCovenantID ~= item.requiredCovenantID then
local activeCovenantData = C_Covenants.GetCovenantData(activeCovenantID)
Expand Down
1 change: 1 addition & 0 deletions DB/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ local Item = {
worldQuestId = false,
pickpocket = false,
requiresCompletedQuestId = false,
requiredAura = false,
-- Populated fields (SavedVariables)
attempts = false,
lastAttempts = false,
Expand Down
Loading
Loading