View Single Post
06/20/23, 07:28 PM   #9
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
Another, probably simpler option would be to simply overwrite the actual fast travel functions.
FastTravelToNode = ZO_PreHook(_G, "FastTravelToNode" , function() return shouldBlockTravel end )
TravelToKeep = ZO_PreHook(_G, "FastTravelToNode" , function() return shouldBlockTravel end )


Maybe add some output informing the user that your addon blocked the travel. Other potential target functions would be JumpToSpecificHouse, JumpToHouse, RequestJumpToHouse.


This would additionally disable using the map to port to wayshrines. If you instead block interaction with wayshrines, the user would still be able to teleport using the map, which may or may not be desired functionality.

Another difference is that interacting with a wayshrine with this would still open up the map, they'd just be unable to actually port anywhere.
  Reply With Quote