Skip to content

Commit

Permalink
Fixing last commit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 17, 2024
1 parent 5aac0bd commit a4560af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -790,18 +790,18 @@ Details222.Parser.EventFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
Details222.Parser.EventFrame:SetScript("OnEvent", function(self, event, ...)
local instanceName, isntanceType = GetInstanceInfo()

if (isntanceType == "pvp" or isntanceType == "arena") then
Details222.parser_frame:SetScript("OnEvent", Details222.Parser.OnParserEventPVP)
return
end

if (isntanceType ~= "none") then
if (Details222.parser_frame:GetScript("OnEvent") ~= Details222.Parser.OnParserEvent) then
Details222.parser_frame:SetScript("OnEvent", Details222.Parser.OnParserEvent)
end
return
end

if (isntanceType == "pvp" or isntanceType == "arena") then
Details222.parser_frame:SetScript("OnEvent", Details222.Parser.OnParserEventPVP)
return
end

if (event == "PLAYER_ENTERING_WORLD" or event == "ZONE_CHANGED_NEW_AREA") then
if (bConsiderGroupMembers) then
--check if any group member is in combat
Expand Down
24 changes: 12 additions & 12 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6648,29 +6648,29 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end

function Details222.Parser.OnParserEventPVP()
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
local time, token, hidding, sourceGUID, sourceName, sourceFlags, sourceFlags2, targetGUID, targetName, targetFlags, targetFlags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
local func = token_list[token]

if (func) then
if (group_roster_name_cache[who_serial]) then
who_name = group_roster_name_cache[who_serial]
if (group_roster_name_cache[sourceGUID]) then
sourceName = group_roster_name_cache[sourceGUID]
else
if (who_serial:match("^Pl")) then
who_name = who_name:gsub("-%a+$", "")
group_roster_name_cache[who_serial] = who_name
if (sourceGUID:match("^Pl")) then
sourceName = sourceName:gsub("-%a+$", "")
group_roster_name_cache[sourceGUID] = sourceName
end
end

if (group_roster_name_cache[target_serial]) then
target_name = group_roster_name_cache[target_serial]
if (group_roster_name_cache[targetGUID]) then
targetName = group_roster_name_cache[targetGUID]
else
if (target_serial:match("^Pl")) then
target_name = target_name:gsub("-%a+$", "")
group_roster_name_cache[target_serial] = target_name
if (targetGUID:match("^Pl")) then
targetName = targetName:gsub("-%a+$", "")
group_roster_name_cache[targetGUID] = targetName
end
end

return func(nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
return func(nil, token, time, sourceGUID, sourceName, sourceFlags, targetGUID, targetName, targetFlags, targetFlags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
end
end

Expand Down

0 comments on commit a4560af

Please sign in to comment.