After taking a look I would suggest:
Lua Code:
local orgShowContextMenu = SharedChatSystem.ShowPlayerContextMenu
function SharedChatSystem.ShowPlayerContextMenu(...)
local orgClearMenu = ClearMenu
local orgShowMenu = ShowMenu
if not ZO_Dialogs_IsShowingDialog() then
local chat, playerName, rawName = ...
function ClearMenu(...)
ClearMenu = orgClearMenu
ClearMenu(...)
-- Here: Insert items before
end
function ShowMenu(...)
ShowMenu = orgShowMenu
-- Here: Append items
return ShowMenu(...)
end
end
return orgShowContextMenu(...)
end
But without warranty