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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
local COUNTDOWN_TIMER_START_MS = 5000
local COUNTDOWN_TIMER_END_BATTLEGROUND_MS = ZO_ONE_MINUTE_IN_MILLISECONDS
--------------------
--Battleground HUD Fragment
--------------------
end
control : RegisterForEvent ( EVENT_BATTLEGROUND_RULESET_CHANGED , function ( ) self : OnBattlegroundRulesetChanged ( ) end )
end
do
local KEYBOARD_STYLE =
{
hudTemplate = "ZO_BattlegroundHudTopLevel_Keyboard" ,
keybindButtonTemplate = "ZO_KeybindButton_Keyboard_Template" ,
}
local GAMEPAD_STYLE =
{
hudTemplate = "ZO_BattlegroundHudTopLevel_Gamepad" ,
keybindButtonTemplate = "ZO_KeybindButton_Gamepad_Template" ,
}
self . platformStyle = ZO_PlatformStyle : New ( function ( style ) self : ApplyPlatformStyle ( style ) end , KEYBOARD_STYLE , GAMEPAD_STYLE )
end
end
end
end
end
if currentBattlegroundId ~= 0 then
else
end
end
return ZO_FormatTime ( zo_ceil ( self . currentBattlegroundTimeMS / 1000 ) , TIME_FORMAT_STYLE_COLONS , TIME_FORMAT_PRECISION_SECONDS , TIME_FORMAT_DIRECTION_DESCENDING )
end
do
local PRE_SHUTDOWN_WARNING_TIME_MS = 10000
if battlegroundState == BATTLEGROUND_STATE_PREGAME then
if self . currentBattlegroundTimeMS <= PRE_SHUTDOWN_WARNING_TIME_MS and previousBattlegroundTimeMS > PRE_SHUTDOWN_WARNING_TIME_MS then
local shutdownImminentMessage = zo_strformat ( SI_BATTLEGROUND_SHUTDOWN_IMMINENT , PRE_SHUTDOWN_WARNING_TIME_S )
end
elseif battlegroundState == BATTLEGROUND_STATE_STARTING then
if previousBattlegroundTimeMS > COUNTDOWN_TIMER_START_MS then
local messageParams = CENTER_SCREEN_ANNOUNCE : CreateMessageParams ( CSA_CATEGORY_COUNTDOWN_TEXT , SOUNDS . BATTLEGROUND_COUNTDOWN_FINISH )
messageParams : SetIconData ( GetCountdownBattlegroundAllianceSymbolIcon ( GetUnitBattlegroundAlliance ( "player" ) ) )
end
else
local gameTypeString = GetString ( "SI_BATTLEGROUNDGAMETYPE" , GetBattlegroundGameType ( GetCurrentBattlegroundId ( ) ) )
end
end
elseif battlegroundState == BATTLEGROUND_STATE_RUNNING then
local gameTypeString = GetString ( "SI_BATTLEGROUNDGAMETYPE" , GetBattlegroundGameType ( GetCurrentBattlegroundId ( ) ) )
if self . currentBattlegroundTimeMS <= COUNTDOWN_TIMER_END_BATTLEGROUND_MS and previousBattlegroundTimeMS > COUNTDOWN_TIMER_END_BATTLEGROUND_MS then
local messageParams = CENTER_SCREEN_ANNOUNCE : CreateMessageParams ( CSA_CATEGORY_MAJOR_TEXT , SOUNDS . BATTLEGROUND_ONE_MINUTE_WARNING )
end
end
if previousShutdownTimerMS >= PRE_SHUTDOWN_WARNING_TIME_MS and self . shutdownTimerMS < PRE_SHUTDOWN_WARNING_TIME_MS then
local shutdownImminentMessage = zo_strformat ( SI_BATTLEGROUND_SHUTDOWN_IMMINENT , PRE_SHUTDOWN_WARNING_TIME_S )
end
end
elseif battlegroundState == BATTLEGROUND_STATE_FINISHED then
end
end
else
end
end
end
end
--[[ xml functions ]] --
end |