Skip to content

Commit

Permalink
Fixed spellid issue when parsing combat log
Browse files Browse the repository at this point in the history
  • Loading branch information
LeftHandedGlove committed Aug 30, 2019
1 parent dd27246 commit dd0919c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions WeaponSwingTimer_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ addon_data.core.MissHandler = function(unit, miss_type, is_offhand)
end

addon_data.core.SpellHandler = function(unit, spell_id)
--print(spell_id)
local _, player_class, _ = UnitClass('player')
for class, spell_table in pairs(swing_reset_spells) do
if player_class == class then
Expand Down
3 changes: 2 additions & 1 deletion WeaponSwingTimer_Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ addon_data.player.OnInventoryChange = function()
end

addon_data.player.OnCombatLogUnfiltered = function(combat_info)
local _, event, _, source_guid, _, _, _, dest_guid, _, _, _, spell_id, spell_name, _ = unpack(combat_info)
local _, event, _, source_guid, _, _, _, dest_guid, _, _, _, _, spell_name, _ = unpack(combat_info)
if (source_guid == addon_data.player.guid) then
if (event == "SWING_DAMAGE") then
local _, _, _, _, _, _, _, _, _, is_offhand = select(12, unpack(combat_info))
Expand All @@ -134,6 +134,7 @@ addon_data.player.OnCombatLogUnfiltered = function(combat_info)
local miss_type, is_offhand = select(12, unpack(combat_info))
addon_data.core.MissHandler("player", miss_type, is_offhand)
elseif (event == "SPELL_DAMAGE") or (event == "SPELL_MISSED") then
local _, _, _, _, _, _, spell_id = GetSpellInfo(spell_name)
addon_data.core.SpellHandler("player", spell_id)
end
end
Expand Down
3 changes: 2 additions & 1 deletion WeaponSwingTimer_Target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ addon_data.target.OnUpdate = function(elapsed)
end

addon_data.target.OnCombatLogUnfiltered = function(combat_info)
local _, event, _, source_guid, _, _, _, dest_guid, _, _, _, spell_id, spell_name, _ = unpack(combat_info)
local _, event, _, source_guid, _, _, _, dest_guid, _, _, _, _, spell_name, _ = unpack(combat_info)
if (source_guid == addon_data.target.guid) then
if (event == "SWING_DAMAGE") then
local _, _, _, _, _, _, _, _, _, is_offhand = select(12, unpack(combat_info))
Expand All @@ -139,6 +139,7 @@ addon_data.target.OnCombatLogUnfiltered = function(combat_info)
local miss_type, is_offhand = select(12, unpack(combat_info))
addon_data.core.MissHandler("target", miss_type, is_offhand)
elseif (event == "SPELL_DAMAGE") or (event == "SPELL_MISSED") then
local _, _, _, _, _, _, spell_id = GetSpellInfo(spell_name)
addon_data.core.SpellHandler("target", spell_id)
end
end
Expand Down

0 comments on commit dd0919c

Please sign in to comment.