MeleeVictoryDialogBJ
- Parameters
-
whichPlayer player
leftGame boolean
- comment
- bug
Leaks handle
t
: In Jass you must set local variables that hold agents (or any child type) tonull
at the end of functions to avoid reference counter leaks.- bug
Leaks handle
d
: In Jass you must set local variables that hold agents (or any child type) tonull
at the end of functions to avoid reference counter leaks.- patch
1.00
- Source
- Blizzard.j
- return type
nothing
- Source code
function MeleeVictoryDialogBJ takes player whichPlayer, boolean leftGame returns nothing local trigger t = CreateTrigger() local dialog d = DialogCreate() local string formatString // Display "player was victorious" or "player has left the game" message if (leftGame) then set formatString = GetLocalizedString( "PLAYER_LEFT_GAME" ) else set formatString = GetLocalizedString( "PLAYER_VICTORIOUS" ) endif call DisplayTimedTextFromPlayer(whichPlayer, 0, 0, 60, formatString) call DialogSetMessage( d, GetLocalizedString( "GAMEOVER_VICTORY_MSG" ) ) call DialogAddButton( d, GetLocalizedString( "GAMEOVER_CONTINUE_GAME" ), GetLocalizedHotkey("GAMEOVER_CONTINUE_GAME") ) set t = CreateTrigger() call TriggerRegisterDialogButtonEvent( t, DialogAddQuitButton( d, true, GetLocalizedString( "GAMEOVER_QUIT_GAME" ), GetLocalizedHotkey("GAMEOVER_QUIT_GAME") ) ) call DialogDisplay( whichPlayer, d, true ) call StartSoundForPlayerBJ( whichPlayer, bj_victoryDialogSound ) endfunction