View Single Post
08/23/23, 12:58 PM   #52
Toirealach
AddOn Author - Click to view addons
Join Date: Sep 2020
Posts: 30
Suppressing redundant PvP Kill Feed events

Originally Posted by ZOS_DanBatson View Post
Note about the trigger twice thing:

"The client will raise two consecutive kill events...

To safeguard against this, ChatHandlers.lua creates a singleton:
Code:
g_pvpKillFeedDeathRecurrenceTracker = ZO_RecurrenceTracker:New(EXPIRATION_MS, EXTENSION_MS)
which suppresses the redundant message, if any, when received:
Code:
local numOccurrences = g_pvpKillFeedDeathRecurrenceTracker:AddValue(messageKey)
if numOccurrences > 1 then
    -- Suppress redundant notifications that would otherwise result
    -- from duplicate client- and server-sourced death events.
    return nil
end
"
Dan, in looking at your code in chat handlers, is your fall off time 10 seconds there?

So if a killer kills the same victim twice within 10 seconds that only one death notice is posted?

I'm asking because I have definitely killed someone in Cyrodiil that just put down a camp and they take the camp immediately and I kill them a second time in less than ten seconds.

In this case is only one death notice posted?

If so, you might want to consider cutting that fall off time in half to 5 seconds.
  Reply With Quote