Quantcast
ESOUI - View Single Post - Is there Event for jump request?
View Single Post
07/09/20, 12:23 AM   #6
andy.s
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 10
There are actually several ways to achieve that, but the most simple one is:

Lua Code:
  1. local org = ZO_PlayerToPlayer.AddPromptToIncomingQueue
  2. function ZO_PlayerToPlayer.AddPromptToIncomingQueue(self, interactType, characterName, displayName, targetLabel, acceptCallback, declineCallback, deferDecisionCallback)
  3.     if interactType == 19 then
  4.         return {}
  5.     else
  6.         return org(self, interactType, characterName, displayName, targetLabel, acceptCallback, declineCallback, deferDecisionCallback)
  7.     end
  8. end
  9.  
  10. --ZO_PreHook(ZO_PlayerToPlayer, 'AddPromptToIncomingQueue', function(self, interactType)
  11.     --if interactType == 19 then return true end
  12. --end)

I commented ZO_PreHook, because it will produce lua error, since zos code doesn't check if the prompt was added and will just try to access nil value. Also INTERACT_TYPE_TRAVEL_TO_LEADER = 19 is a local variable, so have to use a raw value... But it does its job
  Reply With Quote