Try to change the function code to this, like siri wrote (first param = self). Could be that my exmaple would not work properly as my first param was the interactType but it actually fileld with the values of "self" instead and thus the check on interactType == INTERACT_TYPE_TRAVEL_TO_LEADER was actually if self == INTERACT_TYPE_TRAVEL_TO_LEADER and thus never was met.
Code:
ZO_PreHook(PLAYER_TO_PLAYER, "AddPromptToIncomingQueue", function(self, interactType)
if interactType == INTERACT_TYPE_TRAVEL_TO_LEADER then
return true
end
end)
Yeah the decline callback function is local but it's code is this:
Lua Code:
local function DeclineCallback()
self:RemoveFromIncomingQueue(INTERACT_TYPE_TRAVEL_TO_LEADER)
end
So if the first code example above did not work you can try this:
Code:
ZO_PreHook(PLAYER_TO_PLAYER, "AddPromptToIncomingQueue", function(self, interactType)
d("interactType: " .. tostring(interactType)) --just a chat debug line to see if interact type is a number (correct) or a table/userdata (wrong)
if interactType == INTERACT_TYPE_TRAVEL_TO_LEADER then
self:RemoveFromIncomingQueue(INTERACT_TYPE_TRAVEL_TO_LEADER) --if self is not working try PLAYER_TO_PLAYER::RemoveFromIncomingQueue(INTERACT_TYPE_TRAVEL_TO_LEADER)
return true
end
end)