ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Request: lightweight addon to Hide fast travel confirm dialog (https://www.esoui.com/forums/showthread.php?t=10737)

snowfl 11/15/23 08:12 AM

Request: lightweight addon to Hide fast travel confirm dialog
 
There are lots of addons have this function but all of them are bloaty and alters too many in game functions. Looking for a simple addon to hide fast travel confirm dialog.

Thanks





Tired this and it didn't work

Code:

function TravelAutoConfirm()
                ESO_Dialogs["RECALL_CONFIRM"]={
                        gamepadInfo={dialogType=GAMEPAD_DIALOGS.BASIC},
                        title={text=SI_PROMPT_TITLE_FAST_TRAVEL_CONFIRM},
                        mainText={text=SI_FAST_TRAVEL_DIALOG_MAIN_TEXT},
                        updateFn=function(dialog)
                                        FastTravelToNode(dialog.data.nodeIndex)
                                        SCENE_MANAGER:ShowBaseScene()
                                        ZO_Dialogs_ReleaseDialog("RECALL_CONFIRM")
                        end
                }
                ESO_Dialogs["FAST_TRAVEL_CONFIRM"]={
                        gamepadInfo={dialogType=GAMEPAD_DIALOGS.BASIC},
                        title={text=SI_PROMPT_TITLE_FAST_TRAVEL_CONFIRM},
                        mainText={text=SI_FAST_TRAVEL_DIALOG_MAIN_TEXT},
                        updateFn=function(dialog)
                                        FastTravelToNode(dialog.data.nodeIndex)
                                        ZO_Dialogs_ReleaseDialog("FAST_TRAVEL_CONFIRM")
                        end
                }
end

2nd code

Code:

ZO_PreHook(
        "ZO_Dialogs_ShowDialog",
        function(dialogName)
                if dialogName == "RECALL_CONFIRM" then
                        RECALL()
                        return true
                elseif dialogName == "FAST_TRAVEL_CONFIRM" then
                        FASTTRAVEL()
                        return true
                end
        end
)


sirinsidiator 11/15/23 10:09 AM

Your second attempt is almost correct, but the game uses ZO_Dialogs_ShowPlatformDialog instead of ZO_Dialogs_ShowDialog for these two.

Lua Code:
  1. ZO_PreHook(
  2.     "ZO_Dialogs_ShowPlatformDialog",
  3.     function(dialogName, data)
  4.         if dialogName == "RECALL_CONFIRM" or dialogName == "FAST_TRAVEL_CONFIRM" then
  5.             FastTravelToNode(data.nodeIndex)
  6.             return true
  7.         end
  8.     end
  9. )

snowfl 11/15/23 03:34 PM

Nice, thanks so much for the help :)


All times are GMT -6. The time now is 02:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI