diff --git a/FreshShit/PrydazBar/event.lua b/FreshShit/PrydazBar/event.lua new file mode 100644 index 0000000..dacb326 --- /dev/null +++ b/FreshShit/PrydazBar/event.lua @@ -0,0 +1,27 @@ +-- COMBAT_LOG_EVENT_UNFILTERED +-- For some reason the non lua version does not work (with status > event > spell aura applied...) +function(e, ...) + local subevent, err = CLEUParser.GetSubevent(...) + if err ~= nil then + -- print(err) + return + end + + if subevent == "SPELL_AURA_APPLIED" then + local spellid, err = CLEUParser.GetSpellId(...) + if err ~= nil then + -- print(err) + return + end + + local target, err = CLEUParser.GetDestName(...) + if err ~= nil then + -- print(err) + return + end + + if spellid == 207472 and UnitName("player") == target then + return true + end + end +end diff --git a/FreshShit/PrydazBar/export b/FreshShit/PrydazBar/export new file mode 100644 index 0000000..a499b34 --- /dev/null +++ b/FreshShit/PrydazBar/export @@ -0,0 +1 @@ +!nFvBVTTnq4)l5tPalg2jzTFAdWwwUXfoYEwsRBafsIwKwMnYKAKuoXfd63(o(IKTRNtZ(2qAvipEhVN7fE3LKbjrjHBtcX6)blLviXtFMIvBscg03TF(61sI6pscac7TBmRrS8nCXcoLPsc98dI8xMe(noFR508APIVnI8IkUcJuKKWA3Vnx6sUcPOCMH3tO8ihdmnmoAEs4ku(tfcEnd7Xl5caIbd0seCR57DMV3dF79ZjaiucArbriT8f1rWAAKYYPGHEB)pC)hUfGJKKIwj5IvgnokjSGWicAE4g(ZZzGeMFpmxr3PrpJcAOQeThUVqgAlrRgv3f72zn70nuTrOOBj4oAQ9vanYoI2Fz3yprF5TKTsiRxziewVEn9LKWuVHHrPHXEE(HHwOBWZi39jHaW8hhnmkD28pM6)7qWinoyY0zqmXFCNs94BxHunzZ4fq4RwGImOyu8KjqcazfOnlLh8NTys8mRMA9CJoG3BUPj7vuyZN0mmHlAYK8TKMmbbj5SMm1gydtVQSg1KTdIvu9omNi1hay7zU4PMSRFMQ2asdPe1Wj)AtMXemRm4PjtJF4BvvjLG71R37A(06AwUof6AYp1Kzj1Kz)PKNJaHADSW5ebaVFbSJz(Xlqcjr07JeWJBz46tfNU2jqZFdIWOLgBHDGH2F0gELaEsCnW(7o)CbrvlosocddBorpTyeqhORRcx4pBw6W4LdthUyXSP(JV6skV1i1oik(Y2OnG(DM4)zt9TAYxY0p1f89SFjJtHefKlh)gtKQa4X5)VmU)vC4ct2WSTQeKpd8NfdVTngXv26nx9oltwB)hbzhuYuIAYpWBB2y(4EQZRf5KyxPfm8cZuJo8U(hQjTqqm1Km5La5dI0vD0uATT8YiDzXA2HsXknbmv(vZRvDTveBp8XSjYYMPKCWnqpiGxAoNLMFudGbMgadmnagyAamWWhtremu5VBlRam9E9Dt3ATcDtaWdQmngmL5GkrKdMPRaTKaQdkNdx4weL925EnLrLBEZ8RST3WcE1u2ebhkqVkj8LJAWUcj8UGv3)GvJjsOiPq3AfKVsWleePeIs5u5jnyT38FAjuVAjPao(OELg8PdBGEtH)dxoOq4KvCbMis5oKDFlVWLypQJf7ibgKdmb9(7cBQoEYF1o5doIZDGbSQ00A2rHGla9g(x1ib0izsTUpWN3q1tv44qs)grFrg)7gcTydG47633MfP9qLCKzwhfQeYMng426sfTnZ0s)mY5LiP8mQyk0GohOS)SJeOCY5e5LNtSAx1fukLPN(P6m6Rr5TP0NqhkPKForTl57iQC5eJa1IDtCnE8HmsVx91MBClliKh)WYGzQBv3dcR(u08N2pUTMYkDUMcYwMx1ElAVmNTMwyxdvrgI)kmXbbtWpIErlIClNR2SWLKRZmoLlQ5IfMu7OJtOBtqAFQbs(SDo3BD5gqQJ2nSC6hFamiuz1gK2E1OKRz34VEOlJYMFxlar8l3fpTjlGlGrJOW4Ble7XOV5ejQLTP6YtqKJ8fpe4myfJqIVep9Md7UjulGtoTHO457AlM9H(M0ylmOymbQlhatETS10g5IDDaAujIb32Ab0kbgfgPCgK5r6envRlk0BPVFa4k1yNSF6UyVk)QF7oNY8ElvE1WK05MgBRjzQiXfui121ibGB0uVHZsNgald9nrCm9OmG1q0zsjQagPDEC0SPb(6IMLRp9VZqNpbJY3BW77bWChaJ7VvJKK)5 \ No newline at end of file diff --git a/FreshShit/PrydazBar/init.lua b/FreshShit/PrydazBar/init.lua new file mode 100644 index 0000000..ee215b6 --- /dev/null +++ b/FreshShit/PrydazBar/init.lua @@ -0,0 +1,1037 @@ +CLEUEventInfo = { + ["GENERIC"] = { + ["timestamp"] = 1, + ["subevent"] = 2, + ["hideCaster"] = 3, + ["sourceGUID"] = 4, + ["sourceName"] = 5, + ["sourceFlags"] = 6, + ["sourceRaidFlags"] = 7, + ["destGUID"] = 8, + ["destName"] = 9, + ["destFlags"] = 10, + ["destRaidFlags"] = 11, + }, + ["GENERIC_SPELL"] = { + ["spellId"] = 12, + ["spellName"] = 13, + ["spellSchool"] = 14, + }, + ["GENERIC_DAMAGE"] = { + ["amount"] = 15, + ["overkill"] = 16, + ["school"] = 17, + ["resisted"] = 18, + ["blocked"] = 19, + ["absorbed"] = 20, + ["critical"] = 21, + ["glancing"] = 22, + ["crushing"] = 23, + ["isOffHand"] = 24, + }, + ["GENERIC_MISSED"] = { + ["missType"] = 15, + ["isOffHand"] = 16, + ["amountMissed"] = 17, + ["critical"] = 18, + }, + ["GENERIC_HEAL"] = { + ["amount"] = 15, + ["overhealing"] = 16, + ["absorbed"] = 17, + ["critical"] = 18, + }, + ["GENERIC_HEAL_ABSORBED"] = { + ["extraGUID"] = 15, + ["extraName"] = 16, + ["extraFlags"] = 17, + ["extraRaidFlags"] = 18, + ["extraSpellID"] = 19, + ["extraSpellName"] = 20, + ["extraSchool"] = 21, + ["absorbedAmount"] = 22, + ["totalAmount"] = 23, + }, + ["GENERIC_ENERGIZE"] = { + ["amount"] = 15, + ["overEnergize"] = 16, + ["powerType"] = 17, + }, + ["GENERIC_DRAIN"] = { + ["amount"] = 15, + ["powerType"] = 16, + ["extraAmount"] = 17, + }, + ["GENERIC_LEECH"] = { + ["amount"] = 15, + ["powerType"] = 16, + ["extraAmount"] = 17, + }, + ["GENERIC_INTERRUPT"] = { + ["extraSpellId"] = 15, + ["extraSpellName"] = 16, + ["extraSchool"] = 17, + }, + ["GENERIC_DISPEL"] = { + ["extraSpellId"] = 15, + ["extraSpellName"] = 16, + ["extraSchool"] = 17, + ["auraType"] = 18, + }, + ["GENERIC_DISPEL_FAILED"] = { + ["extraSpellId"] = 15, + ["extraSpellName"] = 16, + ["extraSchool"] = 17, + }, + ["GENERIC_STOLEN"] = { + ["extraSpellId"] = 15, + ["extraSpellName"] = 16, + ["extraSchool"] = 17, + ["auraType"] = 18, + }, + ["GENERIC_EXTRA_ATTACKS"] = { + ["amount"] = 15, + }, + ["GENERIC_AURA_APPLIED"] = { + ["auraType"] = 15, + ["amount"] = 16, + }, + ["GENERIC_AURA_REMOVED"] = { + ["auraType"] = 15, + ["amount"] = 16, + }, + ["GENERIC_AURA_APPLIED_DOSE"] = { + ["auraType"] = 15, + ["amount"] = 16, + }, + ["GENERIC_AURA_REMOVED_DOSE"] = { + ["auraType"] = 15, + ["amount"] = 16, + }, + ["GENERIC_AURA_REFRESH"] = { + ["auraType"] = 15, + }, + ["GENERIC_AURA_BROKEN"] = { + ["auraType"] = 15, + }, + ["GENERIC_AURA_BROKEN_SPELL"] = { + ["extraSpellId"] = 15, + ["extraSpellName"] = 16, + ["extraSchool"] = 17, + ["auraType"] = 18, + }, + ["GENERIC_CAST_START"] = { + }, + ["GENERIC_CAST_SUCCESS"] = { + }, + ["GENERIC_CAST_FAILED"] = { + }, +} + +CLEUEventInfo["SWING_DAMAGE"] = CLEUEventInfo["GENERIC_DAMAGE"] +CLEUEventInfo["SWING_MISSED"] = CLEUEventInfo["GENERIC_MISSED"] +CLEUEventInfo["SWING_HEAL"] = CLEUEventInfo["GENERIC_HEAL"] +CLEUEventInfo["SWING_HEAL_ABSORBED"] = CLEUEventInfo["GENERIC_HEAL_ABSORBED"] +CLEUEventInfo["SWING_ENERGIZE"] = CLEUEventInfo["GENERIC_ENERGIZE"] +CLEUEventInfo["SWING_DRAIN"] = CLEUEventInfo["GENERIC_DRAIN"] +CLEUEventInfo["SWING_LEECH"] = CLEUEventInfo["GENERIC_LEECH"] +CLEUEventInfo["SWING_INTERRUPT"] = CLEUEventInfo["GENERIC_INTERRUPT"] +CLEUEventInfo["SWING_DISPEL"] = CLEUEventInfo["GENERIC_DISPEL"] +CLEUEventInfo["SWING_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"] +CLEUEventInfo["SWING_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"] +CLEUEventInfo["SWING_EXTRA_ATTACKS"] = CLEUEventInfo["GENERIC_EXTRA_ATTACKS"] +CLEUEventInfo["SWING_AURA_APPLIED"] = CLEUEventInfo["GENERIC_AURA_APPLIED"] +CLEUEventInfo["SWING_AURA_REMOVED"] = CLEUEventInfo["GENERIC_AURA_REMOVED"] +CLEUEventInfo["SWING_AURA_APPLIED_DOSE"] = CLEUEventInfo["GENERIC_AURA_APPLIED_DOSE"] +CLEUEventInfo["SWING_AURA_REMOVED_DOSE"] = CLEUEventInfo["GENERIC_AURA_REMOVED_DOSE"] +CLEUEventInfo["SWING_AURA_REFRESH"] = CLEUEventInfo["GENERIC_AURA_REFRESH"] +CLEUEventInfo["SWING_AURA_BROKEN"] = CLEUEventInfo["GENERIC_AURA_BROKEN"] +CLEUEventInfo["SWING_AURA_BROKEN_SPELL"] = CLEUEventInfo["GENERIC_AURA_BROKEN_SPELL"] +CLEUEventInfo["SWING_CAST_START"] = CLEUEventInfo["GENERIC_CAST_START"] +CLEUEventInfo["SWING_CAST_SUCCESS"] = CLEUEventInfo["GENERIC_CAST_SUCCESS"] +CLEUEventInfo["SWING_CAST_FAILED"] = CLEUEventInfo["GENERIC_CAST_FAILED"] + +CLEUEventInfo["RANGE_DAMAGE"] = CLEUEventInfo["GENERIC_DAMAGE"] +CLEUEventInfo["RANGE_MISSED"] = CLEUEventInfo["GENERIC_MISSED"] +CLEUEventInfo["RANGE_HEAL"] = CLEUEventInfo["GENERIC_HEAL"] +CLEUEventInfo["RANGE_HEAL_ABSORBED"] = CLEUEventInfo["GENERIC_HEAL_ABSORBED"] +CLEUEventInfo["RANGE_ENERGIZE"] = CLEUEventInfo["GENERIC_ENERGIZE"] +CLEUEventInfo["RANGE_DRAIN"] = CLEUEventInfo["GENERIC_DRAIN"] +CLEUEventInfo["RANGE_LEECH"] = CLEUEventInfo["GENERIC_LEECH"] +CLEUEventInfo["RANGE_INTERRUPT"] = CLEUEventInfo["GENERIC_INTERRUPT"] +CLEUEventInfo["RANGE_DISPEL"] = CLEUEventInfo["GENERIC_DISPEL"] +CLEUEventInfo["RANGE_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"] +CLEUEventInfo["RANGE_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"] +CLEUEventInfo["RANGE_EXTRA_ATTACKS"] = CLEUEventInfo["GENERIC_EXTRA_ATTACKS"] +CLEUEventInfo["RANGE_AURA_APPLIED"] = CLEUEventInfo["GENERIC_AURA_APPLIED"] +CLEUEventInfo["RANGE_AURA_REMOVED"] = CLEUEventInfo["GENERIC_AURA_REMOVED"] +CLEUEventInfo["RANGE_AURA_APPLIED_DOSE"] = CLEUEventInfo["GENERIC_AURA_APPLIED_DOSE"] +CLEUEventInfo["RANGE_AURA_REMOVED_DOSE"] = CLEUEventInfo["GENERIC_AURA_REMOVED_DOSE"] +CLEUEventInfo["RANGE_AURA_REFRESH"] = CLEUEventInfo["GENERIC_AURA_REFRESH"] +CLEUEventInfo["RANGE_AURA_BROKEN"] = CLEUEventInfo["GENERIC_AURA_BROKEN"] +CLEUEventInfo["RANGE_AURA_BROKEN_SPELL"] = CLEUEventInfo["GENERIC_AURA_BROKEN_SPELL"] +CLEUEventInfo["RANGE_CAST_START"] = CLEUEventInfo["GENERIC_CAST_START"] +CLEUEventInfo["RANGE_CAST_SUCCESS"] = CLEUEventInfo["GENERIC_CAST_SUCCESS"] +CLEUEventInfo["RANGE_CAST_FAILED"] = CLEUEventInfo["GENERIC_CAST_FAILED"] + +CLEUEventInfo["SPELL_DAMAGE"] = CLEUEventInfo["GENERIC_DAMAGE"] +CLEUEventInfo["SPELL_MISSED"] = CLEUEventInfo["GENERIC_MISSED"] +CLEUEventInfo["SPELL_HEAL"] = CLEUEventInfo["GENERIC_HEAL"] +CLEUEventInfo["SPELL_HEAL_ABSORBED"] = CLEUEventInfo["GENERIC_HEAL_ABSORBED"] +CLEUEventInfo["SPELL_ENERGIZE"] = CLEUEventInfo["GENERIC_ENERGIZE"] +CLEUEventInfo["SPELL_DRAIN"] = CLEUEventInfo["GENERIC_DRAIN"] +CLEUEventInfo["SPELL_LEECH"] = CLEUEventInfo["GENERIC_LEECH"] +CLEUEventInfo["SPELL_INTERRUPT"] = CLEUEventInfo["GENERIC_INTERRUPT"] +CLEUEventInfo["SPELL_DISPEL"] = CLEUEventInfo["GENERIC_DISPEL"] +CLEUEventInfo["SPELL_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"] +CLEUEventInfo["SPELL_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"] +CLEUEventInfo["SPELL_EXTRA_ATTACKS"] = CLEUEventInfo["GENERIC_EXTRA_ATTACKS"] +CLEUEventInfo["SPELL_AURA_APPLIED"] = CLEUEventInfo["GENERIC_AURA_APPLIED"] +CLEUEventInfo["SPELL_AURA_REMOVED"] = CLEUEventInfo["GENERIC_AURA_REMOVED"] +CLEUEventInfo["SPELL_AURA_APPLIED_DOSE"] = CLEUEventInfo["GENERIC_AURA_APPLIED_DOSE"] +CLEUEventInfo["SPELL_AURA_REMOVED_DOSE"] = CLEUEventInfo["GENERIC_AURA_REMOVED_DOSE"] +CLEUEventInfo["SPELL_AURA_REFRESH"] = CLEUEventInfo["GENERIC_AURA_REFRESH"] +CLEUEventInfo["SPELL_AURA_BROKEN"] = CLEUEventInfo["GENERIC_AURA_BROKEN"] +CLEUEventInfo["SPELL_AURA_BROKEN_SPELL"] = CLEUEventInfo["GENERIC_AURA_BROKEN_SPELL"] +CLEUEventInfo["SPELL_CAST_START"] = CLEUEventInfo["GENERIC_CAST_START"] +CLEUEventInfo["SPELL_CAST_SUCCESS"] = CLEUEventInfo["GENERIC_CAST_SUCCESS"] +CLEUEventInfo["SPELL_CAST_FAILED"] = CLEUEventInfo["GENERIC_CAST_FAILED"] + +CLEUEventInfo["SPELL_PERIODIC_DAMAGE"] = CLEUEventInfo["GENERIC_DAMAGE"] +CLEUEventInfo["SPELL_PERIODIC_MISSED"] = CLEUEventInfo["GENERIC_MISSED"] +CLEUEventInfo["SPELL_PERIODIC_HEAL"] = CLEUEventInfo["GENERIC_HEAL"] +CLEUEventInfo["SPELL_PERIODIC_HEAL_ABSORBED"] = CLEUEventInfo["GENERIC_HEAL_ABSORBED"] +CLEUEventInfo["SPELL_PERIODIC_ENERGIZE"] = CLEUEventInfo["GENERIC_ENERGIZE"] +CLEUEventInfo["SPELL_PERIODIC_DRAIN"] = CLEUEventInfo["GENERIC_DRAIN"] +CLEUEventInfo["SPELL_PERIODIC_LEECH"] = CLEUEventInfo["GENERIC_LEECH"] +CLEUEventInfo["SPELL_PERIODIC_INTERRUPT"] = CLEUEventInfo["GENERIC_INTERRUPT"] +CLEUEventInfo["SPELL_PERIODIC_DISPEL"] = CLEUEventInfo["GENERIC_DISPEL"] +CLEUEventInfo["SPELL_PERIODIC_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"] +CLEUEventInfo["SPELL_PERIODIC_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"] +CLEUEventInfo["SPELL_PERIODIC_EXTRA_ATTACKS"] = CLEUEventInfo["GENERIC_EXTRA_ATTACKS"] +CLEUEventInfo["SPELL_PERIODIC_AURA_APPLIED"] = CLEUEventInfo["GENERIC_AURA_APPLIED"] +CLEUEventInfo["SPELL_PERIODIC_AURA_REMOVED"] = CLEUEventInfo["GENERIC_AURA_REMOVED"] +CLEUEventInfo["SPELL_PERIODIC_AURA_APPLIED_DOSE"] = CLEUEventInfo["GENERIC_AURA_APPLIED_DOSE"] +CLEUEventInfo["SPELL_PERIODIC_AURA_REMOVED_DOSE"] = CLEUEventInfo["GENERIC_AURA_REMOVED_DOSE"] +CLEUEventInfo["SPELL_PERIODIC_AURA_REFRESH"] = CLEUEventInfo["GENERIC_AURA_REFRESH"] +CLEUEventInfo["SPELL_PERIODIC_AURA_BROKEN"] = CLEUEventInfo["GENERIC_AURA_BROKEN"] +CLEUEventInfo["SPELL_PERIODIC_AURA_BROKEN_SPELL"] = CLEUEventInfo["GENERIC_AURA_BROKEN_SPELL"] +CLEUEventInfo["SPELL_PERIODIC_CAST_START"] = CLEUEventInfo["GENERIC_CAST_START"] +CLEUEventInfo["SPELL_PERIODIC_CAST_SUCCESS"] = CLEUEventInfo["GENERIC_CAST_SUCCESS"] +CLEUEventInfo["SPELL_PERIODIC_CAST_FAILED"] = CLEUEventInfo["GENERIC_CAST_FAILED"] + +---@class CLEUParser +CLEUParser = { + ---@param ... any + ---@return number, nil|string + GetTimestamp = function(...) + local val = select(CLEUEventInfo["GENERIC"]["timestamp"], ...) + if val == nil then return 0, "Timestamp is nil or missing" end + if type(val) ~= "number" then return 0, "Timestamp is not a number" end + return val, nil + end, + ---@param ... any + ---@return string, nil|string + GetSubevent = function(...) + local val = select(CLEUEventInfo["GENERIC"]["subevent"], ...) + if val == nil then return "", "Subevent is nil or missing" end + if type(val) ~= "string" then return "", "Subevent is not a string" end + return val, nil + end, + ---@param ... any + ---@return boolean, nil|string + GetHideCaster = function(...) + local val = select(CLEUEventInfo["GENERIC"]["hideCaster"], ...) + if val == nil then return false, "HideCaster is nil or missing" end + if type(val) ~= "boolean" then return false, "HideCaster is not a boolean" end + return val, nil + end, + ---@param ... any + ---@return string, nil|string + GetSourceGUID = function(...) + local val = select(CLEUEventInfo["GENERIC"]["sourceGUID"], ...) + if val == nil then return "", "SourceGUID is nil or missing" end + if type(val) ~= "string" then return "", "SourceGUID is not a string" end + return val, nil + end, + ---@param ... any + ---@return string, nil|string + GetSourceName = function(...) + local val = select(CLEUEventInfo["GENERIC"]["sourceName"], ...) + if val == nil then return "", "SourceName is nil or missing" end + if type(val) ~= "string" then return "", "SourceName is not a string" end + return val, nil + end, + ---@param ... any + ---@return number, nil|string + GetSourceFlags = function(...) + local val = select(CLEUEventInfo["GENERIC"]["sourceFlags"], ...) + if val == nil then return 0, "SourceFlags is nil or missing" end + if type(val) ~= "number" then return 0, "SourceFlags is not a number" end + return val, nil + end, + ---@param ... any + ---@return number, nil|string + GetSourceRaidFlags = function(...) + local val = select(CLEUEventInfo["GENERIC"]["sourceRaidFlags"], ...) + if val == nil then return 0, "SourceRaidFlags is nil or missing" end + if type(val) ~= "number" then return 0, "SourceRaidFlags is not a number" end + return val, nil + end, + ---@param ... any + ---@return string, nil|string + GetDestGUID = function(...) + local val = select(CLEUEventInfo["GENERIC"]["destGUID"], ...) + if val == nil then return "", "DestGUID is nil or missing" end + if type(val) ~= "string" then return "", "DestGUID is not a string" end + return val, nil + end, + ---@param ... any + ---@return string, nil|string + GetDestName = function(...) + local val = select(CLEUEventInfo["GENERIC"]["destName"], ...) + if val == nil then return "", "DestName is nil or missing" end + if type(val) ~= "string" then return "", "DestName is not a string" end + return val, nil + end, + ---@param ... any + ---@return number, nil|string + GetDestFlags = function(...) + local val = select(CLEUEventInfo["GENERIC"]["destFlags"], ...) + if val == nil then return 0, "DestFlags is nil or missing" end + if type(val) ~= "number" then return 0, "DestFlags is not a number" end + return val, nil + end, + ---@param ... any + ---@return number, nil|string + GetDestRaidFlags = function(...) + local val = select(CLEUEventInfo["GENERIC"]["destRaidFlags"], ...) + if val == nil then return 0, "DestRaidFlags is nil or missing" end + if type(val) ~= "number" then return 0, "DestRaidFlags is not a number" end + return val, nil + end, + + + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + ---@param ... any + ---@return number, nil|string + GetSpellId = function(...) + local val = select(CLEUEventInfo["GENERIC_SPELL"]["spellId"], ...) + if val == nil then return 0, "SpellId is nil or missing" end + if type(val) ~= "number" then return 0, "SpellId is not a number" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + ---@param ... any + ---@return string, nil|string + GetSpellName = function(...) + local val = select(CLEUEventInfo["GENERIC_SPELL"]["spellName"], ...) + if val == nil then return "", "SpellName is nil or missing" end + if type(val) ~= "string" then return "", "SpellName is not a string" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + ---@param ... any + ---@return number, nil|string + GetSpellSchool = function(...) + local val = select(CLEUEventInfo["GENERIC_SPELL"]["spellSchool"], ...) + if val == nil then return 0, "SpellSchool is nil or missing" end + if type(val) ~= "number" then return 0, "SpellSchool is not a number" end + return val, nil + end, + + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + --- |_HEAL| + --- |_ENERGIZE| + --- |_DRAIN| + --- |_LEECH| + --- |_EXTRA_ATTACKS| + --- |_AURA_APPLIED| + --- |_AURA_REMOVED| + --- |_AURA_APPLIED_DOSE| + --- |_AURA_REMOVED_DOSE| + ---@param ... any + ---@return number, nil|string + GetAmount = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["amount"], ...) + if val == nil then return 0, "Amount is nil or missing" end + if type(val) ~= "number" then return 0, "Amount is not a number" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + ---@param ... any + ---@return number, nil|string + GetOverkill = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["overkill"], ...) + if val == nil then return 0, "Overkill is nil or missing" end + if type(val) ~= "number" then return 0, "Overkill is not a number" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + ---@param ... any + ---@return number, nil|string + GetSchool = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["school"], ...) + if val == nil then return 0, "School is nil or missing" end + if type(val) ~= "number" then return 0, "School is not a number" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + --- + --- Apparently this is allowed to be nil? + ---@param ... any + ---@return boolean, nil|string + GetResisted = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["resisted"], ...) + if val == nil then return false, "Resisted is nil or missing" end + if type(val) ~= "boolean" then return false, "Resisted is not a boolean" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + --- + --- Apparently this is allowed to be nil? + ---@param ... any + ---@return boolean, nil|string + GetBlocked = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["blocked"], ...) + if val == nil then return false, "Blocked is nil or missing" end + if type(val) ~= "boolean" then return false, "Blocked is not a boolean" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + --- |_HEAL| + --- + --- Apparently this is allowed to be nil? + ---@param ... any + ---@return boolean, nil|string + GetAbsorbed = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["absorbed"], ...) + if val == nil then return false, "Absorbed is nil or missing" end + if type(val) ~= "boolean" then return false, "Absorbed is not a boolean" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + --- |_MISSED| + --- |_HEAL| + ---@param ... any + ---@return boolean, nil|string + GetCritical = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["critical"], ...) + if val == nil then return false, "Critical is nil or missing" end + if type(val) ~= "boolean" then return false, "Critical is not a boolean" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + ---@param ... any + ---@return boolean, nil|string + GetGlancing = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["glancing"], ...) + if val == nil then return false, "Glancing is nil or missing" end + if type(val) ~= "boolean" then return false, "Glancing is not a boolean" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + ---@param ... any + ---@return boolean, nil|string + GetCrushing = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["crushing"], ...) + if val == nil then return false, "Crushing is nil or missing" end + if type(val) ~= "boolean" then return false, "Crushing is not a boolean" end + return val, nil + end, + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DAMAGE| + --- |_MISSED| + ---@param ... any + ---@return boolean, nil|string + GetIsOffHand = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return false, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["isOffHand"], ...) + if val == nil then return false, "IsOffHand is nil or missing" end + if type(val) ~= "boolean" then return false, "IsOffHand is not a boolean" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_MISSED| + --- + --- return type is unconfirmed! + ---@param ... any + ---@return string, nil|string + GetMissType = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return "", string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["missType"], ...) + if val == nil then return "", "MissType is nil or missing" end + if type(val) ~= "string" then return "", "MissType is not a string" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_MISSED| + ---@param ... any + ---@return number, nil|string + --- + --- return type is unconfirmed! + GetAmountMissed = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["amountMissed"], ...) + if val == nil then return 0, "AmountMissed is nil or missing" end + if type(val) ~= "number" then return 0, "AmountMissed is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL| + --- + --- return type is unconfirmed! + ---@param ... any + ---@return number, nil|string + GetOverhealing = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["overhealing"], ...) + if val == nil then return 0, "Overhealing is nil or missing" end + if type(val) ~= "number" then return 0, "Overhealing is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + ---@param ... any + ---@return string, nil|string + GetExtraGUID = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return "", string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraGUID"], ...) + if val == nil then return "", "ExtraGUID is nil or missing" end + if type(val) ~= "string" then return "", "ExtraGUID is not a string" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + ---@param ... any + ---@return string, nil|string + GetExtraName = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return "", string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraName"], ...) + if val == nil then return "", "ExtraName is nil or missing" end + if type(val) ~= "string" then return "", "ExtraName is not a string" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + ---@param ... any + ---@return number, nil|string + GetExtraFlags = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraFlags"], ...) + if val == nil then return 0, "ExtraFlags is nil or missing" end + if type(val) ~= "number" then return 0, "ExtraFlags is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + ---@param ... any + ---@return number, nil|string + GetExtraRaidFlags = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraRaidFlags"], ...) + if val == nil then return 0, "ExtraRaidFlags is nil or missing" end + if type(val) ~= "number" then return 0, "ExtraRaidFlags is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + --- + --- WARNING! Different from "GetExtraSpellId" (capital ID!)
+ --- This is the doing of Blizzard, not me.
+ ---@see CLEUParser.GetExtraSpellId + ---@param ... any + ---@return number, nil|string + GetExtraSpellID = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraSpellID"], ...) + if val == nil then return 0, "ExtraSpellID is nil or missing" end + if type(val) ~= "number" then return 0, "ExtraSpellID is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + --- |_INTERRUPT| + --- |_DISPEL| + --- |_DISPEL_FAILED| + --- |_STOLEN| + --- |_AURA_BROKEN_SPELL| + ---@param ... any + ---@return string, nil|string + GetExtraSpellName = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return "", string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraSpellName"], ...) + if val == nil then return "", "extraSpellName is nil or missing" end + if type(val) ~= "string" then return "", "extraSpellName is not a string" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + --- |_INTERRUPT| + --- |_DISPEL| + --- |_DISPEL_FAILED| + --- |_STOLEN| + --- |_AURA_BROKEN_SPELL| + ---@param ... any + ---@return number, nil|string + GetExtraSchool = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraSchool"], ...) + if val == nil then return 0, "ExtraSchool is nil or missing" end + if type(val) ~= "number" then return 0, "ExtraSchool is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_HEAL_ABSORBED| + ---@param ... any + ---@return number, nil|string + GetAbsorbedAmount = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["absorbedAmount"], ...) + if val == nil then return 0, "AbsorbedAmount is nil or missing" end + if type(val) ~= "number" then return 0, "AbsorbedAmount is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_ENERGIZE| + ---@param ... any + ---@return number, nil|string + GetOverEnergize = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["overEnergize"], ...) + if val == nil then return 0, "OverEnergize is nil or missing" end + if type(val) ~= "number" then return 0, "OverEnergize is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_ENERGIZE| + --- |_DRAIN| + --- |_LEECH| + --- + --- return type is unconfirmed! + ---@param ... any + ---@return number, nil|string + GetPowerType = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["powerType"], ...) + if val == nil then return 0, "PowerType is nil or missing" end + if type(val) ~= "number" then return 0, "PowerType is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DRAIN| + --- |_LEECH| + ---@param ... any + ---@return number, nil|string + GetExtraAmount = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraAmount"], ...) + if val == nil then return 0, "ExtraAmount is nil or missing" end + if type(val) ~= "number" then return 0, "ExtraAmount is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_INTERRUPT| + --- |_DISPEL| + --- |_DISPEL_FAILED| + --- |_STOLEN| + --- |_AURA_BROKEN_SPELL| + --- + --- WARNING! Different from "GetExtraSpellID" (capital ID!)
+ --- This is the doing of Blizzard, not me.
+ ---@see CLEUParser.GetExtraSpellID + ---@param ... any + ---@return number, nil|string + GetExtraSpellId = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["extraSpellId"], ...) + if val == nil then return 0, "ExtraSpellId is nil or missing" end + if type(val) ~= "number" then return 0, "ExtraSpellId is not a number" end + return val, nil + end, + + --- Specific to subevents prefixed by: + --- |Prefix| + --- |-----| + --- |RANGE| + --- |SWING| + --- |SPELL| + --- |SPELL_PERIODIC| + --- |SPELL_BUILDING| + --- + --- And suffixed by: + --- |Suffix| + --- |------| + --- |_DISPEL| + --- |_STOLEN| + --- |_AURA_APPLIED| + --- |_AURA_REMOVED| + --- |_AURA_APPLIED_DOSE| + --- |_AURA_REMOVED_DOSE| + --- |_AURA_REFRESH| + --- |_AURA_BROKEN| + --- |_AURA_BROKEN_SPELL| + ---@param ... any + ---@return number, nil|string + GetExtraAuraType = function(...) + local subevent, err = CLEUParser.GetSubevent(...) + if err then return 0, string.format("Failed getting subevent due to: %s", err) end + local val = select(CLEUEventInfo[subevent]["auraType"], ...) + if val == nil then return 0, "AuraType is nil or missing" end + if type(val) ~= "number" then return 0, "AuraType is not a number" end + return val, nil + end, +} \ No newline at end of file