internalingame/tribute/tribute.lua:50 -- TRIBUTE_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
self:RefreshInputModeFragments()
KEYBIND_STRIP:RemoveDefaultExit()
self:SetupGame()
--The UI cannot be toggled while a tribute match is ongoing, so make sure it isn't hidden when we start
if GetGuiHidden("internal_ingame") then
SetGuiHidden("internal_ingame", false)
end
elseif newState == SCENE_HIDING then
ZO_TRIBUTE_PATRON_SELECTION_MANAGER:EndPatronSelection()
ZO_TRIBUTE_PILE_VIEWER_MANAGER:SetViewingPile(nil)
ZO_Dialogs_ReleaseAllDialogsOfName("CONFIRM_CONCEDE_TRIBUTE")
ZO_Dialogs_ReleaseAllDialogsOfName("GAMEPAD_TRIBUTE_OPTIONS")
ZO_Dialogs_ReleaseAllDialogsOfName("KEYBOARD_TRIBUTE_OPTIONS")
if self.beginEndOfGameFanfareEventId then
zo_removeCallLater(self.beginEndOfGameFanfareEventId)
self.beginEndOfGameFanfareEventId = nil
end
self:ResetResourceTooltip()
self:ResetPatronUsageTooltip()
self:ResetDiscardCounters()
self:ResetCardPopupAndTooltip(ANY_ACTIVE_CARD)
self:RefreshInputState()
KEYBIND_STRIP:RestoreDefaultExit()
elseif newState == SCENE_HIDDEN then
self.gamepadCursor:Reset()
self:ResetPatrons()
self.gameFlowState = TRIBUTE_GAME_FLOW_STATE_INACTIVE
if self.showVictoryTutorial then
self.showVictoryTutorial = false
TUTORIAL_MANAGER:ShowTutorial(TUTORIAL_TRIGGER_TRIBUTE_PVP_VICTORY)
end
end
end)