forked from shagu/ShaguDPS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser-tbc.lua
More file actions
37 lines (31 loc) · 1.21 KB
/
Copy pathparser-tbc.lua
File metadata and controls
37 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local parser = ShaguDPS.parser
local function hit(_, _, _, source, _, _, target, _, damage, school)
parser:AddData(source, "Auto Hit", target, damage, school, "damage")
end
local function spell(_, _, _, source, _, _, target, _, _, attack, _, damage, school)
parser:AddData(source, attack, target, damage, school, "damage")
end
local function other(_, _, _, source, _, _, target, _, attack, damage, _, school)
parser:AddData(source, attack, target, damage, school, "damage")
end
local function heal(_, _, _, source, _, _, target, _, _, spell, _, value)
parser:AddData(source, spell, target, value, nil, "heal")
end
local datasources = {
["SWING_DAMAGE"] = hit,
["SPELL_DAMAGE"] = spell,
["RANGE_DAMAGE"] = spell,
["DAMAGE_SHIELD"] = spell,
["DAMAGE_SPLIT"] = spell,
["SPELL_PERIODIC_DAMAGE"] = spell,
["ENVIRONMENTAL_DAMAGE"] = other,
["SPELL_HEAL"] = heal,
["SPELL_PERIODIC_HEAL"] = heal,
}
parser:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
parser:SetScript("OnEvent", function(event)
if not arg2 then return end
if datasources[arg2] then
datasources[arg2](arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13)
end
end)