Code format
This commit is contained in:
231
CLEUParser.lua
231
CLEUParser.lua
@@ -11,12 +11,12 @@ local function Init()
|
||||
["destGUID"] = 8,
|
||||
["destName"] = 9,
|
||||
["destFlags"] = 10,
|
||||
["destRaidFlags"] = 11
|
||||
["destRaidFlags"] = 11,
|
||||
},
|
||||
["GENERIC_SPELL"] = {
|
||||
["spellId"] = 12,
|
||||
["spellName"] = 13,
|
||||
["spellSchool"] = 14
|
||||
["spellSchool"] = 14,
|
||||
},
|
||||
["GENERIC_DAMAGE"] = {
|
||||
["amount"] = 15,
|
||||
@@ -28,19 +28,19 @@ local function Init()
|
||||
["critical"] = 21,
|
||||
["glancing"] = 22,
|
||||
["crushing"] = 23,
|
||||
["isOffHand"] = 24
|
||||
["isOffHand"] = 24,
|
||||
},
|
||||
["GENERIC_MISSED"] = {
|
||||
["missType"] = 15,
|
||||
["isOffHand"] = 16,
|
||||
["amountMissed"] = 17,
|
||||
["critical"] = 18
|
||||
["critical"] = 18,
|
||||
},
|
||||
["GENERIC_HEAL"] = {
|
||||
["amount"] = 15,
|
||||
["overhealing"] = 16,
|
||||
["absorbed"] = 17,
|
||||
["critical"] = 18
|
||||
["critical"] = 18,
|
||||
},
|
||||
["GENERIC_HEAL_ABSORBED"] = {
|
||||
["extraGUID"] = 15,
|
||||
@@ -51,44 +51,44 @@ local function Init()
|
||||
["extraSpellName"] = 20,
|
||||
["extraSchool"] = 21,
|
||||
["absorbedAmount"] = 22,
|
||||
["totalAmount"] = 23
|
||||
["totalAmount"] = 23,
|
||||
},
|
||||
["GENERIC_ENERGIZE"] = {
|
||||
["amount"] = 15,
|
||||
["overEnergize"] = 16,
|
||||
["powerType"] = 17
|
||||
["powerType"] = 17,
|
||||
},
|
||||
["GENERIC_DRAIN"] = {
|
||||
["amount"] = 15,
|
||||
["powerType"] = 16,
|
||||
["extraAmount"] = 17
|
||||
["extraAmount"] = 17,
|
||||
},
|
||||
["GENERIC_LEECH"] = {
|
||||
["amount"] = 15,
|
||||
["powerType"] = 16,
|
||||
["extraAmount"] = 17
|
||||
["extraAmount"] = 17,
|
||||
},
|
||||
["GENERIC_INTERRUPT"] = {
|
||||
["extraSpellId"] = 15,
|
||||
["extraSpellName"] = 16,
|
||||
["extraSchool"] = 17
|
||||
["extraSchool"] = 17,
|
||||
},
|
||||
["GENERIC_DISPEL"] = {
|
||||
["extraSpellId"] = 15,
|
||||
["extraSpellName"] = 16,
|
||||
["extraSchool"] = 17,
|
||||
["auraType"] = 18
|
||||
["auraType"] = 18,
|
||||
},
|
||||
["GENERIC_DISPEL_FAILED"] = {
|
||||
["extraSpellId"] = 15,
|
||||
["extraSpellName"] = 16,
|
||||
["extraSchool"] = 17
|
||||
["extraSchool"] = 17,
|
||||
},
|
||||
["GENERIC_STOLEN"] = {
|
||||
["extraSpellId"] = 15,
|
||||
["extraSpellName"] = 16,
|
||||
["extraSchool"] = 17,
|
||||
["auraType"] = 18
|
||||
["auraType"] = 18,
|
||||
},
|
||||
["GENERIC_EXTRA_ATTACKS"] = { ["amount"] = 15 },
|
||||
["GENERIC_AURA_APPLIED"] = { ["auraType"] = 15, ["amount"] = 16 },
|
||||
@@ -101,38 +101,32 @@ local function Init()
|
||||
["extraSpellId"] = 15,
|
||||
["extraSpellName"] = 16,
|
||||
["extraSchool"] = 17,
|
||||
["auraType"] = 18
|
||||
["auraType"] = 18,
|
||||
},
|
||||
["GENERIC_CAST_START"] = {},
|
||||
["GENERIC_CAST_SUCCESS"] = {},
|
||||
["GENERIC_CAST_FAILED"] = {}
|
||||
["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_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_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"]
|
||||
CLEUEventInfo["SWING_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"]
|
||||
CLEUEventInfo["SWING_EXTRA_ATTACKS"] =
|
||||
CLEUEventInfo["GENERIC_EXTRA_ATTACKS"]
|
||||
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_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_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"]
|
||||
@@ -140,28 +134,22 @@ local function Init()
|
||||
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_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_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"]
|
||||
CLEUEventInfo["RANGE_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"]
|
||||
CLEUEventInfo["RANGE_EXTRA_ATTACKS"] =
|
||||
CLEUEventInfo["GENERIC_EXTRA_ATTACKS"]
|
||||
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_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_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"]
|
||||
@@ -169,28 +157,22 @@ local function Init()
|
||||
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_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_DISPEL_FAILED"] = CLEUEventInfo["GENERIC_DISPEL_FAILED"]
|
||||
CLEUEventInfo["SPELL_STOLEN"] = CLEUEventInfo["GENERIC_STOLEN"]
|
||||
CLEUEventInfo["SPELL_EXTRA_ATTACKS"] =
|
||||
CLEUEventInfo["GENERIC_EXTRA_ATTACKS"]
|
||||
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_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_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"]
|
||||
@@ -198,39 +180,25 @@ local function Init()
|
||||
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_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_INTERRUPT"] = CLEUEventInfo["GENERIC_INTERRUPT"]
|
||||
CLEUEventInfo["SPELL_PERIODIC_DISPEL"] = CLEUEventInfo["GENERIC_DISPEL"]
|
||||
CLEUEventInfo["SPELL_PERIODIC_DISPEL_FAILED"] =
|
||||
CLEUEventInfo["GENERIC_DISPEL_FAILED"]
|
||||
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"]
|
||||
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 = {
|
||||
@@ -378,7 +346,9 @@ local function Init()
|
||||
---@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 val == nil then
|
||||
return 0, "SpellId is nil or missing"
|
||||
end
|
||||
if type(val) ~= "number" then
|
||||
return 0, "SpellId is not a number"
|
||||
end
|
||||
@@ -413,8 +383,7 @@ local function Init()
|
||||
---@param ... any
|
||||
---@return number, nil|string
|
||||
GetSpellSchool = function(...)
|
||||
local val = select(CLEUEventInfo["GENERIC_SPELL"]["spellSchool"],
|
||||
...)
|
||||
local val = select(CLEUEventInfo["GENERIC_SPELL"]["spellSchool"], ...)
|
||||
if val == nil then
|
||||
return 0, "SpellSchool is nil or missing"
|
||||
end
|
||||
@@ -451,11 +420,12 @@ local function Init()
|
||||
GetAmount = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
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 val == nil then
|
||||
return 0, "Amount is nil or missing"
|
||||
end
|
||||
if type(val) ~= "number" then
|
||||
return 0, "Amount is not a number"
|
||||
end
|
||||
@@ -479,8 +449,7 @@ local function Init()
|
||||
GetOverkill = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
if not CLEUEventInfo[subevent] then
|
||||
return 0, "Subevent is not a valid event"
|
||||
@@ -489,7 +458,9 @@ local function Init()
|
||||
return 0, "Overkill is nil or missing"
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["overkill"], ...)
|
||||
if val == nil then return 0, "Overkill is nil or missing" end
|
||||
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
|
||||
@@ -513,11 +484,12 @@ local function Init()
|
||||
GetSchool = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
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 val == nil then
|
||||
return 0, "School is nil or missing"
|
||||
end
|
||||
if type(val) ~= "number" then
|
||||
return 0, "School is not a number"
|
||||
end
|
||||
@@ -543,8 +515,7 @@ local function Init()
|
||||
GetResisted = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["resisted"], ...)
|
||||
if val == nil then
|
||||
@@ -575,8 +546,7 @@ local function Init()
|
||||
GetBlocked = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["blocked"], ...)
|
||||
if val == nil then
|
||||
@@ -608,8 +578,7 @@ local function Init()
|
||||
GetAbsorbed = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["absorbed"], ...)
|
||||
if val == nil then
|
||||
@@ -640,8 +609,7 @@ local function Init()
|
||||
GetCritical = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["critical"], ...)
|
||||
if val == nil then
|
||||
@@ -670,8 +638,7 @@ local function Init()
|
||||
GetGlancing = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["glancing"], ...)
|
||||
if val == nil then
|
||||
@@ -700,8 +667,7 @@ local function Init()
|
||||
GetCrushing = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["crushing"], ...)
|
||||
if val == nil then
|
||||
@@ -731,8 +697,7 @@ local function Init()
|
||||
GetIsOffHand = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return false,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return false, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["isOffHand"], ...)
|
||||
if val == nil then
|
||||
@@ -764,8 +729,7 @@ local function Init()
|
||||
GetMissType = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return "",
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return "", string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["missType"], ...)
|
||||
if val == nil then
|
||||
@@ -797,8 +761,7 @@ local function Init()
|
||||
GetAmountMissed = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["amountMissed"], ...)
|
||||
if val == nil then
|
||||
@@ -830,8 +793,7 @@ local function Init()
|
||||
GetOverhealing = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["overhealing"], ...)
|
||||
if val == nil then
|
||||
@@ -861,8 +823,7 @@ local function Init()
|
||||
GetExtraGUID = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return "",
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return "", string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraGUID"], ...)
|
||||
if val == nil then
|
||||
@@ -892,8 +853,7 @@ local function Init()
|
||||
GetExtraName = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return "",
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return "", string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraName"], ...)
|
||||
if val == nil then
|
||||
@@ -923,8 +883,7 @@ local function Init()
|
||||
GetExtraFlags = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraFlags"], ...)
|
||||
if val == nil then
|
||||
@@ -954,8 +913,7 @@ local function Init()
|
||||
GetExtraRaidFlags = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraRaidFlags"], ...)
|
||||
if val == nil then
|
||||
@@ -989,8 +947,7 @@ local function Init()
|
||||
GetExtraSpellID = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraSpellID"], ...)
|
||||
if val == nil then
|
||||
@@ -1025,8 +982,7 @@ local function Init()
|
||||
GetExtraSpellName = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return "",
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return "", string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraSpellName"], ...)
|
||||
if val == nil then
|
||||
@@ -1061,8 +1017,7 @@ local function Init()
|
||||
GetExtraSchool = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraSchool"], ...)
|
||||
if val == nil then
|
||||
@@ -1092,8 +1047,7 @@ local function Init()
|
||||
GetAbsorbedAmount = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["absorbedAmount"], ...)
|
||||
if val == nil then
|
||||
@@ -1123,8 +1077,7 @@ local function Init()
|
||||
GetOverEnergize = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["overEnergize"], ...)
|
||||
if val == nil then
|
||||
@@ -1158,8 +1111,7 @@ local function Init()
|
||||
GetPowerType = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["powerType"], ...)
|
||||
if val == nil then
|
||||
@@ -1190,8 +1142,7 @@ local function Init()
|
||||
GetExtraAmount = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraAmount"], ...)
|
||||
if val == nil then
|
||||
@@ -1229,8 +1180,7 @@ local function Init()
|
||||
GetExtraSpellId = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
return 0, string.format("Failed getting subevent due to: %s", err)
|
||||
end
|
||||
local val = select(CLEUEventInfo[subevent]["extraSpellId"], ...)
|
||||
if val == nil then
|
||||
@@ -1268,16 +1218,17 @@ local function Init()
|
||||
GetExtraAuraType = function(...)
|
||||
local subevent, err = CLEUParser.GetSubevent(...)
|
||||
if err then
|
||||
return 0,
|
||||
string.format("Failed getting subevent due to: %s", err)
|
||||
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 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
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -1288,4 +1239,4 @@ frame:RegisterEvent("GUILD_ROSTER_UPDATE")
|
||||
frame:SetScript("OnEvent", function(self, event, ...)
|
||||
Init()
|
||||
end)
|
||||
Init()
|
||||
Init()
|
||||
|
Reference in New Issue
Block a user