|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
ZO_STUCK_NAME = "Stuck"end -- this is a check for bringing up a dialog after /reloadui and still being stuck end end -- keep the same active system for cancel / complete, as we don't want to orphan dialogs from a different platform end end -- use SYSTEMS for the errors, as PC handles them within the chat event handler, and gamepad handles them with dialogs that can be closed -- using the active system here causes a bunch of issues if the user runs gamepad unstuck -> PC unstuck, as PC stuck doesn't run through the stuck manager end end end end EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_PLAYER_ACTIVATED, function() OnPlayerActivated() end) EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_STUCK_CANCELED, function() OnStuckCanceled() end) EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_STUCK_COMPLETE, function() OnStuckComplete() end) EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_STUCK_ERROR_ALREADY_IN_PROGRESS, function() OnStuckErrorAlreadyInProgress() end) EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_STUCK_ERROR_INVALID_LOCATION, function() OnStuckErrorInvalidLocation() end) EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_STUCK_ERROR_IN_COMBAT, function() OnStuckErrorInCombat() end) EVENT_MANAGER:RegisterForEvent(ZO_STUCK_NAME, EVENT_STUCK_ERROR_ON_COOLDOWN, function() OnStuckErrorOnCooldown() end)endend |