View Single Post
06/22/23, 10:41 AM   #10
Anumaril
 
Anumaril's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 14
Originally Posted by Dolgubon View Post
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 )
This ended up being a much more elegant solution than what I was trying to do before, and also makes it easy to disable fast travel to houses, etc. Thanks so much!

For anyone reading this in the future and thinking of doing the same, I had to alter the above lines to look like:

ZO_PreHook(_G, "FastTravelToNode", function(nodeIndex, ignoreCost)
ZO_PreHook(_G, "TravelToKeep", function(keepId, ignoreCost)
ZO_PreHook(_G, "RequestJumpToHouse", function(houseId)

Thanks everyone for your help, you guys a great
  Reply With Quote