include "TriggerLibs/NativeLib"
include "TriggerLibs/HeroesLib_h"
include "TriggerLibs/GameLib_h"
include "TriggerLibs/MapMechanicsLib_h"
include "TriggerLibs/AILib_h"
include "TriggerLibs/StartingExperienceLib_h"
include "TriggerLibs/SoundLib_h"
include "TriggerLibs/GameDataHelperLib_h"
include "TriggerLibs/SupportLib_h"

include "TriggerLibs/UILib_h"

//--------------------------------------------------------------------------------------------------
// Library: UI
//--------------------------------------------------------------------------------------------------
// External Library Initialization
void libUIUI_InitLibraries () {
    libNtve_InitVariables();
    libCore_InitVariables();
    libGame_InitVariables();
    libMapM_InitVariables();
    libAIAI_InitVariables();
    libStEx_InitVariables();
    libSond_InitVariables();
    libGDHL_InitVariables();
    libSprt_InitVariables();
}

// Variable Initialization
bool libUIUI_InitVariables_completed = false;

void libUIUI_InitVariables () {
    int init_i;
    int init_j;
    int init_i1;
    int init_j1;
    int init_k1;

    if (libUIUI_InitVariables_completed) {
        return;
    }

    libUIUI_InitVariables_completed = true;

    libUIUI_gv_uITimeLabelUpdateTimer = TimerCreate();
    libUIUI_gv_uIDamageFlashUI.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_uIDamageFlashUI.lv_lightSplashImage = c_invalidDialogControlId;
    libUIUI_gv_uIDamageFlashUI.lv_intenseSplashImage = c_invalidDialogControlId;
    libUIUI_gv_uIDamageFlashUI.lv_lowHealthPersistentImage = c_invalidDialogControlId;
    libUIUI_gv_uIDamageFlashLowHPThreshold = 30.0;
    libUIUI_gv_uIDeathActionCamPanel.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_uIDeathActionCamPanel.lv_previousAllyButton = c_invalidDialogControlId;
    libUIUI_gv_uIDeathActionCamPanel.lv_nextAllyButton = c_invalidDialogControlId;
    libUIUI_gv_uIDeathActionCamPanel.lv_deathActionCamCheckbox = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_DebuffPanelBarColor1_C = Color(100.00, 6.67, 6.67);
    libUIUI_gv_deathRecap_DebuffPanelBarColor2_C = Color(100.00, 66.67, 6.67);
    libUIUI_gv_deathRecap_Panel.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_closeButton = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_openButton = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffsPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffsTimelineBar = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_DebuffCategoryCount_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_debuffsCategoryLabels[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_deathRecap_Panel.lv_damageTakenPanel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageTakenBars_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarImages[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageTakenBars_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageTakenBars_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarNameLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageTakenBars_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarBorderFrames[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageTakenBars_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarAmountLabels[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_deathRecap_Panel.lv_damageTakenSummaryLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_blankDetailsPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeaderLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsTimelineBar = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsEndTimeLabel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDebuffDetailsAbilities_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityDebuffLabels[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoIcon = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoNameLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoAmountLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoTooltipLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoPortraitImage = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoNameLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoPlayerNameLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoDescriptionLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsClickForMoreInfoLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsPanel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageDetailsAbilities_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarImages[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageDetailsAbilities_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageDetailsAbilities_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarNameLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageDetailsAbilities_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarBorderFrames[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libGame_gv_deathRecap_MaxDamageDetailsAbilities_C; init_i1 += 1) {
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarAmountLabels[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoIcon = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoCountLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoNameLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoAmountLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoTooltipLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPanel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPortraitImage = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoNameLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPlayerNameLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoDescriptionLabel = c_invalidDialogControlId;
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsClickForMoreInfoLabel = c_invalidDialogControlId;
    for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
        for (init_j = 0; init_j <= libGame_gv_deathRecap_MaxDebuffBars_C; init_j += 1) {
            libUIUI_gv_deathRecap_DebuffBars[init_i][init_j] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_deathTimerPanel.lv_mainPanel[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_deathTimerPanel.lv_timerBar[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFramePortraitImage[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_deathTimerPanel.lv_announcementPanel[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameNameLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameKillersLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFramePortraitImage[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameBorderImageFaded[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameBorderImageBright[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameCrossImage[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
        libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[init_i] = TimerCreate();
    }
    for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
        libUIUI_gv_deathAnnouncement_TopMostHeroFrame[init_i] = 1;
    }
    for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
        libUIUI_gv_deathAnnouncement_NextHeroFrameToUse[init_i] = 1;
    }
    libUIUI_gv_uIDebugPanelForcedMinionWaveCompIndex = 1;
    libUIUI_gv_uIDebugPanel.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_closeButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_refreshCooldownsButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_startGameButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_spawnCreepCampsButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompCheckbox = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_respecHeroButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_playerLabel = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_playerSlider = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_levelLabel = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_levelSlider = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_useCurrentXPCheckbox = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_spawnHeroButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_allHeroesCheckbox = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_allTalentsCheckbox = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_heroDropdown = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_skinDropdown = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_mountDropdown = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_announcerDropdown = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_metaXPEditBox = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_metaXPSendButton = c_invalidDialogControlId;
    libUIUI_gv_uIDebugPanel.lv_xPLabel = c_invalidDialogControlId;
    libUIUI_gv_encouragement_Panel.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_encouragement_Panel.lv_closeButton = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libUIUI_gv_encouragement_MaxNumberOfStatCalloutsDisplayed_C; init_i1 += 1) {
        libUIUI_gv_encouragement_Panel.lv_statCalloutLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libUIUI_gv_encouragement_MaxNumberOfDeathTipsDisplayed_C; init_i1 += 1) {
        libUIUI_gv_encouragement_Panel.lv_deathTipLabels[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_fullscreenOverlaysPanel.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_fullscreenOverlaysPanel.lv_cCSplashImage = c_invalidDialogControlId;
    libUIUI_gv_fullscreenOverlaysPanel.lv_flashBangImage = c_invalidDialogControlId;
    libUIUI_gv_fullscreenOverlaysPanel.lv_abathurSymbioteOverlay = c_invalidDialogControlId;
    libUIUI_gv_fullscreenOverlaysPanel.lv_deathOverlay = c_invalidDialogControlId;
    libUIUI_gv_gameOverSplash.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_gameOverSplash.lv_victoryFrame = c_invalidDialogControlId;
    libUIUI_gv_gameOverSplash.lv_defeatFrame = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_fullscreenUpperContainer = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_consoleUIContainer = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_consolePanel = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_talentsButton = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_gameMenuButton = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_minimapPanel = c_invalidDialogControlId;
    libUIUI_gv_uIGameUIHandles.lv_gameUIContainer = c_invalidDialogControlId;
    for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
        for (init_j = 0; init_j <= libUIUI_gv_uI_HealingFountainsHelpText_ArraySize_C; init_j += 1) {
            libUIUI_gv_uIHealingFountainsHelpText[init_i][init_j].lv_textTag = c_textTagNone;
        }
    }
    for (init_i = 0; init_i <= libUIUI_gv_helpButtonMaxCount_C; init_i += 1) {
        libUIUI_gv_helpButtonFrames[init_i] = c_invalidDialogControlId;
    }
    for (init_i = 0; init_i <= libUIUI_gv_helpButtonMaxCount_C; init_i += 1) {
        libUIUI_gv_helpButtonLabels[init_i] = c_invalidDialogControlId;
    }
    libUIUI_gv_uIHeroConsole.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_buffDebuffPanel = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_heroStatsFrame = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_heroStatsUnitStatusFrame = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_heroStatsHealthBar = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_heroStatsManaBar = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_gameUIPortrait = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_gameUICommandPanel = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_gameUICommandCardPanelFrame = c_invalidDialogControlId;
    libUIUI_gv_uIHeroConsole.lv_gameUIInventoryPanel = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarTimeLabel = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_castChannelBarParentFrame = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarParentFrame = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarDurationBar = c_invalidDialogControlId;
    libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarBehaviorLabel = c_invalidDialogControlId;
    libUIUI_gv_uIHeroSpecificStatusFrame.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_uIHeroSpecificStatusFrame.lv_mechanicIcon = c_invalidDialogControlId;
    for (init_i = 0; init_i <= libCore_gv_bALMaxPlayers; init_i += 1) {
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_playerNameLabel = c_invalidDialogControlId;
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_heroNameLabel = c_invalidDialogControlId;
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_botDifficultyLabel = c_invalidDialogControlId;
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_botStatusLabel = c_invalidDialogControlId;
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_mapMechanicFrame = c_invalidDialogControlId;
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_mapMechanicIcon = c_invalidDialogControlId;
        libUIUI_gv_uIHeroStatusFrames[init_i].lv_mapMechanicCount = c_invalidDialogControlId;
    }
    libUIUI_gv_uIHeroTrackerArrow.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_uIHeroTrackerArrow.lv_arrow = c_invalidDialogControlId;
    libUIUI_gv_uIHeroTrackerArrow.lv_portraitImage = c_invalidDialogControlId;
    libUIUI_gv_uILeaderboard.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_uILeaderboard.lv_timeLabel = c_invalidDialogControlId;
    libUIUI_gv_uILeaderboard.lv_timeLabelHours = c_invalidDialogControlId;
    libUIUI_gv_uILeaderboard.lv_timeLabelMinutes = c_invalidDialogControlId;
    libUIUI_gv_uILeaderboard.lv_timeLabelSeconds = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_teamXPLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_teamLevelLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_teamMapMechanicLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_xPSortingButton[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_takedownSortingButton[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_deathsSortingButton[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uILeaderboard.lv_mapMechanicSortingButton[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_portrait[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_playerName[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_heroName[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_playerOwnerBackground[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_playerXPLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_deathCountdownLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_heroicAbilityLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_soloKillsLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_takedownsLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_deathsLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_mapMechanicBackground[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_mapMechanicIcon[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            for (init_k1 = 0; init_k1 <= 6; init_k1 += 1) {
                libUIUI_gv_uILeaderboard.lv_talentsBackground[init_i1][init_j1][init_k1] = c_invalidDialogControlId;
            }
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            for (init_k1 = 0; init_k1 <= libCore_gv_talentsBucket_MaxTiers_C; init_k1 += 1) {
                libUIUI_gv_uILeaderboard.lv_talentsIcon[init_i1][init_j1][init_k1] = c_invalidDialogControlId;
            }
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_bALMaxPlayersOnATeam; init_j1 += 1) {
            for (init_k1 = 0; init_k1 <= 6; init_k1 += 1) {
                libUIUI_gv_uILeaderboard.lv_talentsLabel[init_i1][init_j1][init_k1] = c_invalidDialogControlId;
            }
        }
    }
    libUIUI_gv_mapMechanicsPanel.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtPanel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeFrame[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeCounterLabel[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseFrame = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseInfoLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseTimerLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayPanel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonModeFrame = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonCounterLabel[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonModeFrame = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonRemainingCannonballsLabel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonCannonballImage[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesPanel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeFrame = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeSkullCounterLabel[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerModeFrame = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesGolemModeFrame = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesAllyGolemHealthUnitStatus = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesEnemyGolemHealthUnitStatus = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesAllyGolemModeSkullCounterLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesEnemyGolemModeSkullCounterLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShirePanel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerModeFrame = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineModeFrame = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineDisabledImage[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineDisabledImage[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonModeFrame = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonInfoLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonTimerLabel = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthUnitStatus = c_invalidDialogControlId;
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthLabel = c_invalidDialogControlId;
    libUIUI_gv_uINotificationDisplay.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_uINotificationDisplay.lv_flashFrame = c_invalidDialogControlId;
    libUIUI_gv_uIObserverUI.lv_mainPanel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayers; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_heroPanels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayers; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_heroPortraitImages[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayers; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_heroIconBorders[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayers; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_heroTargetFrames[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayers; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_heroStatusBars[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayers; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_heroDeathTimeLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_teamKillsLabel[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_teamLevelLabel[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_uIObserverUI.lv_teamTownsLabel[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_talents_ButtonInactive_C = Color(20.00, 20.00, 20.00);
    libUIUI_gv_talents_ButtonLitUp_C = Color(100.00, 100.00, 100.00);
    libUIUI_gv_talents_ProfileColor_C = Color(41.18, 78.43, 88.24);
    libUIUI_gv_talents_Panel.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_heroImage = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_closeButton = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_heroNameLabel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_talentsBucket_MaxTiers_C; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_talentsBucket_MaxTalentsPerTier_C; init_j1 += 1) {
            libUIUI_gv_talents_Panel.lv_talentFrames[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talentsBucket_MaxTiers_C; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_talentsBucket_MaxTalentsPerTier_C; init_j1 += 1) {
            libUIUI_gv_talents_Panel.lv_talentButtons[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talentsBucket_MaxTiers_C; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_talentsBucket_MaxTalentsPerTier_C; init_j1 += 1) {
            libUIUI_gv_talents_Panel.lv_talentIcons[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talentsBucket_MaxTiers_C; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_talentsBucket_MaxTalentsPerTier_C; init_j1 += 1) {
            libUIUI_gv_talents_Panel.lv_talentSelectedImages[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talentsBucket_MaxTiers_C; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_talentsBucket_MaxTalentsPerTier_C; init_j1 += 1) {
            libUIUI_gv_talents_Panel.lv_talentGlowImages[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talentsBucket_MaxTiers_C; init_i1 += 1) {
        libUIUI_gv_talents_Panel.lv_tierLevels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxTalentsPerHero_C; init_i1 += 1) {
        for (init_j1 = 0; init_j1 <= libCore_gv_talentsBucket_MaxTalentsPerTier_C; init_j1 += 1) {
            libUIUI_gv_talents_Panel.lv_talentTooltipLabels[init_i1][init_j1] = c_invalidDialogControlId;
        }
    }
    libUIUI_gv_talents_Panel.lv_heroLevelLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_attackDamageLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_attackSpeedLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_damagePerSecondLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_healthLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_healthRegenLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_shieldLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_abilityPowerLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_resourceTitle = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_resourceLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_resourceRegenTitle = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_resourceRegenLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_cooldownReductionLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_movementSpeedLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_Panel.lv_committedPointsValueLabel = c_invalidDialogControlId;
    libUIUI_gv_talents_ABChoicePanelBaseHeight_C = 250;
    libUIUI_gv_talents_ABChoicePanelButtonHeight_C = 74;
    libUIUI_gv_talents_ABChoicePanel.lv_mainDialog = c_invalidDialogControlId;
    libUIUI_gv_talents_ABChoicePanel.lv_headerLabel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C; init_i1 += 1) {
        libUIUI_gv_talents_ABChoicePanel.lv_talentFrames[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C; init_i1 += 1) {
        libUIUI_gv_talents_ABChoicePanel.lv_talentButtons[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C; init_i1 += 1) {
        libUIUI_gv_talents_ABChoicePanel.lv_talentIcons[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C; init_i1 += 1) {
        libUIUI_gv_talents_ABChoicePanel.lv_talentDescriptionLabels[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C; init_i1 += 1) {
        libUIUI_gv_talents_ABChoicePanel.lv_tooltipLabel[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_uITargetInfoPanel.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_unitName = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_playerName = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_level = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_portraitImage = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_unitTargetFrame = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_mapMechanicIcon = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_mapMechanicLabel = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_descriptionLabel = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_cursedBuildingIcon = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_healthAndManaUnitStatusStatusFrame = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_healthOnlyUnitStatusStatusFrame = c_invalidDialogControlId;
    libUIUI_gv_uITargetInfoPanel.lv_towerWithAmmoUnitStatusStatusFrame = c_invalidDialogControlId;
    libUIUI_gv_uITargetingHelperPanel.lv_mainPanel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayersOnATeam; init_i1 += 1) {
        libUIUI_gv_uITargetingHelperPanel.lv_heroFrames[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayersOnATeam; init_i1 += 1) {
        libUIUI_gv_uITargetingHelperPanel.lv_heroIcons[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayersOnATeam; init_i1 += 1) {
        libUIUI_gv_uITargetingHelperPanel.lv_heroBorderImages[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayersOnATeam; init_i1 += 1) {
        libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxPlayersOnATeam; init_i1 += 1) {
        libUIUI_gv_uITargetingHelperPanel.lv_heroStatusFrames[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_topBarPanel.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_topBarPanel.lv_gameTimerLabel = c_invalidDialogControlId;
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_xPBackgroundBlue[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_xPBackgroundRed[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_xPUnitStatusFrame[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_xPVeterancyBar[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_levelLabel[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_levelUpLabel[init_i1] = c_invalidDialogControlId;
    }
    for (init_i1 = 0; init_i1 <= libCore_gv_bALMaxTeams; init_i1 += 1) {
        libUIUI_gv_topBarPanel.lv_coreHealthUnitStatusFrames[init_i1] = c_invalidDialogControlId;
    }
    libUIUI_gv_topBarPanel.lv_coreHealthLabel = c_invalidDialogControlId;
    libUIUI_gv_tryMeModePanel.lv_mainPanel = c_invalidDialogControlId;
    libUIUI_gv_tryMeModePanel.lv_toggleMinionsButton = c_invalidDialogControlId;
    libUIUI_gv_tryMeModePanel.lv_refreshFortsButton = c_invalidDialogControlId;
    libUIUI_gv_tryMeModePanel.lv_levelUpButton = c_invalidDialogControlId;
    libUIUI_gv_tryMeModePanel.lv_resetLevelButton = c_invalidDialogControlId;
    libUIUI_gv_tryMeModePanel.lv_clearCooldownsButton = c_invalidDialogControlId;
    libUIUI_gv_tutorialReferencePanel = c_invalidDialogControlId;
    for (init_i = 0; init_i <= libUIUI_gv_tutorialReferenceCount_Max; init_i += 1) {
        libUIUI_gv_tutorialReferenceLabels[init_i] = c_invalidDialogControlId;
    }
}

// Functions
void libUIUI_gf_UISetDialogItemToSelectedOrObserved (int lp_dialogItem) {
    // Implementation
    DialogControlSetObservedType(lp_dialogItem, c_triggerObservedTypeSelectedOrObservedPlayerId);
    DialogControlSetVisible(lp_dialogItem, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
    DialogControlSetVisible(lp_dialogItem, libCore_gv_nPCPlayers, false);
}

trigger auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_Trigger = null;
int auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_lp_player;

void libUIUI_gf_UIUpdateEventPlayerStatsChange (int lp_player) {
    auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_lp_player = lp_player;

    if (auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_Trigger == null) {
        auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_Trigger = TriggerCreate("auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_TriggerFunc");
    }

    TriggerExecute(auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_Trigger, false, false);
}

bool auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_TriggerFunc (bool testConds, bool runActions) {
    int lp_player = auto_libUIUI_gf_UIUpdateEventPlayerStatsChange_lp_player;

    // Variable Declarations
    int lv_itPlayer;
    unit lv_heroUnit;
    int lv_currentLevel;

    // Variable Initialization

    // Implementation
    if (((lp_player < 1) || (lp_player > libCore_gv_bALMaxPlayers))) {
        return true;
    }
    else {
    }
    lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
    Wait(0.1875, c_timeGame);
    lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
    libUIUI_gf_TalentsBucketUpdateHeroInfoStatsForPlayer(lp_player);
    libGame_gf_UpdateHeroWeaponStats(lv_heroUnit);
    return true;
}

void libUIUI_gf_UIUpdateTimeLabels () {
    // Variable Declarations
    text lv_timeLabelText;

    // Variable Initialization

    // Implementation
    if ((TimerGetRemaining(libGame_gv_openTheGatesTimer) > 0.0)) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_60CC3C9D", "A", StringToText(StringSub(libCore_gf_GetTimeStamp(TimerGetRemaining(libGame_gv_openTheGatesTimer)), 1, 5)));
        lv_timeLabelText = TextExpressionAssemble("Param/Expression/lib_UIUI_60CC3C9D");
    }
    else {
        lv_timeLabelText = StringToText(StringSub(libCore_gf_GetTimeStamp(TimerGetElapsed(libGame_gv_gameTimer)), 1, 5));
    }
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_timeLabel, lv_timeLabelText, PlayerGroupAll());
    libNtve_gf_SetDialogItemText(libUIUI_gv_topBarPanel.lv_gameTimerLabel, lv_timeLabelText, PlayerGroupAll());
    TimerStart(libUIUI_gv_uITimeLabelUpdateTimer, 1.0, false, c_timeGame);
}

void libUIUI_gf_UIDamageFlashStartLowHPSoundAndScreenEffects (int lp_player) {
    // Implementation
    if ((libGame_gv_players[lp_player].lv_lowHPSoundPlaying == false)) {
        DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_lowHealthPersistentImage, libCore_gv_playerGroupFromPlayer[EventPlayer()], 0.0, 50.0);
        libGame_gv_players[lp_player].lv_lowHPSoundPlaying = true;
        TriggerEnable(libUIUI_gt_UIDamageFlashLowHPSoundsLooper, true);
        if ((libGame_gv_players[lp_player].lv_lowHPStartSound == null)) {
            SoundPlayForPlayer(SoundLink("UI_LowHealth_Warning_Start", -1), lp_player, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, 0.0);
            libGame_gv_players[lp_player].lv_lowHPStartSound = SoundLastPlayed();
        }
        else {
        }
        if ((libGame_gv_players[lp_player].lv_lowHPBreathLoop == null)) {
            SoundPlayForPlayer(SoundLink("UI_LowHealthWarning_Breath_Loop", -1), lp_player, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, 0.0);
            libGame_gv_players[lp_player].lv_lowHPBreathLoop = SoundLastPlayed();
        }
        else {
        }
        if ((libGame_gv_players[lp_player].lv_lowHPHeartBeatLoop == null)) {
            SoundPlayForPlayer(SoundLink("UI_LowHealthWarning_HeartBeat_Loop", -1), lp_player, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, 0.0);
            libGame_gv_players[lp_player].lv_lowHPHeartBeatLoop = SoundLastPlayed();
        }
        else {
        }
    }
    else {
    }
}

void libUIUI_gf_UIDamageFlashStopLowHPSoundAndScreenEffects (int lp_player) {
    // Implementation
    libGame_gv_players[lp_player].lv_lowHPSoundPlaying = false;
    DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_lowHealthPersistentImage, libCore_gv_playerGroupFromPlayer[lp_player], 0.625, 100.0);
    if ((libGame_gv_players[lp_player].lv_lowHPStartSound != null)) {
        SoundStop(libGame_gv_players[lp_player].lv_lowHPStartSound, true);
        libGame_gv_players[lp_player].lv_lowHPStartSound = null;
    }
    else {
    }
    if ((libGame_gv_players[lp_player].lv_lowHPBreathLoop != null)) {
        SoundStop(libGame_gv_players[lp_player].lv_lowHPBreathLoop, true);
        libGame_gv_players[lp_player].lv_lowHPBreathLoop = null;
    }
    else {
    }
    if ((libGame_gv_players[lp_player].lv_lowHPHeartBeatLoop != null)) {
        SoundStop(libGame_gv_players[lp_player].lv_lowHPHeartBeatLoop, true);
        libGame_gv_players[lp_player].lv_lowHPHeartBeatLoop = null;
    }
    else {
    }
}

void libUIUI_gf_UILowHPSetSoundChannelsForLowHealth (int lp_player) {
    // Implementation
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryAlert, 0.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryAmbient, 25.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryBuild, 25.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryCombat, 60.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryDeath, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryDialogue, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryDoodad, 25.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryFlames, 25.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryFoley, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryGather, 25.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryME, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMission, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMovement, 35.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMovie, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMusic, 80.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryOther, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryReady, 25.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySAmbient, 70.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySEmitters, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySPieces, 70.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySpell, 60.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryTV, 100.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryUI, 70.0, 2.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryVoice, 100.0, 2.0);
}

void libUIUI_gf_UILowHPSetSoundChannelsForSilence (int lp_player) {
    // Implementation
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryAlert, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryAmbient, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryBuild, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryCombat, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryDeath, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryDialogue, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryDoodad, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryFlames, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryFoley, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryGather, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryME, 100.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMission, 100.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMovement, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMovie, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryMusic, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryOther, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryReady, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySAmbient, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySEmitters, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySPieces, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategorySpell, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryTV, 30.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryUI, 100.0, 1.0);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryVoice, 30.0, 1.0);
}

void libUIUI_gf_UILowHPSetSoundChannelsForNormal (int lp_player) {
    // Implementation
    libNtve_gf_SetAllSoundChannelVolumes(2, PlayerGroupSingle(lp_player), 1.5);
    SoundChannelSetVolume(PlayerGroupSingle(lp_player), c_soundCategoryVoice, 100.0, 1.0);
}

void libUIUI_gf_UIDeathActionCamPanelShowHidePanelForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
}

void libUIUI_gf_UIDeathActionCamPanelToggleDeathActionCamForPlayer (int lp_player) {
    // Implementation
    libGame_gv_players[lp_player].lv_bankData.lv_settingDeathActionCam = !(libGame_gv_players[lp_player].lv_bankData.lv_settingDeathActionCam);
    BankValueSetFromFlag(libGame_gv_players[lp_player].lv_bankData.lv_bank, "Settings", "DeathActionCam", libGame_gv_players[lp_player].lv_bankData.lv_settingDeathActionCam);
    BankSave(libGame_gv_players[lp_player].lv_bankData.lv_bank);
    if ((libGame_gv_players[lp_player].lv_bankData.lv_settingDeathActionCam == true)) {
        libGame_gf_CameraTrackNextAliveAllyForPlayer(lp_player);
        DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_previousAllyButton, libCore_gv_playerGroupFromPlayer[lp_player], true);
        DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_nextAllyButton, libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    else {
        libGame_gv_players[lp_player].lv_cameraAllyPlayerToTrack = 0;
        DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_previousAllyButton, libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_nextAllyButton, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    libGame_gf_CameraUpdateCameraForPlayer(lp_player);
}

void libUIUI_gf_DeathRecapShowHideForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_DeathRecapShowHideButtonForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_openButton, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_DeathRecapCreateDebuffBarForPlayer (int lp_line, fixed lp_startTime, fixed lp_duration, int lp_player) {
    // Variable Declarations
    int lv_barWidth;
    int lv_xOffset;
    int lv_yOffset;
    color lv_color;

    // Variable Initialization
    lv_color = Color(0,0,0);

    // Implementation
    lv_barWidth = FixedToInt((lp_duration * libUIUI_gv_deathRecap_DebuffPanelTimelinePixelWidth_C / libUIUI_gv_deathRecap_DebuffPanelTimeFrame_C));
    lv_xOffset = FixedToInt((libUIUI_gv_deathRecap_DebuffPanelTimelinePixelWidth_C / libUIUI_gv_deathRecap_DebuffPanelTimeFrame_C * lp_startTime * -1));
    lv_yOffset = ((lp_line * libUIUI_gv_deathRecap_DebuffPanelBarSpacing_C + (lp_line - 1) * libUIUI_gv_deathRecap_DebuffPanelBarHeight_C) * -1);
    if ((ModI(lp_line, 2) == 1)) {
        lv_color = libUIUI_gv_deathRecap_DebuffPanelBarColor1_C;
    }
    else {
        lv_color = libUIUI_gv_deathRecap_DebuffPanelBarColor2_C;
    }
    DialogControlCreateInPanelFromTemplate(libUIUI_gv_deathRecap_Panel.lv_debuffsPanel, c_triggerControlTypeImage, "DeathRecapPanel/DebuffBarTemplate");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetSize(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[lp_player], lv_barWidth, libUIUI_gv_deathRecap_DebuffPanelBarHeight_C);
    DialogControlSetPositionRelative(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[lp_player], c_anchorBottomRight, libUIUI_gv_deathRecap_Panel.lv_debuffsTimelineBar, c_anchorTopRight, lv_xOffset, lv_yOffset);
    libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), lv_color, libCore_gv_playerGroupFromPlayer[lp_player]);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[lp_player], true);
    libUIUI_gv_deathRecap_DebuffBarCount[lp_player] += 1;
    libUIUI_gv_deathRecap_DebuffBars[lp_player][libUIUI_gv_deathRecap_DebuffBarCount[lp_player]] = DialogControlLastCreated();
}

void libUIUI_gf_DeathRecapClearDebuffBarsForPlayer (int lp_player) {
    int auto4DC78A85_ae;
    int auto4DC78A85_ai;

    // Variable Declarations
    int lv_itDebuffBar;

    // Variable Initialization

    // Implementation
    auto4DC78A85_ae = libUIUI_gv_deathRecap_DebuffBarCount[lp_player];
    auto4DC78A85_ai = 1;
    lv_itDebuffBar = 1;
    for ( ; ( (auto4DC78A85_ai >= 0 && lv_itDebuffBar <= auto4DC78A85_ae) || (auto4DC78A85_ai <= 0 && lv_itDebuffBar >= auto4DC78A85_ae) ) ; lv_itDebuffBar += auto4DC78A85_ai ) {
        DialogControlDestroy(libUIUI_gv_deathRecap_DebuffBars[lp_player][lv_itDebuffBar]);
    }
    libUIUI_gv_deathRecap_DebuffBarCount[lp_player] = 0;
}

void libUIUI_gf_DeathRecapPopulateMainPanelsForPlayer (int lp_deadPlayer, int lp_deathIndex) {
    int auto7E8EDEF0_ae;
    int auto7E8EDEF0_ai;
    int autoCAF723E4_ae;
    int autoCAF723E4_ai;

    // Variable Declarations
    int lv_itDamageBar;
    int lv_damageBarCount;
    int lv_totalDamage;
    int lv_barIndex;

    // Variable Initialization

    // Implementation
    libUIUI_gv_deathRecap_CurrentDeathIndex[lp_deadPlayer] = lp_deathIndex;
    lv_damageBarCount = libGame_gv_deathRecap_DeathData[lp_deadPlayer][lp_deathIndex].lv_damageTakenBarCount;
    lv_totalDamage = libGame_gv_deathRecap_DeathData[lp_deadPlayer][lp_deathIndex].lv_totalDamageTaken;
    auto7E8EDEF0_ae = lv_damageBarCount;
    auto7E8EDEF0_ai = 1;
    lv_itDamageBar = 1;
    for ( ; ( (auto7E8EDEF0_ai >= 0 && lv_itDamageBar <= auto7E8EDEF0_ae) || (auto7E8EDEF0_ai <= 0 && lv_itDamageBar >= auto7E8EDEF0_ae) ) ; lv_itDamageBar += auto7E8EDEF0_ai ) {
        lv_barIndex = libGame_gv_deathRecap_DeathData[lp_deadPlayer][lp_deathIndex].lv_damageTakenBarSortOrder[lv_itDamageBar];
        DialogControlSetSize(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarImages[lv_itDamageBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], libUIUI_gv_deathRecap_DamageTakenPanelBarWidth_C, (libUIUI_gv_deathRecap_DamageTakenPanelTotalBarHeight_C * libGame_gv_deathRecap_DeathData[lp_deadPlayer][lp_deathIndex].lv_damageTakenBars[lv_barIndex].lv_amount / lv_totalDamage));
        libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarNameLabels[lv_itDamageBar], libCore_gv_dataHeroesHeroData[libGame_gv_deathRecap_DeathData[lp_deadPlayer][lp_deathIndex].lv_damageTakenBars[lv_barIndex].lv_heroIndex].lv_name, libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarAmountLabels[lv_itDamageBar], FormatNumber(libGame_gv_deathRecap_DeathData[lp_deadPlayer][lp_deathIndex].lv_damageTakenBars[lv_barIndex].lv_amount), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarImages[lv_itDamageBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarAmountLabels[lv_itDamageBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
    }
    autoCAF723E4_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    autoCAF723E4_ai = 1;
    lv_itDamageBar = (lv_damageBarCount + 1);
    for ( ; ( (autoCAF723E4_ai >= 0 && lv_itDamageBar <= autoCAF723E4_ae) || (autoCAF723E4_ai <= 0 && lv_itDamageBar >= autoCAF723E4_ae) ) ; lv_itDamageBar += autoCAF723E4_ai ) {
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarImages[lv_itDamageBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarAmountLabels[lv_itDamageBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    }
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_debuffDetailsPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_blankDetailsPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
    libUIUI_gf_DeathRecapShowHideButtonForPlayer(true, lp_deadPlayer);
}

void libUIUI_gf_DeathRecapPopulateDamageDetailsPanelForPlayer (int lp_deadPlayer, int lp_damageBarIndex) {
    int auto6B356446_ae;
    int auto6B356446_ai;
    int auto3BF5E4DA_ae;
    int auto3BF5E4DA_ai;

    // Variable Declarations
    int lv_itAbilityBar;
    int lv_deathIndex;
    int lv_abilityBarCount;
    int lv_totalDamage;
    int lv_barIndex;

    // Variable Initialization

    // Implementation
    libUIUI_gv_deathRecap_CurrentDamageTakenBarIndex[lp_deadPlayer] = lp_damageBarIndex;
    lv_deathIndex = libUIUI_gv_deathRecap_CurrentDeathIndex[lp_deadPlayer];
    lv_abilityBarCount = libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lp_damageBarIndex].lv_numberOfAbilities;
    lv_totalDamage = libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lp_damageBarIndex].lv_amount;
    auto6B356446_ae = lv_abilityBarCount;
    auto6B356446_ai = 1;
    lv_itAbilityBar = 1;
    for ( ; ( (auto6B356446_ai >= 0 && lv_itAbilityBar <= auto6B356446_ae) || (auto6B356446_ai <= 0 && lv_itAbilityBar >= auto6B356446_ae) ) ; lv_itAbilityBar += auto6B356446_ai ) {
        lv_barIndex = libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lp_damageBarIndex].lv_abilitySortOrder[lv_itAbilityBar];
        DialogControlSetSize(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarImages[lv_itAbilityBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], libUIUI_gv_deathRecap_DamageDetailsPanelBarWidth_C, (libUIUI_gv_deathRecap_DamageDetailsPanelTotalBarHeight_C * libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lp_damageBarIndex].lv_abilityAmounts[lv_barIndex] / lv_totalDamage));
        libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarNameLabels[lv_itAbilityBar], StringExternal(("Abil/Name/" + (libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lp_damageBarIndex].lv_abilityLinks[lv_barIndex]))), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarAmountLabels[lv_itAbilityBar], FormatNumber(libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lp_damageBarIndex].lv_abilityAmounts[lv_barIndex]), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarImages[lv_itAbilityBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarAmountLabels[lv_itAbilityBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
    }
    auto3BF5E4DA_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    auto3BF5E4DA_ai = 1;
    lv_itAbilityBar = (lv_abilityBarCount + 1);
    for ( ; ( (auto3BF5E4DA_ai >= 0 && lv_itAbilityBar <= auto3BF5E4DA_ae) || (auto3BF5E4DA_ai <= 0 && lv_itAbilityBar >= auto3BF5E4DA_ae) ) ; lv_itAbilityBar += auto3BF5E4DA_ai ) {
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarImages[lv_itAbilityBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
        DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarAmountLabels[lv_itAbilityBar], libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    }
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsClickForMoreInfoLabel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_debuffDetailsPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_blankDetailsPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
}

void libUIUI_gf_DeathRecapPopulateDamageDetailsAbilityInfoForPlayer (int lp_deadPlayer, int lp_abilityBarIndex) {
    // Variable Declarations
    int lv_deathIndex;
    int lv_damageTakenBarIndex;
    string lv_abilityLink;
    string lv_abilityButton;

    // Variable Initialization
    lv_abilityLink = "";
    lv_abilityButton = "";

    // Implementation
    lv_deathIndex = libUIUI_gv_deathRecap_CurrentDeathIndex[lp_deadPlayer];
    lv_damageTakenBarIndex = libUIUI_gv_deathRecap_CurrentDamageTakenBarIndex[lp_deadPlayer];
    lv_abilityLink = (libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lv_damageTakenBarIndex].lv_abilityLinks[lp_abilityBarIndex]);
    if ((lv_abilityLink == ("attack"))) {
        lv_abilityButton = ("AutoAttack");
    }
    else {
        lv_abilityButton = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilityLink, "CmdButtonArray[" + IntToString(0) + "].DefaultButtonFace", c_playerAny);
    }
    libNtve_gf_SetDialogItemImage(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoIcon, (CatalogFieldValueGet(c_gameCatalogButton, lv_abilityButton, "Icon", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
    TextExpressionSetToken("Param/Expression/lib_UIUI_D0428144", "A", IntToText(libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lv_damageTakenBarIndex].lv_abilityCounts[lp_abilityBarIndex]));
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoCountLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_D0428144"), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoNameLabel, StringExternal(("Abil/Name/" + lv_abilityLink)), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
    TextExpressionSetToken("Param/Expression/lib_UIUI_BA67DA5D", "A", FormatNumber(libGame_gv_deathRecap_DeathData[lp_deadPlayer][lv_deathIndex].lv_damageTakenBars[lv_damageTakenBarIndex].lv_abilityAmounts[lp_abilityBarIndex]));
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoAmountLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_BA67DA5D"), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoTooltipLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogButton, lv_abilityButton, "Tooltip", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_deadPlayer]);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsClickForMoreInfoLabel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], false);
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoPanel, libCore_gv_playerGroupFromPlayer[lp_deadPlayer], true);
}

void libUIUI_gf_DeathTimerPanelShowHideTeamsPanelForPlayer (bool lp_showHide, int lp_team, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_deathTimerPanel.lv_mainPanel[lp_team], libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

trigger auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_Trigger = null;
int auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_lp_player;
int auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_lp_killingPlayer;

void libUIUI_gf_DeathAnnouncementPanelRegisterPlayer (int lp_player, int lp_killingPlayer) {
    auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_lp_player = lp_player;
    auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_lp_killingPlayer = lp_killingPlayer;

    if (auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_Trigger == null) {
        auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_Trigger = TriggerCreate("auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_TriggerFunc");
    }

    TriggerExecute(auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_Trigger, false, false);
}

bool auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_TriggerFunc (bool testConds, bool runActions) {
    int lp_player = auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_lp_player;
    int lp_killingPlayer = auto_libUIUI_gf_DeathAnnouncementPanelRegisterPlayer_lp_killingPlayer;

    // Variable Declarations
    int lv_team;
    int lv_frameIndex;
    int lv_heroIndex;

    // Variable Initialization

    // Implementation
    if ((libGame_gv_gameOver == true)) {
        return true;
    }
    else {
    }
    if (((lp_player < 1) || (lp_player > libCore_gv_bALMaxPlayers))) {
        return true;
    }
    else {
    }
    lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
    if ((lv_team > libCore_gv_bALMaxTeams)) {
        return true;
    }
    else {
    }
    lv_frameIndex = libUIUI_gv_deathAnnouncement_NextHeroFrameToUse[lv_team];
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    while ((libUIUI_gv_deathAnnouncement_HeroFrameInUse[lv_team][lv_frameIndex] == true)) {
        Wait(0.0625, c_timeGame);
        lv_frameIndex = libUIUI_gv_deathAnnouncement_NextHeroFrameToUse[lv_team];
    }
    libUIUI_gv_deathAnnouncement_HeroFrameInUse[lv_team][lv_frameIndex] = true;
    libUIUI_gv_deathAnnouncement_PlayerAssignedToFrame[lv_team][lv_frameIndex] = lp_player;
    libNtve_gf_SetDialogItemImage(libUIUI_gv_deathTimerPanel.lv_announcementHeroFramePortraitImage[lv_team][lv_frameIndex], libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_portrait, PlayerGroupAll());
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameNameLabel[lv_team][lv_frameIndex], libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_name, PlayerGroupAll());
    if (((lp_killingPlayer <= 0) || (lp_killingPlayer > libCore_gv_bALMaxEnginePlayerCount))) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameKillersLabel[lv_team][lv_frameIndex], StringToText(""), PlayerGroupAll());
    }
    else {
        TextExpressionSetToken("Param/Expression/lib_UIUI_13F673ED", "A", libGame_gv_players[lp_killingPlayer].lv_name);
        libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameKillersLabel[lv_team][lv_frameIndex], TextExpressionAssemble("Param/Expression/lib_UIUI_13F673ED"), PlayerGroupAll());
    }
    if ((lv_frameIndex == libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lv_team])) {
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lv_team][lv_frameIndex], PlayerGroupAll(), "TransitionInTopmost");
    }
    else {
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lv_team][lv_frameIndex], PlayerGroupAll(), "TransitionIn");
    }
    if ((TimerGetRemaining(libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[lv_team]) <= 0.0)) {
        TimerStart(libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[lv_team], libUIUI_gv_deathTimerPanel_AnnouncementVisibleDuration_C, false, c_timeGame);
    }
    else {
    }
    libUIUI_gv_deathAnnouncement_NextHeroFrameToUse[lv_team] += 1;
    if ((libUIUI_gv_deathAnnouncement_NextHeroFrameToUse[lv_team] > libCore_gv_bALMaxPlayersOnATeam)) {
        libUIUI_gv_deathAnnouncement_NextHeroFrameToUse[lv_team] = 1;
    }
    else {
    }
    libUIUI_gv_deathAnnouncement_VisibleHeroFrameCount[lv_team] += 1;
    return true;
}

void libUIUI_gf_DeathAnnouncementPanelTransitionFrameOut (int lp_team) {
    int auto7297B3A0_ae;
    int auto7297B3A0_ai;
    int auto1A002823_ae;
    int auto1A002823_ai;

    // Variable Declarations
    int lv_itUpdateOrder;
    int lv_topmostFrame;
    int lv_topmostFramePlayer;
    int lv_frameIndex;

    // Variable Initialization

    // Implementation
    if ((libGame_gv_gameOver == true)) {
        return ;
    }
    else {
    }
    libUIUI_gv_deathAnnouncement_VisibleHeroFrameCount[lp_team] -= 1;
    lv_topmostFrame = libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lp_team];
    lv_topmostFramePlayer = libUIUI_gv_deathAnnouncement_PlayerAssignedToFrame[lp_team][lv_topmostFrame];
    DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lp_team][lv_topmostFrame], PlayerGroupAll(), "TransitionOut");
    auto7297B3A0_ae = (libCore_gv_bALMaxPlayersOnATeam - 1);
    auto7297B3A0_ai = 1;
    lv_itUpdateOrder = 1;
    for ( ; ( (auto7297B3A0_ai >= 0 && lv_itUpdateOrder <= auto7297B3A0_ae) || (auto7297B3A0_ai <= 0 && lv_itUpdateOrder >= auto7297B3A0_ae) ) ; lv_itUpdateOrder += auto7297B3A0_ai ) {
        lv_frameIndex = (lv_itUpdateOrder + libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lp_team]);
        if ((lv_frameIndex > libCore_gv_bALMaxPlayersOnATeam)) {
            lv_frameIndex = (lv_frameIndex - libCore_gv_bALMaxPlayersOnATeam);
        }
        else {
        }
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lp_team][lv_frameIndex], PlayerGroupAll(), "ShiftUp");
        if ((lv_itUpdateOrder == 1)) {
            DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lp_team][lv_frameIndex], PlayerGroupAll(), "TransitionToTop");
        }
        else {
        }
    }
    libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lp_team] += 1;
    if ((libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lp_team] > libCore_gv_bALMaxPlayersOnATeam)) {
        libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lp_team] = 1;
    }
    else {
    }
    auto1A002823_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto1A002823_ai = 1;
    lv_itUpdateOrder = 1;
    for ( ; ( (auto1A002823_ai >= 0 && lv_itUpdateOrder <= auto1A002823_ae) || (auto1A002823_ai <= 0 && lv_itUpdateOrder >= auto1A002823_ae) ) ; lv_itUpdateOrder += auto1A002823_ai ) {
        lv_frameIndex = (lv_itUpdateOrder + libUIUI_gv_deathAnnouncement_TopMostHeroFrame[lp_team] - 1);
        if ((lv_frameIndex > libCore_gv_bALMaxPlayersOnATeam)) {
            lv_frameIndex = (lv_frameIndex - libCore_gv_bALMaxPlayersOnATeam);
        }
        else {
        }
        libNtve_gf_SetDialogItemRenderPriority(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lp_team][lv_frameIndex], (libUIUI_gv_deathAnnouncement_TopFrameRenderPriority_C - (lv_itUpdateOrder - 1) * libUIUI_gv_deathAnnouncement_RenderPriorityDecrement_C), PlayerGroupAll());
    }
    libUIUI_gf_DeathTimerPanelRegisterPlayer(lv_topmostFramePlayer);
    Wait(libUIUI_gv_deathTimerPanel_AnnouncementTransitionOutDuration_C, c_timeGame);
    libUIUI_gv_deathAnnouncement_HeroFrameInUse[lp_team][lv_topmostFrame] = false;
}

int libUIUI_gf_DeathTimerPanelGetFreeFrameIndexForTeam (int lp_team) {
    int init_i;

    int auto2AF2B84D_ae;
    int auto2AF2B84D_ai;

    // Variable Declarations
    int lv_itFrameIndex;
    bool[libCore_gv_bALMaxPlayersOnATeam + 1] lv_frameIndexAvailable;

    // Variable Initialization
    for (init_i = 0; init_i <= libCore_gv_bALMaxPlayersOnATeam; init_i += 1) {
        lv_frameIndexAvailable[init_i] = true;
    }

    // Implementation
    auto2AF2B84D_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto2AF2B84D_ai = 1;
    lv_itFrameIndex = 1;
    for ( ; ( (auto2AF2B84D_ai >= 0 && lv_itFrameIndex <= auto2AF2B84D_ae) || (auto2AF2B84D_ai <= 0 && lv_itFrameIndex >= auto2AF2B84D_ae) ) ; lv_itFrameIndex += auto2AF2B84D_ai ) {
        if ((libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lv_itFrameIndex] == 0)) {
            return lv_itFrameIndex;
        }
        else {
        }
    }
    return 0;
}

int libUIUI_gf_DeathTimerPanelGetFreeGroupForTeam (int lp_team) {
    int autoF4FA6DC8_ae;
    int autoF4FA6DC8_ai;

    // Variable Declarations
    int lv_itGroup;

    // Variable Initialization

    // Implementation
    autoF4FA6DC8_ae = libCore_gv_bALMaxPlayersOnATeam;
    autoF4FA6DC8_ai = 1;
    lv_itGroup = 1;
    for ( ; ( (autoF4FA6DC8_ai >= 0 && lv_itGroup <= autoF4FA6DC8_ae) || (autoF4FA6DC8_ai <= 0 && lv_itGroup >= autoF4FA6DC8_ae) ) ; lv_itGroup += autoF4FA6DC8_ai ) {
        if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroup].lv_frameCount == 0)) {
            return lv_itGroup;
        }
        else {
        }
    }
    return 0;
}

int libUIUI_gf_DeathTimerPanelFindAppropriateGroupForFrame (int lp_team, int lp_frameIndex) {
    int auto7EFA9973_ae;
    int auto7EFA9973_ai;

    // Variable Declarations
    int lv_itGroup;
    int lv_framePlayer;
    fixed lv_deathTimeRemaining;
    fixed lv_groupDeathTimeRemaining;

    // Variable Initialization

    // Implementation
    lv_framePlayer = libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lp_frameIndex];
    lv_deathTimeRemaining = TimerGetRemaining(libGame_gv_players[lv_framePlayer].lv_respawnTimer);
    auto7EFA9973_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto7EFA9973_ai = 1;
    lv_itGroup = 1;
    for ( ; ( (auto7EFA9973_ai >= 0 && lv_itGroup <= auto7EFA9973_ae) || (auto7EFA9973_ai <= 0 && lv_itGroup >= auto7EFA9973_ae) ) ; lv_itGroup += auto7EFA9973_ai ) {
        if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroup].lv_frameCount > 0)) {
            lv_groupDeathTimeRemaining = TimerGetRemaining(libGame_gv_players[libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroup].lv_frames[1]]].lv_respawnTimer);
            if ((lv_deathTimeRemaining >= (lv_groupDeathTimeRemaining - libUIUI_gv_deathTimerPanel_GroupTimeDifferential_C)) && (lv_deathTimeRemaining <= (lv_groupDeathTimeRemaining + libUIUI_gv_deathTimerPanel_GroupTimeDifferential_C))) {
                return lv_itGroup;
            }
            else {
            }
        }
        else {
        }
    }
    return libUIUI_gf_DeathTimerPanelGetFreeGroupForTeam(lp_team);
}

int libUIUI_gf_DeathTimerPanelGetGroupOfFrame (int lp_team, int lp_frameIndex) {
    int auto65E5AFBC_ae;
    int auto65E5AFBC_ai;
    int auto5A012574_ae;
    int auto5A012574_ai;

    // Variable Declarations
    int lv_itGroup;
    int lv_itLayer;

    // Variable Initialization

    // Implementation
    auto65E5AFBC_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto65E5AFBC_ai = 1;
    lv_itGroup = 1;
    for ( ; ( (auto65E5AFBC_ai >= 0 && lv_itGroup <= auto65E5AFBC_ae) || (auto65E5AFBC_ai <= 0 && lv_itGroup >= auto65E5AFBC_ae) ) ; lv_itGroup += auto65E5AFBC_ai ) {
        auto5A012574_ae = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroup].lv_frameCount;
        auto5A012574_ai = 1;
        lv_itLayer = 1;
        for ( ; ( (auto5A012574_ai >= 0 && lv_itLayer <= auto5A012574_ae) || (auto5A012574_ai <= 0 && lv_itLayer >= auto5A012574_ae) ) ; lv_itLayer += auto5A012574_ai ) {
            if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroup].lv_frames[lv_itLayer] == lp_frameIndex)) {
                return lv_itGroup;
            }
            else {
            }
        }
    }
    return 0;
}

int libUIUI_gf_DeathTimerPanelGetLayerOfFrameInGroup (int lp_team, int lp_group, int lp_frameIndex) {
    int auto232AC876_ae;

    // Variable Declarations
    int lv_itLayer;

    // Variable Initialization

    // Implementation
    auto232AC876_ae = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount;
    lv_itLayer = 1;
    for ( ; lv_itLayer <= auto232AC876_ae ; lv_itLayer += 1 ) {
        if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[lv_itLayer] == lp_frameIndex)) {
            return lv_itLayer;
        }
        else {
        }
    }
    return 0;
}

void libUIUI_gf_DeathTimerPanelShowDeathTimeLabelForGroup (int lp_team, int lp_group) {
    int auto9A6E9E02_ae;
    int auto9A6E9E02_ai;

    // Variable Declarations
    int lv_itLayer;
    int lv_frameCount;
    int lv_frameIndex;

    // Variable Initialization

    // Implementation
    lv_frameCount = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount;
    auto9A6E9E02_ae = lv_frameCount;
    auto9A6E9E02_ai = 1;
    lv_itLayer = 1;
    for ( ; ( (auto9A6E9E02_ai >= 0 && lv_itLayer <= auto9A6E9E02_ae) || (auto9A6E9E02_ai <= 0 && lv_itLayer >= auto9A6E9E02_ae) ) ; lv_itLayer += auto9A6E9E02_ai ) {
        lv_frameIndex = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[lv_itLayer];
        if ((lv_itLayer == lv_frameCount)) {
            DialogControlSetVisible(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[lp_team][lv_frameIndex], PlayerGroupAll(), true);
        }
        else {
            DialogControlSetVisible(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[lp_team][lv_frameIndex], PlayerGroupAll(), false);
        }
    }
}

void libUIUI_gf_DeathTimerPanelSetRenderPrioritiesForGroups (int lp_team) {
    int auto183644CC_ae;
    int auto183644CC_ai;
    int autoF6C73D5D_ae;
    int autoF6C73D5D_ai;
    int autoE3BADCC2_ae;
    int autoE3BADCC2_ai;
    int autoAB777A2C_ae;
    int autoAB777A2C_ai;
    int auto0C5B01C3_ae;
    int auto0C5B01C3_ai;
    int auto74166B33_ae;
    int auto74166B33_ai;

    // Variable Declarations
    int lv_itGroupSortOrder;
    int lv_itLayer;
    int lv_itSortA;
    int lv_itSortB;
    fixed[libCore_gv_bALMaxPlayersOnATeam + 1] lv_deathTimeRemainingForGroup;
    int[libCore_gv_bALMaxPlayersOnATeam + 1] lv_groupSortOrder;
    int lv_group;
    int lv_frameIndex;
    int lv_renderPriority;

    // Variable Initialization

    // Implementation
    auto183644CC_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto183644CC_ai = 1;
    lv_itGroupSortOrder = 1;
    for ( ; ( (auto183644CC_ai >= 0 && lv_itGroupSortOrder <= auto183644CC_ae) || (auto183644CC_ai <= 0 && lv_itGroupSortOrder >= auto183644CC_ae) ) ; lv_itGroupSortOrder += auto183644CC_ai ) {
        if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroupSortOrder].lv_frameCount > 0)) {
            lv_deathTimeRemainingForGroup[lv_itGroupSortOrder] = TimerGetRemaining(libGame_gv_players[libUIUI_gv_deathAnnouncement_PlayerAssignedToFrame[lp_team][libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_itGroupSortOrder].lv_frames[1]]].lv_respawnTimer);
        }
        else {
        }
    }
    autoF6C73D5D_ae = libCore_gv_bALMaxPlayersOnATeam;
    autoF6C73D5D_ai = 1;
    lv_itGroupSortOrder = 1;
    for ( ; ( (autoF6C73D5D_ai >= 0 && lv_itGroupSortOrder <= autoF6C73D5D_ae) || (autoF6C73D5D_ai <= 0 && lv_itGroupSortOrder >= autoF6C73D5D_ae) ) ; lv_itGroupSortOrder += autoF6C73D5D_ai ) {
        lv_groupSortOrder[lv_itGroupSortOrder] = lv_itGroupSortOrder;
    }
    autoE3BADCC2_ae = 1;
    autoE3BADCC2_ai = -1;
    lv_itSortA = (libCore_gv_bALMaxPlayersOnATeam - 1);
    for ( ; ( (autoE3BADCC2_ai >= 0 && lv_itSortA <= autoE3BADCC2_ae) || (autoE3BADCC2_ai <= 0 && lv_itSortA >= autoE3BADCC2_ae) ) ; lv_itSortA += autoE3BADCC2_ai ) {
        autoAB777A2C_ae = lv_itSortA;
        autoAB777A2C_ai = 1;
        lv_itSortB = 1;
        for ( ; ( (autoAB777A2C_ai >= 0 && lv_itSortB <= autoAB777A2C_ae) || (autoAB777A2C_ai <= 0 && lv_itSortB >= autoAB777A2C_ae) ) ; lv_itSortB += autoAB777A2C_ai ) {
            if ((lv_deathTimeRemainingForGroup[lv_itSortB] > lv_deathTimeRemainingForGroup[(lv_itSortB + 1)])) {
                lv_deathTimeRemainingForGroup[0] = lv_deathTimeRemainingForGroup[lv_itSortB];
                lv_deathTimeRemainingForGroup[lv_itSortB] = lv_deathTimeRemainingForGroup[(lv_itSortB + 1)];
                lv_deathTimeRemainingForGroup[(lv_itSortB + 1)] = lv_deathTimeRemainingForGroup[0];
                lv_groupSortOrder[0] = lv_groupSortOrder[lv_itSortB];
                lv_groupSortOrder[lv_itSortB] = lv_groupSortOrder[(lv_itSortB + 1)];
                lv_groupSortOrder[(lv_itSortB + 1)] = lv_groupSortOrder[0];
            }
            else {
            }
        }
    }
    auto0C5B01C3_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto0C5B01C3_ai = 1;
    lv_itGroupSortOrder = 1;
    for ( ; ( (auto0C5B01C3_ai >= 0 && lv_itGroupSortOrder <= auto0C5B01C3_ae) || (auto0C5B01C3_ai <= 0 && lv_itGroupSortOrder >= auto0C5B01C3_ae) ) ; lv_itGroupSortOrder += auto0C5B01C3_ai ) {
        lv_group = lv_groupSortOrder[lv_itGroupSortOrder];
        auto74166B33_ae = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_group].lv_frameCount;
        auto74166B33_ai = 1;
        lv_itLayer = 1;
        for ( ; ( (auto74166B33_ai >= 0 && lv_itLayer <= auto74166B33_ae) || (auto74166B33_ai <= 0 && lv_itLayer >= auto74166B33_ae) ) ; lv_itLayer += auto74166B33_ai ) {
            lv_frameIndex = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lv_group].lv_frames[lv_itLayer];
            lv_renderPriority = (libUIUI_gv_defaultRenderPriority_C - lv_itLayer + 1 + (libCore_gv_bALMaxPlayersOnATeam - lv_itGroupSortOrder) * 10);
            libNtve_gf_SetDialogItemRenderPriority(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lv_frameIndex], lv_renderPriority, PlayerGroupAll());
            TextExpressionSetToken("Param/Expression/lib_UIUI_0AC7D801", "A", IntToText(lv_group));
            TextExpressionSetToken("Param/Expression/lib_UIUI_0AC7D801", "B", IntToText(lv_frameIndex));
            TextExpressionSetToken("Param/Expression/lib_UIUI_0AC7D801", "C", UnitTypeGetName(UnitGetType(libGame_gv_players[libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lv_frameIndex]].lv_heroUnit)));
            TextExpressionSetToken("Param/Expression/lib_UIUI_0AC7D801", "D", IntToText(lv_renderPriority));
            TextExpressionSetToken("Param/Expression/lib_UIUI_0AC7D801", "E", FixedToText(lv_deathTimeRemainingForGroup[lv_itGroupSortOrder], 2));
            TriggerDebugOutput(6, TextExpressionAssemble("Param/Expression/lib_UIUI_0AC7D801"), false);
        }
    }
}

void libUIUI_gf_DeathTimerPanelAddFrameToGroup (int lp_team, int lp_group, int lp_frameIndex) {
    int autoD312A942_ae;
    int autoD312A942_ai;

    // Variable Declarations
    int lv_itPlayer;
    int lv_layer;
    int lv_primaryFrameForGroup;
    fixed lv_deathTimeRemaining;

    // Variable Initialization

    // Implementation
    libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount += 1;
    lv_layer = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount;
    libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[lv_layer] = lp_frameIndex;
    DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], PlayerGroupAll(), "Reset");
    libUIUI_gf_DeathTimerPanelSetRenderPrioritiesForGroups(lp_team);
    autoD312A942_ae = libCore_gv_bALMaxPlayers;
    autoD312A942_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (autoD312A942_ai >= 0 && lv_itPlayer <= autoD312A942_ae) || (autoD312A942_ai <= 0 && lv_itPlayer >= autoD312A942_ae) ) ; lv_itPlayer += autoD312A942_ai ) {
        if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_slideOut[lv_itPlayer] == true)) {
            DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], libCore_gv_playerGroupFromPlayer[lv_itPlayer], ("SetLayerSlideOut" + IntToString(lv_layer)));
            DialogControlSetVisible(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[lp_team][lp_frameIndex], libCore_gv_playerGroupFromPlayer[lv_itPlayer], true);
        }
        else {
            DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], libCore_gv_playerGroupFromPlayer[lv_itPlayer], ("SetLayer" + IntToString(lv_layer)));
        }
    }
    libUIUI_gf_DeathTimerPanelShowDeathTimeLabelForGroup(lp_team, lp_group);
    lv_primaryFrameForGroup = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[1];
    lv_deathTimeRemaining = TimerGetRemaining(libGame_gv_players[libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lv_primaryFrameForGroup]].lv_respawnTimer);
    if ((lp_team == libGame_gv_teamOrderIndex_C)) {
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], PlayerGroupAll(), "BeginLeft");
        DialogControlSetAnimationTime(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], PlayerGroupAll(), "DeadTimerLeft", (libCore_gv_bALMaxDeathTime - lv_deathTimeRemaining));
    }
    else {
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], PlayerGroupAll(), "BeginRight");
        DialogControlSetAnimationTime(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], PlayerGroupAll(), "DeadTimerRight", (libCore_gv_bALMaxDeathTime - lv_deathTimeRemaining));
    }
    DialogControlSetAnimationTime(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[lp_team][lp_frameIndex], PlayerGroupAll(), "DeadTimerText", (libCore_gv_bALMaxDeathTime - lv_deathTimeRemaining));
}

void libUIUI_gf_DeathTimerPanelRemoveFrameFromGroup (int lp_team, int lp_group, int lp_frameIndex) {
    int auto4F537120_ae;
    int auto4F537120_ai;
    int auto28A8FEAC_ae;
    int auto28A8FEAC_ai;
    int autoB7D4148C_ae;
    int autoB7D4148C_ai;

    // Variable Declarations
    int lv_itPlayer;
    int lv_itLayer;
    int lv_itFrame;
    int lv_frameLayer;
    int lv_currentFrameCount;
    int lv_framesToBeAddedCount;
    int[libCore_gv_bALMaxPlayersOnATeam + 1] lv_framesToBeAdded;

    // Variable Initialization

    // Implementation
    auto4F537120_ae = libCore_gv_bALMaxPlayers;
    auto4F537120_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (auto4F537120_ai >= 0 && lv_itPlayer <= auto4F537120_ae) || (auto4F537120_ai <= 0 && lv_itPlayer >= auto4F537120_ae) ) ; lv_itPlayer += auto4F537120_ai ) {
        libUIUI_gf_DeathTimerPanelCollapseGroupForPlayer(lp_team, lp_group, lv_itPlayer);
    }
    lv_frameLayer = libUIUI_gf_DeathTimerPanelGetLayerOfFrameInGroup(lp_team, lp_group, lp_frameIndex);
    lv_currentFrameCount = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount;
    auto28A8FEAC_ae = lv_currentFrameCount;
    auto28A8FEAC_ai = 1;
    lv_itLayer = (lv_frameLayer + 1);
    for ( ; ( (auto28A8FEAC_ai >= 0 && lv_itLayer <= auto28A8FEAC_ae) || (auto28A8FEAC_ai <= 0 && lv_itLayer >= auto28A8FEAC_ae) ) ; lv_itLayer += auto28A8FEAC_ai ) {
        lv_framesToBeAddedCount += 1;
        lv_framesToBeAdded[lv_framesToBeAddedCount] = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[lv_itLayer];
    }
    libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount = (lv_frameLayer - 1);
    libUIUI_gf_DeathTimerPanelShowDeathTimeLabelForGroup(lp_team, lp_group);
    autoB7D4148C_ae = lv_framesToBeAddedCount;
    autoB7D4148C_ai = 1;
    lv_itFrame = 1;
    for ( ; ( (autoB7D4148C_ai >= 0 && lv_itFrame <= autoB7D4148C_ae) || (autoB7D4148C_ai <= 0 && lv_itFrame >= autoB7D4148C_ae) ) ; lv_itFrame += autoB7D4148C_ai ) {
        libUIUI_gf_DeathTimerPanelAddFrameToGroup(lp_team, lp_group, lv_framesToBeAdded[lv_itFrame]);
    }
}

void libUIUI_gf_DeathTimerPanelRegisterPlayer (int lp_player) {
    // Variable Declarations
    fixed lv_deathTimeRemaining;
    int lv_team;
    int lv_heroIndex;
    int lv_frameIndex;
    int lv_group;
    text lv_heroName;

    // Variable Initialization

    // Implementation
    if ((libGame_gv_gameOver == true)) {
        return ;
    }
    else {
    }
    lv_deathTimeRemaining = TimerGetRemaining(libGame_gv_players[lp_player].lv_respawnTimer);
    lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    lv_frameIndex = libUIUI_gf_DeathTimerPanelGetFreeFrameIndexForTeam(lv_team);
    libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lv_team][lv_frameIndex] = lp_player;
    lv_heroName = UnitTypeGetName(UnitGetType(libGame_gv_players[lp_player].lv_heroUnit));
    lv_group = libUIUI_gf_DeathTimerPanelFindAppropriateGroupForFrame(lv_team, lv_frameIndex);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFramePortraitImage[lv_team][lv_frameIndex], libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_portrait, PlayerGroupAll());
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[lv_team][lv_frameIndex], lv_heroName, PlayerGroupAll());
    libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[lv_team][lv_frameIndex], FixedToText(lv_deathTimeRemaining, 0), PlayerGroupAll());
    libUIUI_gf_DeathTimerPanelAddFrameToGroup(lv_team, lv_group, lv_frameIndex);
    DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lv_team][lv_frameIndex], PlayerGroupAll(), "TransitionIn");
}

void libUIUI_gf_DeathTimerPanelUnregisterPlayer (int lp_team, int lp_frameIndex) {
    // Implementation
    if ((libGame_gv_gameOver == true)) {
        return ;
    }
    else {
    }
    libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lp_frameIndex] = 0;
    DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lp_frameIndex], PlayerGroupAll(), "TransitionOut");
    libUIUI_gf_DeathTimerPanelRemoveFrameFromGroup(lp_team, libUIUI_gf_DeathTimerPanelGetGroupOfFrame(lp_team, lp_frameIndex), lp_frameIndex);
}

void libUIUI_gf_DeathTimerPanelPlayerDeathTimerChanges (int lp_player) {
    int autoF53D04EB_ae;
    int autoF53D04EB_ai;

    // Variable Declarations
    int lv_itFrame;
    int lv_team;
    int lv_frameIndex;
    int lv_group;

    // Variable Initialization

    // Implementation
    lv_team = libGame_gf_TeamNumberOfPlayer(lp_player);
    autoF53D04EB_ae = libCore_gv_bALMaxPlayersOnATeam;
    autoF53D04EB_ai = 1;
    lv_itFrame = 1;
    for ( ; ( (autoF53D04EB_ai >= 0 && lv_itFrame <= autoF53D04EB_ae) || (autoF53D04EB_ai <= 0 && lv_itFrame >= autoF53D04EB_ae) ) ; lv_itFrame += autoF53D04EB_ai ) {
        if ((libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lv_team][lv_itFrame] == lp_player)) {
            lv_frameIndex = lv_itFrame;
        }
        else {
        }
    }
    if ((lv_frameIndex == 0)) {
        return ;
    }
    else {
    }
    lv_group = libUIUI_gf_DeathTimerPanelGetGroupOfFrame(lv_team, lv_frameIndex);
    libUIUI_gf_DeathTimerPanelRemoveFrameFromGroup(lv_team, lv_group, lv_frameIndex);
    libUIUI_gf_DeathTimerPanelAddFrameToGroup(lv_team, libUIUI_gf_DeathTimerPanelFindAppropriateGroupForFrame(lv_team, lv_frameIndex), lv_frameIndex);
}

void libUIUI_gf_DeathTimerPanelSlideGroupOutForPlayer (int lp_team, int lp_group, int lp_player) {
    int auto2FE8919C_ae;
    int auto2FE8919C_ai;

    // Variable Declarations
    int lv_itLayer;
    int lv_framesInGroup;
    int lv_frameIndex;

    // Variable Initialization

    // Implementation
    if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_slideOut[lp_player] == true)) {
        return ;
    }
    else {
    }
    lv_framesInGroup = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount;
    if ((lv_framesInGroup <= 0)) {
        return ;
    }
    else {
    }
    libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_slideOut[lp_player] = true;
    auto2FE8919C_ae = lv_framesInGroup;
    auto2FE8919C_ai = 1;
    lv_itLayer = 1;
    for ( ; ( (auto2FE8919C_ai >= 0 && lv_itLayer <= auto2FE8919C_ae) || (auto2FE8919C_ai <= 0 && lv_itLayer >= auto2FE8919C_ae) ) ; lv_itLayer += auto2FE8919C_ai ) {
        lv_frameIndex = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[lv_itLayer];
        DialogControlSetVisible(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[lp_team][lv_frameIndex], libCore_gv_playerGroupFromPlayer[lp_player], true);
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lv_frameIndex], libCore_gv_playerGroupFromPlayer[lp_player], ("SlideOut" + IntToString(lv_itLayer)));
    }
}

void libUIUI_gf_DeathTimerPanelCollapseGroupForPlayer (int lp_team, int lp_group, int lp_player) {
    int auto220ED1CE_ae;
    int auto220ED1CE_ai;

    // Variable Declarations
    int lv_itLayer;
    int lv_framesInGroup;
    int lv_frameIndex;

    // Variable Initialization

    // Implementation
    if ((libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_slideOut[lp_player] == false)) {
        return ;
    }
    else {
    }
    libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_slideOut[lp_player] = false;
    lv_framesInGroup = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frameCount;
    if ((lv_framesInGroup <= 0)) {
        return ;
    }
    else {
    }
    auto220ED1CE_ae = lv_framesInGroup;
    auto220ED1CE_ai = 1;
    lv_itLayer = 1;
    for ( ; ( (auto220ED1CE_ai >= 0 && lv_itLayer <= auto220ED1CE_ae) || (auto220ED1CE_ai <= 0 && lv_itLayer >= auto220ED1CE_ae) ) ; lv_itLayer += auto220ED1CE_ai ) {
        lv_frameIndex = libUIUI_gv_deathTimerPanel_TimerGroups[lp_team][lp_group].lv_frames[lv_itLayer];
        DialogControlSetVisible(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[lp_team][lv_frameIndex], libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lv_frameIndex], libCore_gv_playerGroupFromPlayer[lp_player], ("Collapse" + IntToString(lv_itLayer)));
    }
}

void libUIUI_gf_DeathTimerPanelUpdatePlayerPortraitsForTeam (int lp_team) {
    int autoCE21505D_ae;
    int autoCE21505D_ai;
    int autoD81FD3A4_ae;
    int autoD81FD3A4_ai;

    // Variable Declarations
    int lv_itFrameIndex;
    int lv_player;
    fixed lv_deathTimeRemaining;
    bool lv_firstTooltipText;
    text lv_tooltipText;
    int lv_framePosition;
    text lv_heroName;
    int lv_otherTeam;
    bool[libCore_gv_bALMaxPlayersOnATeam + 1] lv_unregisterFrame;

    // Variable Initialization
    lv_firstTooltipText = true;

    // Implementation
    autoCE21505D_ae = libCore_gv_bALMaxPlayersOnATeam;
    autoCE21505D_ai = 1;
    lv_itFrameIndex = 1;
    for ( ; ( (autoCE21505D_ai >= 0 && lv_itFrameIndex <= autoCE21505D_ae) || (autoCE21505D_ai <= 0 && lv_itFrameIndex >= autoCE21505D_ae) ) ; lv_itFrameIndex += autoCE21505D_ai ) {
        if ((libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lv_itFrameIndex] == 0)) {
            continue;
        }
        else {
        }
        lv_player = libUIUI_gv_deathTimerPanel_PlayerAssignedToFrame[lp_team][lv_itFrameIndex];
        lv_deathTimeRemaining = TimerGetRemaining(libGame_gv_players[lv_player].lv_respawnTimer);
        if ((lv_firstTooltipText == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_CDDA5F7A", "A", UnitTypeGetName(UnitGetType(libGame_gv_players[lv_player].lv_heroUnit)));
            TextExpressionSetToken("Param/Expression/lib_UIUI_CDDA5F7A", "B", FixedToText(lv_deathTimeRemaining, 0));
            lv_tooltipText = (lv_tooltipText + TextExpressionAssemble("Param/Expression/lib_UIUI_CDDA5F7A"));
            lv_firstTooltipText = false;
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_7326B287", "A", UnitTypeGetName(UnitGetType(libGame_gv_players[lv_player].lv_heroUnit)));
            TextExpressionSetToken("Param/Expression/lib_UIUI_7326B287", "B", FixedToText(lv_deathTimeRemaining, 0));
            lv_tooltipText = (lv_tooltipText + TextExpressionAssemble("Param/Expression/lib_UIUI_7326B287"));
        }
        if ((lv_deathTimeRemaining > 0.0)) {
            lv_framePosition = FixedToInt((libUIUI_gv_deathTimerPanel_MaxBarWidth_C * (lv_deathTimeRemaining / libCore_gv_bALMaxDeathTime)));
            libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[lp_team][lv_itFrameIndex], FixedToText(lv_deathTimeRemaining, 0), PlayerGroupAll());
            lv_heroName = UnitTypeGetName(UnitGetType(libGame_gv_players[lv_player].lv_heroUnit));
            TextExpressionSetToken("Param/Expression/lib_UIUI_CA1FA4EC", "A", lv_heroName);
            TextExpressionSetToken("Param/Expression/lib_UIUI_CA1FA4EC", "B", FixedToText(lv_deathTimeRemaining, 0));
            libNtve_gf_SetDialogItemText(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[lp_team][lv_itFrameIndex], TextExpressionAssemble("Param/Expression/lib_UIUI_CA1FA4EC"), PlayerGroupAll());
            if ((lv_deathTimeRemaining == libUIUI_gv_deathTimerPanel_NearRezTime_C)) {
                lv_otherTeam = (3 - lp_team);
                DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lv_itFrameIndex], libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers, "NearRezAlly");
                DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lp_team][lv_itFrameIndex], libGame_gv_teams[lv_otherTeam].lv_teamPlayerGroupNoNPCPlayers, "NearRezEnemy");
            }
            else {
            }
        }
        else {
            lv_unregisterFrame[lv_itFrameIndex] = true;
        }
    }
    autoD81FD3A4_ae = libCore_gv_bALMaxPlayersOnATeam;
    autoD81FD3A4_ai = 1;
    lv_itFrameIndex = 1;
    for ( ; ( (autoD81FD3A4_ai >= 0 && lv_itFrameIndex <= autoD81FD3A4_ae) || (autoD81FD3A4_ai <= 0 && lv_itFrameIndex >= autoD81FD3A4_ae) ) ; lv_itFrameIndex += autoD81FD3A4_ai ) {
        if ((lv_unregisterFrame[lv_itFrameIndex] == true)) {
            libUIUI_gf_DeathTimerPanelUnregisterPlayer(lp_team, lv_itFrameIndex);
        }
        else {
        }
    }
    libNtve_gf_SetDialogItemTooltip(libUIUI_gv_deathTimerPanel.lv_timerBar[lp_team], lv_tooltipText, PlayerGroupAll());
}

void libUIUI_gf_DeathTimerPanelUpdateTeamDeathTimeIndicatorForTeam (int lp_team) {
    int autoDF2B5C53_ae;
    int autoDF2B5C53_ai;

    // Variable Declarations
    int lv_itPlayer;
    int lv_level;
    fixed lv_deathTime;
    int lv_timerBarWidth;

    // Variable Initialization

    // Implementation
    lv_level = libGame_gv_teams[lp_team].lv_teamLevel;
    if ((lv_level == 1) && (libCore_gv_sYSGameMode != 1)) {
        autoDF2B5C53_ae = libCore_gv_bALMaxPlayers;
        autoDF2B5C53_ai = 1;
        lv_itPlayer = 1;
        for ( ; ( (autoDF2B5C53_ai >= 0 && lv_itPlayer <= autoDF2B5C53_ae) || (autoDF2B5C53_ai <= 0 && lv_itPlayer >= autoDF2B5C53_ae) ) ; lv_itPlayer += autoDF2B5C53_ai ) {
            libUIUI_gf_DeathTimerPanelShowHideTeamsPanelForPlayer(true, lp_team, lv_itPlayer);
        }
    }
    else {
    }
    lv_deathTime = libCore_gf_HeroDeathTime(libCore_gv_cOMPUTER_Neutral, lv_level);
    lv_timerBarWidth = FixedToInt(((lv_deathTime/libCore_gv_bALMaxDeathTime)*libUIUI_gv_deathTimerPanel_MaxBarWidth_C));
    DialogControlSetSize(libUIUI_gv_deathTimerPanel.lv_timerBar[lp_team], PlayerGroupAll(), lv_timerBarWidth, libUIUI_gv_deathTimerPanel_BarHeight_C);
}

void libUIUI_gf_DeathTimerPanelPauseTimerAnimations () {
    int autoA53B2852_ae;
    int autoA53B2852_ai;

    // Variable Declarations
    int lv_itTeam;

    // Variable Initialization

    // Implementation
    autoA53B2852_ae = libCore_gv_bALMaxTeams;
    autoA53B2852_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoA53B2852_ai >= 0 && lv_itTeam <= autoA53B2852_ae) || (autoA53B2852_ai <= 0 && lv_itTeam >= autoA53B2852_ae) ) ; lv_itTeam += autoA53B2852_ai ) {
        DialogControlSendAnimationEvent(libUIUI_gv_deathTimerPanel.lv_mainPanel[lv_itTeam], PlayerGroupAll(), "AnimPause");
    }
}

void libUIUI_gf_UIDebugPanelShowHideDebugPanelForPlayer (bool lp_showHide, int lp_player) {
    playergroup auto1FE062EF_g;
    int auto1FE062EF_p;

    // Variable Declarations
    int lv_p;
    bool lv_playerIsUsingDebugPanel;

    // Variable Initialization

    // Implementation
    if ((libCore_gv_dEBUGDebuggingEnabled == false)) {
        return ;
    }
    else {
    }
    if ((lp_showHide == true)) {
        DialogControlSetVisible(libUIUI_gv_uIDebugPanel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], true);
        TriggerEnable(libUIUI_gt_UIDebugPanelUpdate, true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uIDebugPanel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], false);
        auto1FE062EF_g = libCore_gv_activeHumanPlayers; 
        auto1FE062EF_p = 1;
        for ( ; auto1FE062EF_p <= PlayerGroupCount(auto1FE062EF_g) ; auto1FE062EF_p += BoolToInt(lv_p == PlayerGroupPlayer(auto1FE062EF_g, auto1FE062EF_p)) ) {
            lv_p = PlayerGroupPlayer(auto1FE062EF_g, auto1FE062EF_p);
            if ((DialogControlIsVisible(libUIUI_gv_uIDebugPanel.lv_mainDialog, lv_p) == true)) {
                lv_playerIsUsingDebugPanel = true;
                break;
            }
            else {
            }
        }
        if ((lv_playerIsUsingDebugPanel == false)) {
            TriggerEnable(libUIUI_gt_UIDebugPanelUpdate, false);
        }
        else {
        }
    }
}

void libUIUI_gf_UIDebugPanelSetUpMinionCompDropdown () {
    int auto85DDCEC0_ae;
    int auto85DDCEC0_ai;

    // Variable Declarations
    int lv_itMinionComp;

    // Variable Initialization

    // Implementation
    auto85DDCEC0_ae = libCore_gv_dataMinionWaveCompositionCount;
    auto85DDCEC0_ai = 1;
    lv_itMinionComp = 1;
    for ( ; ( (auto85DDCEC0_ai >= 0 && lv_itMinionComp <= auto85DDCEC0_ae) || (auto85DDCEC0_ai <= 0 && lv_itMinionComp >= auto85DDCEC0_ae) ) ; lv_itMinionComp += auto85DDCEC0_ai ) {
        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown, PlayerGroupAll(), libCore_gv_dataMinionWaveCompositions[lv_itMinionComp].lv_name);
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown, PlayerGroupAll(), 1);
}

void libUIUI_gf_UIDebugPanelRefreshCooldowns (int lp_player) {
    int autoF7A67073_ae;
    int autoF7A67073_ai;

    // Variable Declarations
    int lv_i;
    unit lv_unit;
    int lv_heroIndex;
    string lv_abilLink;
    string lv_cooldownLink;
    string lv_chargeLink;
    string lv_itemUnitType;
    int lv_itemIndex;
    int lv_currentRank;

    // Variable Initialization
    lv_cooldownLink = "";
    lv_chargeLink = "";

    // Implementation
    lv_unit = UnitGroupUnit(UnitGroupSelected(EventPlayer()), 1);
    lv_heroIndex = libGame_gv_players[EventPlayer()].lv_heroIndex;
    if ((lv_heroIndex == 0)) {
        return ;
    }
    else {
    }
    autoF7A67073_ae = (libCore_gv_dataHeroesNumberOfAbilitiesPerHero - 0);
    autoF7A67073_ai = 1;
    lv_i = 1;
    for ( ; ( (autoF7A67073_ai >= 0 && lv_i <= autoF7A67073_ae) || (autoF7A67073_ai <= 0 && lv_i >= autoF7A67073_ae) ) ; lv_i += autoF7A67073_ai ) {
        lv_abilLink = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_abilities[lv_i];
        lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(lv_unit));
        libNtve_gf_UnitRemoveCooldown(lv_unit, lv_cooldownLink);
        lv_chargeLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Charge.Link", UnitGetOwner(lv_unit));
        UnitAddChargeUsed(lv_unit, lv_chargeLink, -1.0);
    }
}

void libUIUI_gf_UIDebugPanelPopulateHeroDropdownForPlayer (int lp_player, bool lp_allHeroes) {
    int init_i;

    int autoE277C632_ae;
    int autoE277C632_ai;
    int auto336B2B28_ae;
    int auto336B2B28_ai;
    int auto89EAACCB_ae;
    int auto89EAACCB_ai;
    int auto0C1C148E_ae;
    int auto0C1C148E_ai;

    // Variable Declarations
    int lv_itHeroIndex;
    int lv_itSortA;
    int lv_itSortB;
    int lv_itDropdownIndex;
    int lv_maxDropdownIndex;
    string[libCore_gv_dataHeroesMaxHeroCount + 1] lv_heroStringIDs;
    int lv_heroIndex;

    // Variable Initialization
    for (init_i = 0; init_i <= libCore_gv_dataHeroesMaxHeroCount; init_i += 1) {
        lv_heroStringIDs[init_i] = "";
    }

    // Implementation
    DialogControlRemoveAllItems(libUIUI_gv_uIDebugPanel.lv_heroDropdown, libCore_gv_playerGroupFromPlayer[lp_player]);
    autoE277C632_ae = libCore_gv_dataHeroesNumberOfHeroes;
    autoE277C632_ai = 1;
    lv_itHeroIndex = 1;
    for ( ; ( (autoE277C632_ai >= 0 && lv_itHeroIndex <= autoE277C632_ae) || (autoE277C632_ai <= 0 && lv_itHeroIndex >= autoE277C632_ae) ) ; lv_itHeroIndex += autoE277C632_ai ) {
        if ((libCore_gv_dataHeroesHeroData[lv_itHeroIndex].lv_heroCatalogLink != null) && ((lp_allHeroes == true) || (libCore_gv_dataHeroesHeroData[lv_itHeroIndex].lv_dEBUGPlayable == true))) {
            lv_maxDropdownIndex += 1;
            libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][lv_maxDropdownIndex] = lv_itHeroIndex;
            lv_heroStringIDs[lv_maxDropdownIndex] = (libCore_gv_dataHeroesHeroData[lv_itHeroIndex].lv_heroCatalogLink);
        }
        else {
        }
    }
    auto336B2B28_ae = 1;
    auto336B2B28_ai = -1;
    lv_itSortA = (lv_maxDropdownIndex - 1);
    for ( ; ( (auto336B2B28_ai >= 0 && lv_itSortA <= auto336B2B28_ae) || (auto336B2B28_ai <= 0 && lv_itSortA >= auto336B2B28_ae) ) ; lv_itSortA += auto336B2B28_ai ) {
        auto89EAACCB_ae = lv_itSortA;
        auto89EAACCB_ai = 1;
        lv_itSortB = 1;
        for ( ; ( (auto89EAACCB_ai >= 0 && lv_itSortB <= auto89EAACCB_ae) || (auto89EAACCB_ai <= 0 && lv_itSortB >= auto89EAACCB_ae) ) ; lv_itSortB += auto89EAACCB_ai ) {
            if ((StringCompare(lv_heroStringIDs[lv_itSortB], lv_heroStringIDs[(lv_itSortB + 1)], c_stringNoCase) > 0)) {
                libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][0] = libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][lv_itSortB];
                lv_heroStringIDs[0] = lv_heroStringIDs[lv_itSortB];
                libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][lv_itSortB] = libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][(lv_itSortB + 1)];
                lv_heroStringIDs[lv_itSortB] = lv_heroStringIDs[(lv_itSortB + 1)];
                libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][(lv_itSortB + 1)] = libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][0];
                lv_heroStringIDs[(lv_itSortB + 1)] = lv_heroStringIDs[0];
            }
            else {
            }
        }
    }
    auto0C1C148E_ae = lv_maxDropdownIndex;
    auto0C1C148E_ai = 1;
    lv_itDropdownIndex = 1;
    for ( ; ( (auto0C1C148E_ai >= 0 && lv_itDropdownIndex <= auto0C1C148E_ae) || (auto0C1C148E_ai <= 0 && lv_itDropdownIndex >= auto0C1C148E_ae) ) ; lv_itDropdownIndex += auto0C1C148E_ai ) {
        lv_heroIndex = libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[lp_player][lv_itDropdownIndex];
        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_name);
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

void libUIUI_gf_UIDebugPanelPopulateSkinDropdownForPlayer (int lp_player, int lp_heroIndex) {
    int auto55853775_ae;
    int auto55853775_ai;

    // Variable Declarations
    int lv_itSkin;
    int lv_skinIndex;
    int lv_dropdownIndex;

    // Variable Initialization

    // Implementation
    DialogControlRemoveAllItems(libUIUI_gv_uIDebugPanel.lv_skinDropdown, libCore_gv_playerGroupFromPlayer[lp_player]);
    auto55853775_ae = libCore_gv_dataHeroesHeroData[lp_heroIndex].lv_skinCount;
    auto55853775_ai = 1;
    lv_itSkin = 1;
    for ( ; ( (auto55853775_ai >= 0 && lv_itSkin <= auto55853775_ae) || (auto55853775_ai <= 0 && lv_itSkin >= auto55853775_ae) ) ; lv_itSkin += auto55853775_ai ) {
        lv_skinIndex = libCore_gf_DataSkinsGetSkinIndexFromSkinLink(libCore_gv_dataHeroesHeroData[lp_heroIndex].lv_skinArray[lv_itSkin]);
        if ((libCore_gv_dataSkinsSkinData[lv_skinIndex].lv_skinID != null)) {
            DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, libCore_gv_playerGroupFromPlayer[lp_player], libCore_gv_dataSkinsSkinData[lv_skinIndex].lv_skinName);
            lv_dropdownIndex += 1;
            libUIUI_gv_uIDebugPanelSkinIndexFromDropdownIndex[lp_player][lv_dropdownIndex] = lv_skinIndex;
        }
        else {
        }
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

void libUIUI_gf_UIDebugPanelPopulateMountDropdownForPlayer (int lp_player, int lp_heroIndex) {
    int auto22705CF3_ae;
    int auto22705CF3_ai;

    // Variable Declarations
    int lv_itMount;

    // Variable Initialization

    // Implementation
    DialogControlRemoveAllItems(libUIUI_gv_uIDebugPanel.lv_mountDropdown, libCore_gv_playerGroupFromPlayer[lp_player]);
    if ((libCore_gv_dataHeroesHeroData[lp_heroIndex].lv_usesMounts == false)) {
        return ;
    }
    else {
    }
    auto22705CF3_ae = libCore_gv_dataMountsMountCount;
    auto22705CF3_ai = 1;
    lv_itMount = 1;
    for ( ; ( (auto22705CF3_ai >= 0 && lv_itMount <= auto22705CF3_ae) || (auto22705CF3_ai <= 0 && lv_itMount >= auto22705CF3_ae) ) ; lv_itMount += auto22705CF3_ai ) {
        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_mountDropdown, libCore_gv_playerGroupFromPlayer[lp_player], libCore_gv_dataMountsMountData[lv_itMount].lv_mountName);
        libUIUI_gv_uIDebugPanelMountIndexFromDropdownIndex[lp_player][lv_itMount] = lv_itMount;
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_mountDropdown, libCore_gv_playerGroupFromPlayer[lp_player], 1);
}

void libUIUI_gf_UIDebugPanelPopulateAnnouncerDropdownForPlayer (int lp_player) {
    int auto80722E6E_ae;
    int auto80722E6E_ai;

    // Variable Declarations
    int lv_itAnnouncerIndex;

    // Variable Initialization

    // Implementation
    DialogControlRemoveAllItems(libUIUI_gv_uIDebugPanel.lv_announcerDropdown, libCore_gv_playerGroupFromPlayer[lp_player]);
    auto80722E6E_ae = libCore_gv_dataAnnouncerVONumberOfAnnouncerPacks;
    auto80722E6E_ai = 1;
    lv_itAnnouncerIndex = 1;
    for ( ; ( (auto80722E6E_ai >= 0 && lv_itAnnouncerIndex <= auto80722E6E_ae) || (auto80722E6E_ai <= 0 && lv_itAnnouncerIndex >= auto80722E6E_ae) ) ; lv_itAnnouncerIndex += auto80722E6E_ai ) {
        DialogControlAddItem(libUIUI_gv_uIDebugPanel.lv_announcerDropdown, libCore_gv_playerGroupFromPlayer[lp_player], libCore_gv_dataAnnouncerVOPacks[lv_itAnnouncerIndex].lv_name);
    }
    DialogControlSelectItem(libUIUI_gv_uIDebugPanel.lv_announcerDropdown, libCore_gv_playerGroupFromPlayer[lp_player], libGame_gv_players[lp_player].lv_selectedAnnouncerVOPack);
}

void libUIUI_gf_UIDebugPanelSpawnOrSwapHeroForPlayer (int lp_heroIndex, int lp_skinIndex, int lp_mountIndex, fixed lp_xP, int lp_player) {
    unitgroup auto7BDA85F4_g;
    int auto7BDA85F4_u;

    // Variable Declarations
    int lv_itPlayer;
    unit lv_itUnit;

    // Variable Initialization

    // Implementation
    libGame_gv_players[lp_player].lv_selectedSkin = lp_skinIndex;
    libGame_gv_players[lp_player].lv_selectedMount = lp_mountIndex;
    if ((libGame_gv_players[lp_player].lv_heroIndex == 0)) {
        if ((libGame_gv_players[lp_player].lv_faction == 0)) {
            PlayerGroupAdd(libCore_gv_teamOrder, lp_player);
            PlayerGroupAdd(libGame_gv_teams[1].lv_teamPlayerGroupNoNPCPlayers, lp_player);
        }
        else {
            PlayerGroupAdd(libCore_gv_teamChaos, lp_player);
            PlayerGroupAdd(libGame_gv_teams[2].lv_teamPlayerGroupNoNPCPlayers, lp_player);
        }
        libGame_gf_SpawnHero(lp_player, lp_heroIndex, libGame_gv_players[lp_player].lv_spawnPoint);
        libGame_gf_GrantXPToPlayer(lp_xP, lp_player, 0);
        return ;
    }
    else {
    }
    libUIUI_gf_TalentsBucketRespecHeroForPlayer(lp_player);
    libGame_gf_DataPlayersClearBucketsABChoiceDataForPlayer(lp_player);
    libGame_gf_RemoveLevelUpHeroStatsForPlayer(lp_player);
    UnitClearSelection(lp_player);
    PathDestroy(libGame_gv_players[lp_player].lv_pathDisplay);
    UnitSetCustomValue(libGame_gv_players[lp_player].lv_heroUnit, libCore_gf_CustomValueIndex(9), 1.0);
    UnitGroupRemove(libGame_gv_heroes, libGame_gv_players[lp_player].lv_heroUnit);
    UnitRemove(libGame_gv_players[lp_player].lv_heroUnit);
    auto7BDA85F4_g = UnitGroup(null, lp_player, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    auto7BDA85F4_u = 1;
    for ( ; auto7BDA85F4_u <= UnitGroupCount(auto7BDA85F4_g, c_unitCountAll) ; auto7BDA85F4_u += BoolToInt(lv_itUnit == UnitGroupUnit(auto7BDA85F4_g, auto7BDA85F4_u)) ) {
        lv_itUnit = UnitGroupUnit(auto7BDA85F4_g, auto7BDA85F4_u);
        UnitKill(lv_itUnit);
    }
    libGame_gv_players[lp_player].lv_suppressLevelUpFXAndTeamXPTracking = true;
    libUIUI_gf_TalentsBucketClearTalentsPanelForPlayer(lp_player);
    libGame_gf_SpawnHero(lp_player, lp_heroIndex, libGame_gv_players[lp_player].lv_spawnPoint);
    libGame_gf_GrantXPToPlayer(lp_xP, lp_player, 0);
    Wait(0.0625, c_timeGame);
    libUIUI_gf_UILeaderboardSetUpPlayerOnLeaderboard(lp_player);
    libGame_gv_players[lp_player].lv_suppressLevelUpFXAndTeamXPTracking = false;
}

void libUIUI_gf_EncouragementUpdateEncouragementPanelForPlayer (int lp_player) {
    int autoD7FE0E49_ae;
    int autoD7FE0E49_ai;
    int auto57F9B3BB_ae;
    int auto57F9B3BB_ai;
    int autoAFF43539_ae;
    int autoAFF43539_ai;
    int auto57FAF969_ae;
    int auto57FAF969_ai;
    int auto6F0D3DA8_ae;
    int auto6F0D3DA8_ai;
    int autoEE575873_ae;
    int autoEE575873_ai;
    int auto772F5A92_ae;
    int auto772F5A92_ai;
    int auto7C84C089_ae;
    int auto7C84C089_ai;

    // Variable Declarations
    int lv_itCalloutStat;
    int lv_itThresholdIndex;
    int lv_itSortA;
    int lv_itSortB;
    int lv_itLabel;
    int lv_itTip;
    int lv_statsThatExceedThreshold;
    libUIUI_gs_EncouragementStatToDisplay[libGame_gv_encouragement_NumberOfStatCallouts_C + 1] lv_statCandidatesForDisplay;
    int lv_displayedStatCount;
    int lv_calloutStatIndex;
    int lv_thresholdIndex;
    text lv_calloutDisplayText;
    int lv_displayedTipCount;
    string lv_bankKey;

    // Variable Initialization
    lv_bankKey = "";

    // Implementation
    if ((libCore_gv_sYSUseEncouragementPanel == false)) {
        return ;
    }
    else {
    }
    libGame_gv_encouragement_CalloutStatTracking[lp_player][(1)] = TimerGetElapsed(libGame_gv_encouragement_TimeSpentAliveTimer[lp_player]);
    if ((libGame_gv_encouragement_TotalTeamXPGathered[lp_player] == 0.0)) {
        libGame_gv_encouragement_CalloutStatTracking[lp_player][(2)] = 0.0;
    }
    else {
        libGame_gv_encouragement_CalloutStatTracking[lp_player][(2)] = (libGame_gv_encouragement_XPGathered[lp_player] / libGame_gv_encouragement_TotalTeamXPGathered[lp_player]);
    }
    autoD7FE0E49_ae = libGame_gv_encouragement_NumberOfStatCallouts_C;
    autoD7FE0E49_ai = 1;
    lv_itCalloutStat = 1;
    for ( ; ( (autoD7FE0E49_ai >= 0 && lv_itCalloutStat <= autoD7FE0E49_ae) || (autoD7FE0E49_ai <= 0 && lv_itCalloutStat >= autoD7FE0E49_ae) ) ; lv_itCalloutStat += autoD7FE0E49_ai ) {
        auto57F9B3BB_ae = 1;
        auto57F9B3BB_ai = -1;
        lv_itThresholdIndex = libGame_gv_encouragement_NumberOfStatCalloutThresholds_C;
        for ( ; ( (auto57F9B3BB_ai >= 0 && lv_itThresholdIndex <= auto57F9B3BB_ae) || (auto57F9B3BB_ai <= 0 && lv_itThresholdIndex >= auto57F9B3BB_ae) ) ; lv_itThresholdIndex += auto57F9B3BB_ai ) {
            if ((libGame_gv_encouragement_CalloutStatTracking[lp_player][lv_itCalloutStat] >= libGame_gv_encouragement_CalloutStatThresholds[lv_itThresholdIndex][lv_itCalloutStat])) {
                lv_statsThatExceedThreshold += 1;
                lv_statCandidatesForDisplay[lv_statsThatExceedThreshold].lv_statIndex = lv_itCalloutStat;
                lv_statCandidatesForDisplay[lv_statsThatExceedThreshold].lv_thresholdIndex = lv_itThresholdIndex;
                lv_statCandidatesForDisplay[lv_statsThatExceedThreshold].lv_thresholdRatio = (libGame_gv_encouragement_CalloutStatTracking[lp_player][lv_itCalloutStat] / libGame_gv_encouragement_CalloutStatThresholds[lv_itThresholdIndex][lv_itCalloutStat]);
                break;
            }
            else {
            }
        }
    }
    autoAFF43539_ae = 1;
    autoAFF43539_ai = -1;
    lv_itSortA = (lv_statsThatExceedThreshold - 1);
    for ( ; ( (autoAFF43539_ai >= 0 && lv_itSortA <= autoAFF43539_ae) || (autoAFF43539_ai <= 0 && lv_itSortA >= autoAFF43539_ae) ) ; lv_itSortA += autoAFF43539_ai ) {
        auto57FAF969_ae = lv_itSortA;
        auto57FAF969_ai = 1;
        lv_itSortB = 1;
        for ( ; ( (auto57FAF969_ai >= 0 && lv_itSortB <= auto57FAF969_ae) || (auto57FAF969_ai <= 0 && lv_itSortB >= auto57FAF969_ae) ) ; lv_itSortB += auto57FAF969_ai ) {
            if (((lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdIndex < lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdIndex) || ((lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdIndex == lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdIndex) && (lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdRatio < lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdRatio)))) {
                lv_statCandidatesForDisplay[0].lv_statIndex = lv_statCandidatesForDisplay[lv_itSortB].lv_statIndex;
                lv_statCandidatesForDisplay[0].lv_thresholdIndex = lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdIndex;
                lv_statCandidatesForDisplay[0].lv_thresholdRatio = lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdRatio;
                lv_statCandidatesForDisplay[lv_itSortB].lv_statIndex = lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_statIndex;
                lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdIndex = lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdIndex;
                lv_statCandidatesForDisplay[lv_itSortB].lv_thresholdRatio = lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdRatio;
                lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_statIndex = lv_statCandidatesForDisplay[0].lv_statIndex;
                lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdIndex = lv_statCandidatesForDisplay[0].lv_thresholdIndex;
                lv_statCandidatesForDisplay[(lv_itSortB + 1)].lv_thresholdRatio = lv_statCandidatesForDisplay[0].lv_thresholdRatio;
            }
            else {
            }
        }
    }
    lv_displayedStatCount = MinI(lv_statsThatExceedThreshold, libUIUI_gv_encouragement_MaxNumberOfStatCalloutsDisplayed_C);
    auto6F0D3DA8_ae = lv_displayedStatCount;
    auto6F0D3DA8_ai = 1;
    lv_itLabel = 1;
    for ( ; ( (auto6F0D3DA8_ai >= 0 && lv_itLabel <= auto6F0D3DA8_ae) || (auto6F0D3DA8_ai <= 0 && lv_itLabel >= auto6F0D3DA8_ae) ) ; lv_itLabel += auto6F0D3DA8_ai ) {
        lv_calloutStatIndex = lv_statCandidatesForDisplay[lv_itLabel].lv_statIndex;
        lv_thresholdIndex = lv_statCandidatesForDisplay[lv_itLabel].lv_thresholdIndex;
        lv_calloutDisplayText = libGame_gf_EncouragementFormatStatCalloutText(lv_calloutStatIndex, lv_thresholdIndex, libGame_gv_encouragement_CalloutStatTracking[lp_player][lv_calloutStatIndex]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_encouragement_Panel.lv_statCalloutLabels[lv_itLabel], lv_calloutDisplayText, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_encouragement_Panel.lv_statCalloutLabels[lv_itLabel], libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    autoEE575873_ae = libUIUI_gv_encouragement_MaxNumberOfStatCalloutsDisplayed_C;
    autoEE575873_ai = 1;
    lv_itLabel = (lv_displayedStatCount + 1);
    for ( ; ( (autoEE575873_ai >= 0 && lv_itLabel <= autoEE575873_ae) || (autoEE575873_ai <= 0 && lv_itLabel >= autoEE575873_ae) ) ; lv_itLabel += autoEE575873_ai ) {
        DialogControlSetVisible(libUIUI_gv_encouragement_Panel.lv_statCalloutLabels[lv_itLabel], libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    auto772F5A92_ae = libGame_gv_encouragement_NumberOfDeathTips_C;
    auto772F5A92_ai = 1;
    lv_itTip = 1;
    for ( ; ( (auto772F5A92_ai >= 0 && lv_itTip <= auto772F5A92_ae) || (auto772F5A92_ai <= 0 && lv_itTip >= auto772F5A92_ae) ) ; lv_itTip += auto772F5A92_ai ) {
        if ((libGame_gv_encouragement_RegisteredDeathTips[lp_player][lv_itTip].lv_isRegistered == true)) {
            lv_displayedTipCount += 1;
            libGame_gv_players[lp_player].lv_bankData.lv_deathTipDisplayCount[lv_itTip] += 1;
            lv_bankKey = libGame_ge_EncouragementDeathTipsNames_Ident(libGame_gf_EncouragementConvertIntegerToDeathTipNamePreset(lv_itTip));
            BankValueSetFromInt(libGame_gv_players[lp_player].lv_bankData.lv_bank, "DeathTipDisplayCounts", lv_bankKey, libGame_gv_players[lp_player].lv_bankData.lv_deathTipDisplayCount[lv_itTip]);
            BankSave(libGame_gv_players[lp_player].lv_bankData.lv_bank);
            libNtve_gf_SetDialogItemText(libUIUI_gv_encouragement_Panel.lv_deathTipLabels[lv_displayedTipCount], libGame_gf_EncouragementGetDeathTipText(lv_itTip), libCore_gv_playerGroupFromPlayer[lp_player]);
            DialogControlSetVisible(libUIUI_gv_encouragement_Panel.lv_deathTipLabels[lv_displayedTipCount], libCore_gv_playerGroupFromPlayer[lp_player], true);
            if ((lv_displayedTipCount == libUIUI_gv_encouragement_MaxNumberOfDeathTipsDisplayed_C)) {
                break;
            }
            else {
            }
        }
        else {
        }
    }
    auto7C84C089_ae = libUIUI_gv_encouragement_MaxNumberOfDeathTipsDisplayed_C;
    auto7C84C089_ai = 1;
    lv_itLabel = (lv_displayedTipCount + 1);
    for ( ; ( (auto7C84C089_ai >= 0 && lv_itLabel <= auto7C84C089_ae) || (auto7C84C089_ai <= 0 && lv_itLabel >= auto7C84C089_ae) ) ; lv_itLabel += auto7C84C089_ai ) {
        DialogControlSetVisible(libUIUI_gv_encouragement_Panel.lv_deathTipLabels[lv_itLabel], libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    if (((lv_displayedStatCount > 0) || (lv_displayedTipCount > 0))) {
        libUIUI_gf_EncouragementShowHidePanelForPlayer(true, lp_player);
    }
    else {
    }
    libGame_gf_EncouragementDataTrackingResetCalloutValuesForPlayer(lp_player);
    libGame_gf_EncouragementClearRegisteredDeathTipsForPlayer(lp_player);
}

void libUIUI_gf_EncouragementShowHidePanelForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        DialogControlSetVisible(libUIUI_gv_encouragement_Panel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_encouragement_Panel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
}

void libUIUI_gf_UIFloatingCombatTextCreateTextTag (int lp_displayPlayer, fixed lp_duration, text lp_text, unit lp_targetUnit, fixed lp_heightOffset, fixed lp_horizontalOffset, int lp_numberType) {
    int auto909F8281_val;
    int auto2F07E125_val;

    // Variable Declarations
    int lv_i;
    text lv_numberTypeAsText;
    text lv_sizeTypeAsText;
    text lv_stormFontStyle;

    // Variable Initialization
    lv_i = 1;

    // Implementation
    auto909F8281_val = lp_numberType;
    if (auto909F8281_val == 0) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_2FB67B73");
        lv_i = 1;
    }
    else if (auto909F8281_val == 1) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_F1B40FEF");
        lv_i = 2;
    }
    else if (auto909F8281_val == 2) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_ECDA409A");
        lv_i = 3;
    }
    else if (auto909F8281_val == 3) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_5BB89A81");
        lv_i = 4;
    }
    else if (auto909F8281_val == 11) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_EA95BE1E");
        lv_i = 5;
    }
    else if (auto909F8281_val == 4) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_AAD3571A");
    }
    else if (auto909F8281_val == 5) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_34301CEA");
    }
    else if (auto909F8281_val == 7) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_17B0C24D");
    }
    else if (auto909F8281_val == 6) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_DB46D616");
    }
    else if (auto909F8281_val == 8) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_DA789D36");
    }
    else if (auto909F8281_val == 9) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_00DD479B");
    }
    else if (auto909F8281_val == 10) {
        lv_numberTypeAsText = StringExternal("Param/Value/lib_UIUI_04B9ED85");
    }
    else {
    }
    TextExpressionSetToken("Param/Expression/lib_UIUI_40762CC7", "A", lv_numberTypeAsText);
    TextExpressionSetToken("Param/Expression/lib_UIUI_40762CC7", "B", IntToText(lv_i));
    lv_stormFontStyle = TextExpressionAssemble("Param/Expression/lib_UIUI_40762CC7");
    auto2F07E125_val = lp_numberType;
    if (auto2F07E125_val == 0) {
        if ((lp_displayPlayer == 0)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_6EB579DF", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_6EB579DF", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_6EB579DF"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, PlayerGroupAll());
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_D59B1BC9", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_D59B1BC9", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_D59B1BC9"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, libCore_gv_playerGroupFromPlayer[lp_displayPlayer]);
        }
        TextTagSetVelocity(TextTagLastCreated(), 0.75, 90.0);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeFadeOut, libUIUI_gv_floatingCombatTextFadeDuration);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, lp_duration);
        TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
    }
    else if (auto2F07E125_val == 11) {
        if ((lp_displayPlayer == 0)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_A4108568", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_A4108568", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_A4108568"), 7, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, PlayerGroupAll());
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_0A34971D", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_0A34971D", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_0A34971D"), 7, PointWithOffset(UnitGetPosition(lp_targetUnit), 0.35, 0.0), lp_heightOffset, true, false, libCore_gv_playerGroupFromPlayer[lp_displayPlayer]);
        }
        TextTagSetVelocity(TextTagLastCreated(), 0.75, 90.0);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeFadeOut, libUIUI_gv_floatingCombatTextFadeDuration);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, lp_duration);
        TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
    }
    else if (auto2F07E125_val == 1) {
        if ((lp_displayPlayer == 0)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_0785A5D5", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_0785A5D5", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_0785A5D5"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, PlayerGroupAll());
            TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 100.00, 0.00));
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_63192643", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_63192643", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_63192643"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, libCore_gv_playerGroupFromPlayer[lp_displayPlayer]);
            TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 100.00, 0.00));
        }
        TextTagSetVelocity(TextTagLastCreated(), 1.5, 90.0);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeFadeOut, libUIUI_gv_floatingCombatTextFadeDuration);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, lp_duration);
        TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
    }
    else if (auto2F07E125_val == 2) {
        if ((lp_displayPlayer == 0)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_79B5E900", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_79B5E900", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_79B5E900"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, PlayerGroupAll());
            TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 50.20, 25.10));
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_D9146D5B", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_D9146D5B", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_D9146D5B"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, libCore_gv_playerGroupFromPlayer[lp_displayPlayer]);
            TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 50.20, 25.10));
        }
        TextTagSetVelocity(TextTagLastCreated(), 2.5, 90.0);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeFadeOut, libUIUI_gv_floatingCombatTextFadeDuration);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, lp_duration);
        TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
    }
    else if (auto2F07E125_val == 3) {
        if ((lp_displayPlayer == 0)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_376DD5E2", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_376DD5E2", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_376DD5E2"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, PlayerGroupAll());
            TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 0.00, 0.00));
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_1B8D956D", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_1B8D956D", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_1B8D956D"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, libCore_gv_playerGroupFromPlayer[lp_displayPlayer]);
            TextTagSetColor(TextTagLastCreated(), c_textTagColorText, Color(100.00, 0.00, 0.00));
        }
        TextTagSetVelocity(TextTagLastCreated(), 3.0, 90.0);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeFadeOut, libUIUI_gv_floatingCombatTextFadeDuration);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, lp_duration);
        TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
    }
    else {
        if ((lp_displayPlayer == 0)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_14B8E5E0", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_14B8E5E0", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_14B8E5E0"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, PlayerGroupAll());
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_73451DA8", "A", lv_stormFontStyle);
            TextExpressionSetToken("Param/Expression/lib_UIUI_73451DA8", "B", lp_text);
            TextTagCreate(TextExpressionAssemble("Param/Expression/lib_UIUI_73451DA8"), 15, UnitGetPosition(lp_targetUnit), lp_heightOffset, true, false, libCore_gv_playerGroupFromPlayer[lp_displayPlayer]);
        }
        TextTagSetVelocity(TextTagLastCreated(), 1.0, 90.0);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeFadeOut, libUIUI_gv_floatingCombatTextFadeDuration);
        TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, lp_duration);
        TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
    }
}

void libUIUI_gf_UIFloatingCombatTextXP (int lp_displayPlayer, unit lp_target, text lp_amount, int lp_textTagType) {
    // Variable Declarations
    fixed lv_duration;
    fixed lv_vertOffset;
    fixed lv_horizOffset;

    // Variable Initialization

    // Implementation
    if ((libSprt_gv_dEBUGCombatTextEnabled == true)) {
        if ((libGame_gv_players[lp_displayPlayer].lv_heroUnit == null)) {
            return ;
        }
        else {
        }
        lv_duration = 1.25;
        lv_vertOffset = 1.5;
        lv_horizOffset = RandomFixed(0.4, 0.6);
        if (((PointGetX(UnitGetPosition(libGame_gv_players[lp_displayPlayer].lv_heroUnit)) - PointGetX(UnitGetPosition(lp_target))) > 0)) {
            lv_horizOffset *= -1.0;
        }
        else {
        }
        libUIUI_gf_UIFloatingCombatTextCreateTextTag(lp_displayPlayer, lv_duration, lp_amount, lp_target, lv_vertOffset, lv_horizOffset, lp_textTagType);
    }
    else {
    }
}

void libUIUI_gf_UIFloatingCombatTextHeal (int lp_impactPlayer, unit lp_impactUnit, int lp_launchPlayer, unit lp_launchUnit, unit lp_casterUnit, unit lp_targetUnit, fixed lp_amount, string lp_triggeringEffect) {
    // Variable Declarations
    int lv_impactPlayer;
    unit lv_impactUnit;
    int lv_launchPlayer;
    unit lv_launchUnit;
    unit lv_casterUnit;
    unit lv_targetUnit;
    fixed lv_amount;
    fixed lv_vertOffset;
    fixed lv_horizOffset;
    playergroup lv_vOGroup;
    string lv_triggeringEffect;

    // Variable Initialization
    lv_impactPlayer = lp_impactPlayer;
    lv_impactUnit = lp_impactUnit;
    lv_launchPlayer = lp_launchPlayer;
    lv_launchUnit = lp_launchUnit;
    lv_casterUnit = lp_casterUnit;
    lv_targetUnit = lp_targetUnit;
    lv_amount = lp_amount;
    lv_vOGroup = PlayerGroupEmpty();
    lv_triggeringEffect = lp_triggeringEffect;

    // Implementation
    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(-0.4, -0.6);
    if (((lv_amount > 0.0) || (lv_triggeringEffect == "BlinkHealInitialHeal") || (lv_triggeringEffect == "BlinkHealYserasBlessingMasteryInitialHeal") || (lv_triggeringEffect == "BlinkHealPeriodicHeal"))) {
        if ((lv_impactPlayer != libCore_gv_cOMPUTER_TeamOrder) && (lv_impactPlayer != libCore_gv_cOMPUTER_TeamChaos)) {
            libUIUI_gf_UIFloatingCombatTextCreateTextTag(lv_launchPlayer, libUIUI_gv_floatingCombatTextHighDuration, FixedToText(lv_amount, 0), lv_impactUnit, lv_vertOffset, lv_horizOffset, 4);
            StatEventCreate("PlayerHealed");
            StatEventAddDataInt(StatEventLastCreated(), "TargetPlayer", lv_impactPlayer);
            StatEventAddDataInt(StatEventLastCreated(), "CasterPlayer", lv_launchPlayer);
            StatEventAddDataString(StatEventLastCreated(), "HealEffect", (lv_triggeringEffect));
            StatEventAddDataFixed(StatEventLastCreated(), "HealAmount", lv_amount);
            StatEventSend(StatEventLastCreated());
        }
        else {
        }
        if ((lv_impactPlayer != lv_launchPlayer) && (lv_launchPlayer != libCore_gv_cOMPUTER_TeamOrder) && (lv_launchPlayer != libCore_gv_cOMPUTER_TeamChaos)) {
            libUIUI_gf_UIFloatingCombatTextCreateTextTag(lv_impactPlayer, libUIUI_gv_floatingCombatTextHighDuration, FixedToText(lv_amount, 0), lv_impactUnit, lv_vertOffset, lv_horizOffset, 4);
            if ((lv_triggeringEffect != "SoothingMistCreateHealer")) {
                PlayerGroupAdd(lv_vOGroup, UnitGetOwner(lv_casterUnit));
                PlayerGroupAdd(lv_vOGroup, UnitGetOwner(lv_targetUnit));
                libSond_gf_HeroVOPlayHeroLineWithDelayAndRandomChance(2, UnitGetOwner(lv_targetUnit), lv_vOGroup, 1.0, 33);
            }
            else {
            }
        }
        else {
        }
    }
    else {
    }
}

void libUIUI_gf_FullscreenOverlaysShowHideDeathOverlay (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_deathOverlay, libCore_gv_playerGroupFromPlayer[lp_player], 0.35, 30.0);
    }
    else {
        DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_deathOverlay, libCore_gv_playerGroupFromPlayer[lp_player], 0.35, 100.0);
    }
}

void libUIUI_gf_FullscreenOverlaysCreateCCEffectFlashForPlayer (int lp_player, fixed lp_cCDuration) {
    // Variable Declarations
    fixed lv_fadeTime;

    // Variable Initialization
    lv_fadeTime = 0.25;

    // Implementation
    libNtve_gf_SetDialogItemColor(libUIUI_gv_fullscreenOverlaysPanel.lv_cCSplashImage, Color(0.00, 0.00, 100.00), PlayerGroupAll());
    DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_cCSplashImage, PlayerGroupSingle(lp_player), 0.0, 0.0);
    if ((lp_cCDuration > lv_fadeTime) && (lp_cCDuration < 32765.0)) {
        Wait((lp_cCDuration - lv_fadeTime), c_timeGame);
        DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_cCSplashImage, PlayerGroupSingle(lp_player), lv_fadeTime, 100.0);
    }
    else {
        while (((UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "Hooked") > 0) || (UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "VoidPrison") > 0))) {
            Wait(0.0625, c_timeGame);
        }
        DialogControlFadeTransparency(libUIUI_gv_fullscreenOverlaysPanel.lv_cCSplashImage, PlayerGroupSingle(lp_player), (lv_fadeTime / 2.0), 100.0);
    }
}

void libUIUI_gf_GameOverSplashDisplayForAllPlayers () {
    int auto88F88DD9_ae;
    int auto88F88DD9_ai;
    int autoDB4C5E75_val;

    // Variable Declarations
    int lv_itPlayer;

    // Variable Initialization

    // Implementation
    auto88F88DD9_ae = libCore_gv_bALMaxPlayers;
    auto88F88DD9_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (auto88F88DD9_ai >= 0 && lv_itPlayer <= auto88F88DD9_ae) || (auto88F88DD9_ai <= 0 && lv_itPlayer >= auto88F88DD9_ae) ) ; lv_itPlayer += auto88F88DD9_ai ) {
        autoDB4C5E75_val = libGame_gv_players[lv_itPlayer].lv_victoryDefeat;
        if (autoDB4C5E75_val == c_gameOverVictory) {
            DialogControlSetVisible(libUIUI_gv_gameOverSplash.lv_victoryFrame, libCore_gv_playerGroupFromPlayer[lv_itPlayer], true);
        }
        else if (autoDB4C5E75_val == c_gameOverDefeat) {
            DialogControlSetVisible(libUIUI_gv_gameOverSplash.lv_defeatFrame, libCore_gv_playerGroupFromPlayer[lv_itPlayer], true);
        }
        else {
        }
        DialogControlSetVisible(libUIUI_gv_gameOverSplash.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lv_itPlayer], true);
        UnitStatusBarOverride(libGame_gv_players[lv_itPlayer].lv_heroUnit, -1);
        DialogControlSetVisible(libUIUI_gv_uIGameUIHandles.lv_gameMenuButton, PlayerGroupAll(), false);
    }
}

void libUIUI_gf_UIGameUIToggleMinimapCommandsForPlayer (int lp_player) {
    // Implementation
    libGame_gv_players[lp_player].lv_bankData.lv_settingMinimapCommandsEnabled = !(libGame_gv_players[lp_player].lv_bankData.lv_settingMinimapCommandsEnabled);
    libUIUI_gf_UIGameUIChangeModeMinimapCommandsForPlayer(lp_player);
    BankValueSetFromFlag(libGame_gv_players[lp_player].lv_bankData.lv_bank, "Settings", "MinimapCommandsEnabled", libGame_gv_players[lp_player].lv_bankData.lv_settingMinimapCommandsEnabled);
    BankSave(libGame_gv_players[lp_player].lv_bankData.lv_bank);
}

void libUIUI_gf_UIGameUIChangeModeMinimapCommandsForPlayer (int lp_player) {
    // Implementation
    if ((libGame_gv_players[lp_player].lv_bankData.lv_settingMinimapCommandsEnabled == true)) {
        UISetCommandAllowed(libCore_gv_playerGroupFromPlayer[lp_player], c_uiCommandAllowMinimap, true);
    }
    else {
        UISetCommandAllowed(libCore_gv_playerGroupFromPlayer[lp_player], c_uiCommandAllowMinimap, false);
    }
}

void libUIUI_gf_UIGameUIShowHideConsolePanelForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_uIGameUIHandles.lv_consolePanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_UIHealingFountainsHelpTextCreateTextTagsForTeam (int lp_team) {
    unitgroup autoD6CBEC40_g;
    int autoD6CBEC40_u;

    // Variable Declarations
    unitgroup lv_healingFountainsGroup;
    int lv_itTextTag;
    unit lv_itU;
    text lv_helpLabel;

    // Variable Initialization
    lv_healingFountainsGroup = UnitGroupEmpty();

    // Implementation
    UnitGroupAddUnitGroup(lv_healingFountainsGroup, UnitGroup("TownMoonwellL2", libGame_gv_teams[lp_team].lv_nPCPlayer, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_healingFountainsGroup, UnitGroup("TownMoonwellL3", libGame_gv_teams[lp_team].lv_nPCPlayer, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    if ((libCore_gv_sYSGameMode == 0)) {
        lv_helpLabel = StringExternal("Param/Value/lib_UIUI_28EB608E");
    }
    else {
        lv_helpLabel = StringExternal("Param/Value/lib_UIUI_124E24BA");
    }
    autoD6CBEC40_g = lv_healingFountainsGroup;
    autoD6CBEC40_u = 1;
    for ( ; autoD6CBEC40_u <= UnitGroupCount(autoD6CBEC40_g, c_unitCountAll) ; autoD6CBEC40_u += BoolToInt(lv_itU == UnitGroupUnit(autoD6CBEC40_g, autoD6CBEC40_u)) ) {
        lv_itU = UnitGroupUnit(autoD6CBEC40_g, autoD6CBEC40_u);
        lv_itTextTag += 1;
        TextTagCreate(lv_helpLabel, 24, UnitGetPosition(lv_itU), libUIUI_gv_uI_HealingFountainsHelpText_HeightOffset_C, false, false, PlayerGroupAll());
        libUIUI_gv_uIHealingFountainsHelpText[lp_team][lv_itTextTag].lv_textTag = TextTagLastCreated();
        libUIUI_gv_uIHealingFountainsHelpText[lp_team][lv_itTextTag].lv_healingFountain = lv_itU;
    }
}

void libUIUI_gf_UIHealingFountainsHelpTextShowHideForPlayer (int lp_player, bool lp_showHide) {
    int auto2CCEED65_ae;
    int auto2CCEED65_ai;

    // Variable Declarations
    int lv_itTextTag;
    int lv_arrayToUse;

    // Variable Initialization
    lv_arrayToUse = libGame_gf_TeamNumberOfPlayer(lp_player);

    // Implementation
    if ((lp_showHide == true)) {
        libUIUI_gv_uIHealingFountainsHelpTextTextShowing[lp_player] = true;
    }
    else {
        libUIUI_gv_uIHealingFountainsHelpTextTextShowing[lp_player] = false;
    }
    auto2CCEED65_ae = libUIUI_gv_uI_HealingFountainsHelpText_ArraySize_C;
    auto2CCEED65_ai = 1;
    lv_itTextTag = 1;
    for ( ; ( (auto2CCEED65_ai >= 0 && lv_itTextTag <= auto2CCEED65_ae) || (auto2CCEED65_ai <= 0 && lv_itTextTag >= auto2CCEED65_ae) ) ; lv_itTextTag += auto2CCEED65_ai ) {
        if ((libUIUI_gv_uIHealingFountainsHelpText[lv_arrayToUse][lv_itTextTag].lv_textTag == c_textTagNone)) {
            break;
        }
        else {
            if (((lp_showHide == false) || (UnitIsAlive(libUIUI_gv_uIHealingFountainsHelpText[lv_arrayToUse][lv_itTextTag].lv_healingFountain) == true))) {
                TextTagShow(libUIUI_gv_uIHealingFountainsHelpText[lv_arrayToUse][lv_itTextTag].lv_textTag, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
            }
            else {
            }
        }
    }
}

void libUIUI_gf_AttachHelpButtonToUnit (unit lp_attachedUnit, trigger lp_callback, text lp_helpText, int lp_xOffset, int lp_yOffset) {
    // Implementation
    if ((libUIUI_gv_helpButtonCount >= libUIUI_gv_helpButtonMaxCount_C)) {
        return ;
    }
    else {
    }
    libUIUI_gv_helpButtonCount += 1;
    DialogControlHookupUnitStatus(c_triggerControlTypePanel, "AttachPointFrame", lp_attachedUnit);
    libUIUI_gv_helpButtonFrames[libUIUI_gv_helpButtonCount] = DialogControlLastCreated();
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lp_xOffset, lp_yOffset);
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HelpText", lp_attachedUnit);
    libUIUI_gv_helpButtonLabels[libUIUI_gv_helpButtonCount] = DialogControlLastCreated();
    TextExpressionSetToken("Param/Expression/lib_UIUI_C420E9AE", "A", StringExternal("Param/Value/lib_UIUI_ECEBD1AC"));
    TextExpressionSetToken("Param/Expression/lib_UIUI_C420E9AE", "B", lp_helpText);
    libNtve_gf_SetDialogItemText(libUIUI_gv_helpButtonLabels[libUIUI_gv_helpButtonCount], TextExpressionAssemble("Param/Expression/lib_UIUI_C420E9AE"), PlayerGroupAll());
    UnitStatusBarOverride(lp_attachedUnit, c_unitStatusGroupAll);
    libUIUI_gv_helpButtonCallbacks[libUIUI_gv_helpButtonCount] = lp_callback;
    libUIUI_gv_helpButtonUnits[libUIUI_gv_helpButtonCount] = lp_attachedUnit;
}

void libUIUI_gf_ShowHideHelpButtonOnUnitForPlayer (int lp_player, bool lp_showHide, unit lp_unit) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_helpButtonLabels[libUIUI_gf_HelpButtonFromUnit(lp_unit)], libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

int libUIUI_gf_HelpButtonClickedPlayer () {
    // Implementation
    return DataTableGetInt(true, libUIUI_gv_helpButtonDataTableKey_C);
}

void libUIUI_gf_SetHelpButtonText (unit lp_unit, text lp_text, playergroup lp_players) {
    // Variable Declarations
    int lv_index;

    // Variable Initialization

    // Implementation
    lv_index = libUIUI_gf_HelpButtonFromUnit(lp_unit);
    if ((lv_index <= 0)) {
        return ;
    }
    else {
    }
    libNtve_gf_SetDialogItemText(libUIUI_gv_helpButtonLabels[lv_index], lp_text, lp_players);
}

int libUIUI_gf_HelpButtonFromUnit (unit lp_unit) {
    int auto32E447F9_ae;
    int auto32E447F9_ai;

    // Variable Declarations
    int lv_itIndex;

    // Variable Initialization

    // Implementation
    auto32E447F9_ae = libUIUI_gv_helpButtonCount;
    auto32E447F9_ai = 1;
    lv_itIndex = 1;
    for ( ; ( (auto32E447F9_ai >= 0 && lv_itIndex <= auto32E447F9_ae) || (auto32E447F9_ai <= 0 && lv_itIndex >= auto32E447F9_ae) ) ; lv_itIndex += auto32E447F9_ai ) {
        if ((libUIUI_gv_helpButtonUnits[lv_itIndex] == lp_unit)) {
            return lv_itIndex;
        }
        else {
        }
    }
    return 0;
}

void libUIUI_gf_UIHeroConsoleShowHideForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_uIHeroConsole.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
    DialogControlSetVisible(libUIUI_gv_uIHeroConsole.lv_buffDebuffPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
    DialogControlSetVisible(libUIUI_gv_uIHeroConsole.lv_gameUICommandPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
    DialogControlSetVisible(libUIUI_gv_uIHeroConsole.lv_gameUIInventoryPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
    DialogControlSetVisible(libUIUI_gv_uIHeroConsole.lv_gameUIPortrait, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_UIHeroConsoleShowHideUnitStatusFrameForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_uIHeroConsole.lv_heroStatsUnitStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_UIHeroConsoleSetUpForPlayer (unit lp_unit, int lp_player) {
    string autoAFEECCF3_val;

    // Variable Declarations
    int lv_heroIndex;

    // Variable Initialization

    // Implementation
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_uIHeroConsole.lv_heroStatsUnitStatusFrame, lp_unit, libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uIHeroConsole.lv_heroStatsHealthBar, StringExternal("Param/Value/lib_UIUI_A0E8D814"), libCore_gv_playerGroupFromPlayer[lp_player]);
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    autoAFEECCF3_val = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_heroCatalogLink;
    if (autoAFEECCF3_val == "Barbarian") {
        libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uIHeroConsole.lv_heroStatsManaBar, StringExternal("Param/Value/lib_UIUI_52E43F99"), libCore_gv_playerGroupFromPlayer[lp_player]);
    }
    else {
        libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uIHeroConsole.lv_heroStatsManaBar, StringExternal("Param/Value/lib_UIUI_736AA0F1"), libCore_gv_playerGroupFromPlayer[lp_player]);
    }
}

void libUIUI_gf_HeroConsoleUnitStatusBarsUpdateStunDeathBar (string lp_newBehavior, unit lp_heroUnit) {
    // Variable Declarations
    int lv_player;

    // Variable Initialization

    // Implementation
    lv_player = UnitGetOwner(lp_heroUnit);
    if ((lv_player > libCore_gv_bALMaxEnginePlayerCount)) {
        return ;
    }
    else {
    }
    if ((lp_heroUnit != libUIUI_gv_heroConsoleUnitStatusBars_CurrentUnitForPlayer[lv_player])) {
        return ;
    }
    else {
    }
    if ((lp_newBehavior == "Dead")) {
        libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_5CE53894"), libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemImage(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon, "@UI/HUD_Bar_DeathStun_Icon_Stun", libCore_gv_playerGroupFromPlayer[lv_player]);
    }
    else {
        if ((UnitBehaviorDuration(lp_heroUnit, lp_newBehavior) >= UnitBehaviorDuration(lp_heroUnit, libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player]))) {
            libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
            libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_33824A8F"), libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemImage(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon, (CatalogFieldValueGet(c_gameCatalogBehavior, lp_newBehavior, "InfoIcon", c_playerAny)), libCore_gv_playerGroupFromPlayer[lv_player]);
        }
        else {
        }
    }
    DialogControlSetVisible(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame, libCore_gv_playerGroupFromPlayer[lv_player], true);
}

void libUIUI_gf_HeroConsoleUnitStatusBarsSetUnitForBars (unit lp_unit, int lp_player) {
    // Implementation
    libUIUI_gv_heroConsoleUnitStatusBars_CurrentUnitForPlayer[lp_player] = lp_unit;
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame, lp_unit, libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_heroConsoleUnitStatusBars.lv_castChannelBarParentFrame, lp_unit, libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarParentFrame, lp_unit, libCore_gv_playerGroupFromPlayer[lp_player]);
}

void libUIUI_gf_HeroConsoleUnitStatusBarsUpdateForPlayer (int lp_player) {
    // Variable Declarations
    fixed lv_behaviorDurationRemaining;

    // Variable Initialization

    // Implementation
    lv_behaviorDurationRemaining = UnitBehaviorDuration(libUIUI_gv_heroConsoleUnitStatusBars_CurrentUnitForPlayer[lp_player], libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lp_player]);
    if ((lv_behaviorDurationRemaining > 0.0)) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarTimeLabel, FixedToText(lv_behaviorDurationRemaining, 1), libCore_gv_playerGroupFromPlayer[lp_player]);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    lv_behaviorDurationRemaining = UnitBehaviorDuration(libUIUI_gv_heroConsoleUnitStatusBars_CurrentUnitForPlayer[lp_player], libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lp_player]);
    if ((lv_behaviorDurationRemaining <= 0.0)) {
        DialogControlSetVisible(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarParentFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    else {
    }
}

void libUIUI_gf_UIUnitStatusFramesShowUnitNameLabelForUnit (unit lp_unit) {
    // Implementation
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HeroUnitStatusParentFrame/UnitNameLabel/Label", lp_unit);
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), true);
}

void libUIUI_gf_UIUnitStatusFramesHookupUnitStatusFramesForPlayer (int lp_player) {
    // Variable Declarations
    unit lv_hero;

    // Variable Initialization

    // Implementation
    if (((lp_player > libCore_gv_bALMaxPlayers) || (lp_player < 1))) {
        return ;
    }
    else {
    }
    if ((libGame_gv_players[lp_player].lv_activeVehicle != null)) {
        lv_hero = libGame_gv_players[lp_player].lv_activeVehicle;
    }
    else {
        lv_hero = libGame_gv_players[lp_player].lv_heroUnit;
    }
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HeroUnitStatusParentFrame/UnitNameLabel/Label", lv_hero);
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), true);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_playerNameLabel = DialogControlLastCreated();
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HeroUnitStatusParentFrame/HeroNameLabel", lv_hero);
    libNtve_gf_SetDialogItemText(DialogControlLastCreated(), UnitTypeGetName(UnitGetType(lv_hero)), PlayerGroupAll());
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_heroNameLabel = DialogControlLastCreated();
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HeroUnitStatusParentFrame/BotDifficultyLabel", lv_hero);
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_botDifficultyLabel = DialogControlLastCreated();
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HeroUnitStatusParentFrame/BotStatusLabel", lv_hero);
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_botStatusLabel = DialogControlLastCreated();
    DialogControlHookupUnitStatus(c_triggerControlTypePanel, "HeroUnitStatusParentFrame/HeroMapMechanic", lv_hero);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_mapMechanicFrame = DialogControlLastCreated();
    DialogControlHookupUnitStatus(c_triggerControlTypeImage, "HeroUnitStatusParentFrame/HeroMapMechanic/MapMechanicIcon", lv_hero);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_mapMechanicIcon = DialogControlLastCreated();
    DialogControlHookupUnitStatus(c_triggerControlTypeLabel, "HeroUnitStatusParentFrame/HeroMapMechanic/MapMechanicCount", lv_hero);
    libUIUI_gv_uIHeroStatusFrames[lp_player].lv_mapMechanicCount = DialogControlLastCreated();
}

void libUIUI_gf_UIUnitStatusFramesShowHideBotLabel (int lp_player, bool lp_showHide) {
    // Implementation
    if ((lp_showHide == true)) {
        DialogControlSetVisible(libUIUI_gv_uIHeroStatusFrames[lp_player].lv_playerNameLabel, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_uIHeroStatusFrames[lp_player].lv_heroNameLabel, PlayerGroupAll(), true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uIHeroStatusFrames[lp_player].lv_heroNameLabel, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_uIHeroStatusFrames[lp_player].lv_playerNameLabel, PlayerGroupAll(), true);
    }
}

void libUIUI_gf_UIHeroTrackerArrowShowHideForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_uIHeroTrackerArrow.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_DisplayCameraLockNotificationText (bool lp_lockUnlock, int lp_player) {
    // Variable Declarations
    text lv_label;

    // Variable Initialization

    // Implementation
    if ((lp_lockUnlock == true)) {
        lv_label = StringExternal("Param/Value/lib_UIUI_006511ED");
        SoundPlayForPlayer(SoundLink("UI_Game_Camera_Locked", -1), c_maxPlayers, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, 0.0);
    }
    else {
        lv_label = StringExternal("Param/Value/lib_UIUI_6EC0E30D");
        SoundPlayForPlayer(SoundLink("UI_Game_Camera_Unlocked", -1), c_maxPlayers, libCore_gv_playerGroupFromPlayer[lp_player], 100.0, 0.0);
    }
    DialogControlHookupStandard(c_triggerControlTypeLabel, "UIContainer/ConsoleUIContainer/CameraLockChanges");
    libNtve_gf_SetDialogItemText(DialogControlLastCreated(), lv_label, libCore_gv_playerGroupFromPlayer[lp_player]);
    DialogControlFadeTransparency(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[lp_player], 0.0, 0.0);
    DialogControlSetEnabled(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[lp_player], false);
    DialogControlSetEnabled(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[lp_player], true);
}

void libUIUI_gf_UILeaderboardSortingData (int lp_player, int lp_teamtoSort, int lp_sortingColumn, int lp_mechanic) {
    int auto72D7AE13_ae;
    int auto0DDBE66B_ae;
    int auto0DDBE66B_ai;
    int auto87D2D129_ae;
    int auto87D2D129_ai;
    int auto206960ED_val;
    int autoA84CD256_val;

    // Variable Declarations
    int lv_itPlayerRank;
    int lv_dataFieldB;
    int lv_dataFieldB1;
    int lv_itA;
    int lv_itB;

    // Variable Initialization

    // Implementation
    if ((lp_sortingColumn == 0)) {
        libUIUI_gf_UILeaderboardSortbyPlayerSlotDefault(lp_player, lp_teamtoSort, libMapM_gf_PrimaryMapMechanic());
        return ;
    }
    else {
        auto72D7AE13_ae = libCore_gv_bALMaxPlayersOnATeam;
        lv_itPlayerRank = 1;
        for ( ; lv_itPlayerRank <= auto72D7AE13_ae ; lv_itPlayerRank += 1 ) {
            libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[lp_teamtoSort][lv_itPlayerRank][lp_player] = 1;
        }
        auto0DDBE66B_ae = (libCore_gv_bALMaxPlayersOnATeam - 1);
        auto0DDBE66B_ai = 1;
        lv_itA = 1;
        for ( ; ( (auto0DDBE66B_ai >= 0 && lv_itA <= auto0DDBE66B_ae) || (auto0DDBE66B_ai <= 0 && lv_itA >= auto0DDBE66B_ae) ) ; lv_itA += auto0DDBE66B_ai ) {
            auto87D2D129_ae = 4;
            auto87D2D129_ai = 1;
            lv_itB = lv_itA;
            for ( ; ( (auto87D2D129_ai >= 0 && lv_itB <= auto87D2D129_ae) || (auto87D2D129_ai <= 0 && lv_itB >= auto87D2D129_ae) ) ; lv_itB += auto87D2D129_ai ) {
                auto206960ED_val = lp_sortingColumn;
                if (auto206960ED_val == 1) {
                    lv_dataFieldB = FixedToInt(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_individualXPEarned);
                    lv_dataFieldB1 = FixedToInt(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_individualXPEarned);
                }
                else if (auto206960ED_val == 2) {
                    lv_dataFieldB = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_takedowns;
                    lv_dataFieldB1 = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_takedowns;
                }
                else if (auto206960ED_val == 3) {
                    lv_dataFieldB = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_deaths;
                    lv_dataFieldB1 = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_deaths;
                }
                else if (auto206960ED_val == 4) {
                    autoA84CD256_val = libMapM_gf_PrimaryMapMechanic();
                    if (autoA84CD256_val == 2) {
                        lv_dataFieldB = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_doubloonsTurnedIn;
                        lv_dataFieldB1 = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_doubloonsTurnedIn;
                    }
                    else if (autoA84CD256_val == 1) {
                        lv_dataFieldB = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_tributesCollected;
                        lv_dataFieldB1 = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_tributesCollected;
                    }
                    else if (autoA84CD256_val == 3) {
                        lv_dataFieldB = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_dragonCaptures;
                        lv_dataFieldB1 = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_dragonCaptures;
                    }
                    else if (autoA84CD256_val == 4) {
                        lv_dataFieldB = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_skullsCollected;
                        lv_dataFieldB1 = libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_skullsCollected;
                    }
                    else {
                    }
                }
                else {
                }
                if ((lv_dataFieldB < lv_dataFieldB1)) {
                    libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[lp_teamtoSort][libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_teamPlayerSlot][lp_player] = (libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[lp_teamtoSort][libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itA, lp_teamtoSort)].lv_teamPlayerSlot][lp_player] + 1);
                }
                else {
                    libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[lp_teamtoSort][libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_teamPlayerSlot][lp_player] = (libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[lp_teamtoSort][libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot((lv_itB + 1), lp_teamtoSort)].lv_teamPlayerSlot][lp_player] + 1);
                }
            }
        }
        libUIUI_gf_UILeaderboardSortbyColumnType(lp_player, lp_teamtoSort, libMapM_gf_PrimaryMapMechanic());
    }
}

void libUIUI_gf_UILeaderboardSortbyPlayerSlotDefault (int lp_player, int lp_teamtoSort, int lp_mechanic) {
    int auto576AA95E_ae;
    int auto576AA95E_ai;
    int auto839DD85E_val;
    int autoE5B038B9_val;

    // Variable Declarations
    int lv_slot;
    int lv_itPlayerSlot;
    int lv_itPlayerNumber;

    // Variable Initialization
    lv_itPlayerNumber = 1;

    // Implementation
    auto576AA95E_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto576AA95E_ai = 1;
    lv_itPlayerSlot = 1;
    for ( ; ( (auto576AA95E_ai >= 0 && lv_itPlayerSlot <= auto576AA95E_ae) || (auto576AA95E_ai <= 0 && lv_itPlayerSlot >= auto576AA95E_ae) ) ; lv_itPlayerSlot += auto576AA95E_ai ) {
        if ((libGame_gf_TeamNumberOfPlayer(libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, lp_teamtoSort)) == libGame_gf_TeamNumberOfPlayer(lp_player))) {
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_allySide][lv_itPlayerSlot], libCore_gv_dataHeroesHeroData[libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_heroIndex].lv_leaderboardImage, libCore_gv_playerGroupFromPlayer[lp_player]);
            if (((libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_playerStatus == 3) || (PlayerType(libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))) == c_playerTypeComputer))) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_allySide][lv_itPlayerSlot], (libAIAI_gf_HeroAIDifficultyDisplayText(libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))) + StringExternal("Param/Value/lib_UIUI_AB55F0E8")), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_allySide][lv_itPlayerSlot], libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_name, libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_heroName[libCore_gv_allySide][lv_itPlayerSlot], UnitTypeGetName(UnitGetType(libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_heroUnit)), libCore_gv_playerGroupFromPlayer[lp_player]);
            if ((libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, lp_teamtoSort) == lp_player)) {
                DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_playerOwnerBackground[libCore_gv_allySide][lv_itPlayerSlot], libCore_gv_playerGroupFromPlayer[lp_player], true);
                libNtve_gf_SetDialogItemStyle(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_allySide][lv_itPlayerSlot], "Storm_TeamPlayerNameLabel_BlueHighlight", PlayerGroupAll());
                libNtve_gf_SetDialogItemStyle(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_allySide][lv_itPlayerSlot], "Storm_TeamValueLabel_BlueHighlight", PlayerGroupAll());
                libNtve_gf_SetDialogItemStyle(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_allySide][lv_itPlayerSlot], "Storm_TeamValueLabel_BlueHighlight", PlayerGroupAll());
                libNtve_gf_SetDialogItemStyle(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_allySide][lv_itPlayerSlot], "Storm_TeamValueLabel_BlueHighlight", PlayerGroupAll());
                libNtve_gf_SetDialogItemStyle(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_itPlayerSlot], "Storm_TeamValueLabel_BlueHighlight", PlayerGroupAll());
            }
            else {
                DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_playerOwnerBackground[libCore_gv_allySide][lv_itPlayerSlot], libCore_gv_playerGroupFromPlayer[lp_player], false);
            }
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_itPlayerSlot], libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_icon[libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            if ((libNtve_gf_DialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_itPlayerSlot], lp_player) == "")) {
                libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_itPlayerSlot], "Assets\\Textures\\storm_ui_ingame_hero_icon_placeholder.dds", libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
            libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_itPlayerSlot], libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_tooltipSimple[libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_allySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_takedowns), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_allySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_deaths), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_allySide][lv_itPlayerSlot], FixedToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_individualXPEarned, 0), libCore_gv_playerGroupFromPlayer[lp_player]);
            autoE5B038B9_val = lp_mechanic;
            if (autoE5B038B9_val == 2) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_doubloonsTurnedIn), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (autoE5B038B9_val == 1) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_tributesCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (autoE5B038B9_val == 4) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_skullsCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (autoE5B038B9_val == 3) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_TeamNumberOfPlayer(lp_player))].lv_dragonCaptures), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
        }
        else {
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_enemySide][lv_itPlayerSlot], libCore_gv_dataHeroesHeroData[libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_heroIndex].lv_leaderboardImage, libCore_gv_playerGroupFromPlayer[lp_player]);
            if (((libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_playerStatus == 3) || (PlayerType(libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))) == c_playerTypeComputer))) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_enemySide][lv_itPlayerSlot], (libAIAI_gf_HeroAIDifficultyDisplayText(libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))) + StringExternal("Param/Value/lib_UIUI_23050BC2")), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_enemySide][lv_itPlayerSlot], libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_name, libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_heroName[libCore_gv_enemySide][lv_itPlayerSlot], UnitTypeGetName(UnitGetType(libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_heroUnit)), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_itPlayerSlot], libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_icon[libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            if ((libNtve_gf_DialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_itPlayerSlot], lp_player) == "")) {
                libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_itPlayerSlot], "Assets\\Textures\\storm_ui_ingame_hero_icon_placeholder.dds", libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
            libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_itPlayerSlot], libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_tooltipSimple[libGame_gv_players[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_enemySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_takedowns), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_enemySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_deaths), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_enemySide][lv_itPlayerSlot], FixedToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_individualXPEarned, 0), libCore_gv_playerGroupFromPlayer[lp_player]);
            auto839DD85E_val = lp_mechanic;
            if (auto839DD85E_val == 2) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_doubloonsTurnedIn), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto839DD85E_val == 1) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_tributesCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto839DD85E_val == 4) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_skullsCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto839DD85E_val == 3) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_itPlayerSlot], IntToText(libGame_gv_scoreValues[libCore_gf_GetPlayerIDfromTeamSlot(lv_itPlayerSlot, libGame_gf_EnemyTeamNumberOfPlayer(lp_player))].lv_dragonCaptures), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
        }
    }
}

void libUIUI_gf_UILeaderboardSortbyColumnType (int lp_player, int lp_teamtoSort, int lp_mechanic) {
    int auto02DB4586_val;
    int auto3FDF28C3_val;

    // Variable Declarations
    int lv_slot;
    int lv_itPlayerSlot;
    int lv_itPlayerNumber;

    // Variable Initialization

    // Implementation
    PlayerGroupLoopBegin(libGame_gf_PlayersOnTeamHeroes(lp_teamtoSort, false));
    for ( ; !PlayerGroupLoopDone() ; PlayerGroupLoopStep() ) {
        if ((libGame_gf_TeamNumberOfPlayer(PlayerGroupLoopCurrent()) == libGame_gf_TeamNumberOfPlayer(lp_player))) {
            lv_slot = libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[libCore_gv_allySide][libGame_gv_players[PlayerGroupLoopCurrent()].lv_teamPlayerSlot][lp_player];
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_allySide][lv_slot], libCore_gv_dataHeroesHeroData[libGame_gv_players[PlayerGroupLoopCurrent()].lv_heroIndex].lv_leaderboardImage, libCore_gv_playerGroupFromPlayer[lp_player]);
            if (((libGame_gv_players[PlayerGroupLoopCurrent()].lv_playerStatus == 3) || (PlayerType(PlayerGroupLoopCurrent()) == c_playerTypeComputer))) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_allySide][lv_slot], (libAIAI_gf_HeroAIDifficultyDisplayText(PlayerGroupLoopCurrent()) + StringExternal("Param/Value/lib_UIUI_6A9F4CE0")), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_allySide][lv_slot], libGame_gv_players[PlayerGroupLoopCurrent()].lv_name, libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_heroName[libCore_gv_allySide][lv_slot], UnitTypeGetName(UnitGetType(libGame_gv_players[PlayerGroupLoopCurrent()].lv_heroUnit)), libCore_gv_playerGroupFromPlayer[lp_player]);
            if ((PlayerGroupLoopCurrent() == lp_player)) {
                DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_playerOwnerBackground[libCore_gv_allySide][lv_slot], libCore_gv_playerGroupFromPlayer[lp_player], true);
            }
            else {
                DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_playerOwnerBackground[libCore_gv_allySide][lv_slot], libCore_gv_playerGroupFromPlayer[lp_player], false);
            }
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_slot], libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_icon[libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            if ((libNtve_gf_DialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_slot], lp_player) == "")) {
                libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_slot], "Assets\\Textures\\storm_ui_ingame_hero_icon_placeholder.dds", libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
            libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_slot], libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_tooltipSimple[libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_takedowns), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_deaths), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_allySide][lv_slot], FixedToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_individualXPEarned, 0), libCore_gv_playerGroupFromPlayer[lp_player]);
            auto3FDF28C3_val = lp_mechanic;
            if (auto3FDF28C3_val == 2) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_doubloonsTurnedIn), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto3FDF28C3_val == 1) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_tributesCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto3FDF28C3_val == 4) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_skullsCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto3FDF28C3_val == 3) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_dragonCaptures), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
        }
        else {
            lv_slot = libUIUI_gv_uILeaderboardSorting.lv_leaderboardSort[libCore_gv_enemySide][libGame_gv_players[PlayerGroupLoopCurrent()].lv_teamPlayerSlot][lp_player];
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_enemySide][lv_slot], libCore_gv_dataHeroesHeroData[libGame_gv_players[PlayerGroupLoopCurrent()].lv_heroIndex].lv_leaderboardImage, libCore_gv_playerGroupFromPlayer[lp_player]);
            if (((libGame_gv_players[PlayerGroupLoopCurrent()].lv_playerStatus == 3) || (PlayerType(PlayerGroupLoopCurrent()) == c_playerTypeComputer))) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_enemySide][lv_slot], (libAIAI_gf_HeroAIDifficultyDisplayText(PlayerGroupLoopCurrent()) + StringExternal("Param/Value/lib_UIUI_8E7FD0E1")), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_enemySide][lv_slot], libGame_gv_players[PlayerGroupLoopCurrent()].lv_name, libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_heroName[libCore_gv_enemySide][lv_slot], UnitTypeGetName(UnitGetType(libGame_gv_players[PlayerGroupLoopCurrent()].lv_heroUnit)), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_slot], libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_icon[libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            if ((libNtve_gf_DialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_slot], lp_player) == "")) {
                libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_slot], "Assets\\Textures\\storm_ui_ingame_hero_icon_placeholder.dds", libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
            libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_slot], libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_tooltipSimple[libGame_gv_players[PlayerGroupLoopCurrent()].lv_talentsBucketABChoices[4].lv_selection], libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_takedowns), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_deaths), libCore_gv_playerGroupFromPlayer[lp_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_enemySide][lv_slot], FixedToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_individualXPEarned, 0), libCore_gv_playerGroupFromPlayer[lp_player]);
            auto02DB4586_val = lp_mechanic;
            if (auto02DB4586_val == 2) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_doubloonsTurnedIn), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto02DB4586_val == 1) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_tributesCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto02DB4586_val == 4) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_skullsCollected), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else if (auto02DB4586_val == 3) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[PlayerGroupLoopCurrent()].lv_dragonCaptures), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
        }
    }
    PlayerGroupLoopEnd();
}

void libUIUI_gf_UILeaderboardShowHideForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_UILeaderboardUpdatePlayersXPTakedownsDeaths (int lp_player) {
    // Variable Declarations
    int lv_allyTeam;
    int lv_enemyTeam;
    int lv_slot;

    // Variable Initialization

    // Implementation
    lv_allyTeam = libGame_gf_TeamNumberOfPlayer(lp_player);
    lv_enemyTeam = (3 - lv_allyTeam);
    lv_slot = libGame_gv_players[lp_player].lv_teamPlayerSlot;
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_allySide][lv_slot], IntToText((libGame_gv_scoreValues[lp_player].lv_kills + libGame_gv_scoreValues[lp_player].lv_assists)), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_deaths), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_allySide][lv_slot], FixedToText(libGame_gv_scoreValues[lp_player].lv_individualXPEarned, 0), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_takedownsLabel[libCore_gv_enemySide][lv_slot], IntToText((libGame_gv_scoreValues[lp_player].lv_kills + libGame_gv_scoreValues[lp_player].lv_assists)), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_deathsLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_deaths), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerXPLabel[libCore_gv_enemySide][lv_slot], FixedToText(libGame_gv_scoreValues[lp_player].lv_individualXPEarned, 0), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
}

void libUIUI_gf_UILeaderboardUpdatePlayersMapMechanicsCount (int lp_player, int lp_mechanic) {
    int auto2AED5E8F_val;

    // Variable Declarations
    int lv_allyTeam;
    int lv_enemyTeam;
    int lv_slot;
    int lv_number;

    // Variable Initialization

    // Implementation
    lv_allyTeam = libGame_gf_TeamNumberOfPlayer(lp_player);
    lv_enemyTeam = (3 - lv_allyTeam);
    lv_slot = libGame_gv_players[lp_player].lv_teamPlayerSlot;
    auto2AED5E8F_val = lp_mechanic;
    if (auto2AED5E8F_val == 2) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_doubloonsTurnedIn), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_doubloonsTurnedIn), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    }
    else if (auto2AED5E8F_val == 1) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_tributesCollected), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_tributesCollected), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    }
    else if (auto2AED5E8F_val == 4) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_skullsCollected), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_skullsCollected), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    }
    else if (auto2AED5E8F_val == 3) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_allySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_dragonCaptures), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
        libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[libCore_gv_enemySide][lv_slot], IntToText(libGame_gv_scoreValues[lp_player].lv_dragonCaptures), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    }
    else {
    }
}

void libUIUI_gf_UILeaderboardUpdateTeamLevel (int lp_player) {
    // Variable Declarations
    int lv_allyTeam;
    int lv_enemyTeam;
    int lv_slot;

    // Variable Initialization

    // Implementation
    lv_allyTeam = libGame_gf_TeamNumberOfPlayer(lp_player);
    lv_enemyTeam = (3 - lv_allyTeam);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_teamLevelLabels[libCore_gv_allySide], (StringExternal("Param/Value/lib_UIUI_4D2AF92D") + IntToText(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_teamLevel)), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_teamLevelLabels[libCore_gv_enemySide], (StringExternal("Param/Value/lib_UIUI_9A892921") + IntToText(libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(lp_player)].lv_teamLevel)), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
}

void libUIUI_gf_UILeaderboardUpdatePlayersHeroicAbilityChoice (int lp_player, int lp_buttonIndex) {
    // Variable Declarations
    int lv_allyTeam;
    int lv_enemyTeam;
    int lv_slot;

    // Variable Initialization

    // Implementation
    lv_allyTeam = libGame_gf_TeamNumberOfPlayer(lp_player);
    lv_enemyTeam = (3 - lv_allyTeam);
    lv_slot = libGame_gv_players[lp_player].lv_teamPlayerSlot;
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_slot], libGame_gv_players[lp_player].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_icon[lp_buttonIndex], libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_allySide][lv_slot], libGame_gv_players[lp_player].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_tooltipSimple[lp_buttonIndex], libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_slot], libGame_gv_players[lp_player].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_icon[lp_buttonIndex], libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[libCore_gv_enemySide][lv_slot], libGame_gv_players[lp_player].lv_talentsBucketABChoices[4].lv_talentChoiceData.lv_tooltipSimple[lp_buttonIndex], libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
}

void libUIUI_gf_UILeaderboardSetUpPlayerOnLeaderboard (int lp_player) {
    int auto59CB4EDF_ae;
    int auto59CB4EDF_ai;
    int auto5F6D17E9_ae;
    int auto5F6D17E9_ai;

    // Variable Declarations
    int lv_l;
    int lv_p;
    int lv_allyTeam;
    int lv_enemyTeam;
    int lv_slot;

    // Variable Initialization

    // Implementation
    lv_allyTeam = libGame_gf_TeamNumberOfPlayer(lp_player);
    lv_enemyTeam = (3 - lv_allyTeam);
    lv_slot = libGame_gv_players[lp_player].lv_teamPlayerSlot;
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_allySide][lv_slot], libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_leaderboardImage, libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_allySide][lv_slot], libGame_gv_players[lp_player].lv_name, libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_heroName[libCore_gv_allySide][lv_slot], UnitTypeGetName(UnitGetType(libGame_gv_players[lp_player].lv_heroUnit)), libGame_gv_teams[lv_allyTeam].lv_teamPlayerGroup);
    DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_allySide][lv_slot], PlayerGroupAll(), true);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_enemySide][lv_slot], libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_leaderboardImage, libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_playerName[libCore_gv_enemySide][lv_slot], libGame_gv_players[lp_player].lv_name, libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_heroName[libCore_gv_enemySide][lv_slot], UnitTypeGetName(UnitGetType(libGame_gv_players[lp_player].lv_heroUnit)), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroup);
    if ((libNtve_gf_DialogItemImage(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_enemySide][lv_slot], lp_player) == "")) {
        DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_enemySide][lv_slot], PlayerGroupAll(), false);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uILeaderboard.lv_portrait[libCore_gv_enemySide][lv_slot], PlayerGroupAll(), true);
    }
    auto59CB4EDF_ae = libCore_gv_bALMaxPlayers;
    auto59CB4EDF_ai = 1;
    lv_p = 1;
    for ( ; ( (auto59CB4EDF_ai >= 0 && lv_p <= auto59CB4EDF_ae) || (auto59CB4EDF_ai <= 0 && lv_p >= auto59CB4EDF_ae) ) ; lv_p += auto59CB4EDF_ai ) {
        if ((libGame_gv_players[lv_p].lv_isViewingLeaderboard == true)) {
            auto5F6D17E9_ae = 2;
            auto5F6D17E9_ai = 1;
            lv_l = 1;
            for ( ; ( (auto5F6D17E9_ai >= 0 && lv_l <= auto5F6D17E9_ae) || (auto5F6D17E9_ai <= 0 && lv_l >= auto5F6D17E9_ae) ) ; lv_l += auto5F6D17E9_ai ) {
                libUIUI_gf_UILeaderboardSortingData(lv_p, lv_l, libUIUI_gv_uILeaderboardSorting.lv_playerSortingColumn[lv_p][libGame_gf_TeamNumberOfPlayer(lv_p)], libMapM_gf_PrimaryMapMechanic());
            }
        }
        else {
        }
    }
}

void libUIUI_gf_UILeaderboardUpdateMapMechanicLabels (int lp_mapMechanics) {
    int auto58764773_ae;
    int auto58764773_ai;
    int auto6513245C_val;

    // Variable Declarations
    int lv_i;

    // Variable Initialization

    // Implementation
    auto58764773_ae = 2;
    auto58764773_ai = 1;
    lv_i = 1;
    for ( ; ( (auto58764773_ai >= 0 && lv_i <= auto58764773_ae) || (auto58764773_ai <= 0 && lv_i >= auto58764773_ae) ) ; lv_i += auto58764773_ai ) {
        auto6513245C_val = lp_mapMechanics;
        if (auto6513245C_val == 2) {
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicSortingButton[lv_i], StringExternal("Param/Value/lib_UIUI_310EBE01"), PlayerGroupAll());
        }
        else if (auto6513245C_val == 1) {
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicSortingButton[lv_i], StringExternal("Param/Value/lib_UIUI_8C2428E4"), PlayerGroupAll());
        }
        else if (auto6513245C_val == 3) {
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicSortingButton[lv_i], StringExternal("Param/Value/lib_UIUI_7C20752A"), PlayerGroupAll());
        }
        else if (auto6513245C_val == 4) {
            libNtve_gf_SetDialogItemText(libUIUI_gv_uILeaderboard.lv_mapMechanicSortingButton[lv_i], StringExternal("Param/Value/lib_UIUI_98C780CB"), PlayerGroupAll());
        }
        else {
        }
    }
}

void libUIUI_gf_MapMechanicsRavenCourtShowHidePanel (bool lp_showHide) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtPanel, libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtPanel, libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
}

void libUIUI_gf_MapMechanicsRavenCourtSetModeForTeam (int lp_mode, int lp_teamThatWonTheCurse) {
    int auto3B208D3F_val;

    // Variable Declarations
    int lv_cursedTeam;

    // Variable Initialization

    // Implementation
    auto3B208D3F_val = lp_mode;
    if (auto3B208D3F_val == 0) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeFrame[libGame_gv_teamOrderIndex_C], PlayerGroupAll(), true);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeFrame[libGame_gv_teamChaosIndex_C], PlayerGroupAll(), true);
    }
    else if (auto3B208D3F_val == 1) {
        lv_cursedTeam = (3 - lp_teamThatWonTheCurse);
        libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseInfoLabel, "Storm_MapMechanic_MechanicTimerCentered_Blue", libGame_gv_teams[lp_teamThatWonTheCurse].lv_teamPlayerGroupNoNPCPlayers);
        libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseInfoLabel, "Storm_MapMechanic_MechanicTimerCentered_Red", libGame_gv_teams[lv_cursedTeam].lv_teamPlayerGroupNoNPCPlayers);
        libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseInfoLabel, StringExternal("UI/MapMechanics/CursedHollow/TeamCursed"), libGame_gv_teams[lv_cursedTeam].lv_teamPlayerGroupNoNPCPlayers);
        libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseInfoLabel, StringExternal("UI/MapMechanics/CursedHollow/EnemyTeamCursed"), libGame_gv_teams[lp_teamThatWonTheCurse].lv_teamPlayerGroupNoNPCPlayers);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseFrame, PlayerGroupAll(), true);
    }
    else {
    }
}

void libUIUI_gf_MapMechanicsRavenCourtSetTributeCountForTeam (int lp_count, int lp_team) {
    // Implementation
    TextExpressionSetToken("Param/Expression/lib_UIUI_2C0A5180", "A", IntToText(lp_count));
    TextExpressionSetToken("Param/Expression/lib_UIUI_2C0A5180", "B", IntToText(libMapM_gv_mMRavenTributeThreshold_C));
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeCounterLabel[lp_team], TextExpressionAssemble("Param/Expression/lib_UIUI_2C0A5180"), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsRavenCourtSetRemainingCurseTimeForTeam (int lp_remainingSeconds, int lp_team) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseTimerLabel, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsBlackheartsBayShowHidePanel (bool lp_showHide) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayPanel, libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayPanel, libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
}

void libUIUI_gf_MapMechanicsBlackheartsBaySetMode (int lp_mode) {
    int autoDC06C81E_val;

    // Implementation
    autoDC06C81E_val = lp_mode;
    if (autoDC06C81E_val == 0) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonModeFrame, PlayerGroupAll(), true);
    }
    else if (autoDC06C81E_val == 1) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonModeFrame, PlayerGroupAll(), true);
    }
    else {
    }
}

void libUIUI_gf_MapMechanicsBlackheartsBayShowCannonballForTeam (int lp_team) {
    // Variable Declarations
    int lv_enemyTeam;

    // Variable Initialization

    // Implementation
    lv_enemyTeam = (3 - lp_team);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonCannonballImage[lv_enemyTeam], PlayerGroupAll(), false);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[lv_enemyTeam], PlayerGroupAll(), false);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonCannonballImage[lp_team], PlayerGroupAll(), true);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[lp_team], PlayerGroupAll(), true);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonRemainingCannonballsLabel, "Storm_MapMechanic_MechanicCounterSmallRight_Blue", libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonRemainingCannonballsLabel, "Storm_MapMechanic_MechanicCounterSmallRight_Red", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
}

void libUIUI_gf_MapMechanicsBlackheartsBaySetDoubloonCountForTeam (int lp_count, int lp_maxCount, int lp_team) {
    // Implementation
    TextExpressionSetToken("Param/Expression/lib_UIUI_8CF045C0", "A", IntToText(lp_count));
    TextExpressionSetToken("Param/Expression/lib_UIUI_8CF045C0", "B", IntToText(lp_maxCount));
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonCounterLabel[lp_team], TextExpressionAssemble("Param/Expression/lib_UIUI_8CF045C0"), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsBlackheartsBaySetShotCountForTeam (int lp_count, int lp_team) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[lp_team], IntToText(lp_count), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsHauntedMinesShowHidePanel (bool lp_showHide) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesPanel, libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesPanel, libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
}

void libUIUI_gf_MapMechanicsHauntedMinesSetMode (int lp_mode) {
    int autoCBAA65F0_val;

    // Implementation
    autoCBAA65F0_val = lp_mode;
    if (autoCBAA65F0_val == 0) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesGolemModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerModeFrame, PlayerGroupAll(), true);
    }
    else if (autoCBAA65F0_val == 1) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesGolemModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeFrame, PlayerGroupAll(), true);
    }
    else if (autoCBAA65F0_val == 2) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesGolemModeFrame, PlayerGroupAll(), true);
    }
    else {
    }
}

void libUIUI_gf_MapMechanicsHauntedMinesSetRemainingMinesWarningTime (int lp_remainingSeconds) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerLabel, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsHauntedMinesSetSkullCountForTeam (int lp_count, int lp_team) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeSkullCounterLabel[lp_team], IntToText(lp_count), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsHauntedMinesSetUpGolemForTeam (unit lp_golemUnit, int lp_skullCount, int lp_team) {
    // Variable Declarations
    int lv_enemyTeam;

    // Variable Initialization

    // Implementation
    lv_enemyTeam = (3 - lp_team);
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesAllyGolemHealthUnitStatus, lp_golemUnit, libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesEnemyGolemHealthUnitStatus, lp_golemUnit, libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesAllyGolemModeSkullCounterLabel, IntToText(lp_skullCount), libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesEnemyGolemModeSkullCounterLabel, IntToText(lp_skullCount), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
}

void libUIUI_gf_MapMechanicsDragonShireShowHidePanel (bool lp_showHide) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShirePanel, libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShirePanel, libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);
}

void libUIUI_gf_MapMechanicsDragonShireSetMode (int lp_mode) {
    int auto1CD42420_val;

    // Implementation
    auto1CD42420_val = lp_mode;
    if (auto1CD42420_val == 0) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerModeFrame, PlayerGroupAll(), true);
    }
    else if (auto1CD42420_val == 1) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineModeFrame, PlayerGroupAll(), true);
    }
    else if (auto1CD42420_val == 2) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerModeFrame, PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonModeFrame, PlayerGroupAll(), true);
    }
    else {
    }
}

void libUIUI_gf_MapMechanicsDragonShireSetRemainingShrineWarningTime (int lp_remainingSeconds) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerLabel, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsDragonShireSetStarShrineOwner (int lp_team) {
    // Variable Declarations
    int lv_enemyTeam;

    // Variable Initialization

    // Implementation
    if ((lp_team == 0)) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[libGame_gv_teamOrderIndex_C], PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[libGame_gv_teamChaosIndex_C], PlayerGroupAll(), false);
    }
    else {
        lv_enemyTeam = (3 - lp_team);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[lp_team], PlayerGroupAll(), true);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[lv_enemyTeam], PlayerGroupAll(), false);
    }
}

void libUIUI_gf_MapMechanicsDragonShireSetMoonShrineOwner (int lp_team) {
    // Variable Declarations
    int lv_enemyTeam;

    // Variable Initialization

    // Implementation
    if ((lp_team == 0)) {
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[libGame_gv_teamOrderIndex_C], PlayerGroupAll(), false);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[libGame_gv_teamChaosIndex_C], PlayerGroupAll(), false);
    }
    else {
        lv_enemyTeam = (3 - lp_team);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[lp_team], PlayerGroupAll(), true);
        DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[lv_enemyTeam], PlayerGroupAll(), false);
    }
}

void libUIUI_gf_MapMechanicsDragonShireSetRemainingDragonTime (int lp_remainingSeconds) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonTimerLabel, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds), PlayerGroupAll());
}

void libUIUI_gf_MapMechanicsDragonShireSetUpDragonForTeam (unit lp_dragonUnit, int lp_team) {
    // Variable Declarations
    int lv_enemyTeam;

    // Variable Initialization

    // Implementation
    lv_enemyTeam = (3 - lp_team);
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthUnitStatus, lp_dragonUnit, PlayerGroupAll());
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthLabel, "Storm_MapMechanic_MechanicCounterSmallRight_Blue", libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthLabel, "Storm_MapMechanic_MechanicCounterSmallRight_Red", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonInfoLabel, "Storm_MapMechanic_MechanicCounterSmallLeft_Blue", libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonInfoLabel, "Storm_MapMechanic_MechanicCounterSmallLeft_Red", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonInfoLabel, StringExternal("UI/MapMechanics/Dragonshire/DragonKnight"), libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemText(libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonInfoLabel, StringExternal("UI/MapMechanics/Dragonshire/EnemyDragonKnight"), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
}

void libUIUI_gf_UIObserverUIAddPlayerToObserverUI (int lp_player) {
    // Variable Declarations
    int lv_slot;
    string lv_heroName;

    // Variable Initialization
    lv_heroName = "";

    // Implementation
    lv_slot = libGame_gv_players[lp_player].lv_rosterSlot;
    DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_heroPanels[lv_slot], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    lv_heroName = (libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_heroCatalogLink);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uIObserverUI.lv_heroPortraitImages[lv_slot], libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_portrait, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    if ((libGame_gv_players[lp_player].lv_faction == 0)) {
        libNtve_gf_SetDialogItemColor(libUIUI_gv_uIObserverUI.lv_heroIconBorders[lv_slot], libCore_gv_cOLORAllyColor, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    }
    else {
        libNtve_gf_SetDialogItemColor(libUIUI_gv_uIObserverUI.lv_heroIconBorders[lv_slot], libCore_gv_cOLOREnemyColor, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    }
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_uIObserverUI.lv_heroTargetFrames[lv_slot], libGame_gv_players[lp_player].lv_heroUnit, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_uIObserverUI.lv_heroStatusBars[lv_slot], libGame_gv_players[lp_player].lv_heroUnit, libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
}

void libUIUI_gf_UIObserverUIUpdateForPlayer (int lp_player) {
    int autoB0E7DA55_ae;
    int autoB0E7DA55_ai;

    // Variable Declarations
    int lv_player;
    int lv_rosterSlot;
    int[libCore_gv_bALMaxTeams + 1] lv_teamDeaths;
    int lv_team;

    // Variable Initialization

    // Implementation
    autoB0E7DA55_ae = libCore_gv_bALMaxPlayers;
    autoB0E7DA55_ai = 1;
    lv_player = 1;
    for ( ; ( (autoB0E7DA55_ai >= 0 && lv_player <= autoB0E7DA55_ae) || (autoB0E7DA55_ai <= 0 && lv_player >= autoB0E7DA55_ae) ) ; lv_player += autoB0E7DA55_ai ) {
        if ((libGame_gv_players[lv_player].lv_playerStatus == 2)) {
            lv_rosterSlot = libGame_gv_players[lv_player].lv_rosterSlot;
            if ((libGame_gv_players[lv_player].lv_faction == 0)) {
                lv_team = 1;
            }
            else {
                lv_team = 2;
            }
            if ((libGame_gv_players[lv_player].lv_isDead == true)) {
                libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_heroDeathTimeLabels[lv_rosterSlot], FixedToText(TimerGetRemaining(libGame_gv_players[lv_player].lv_respawnTimer), 0), libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
            }
            lv_teamDeaths[lv_team] += libGame_gv_scoreValues[lv_player].lv_deaths;
        }
        else {
        }
    }
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_teamKillsLabel[1], IntToText(lv_teamDeaths[2]), libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_teamKillsLabel[2], IntToText(lv_teamDeaths[1]), libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_teamLevelLabel[1], IntToText(libGame_gv_teams[1].lv_teamLevel), libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_teamLevelLabel[2], IntToText(libGame_gv_teams[2].lv_teamLevel), libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_teamTownsLabel[1], IntToText(libGame_gv_teams[1].lv_townsRemaining), libCore_gv_playerGroupFromPlayer[lp_player]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_teamTownsLabel[2], IntToText(libGame_gv_teams[2].lv_townsRemaining), libCore_gv_playerGroupFromPlayer[lp_player]);
}

int libUIUI_gf_UIPingDeterminePingTargetType (unit lp_unit) {
    // Implementation
    if ((UnitTypeTestAttribute(UnitGetType(lp_unit), c_unitAttributeHeroic) == true) && (UnitGetType(lp_unit) != "VehicleDragon")) {
        return 1;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "KingsCore")) {
        return 3;
    }
    else {
    }
    if ((libGame_gf_TownGetTownStructurePresetFromUnitID(UnitGetType(lp_unit)) != 0)) {
        return 2;
    }
    else {
    }
    if (((UnitGetType(lp_unit) == "JungleOgrenaut") || (UnitGetType(lp_unit) == "JungleDragonKnight") || (UnitGetType(lp_unit) == "JungleGraveGolemDefender"))) {
        return 5;
    }
    else {
    }
    if (((UnitGetType(lp_unit) == "MercDefenderMeleeOgre") || (UnitGetType(lp_unit) == "MercDefenderRangedOgre"))) {
        return 4;
    }
    else {
    }
    if (((UnitGetType(lp_unit) == "MercDefenderRangedBandit") || (UnitGetType(lp_unit) == "MercDefenderMeleeBandit"))) {
        return 8;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "XelNagaWatchTower")) {
        return 6;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "MercDefenderGnoll")) {
        return 7;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "MercDefenderSiegeGiant")) {
        return 10;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "MercDefenderDragon")) {
        return 9;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "SkeletalPirate")) {
        return 16;
    }
    else {
    }
    if (((UnitGetType(lp_unit) == "DocksPirateCaptain") || (UnitGetType(lp_unit) == "GhostShipBeacon"))) {
        return 17;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "DocksTreasureChest")) {
        return 18;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "RavenLordTribute")) {
        return 14;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "RavenLordTributeWarning")) {
        return 15;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "VehicleDragon")) {
        return 11;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "DragonShireShrineMoon")) {
        return 12;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "DragonShireShrineSun")) {
        return 13;
    }
    else {
    }
    if (((UnitGetType(lp_unit) == "HoleLadderDown") || (UnitGetType(lp_unit) == "GroundHole"))) {
        return 19;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "HoleLadderUp")) {
        return 20;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "UnderworldBoss")) {
        return 21;
    }
    else {
    }
    if ((UnitGetType(lp_unit) == "UnderworldSummonedBoss")) {
        return 22;
    }
    else {
    }
    return 0;
}

unit libUIUI_gf_UIPingGetSpecialPingTargetInRangeOfPoint (point lp_point, bool lp_pingFromMinimap, int lp_pingingPlayer) {
    unitgroup auto8A68EDE1_g;
    int auto8A68EDE1_u;
    unitgroup autoB000D5A6_g;
    int autoB000D5A6_u;

    // Variable Declarations
    const fixed lv_worldSearchRange = 1.75;
    const fixed lv_minimapSearchRange = 4.0;
    fixed lv_searchRange;
    unit lv_u;
    unitgroup lv_unitGroup;
    int lv_pingTargetType;

    // Variable Initialization
    lv_unitGroup = UnitGroupEmpty();

    // Implementation
    if ((lp_pingFromMinimap == true)) {
        lv_searchRange = lv_minimapSearchRange;
    }
    else {
        lv_searchRange = lv_worldSearchRange;
    }
    lv_unitGroup = UnitGroup(null, c_playerAny, RegionCircle(lp_point, lv_searchRange), UnitFilter(0, 0, (1 << c_targetFilterBiological) | (1 << c_targetFilterMissile) | (1 << c_targetFilterItem), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    auto8A68EDE1_g = lv_unitGroup;
    auto8A68EDE1_u = 1;
    for ( ; auto8A68EDE1_u <= UnitGroupCount(auto8A68EDE1_g, c_unitCountAll) ; auto8A68EDE1_u += BoolToInt(lv_u == UnitGroupUnit(auto8A68EDE1_g, auto8A68EDE1_u)) ) {
        lv_u = UnitGroupUnit(auto8A68EDE1_g, auto8A68EDE1_u);
        if ((libUIUI_gf_UIPingDeterminePingTargetType(lv_u) == 1) && (libNtve_gf_UnitIsVisibleToPlayer(lv_u, lp_pingingPlayer) == true)) {
            return lv_u;
        }
        else {
        }
    }
    autoB000D5A6_g = lv_unitGroup;
    autoB000D5A6_u = 1;
    for ( ; autoB000D5A6_u <= UnitGroupCount(autoB000D5A6_g, c_unitCountAll) ; autoB000D5A6_u += BoolToInt(lv_u == UnitGroupUnit(autoB000D5A6_g, autoB000D5A6_u)) ) {
        lv_u = UnitGroupUnit(autoB000D5A6_g, autoB000D5A6_u);
        lv_pingTargetType = libUIUI_gf_UIPingDeterminePingTargetType(lv_u);
        if ((lv_pingTargetType != 1) && (lv_pingTargetType != 0)) {
            return lv_u;
        }
        else {
        }
    }
    return null;
}

void libUIUI_gf_UIPingPlayerPingsUnit (int lp_pingingPlayer, unit lp_targetUnit, playergroup lp_pingPlayerGroup) {
    int autoDCF7C0E3_val;

    // Variable Declarations
    text lv_nameOfPingingHero;
    text lv_nameOfTarget;
    bool lv_targetIsAllied;
    int lv_targetType;
    text lv_pingMessage;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Implementation
    lv_targetType = libUIUI_gf_UIPingDeterminePingTargetType(lp_targetUnit);
    if ((lv_targetType == 0)) {
        libNtve_gf_CreatePingFacingAngle(lp_pingPlayerGroup, lv_pingModel, EventPingPoint(), Color(100.00, 100.00, 100.00), 3.0, 270.0);
        SoundPlayForPlayer(lv_pingSound, lp_pingingPlayer, lp_pingPlayerGroup, 100.0, 0.0);
        return ;
    }
    else {
    }
    lv_targetIsAllied = PlayerGetAlliance(lp_pingingPlayer, c_allianceIdChat, UnitGetOwner(lp_targetUnit));
    if ((lv_targetIsAllied == true)) {
        PlayerCreateEffectUnit(lp_pingingPlayer, "HelpPing", lp_targetUnit);
        TextExpressionSetToken("Param/Expression/lib_UIUI_C9AE258D", "A", UnitTypeGetName(UnitGetType(lp_targetUnit)));
        lv_nameOfTarget = TextExpressionAssemble("Param/Expression/lib_UIUI_C9AE258D");
    }
    else {
        PlayerCreateEffectUnit(lp_pingingPlayer, "AttackPing", lp_targetUnit);
        TextExpressionSetToken("Param/Expression/lib_UIUI_FC8CBB62", "A", UnitTypeGetName(UnitGetType(lp_targetUnit)));
        lv_nameOfTarget = TextExpressionAssemble("Param/Expression/lib_UIUI_FC8CBB62");
    }
    TextExpressionSetToken("Param/Expression/lib_UIUI_F97C66F9", "A", UnitTypeGetName(UnitGetType(libGame_gv_players[lp_pingingPlayer].lv_heroUnit)));
    lv_nameOfPingingHero = TextExpressionAssemble("Param/Expression/lib_UIUI_F97C66F9");
    autoDCF7C0E3_val = lv_targetType;
    if (autoDCF7C0E3_val == 1) {
        if ((lp_targetUnit == libGame_gv_players[lp_pingingPlayer].lv_heroUnit)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_21F8B3CD", "A", lv_nameOfPingingHero);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_21F8B3CD");
            lv_pingSound = SoundLink("UI_Game_Ping_Help", -1);
            libSond_gf_HeroVOPlayHeroLine(26, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            if ((lv_targetIsAllied == true)) {
                TextExpressionSetToken("Param/Expression/lib_UIUI_E0567E2E", "A", lv_nameOfPingingHero);
                TextExpressionSetToken("Param/Expression/lib_UIUI_E0567E2E", "B", lv_nameOfTarget);
                lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_E0567E2E");
                lv_pingSound = SoundLink("UI_Game_Ping_Help", -1);
                libSond_gf_HeroVOPlayHeroLine(25, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
            }
            else {
                TextExpressionSetToken("Param/Expression/lib_UIUI_D17ECC6C", "A", lv_nameOfPingingHero);
                TextExpressionSetToken("Param/Expression/lib_UIUI_D17ECC6C", "B", lv_nameOfTarget);
                lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_D17ECC6C");
                lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
                libSond_gf_HeroVOPlayHeroLine(24, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
            }
        }
        libAIAI_gf_HeroAIPlayerPingsHero(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 2) {
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_AC5F48D3", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_AC5F48D3", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_AC5F48D3");
            lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
            libSond_gf_HeroVOPlayHeroLine(18, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_639CEC10", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_639CEC10", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_639CEC10");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
            libSond_gf_HeroVOPlayHeroLine(17, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
    }
    else if (autoDCF7C0E3_val == 3) {
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_34398ABA", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_34398ABA", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_34398ABA");
            lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
            libSond_gf_HeroVOPlayHeroLine(22, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_89F3058E", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_89F3058E", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_89F3058E");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
            libSond_gf_HeroVOPlayHeroLine(21, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIPlayerPingsCore(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 4) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_9693728F");
        TextExpressionSetToken("Param/Expression/lib_UIUI_50C9F169", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_50C9F169", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_50C9F169");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
            libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 8) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_4D6F783F");
        TextExpressionSetToken("Param/Expression/lib_UIUI_AE9F97C8", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_AE9F97C8", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_AE9F97C8");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
            libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 5) {
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_D7B9403B", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_D7B9403B", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_D7B9403B");
            lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_28B0A77B", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_28B0A77B", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_28B0A77B");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
            if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
                libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
            }
            else {
                libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
            }
            libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
        }
    }
    else if (autoDCF7C0E3_val == 6) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_FE37D6F2");
        lv_pingSound = SoundLink("UI_Game_Ping_General", -1);
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_04E8F441", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_04E8F441", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_04E8F441");
            libSond_gf_HeroVOPlayHeroLine(20, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_E1B26562", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_E1B26562", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_E1B26562");
            libSond_gf_HeroVOPlayHeroLine(19, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIWatchTowerPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 7) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_8EE2FE43");
        TextExpressionSetToken("Param/Expression/lib_UIUI_3C059A25", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_3C059A25", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_3C059A25");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
            libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 10) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_179622D3");
        TextExpressionSetToken("Param/Expression/lib_UIUI_449013E9", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_449013E9", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_449013E9");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
            libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 9) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_789DEAC9");
        TextExpressionSetToken("Param/Expression/lib_UIUI_98160D3F", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_98160D3F", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_98160D3F");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
            libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 16) {
        lv_nameOfTarget = StringExternal("Param/Value/lib_UIUI_78B140A8");
        TextExpressionSetToken("Param/Expression/lib_UIUI_D68B17FC", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_D68B17FC", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_D68B17FC");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
            libSond_gf_HeroVOPlayHeroLine(23, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        else {
            libSond_gf_HeroVOPlayHeroLine(12, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
        }
        libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 17) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_306A920B", "A", lv_nameOfPingingHero);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_306A920B");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        libAIAI_gf_HeroAIGhostShipBeaconPinged(lp_pingingPlayer);
    }
    else if (autoDCF7C0E3_val == 18) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_3095CFC8", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_3095CFC8", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_3095CFC8");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
    }
    else if (autoDCF7C0E3_val == 14) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_31D5D8D3", "A", lv_nameOfPingingHero);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_31D5D8D3");
        lv_pingSound = SoundLink("UI_Game_Ping_General", -1);
        libAIAI_gf_HeroAITearOfElunePinged(lp_pingingPlayer);
    }
    else if (autoDCF7C0E3_val == 15) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_25DB8B1D", "A", lv_nameOfPingingHero);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_25DB8B1D");
        lv_pingSound = SoundLink("UI_Game_Ping_General", -1);
        libAIAI_gf_HeroAITearOfElunePinged(lp_pingingPlayer);
    }
    else if (autoDCF7C0E3_val == 11) {
        if ((UnitHasBehavior2(lp_targetUnit, "GenericVehicleBehaviorOccupied") == false)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_84C044F8", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_84C044F8", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_84C044F8");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        }
        else {
            if ((lv_targetIsAllied == true)) {
                TextExpressionSetToken("Param/Expression/lib_UIUI_04E7BFE4", "A", lv_nameOfPingingHero);
                TextExpressionSetToken("Param/Expression/lib_UIUI_04E7BFE4", "B", lv_nameOfTarget);
                lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_04E7BFE4");
                lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
            }
            else {
                TextExpressionSetToken("Param/Expression/lib_UIUI_9A2F4C97", "A", lv_nameOfPingingHero);
                TextExpressionSetToken("Param/Expression/lib_UIUI_9A2F4C97", "B", lv_nameOfTarget);
                lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_9A2F4C97");
                lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
                if ((libAIAI_gf_HeroAIIsPlayerActive(lp_pingingPlayer, 1) == true)) {
                    libSond_gf_HeroVOPlayHeroLine(24, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
                }
                else {
                    libSond_gf_HeroVOPlayHeroLine(14, lp_pingingPlayer, libGame_gf_AlliedPlayerGroupOfPlayer(lp_pingingPlayer));
                }
                libAIAI_gf_HeroAIMinionCampPinged(lp_pingingPlayer, lp_targetUnit);
            }
        }
    }
    else if (autoDCF7C0E3_val == 12) {
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_5197A671", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_5197A671", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_5197A671");
            lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_8789201D", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_8789201D", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_8789201D");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        }
        libAIAI_gf_HeroAIObeliskPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 13) {
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_F5844902", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_F5844902", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_F5844902");
            lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_75CF279B", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_75CF279B", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_75CF279B");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        }
        libAIAI_gf_HeroAIObeliskPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 19) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_EEE18B5D", "A", lv_nameOfPingingHero);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_EEE18B5D");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
    }
    else if (autoDCF7C0E3_val == 20) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_38B98A49", "A", lv_nameOfPingingHero);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_38B98A49");
        lv_pingSound = SoundLink("UI_Game_Ping_General", -1);
    }
    else if (autoDCF7C0E3_val == 21) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_9D3F09AC", "A", lv_nameOfPingingHero);
        TextExpressionSetToken("Param/Expression/lib_UIUI_9D3F09AC", "B", lv_nameOfTarget);
        lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_9D3F09AC");
        lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        libAIAI_gf_HeroAIUnderworldBossPinged(lp_pingingPlayer, lp_targetUnit);
    }
    else if (autoDCF7C0E3_val == 22) {
        if ((lv_targetIsAllied == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_E884023D", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_E884023D", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_E884023D");
            lv_pingSound = SoundLink("UI_Game_Ping_Help", -1);
        }
        else {
            TextExpressionSetToken("Param/Expression/lib_UIUI_0D1F9617", "A", lv_nameOfPingingHero);
            TextExpressionSetToken("Param/Expression/lib_UIUI_0D1F9617", "B", lv_nameOfTarget);
            lv_pingMessage = TextExpressionAssemble("Param/Expression/lib_UIUI_0D1F9617");
            lv_pingSound = SoundLink("UI_Game_Ping_Attack", -1);
        }
    }
    else {
    }
    UIDisplayMessage(lp_pingPlayerGroup, c_messageAreaChat, lv_pingMessage);
    libNtve_gf_CreatePingFacingAngle(lp_pingPlayerGroup, lv_pingModel, UnitGetPosition(lp_targetUnit), Color(100.00, 100.00, 100.00), 3.0, 270.0);
    SoundPlayForPlayer(lv_pingSound, lp_pingingPlayer, lp_pingPlayerGroup, 100.0, 0.0);
}

void libUIUI_gf_UIPingPlayerUsesAssistMePing (int lp_player, point lp_location) {
    // Variable Declarations
    unit lv_pingingPlayerHero;
    playergroup lv_pingPlayerGroup;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingPlayerGroup = PlayerGroupEmpty();
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Implementation
    lv_pingingPlayerHero = libGame_gv_players[lp_player].lv_heroUnit;
    lv_pingPlayerGroup = libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lp_player), false);
    lv_pingSound = SoundLink("UI_Game_Ping_Help", -1);
    lv_pingModel = "AssistMePingMinimap";
    libNtve_gf_CreatePingFacingAngle(lv_pingPlayerGroup, lv_pingModel, lp_location, Color(100.00, 100.00, 100.00), 3.0, 270.0);
    PingSetScale(PingLastCreated(), 0.6);
    SoundPlayForPlayer(lv_pingSound, lp_player, lv_pingPlayerGroup, 100.0, 0.0);
    PlayerCreateEffectPoint(lp_player, "AssistMePing", lp_location);
    TextExpressionSetToken("Param/Expression/lib_UIUI_289FB7DC", "A", UnitTypeGetName(UnitGetType(lv_pingingPlayerHero)));
    UIDisplayMessage(lv_pingPlayerGroup, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_UIUI_289FB7DC"));
}

void libUIUI_gf_UIPingPlayerUsesDangerPing (int lp_player, point lp_location, unit lp_targetUnit) {
    // Variable Declarations
    unit lv_pingingPlayerHero;
    playergroup lv_pingPlayerGroup;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingPlayerGroup = PlayerGroupEmpty();
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Implementation
    lv_pingingPlayerHero = libGame_gv_players[lp_player].lv_heroUnit;
    lv_pingPlayerGroup = libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lp_player), false);
    lv_pingSound = SoundLink("UI_Game_Ping_Careful", -1);
    lv_pingModel = "DangerPingMinimap";
    libNtve_gf_CreatePingFacingAngle(lv_pingPlayerGroup, lv_pingModel, lp_location, Color(100.00, 100.00, 100.00), 3.0, 270.0);
    PingSetScale(PingLastCreated(), 0.6);
    SoundPlayForPlayer(lv_pingSound, lp_player, lv_pingPlayerGroup, 100.0, 0.0);
    if ((lp_targetUnit != null) && (UnitFilterMatch(lp_targetUnit, lp_player, UnitFilter((1 << c_targetFilterHeroic), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)))) == true)) {
        PlayerCreateEffectUnit(lp_player, "DangerPingUnit", lp_targetUnit);
        TextExpressionSetToken("Param/Expression/lib_UIUI_44C40EEE", "A", UnitTypeGetName(UnitGetType(lv_pingingPlayerHero)));
        TextExpressionSetToken("Param/Expression/lib_UIUI_44C40EEE", "B", UnitTypeGetName(UnitGetType(lp_targetUnit)));
        UIDisplayMessage(lv_pingPlayerGroup, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_UIUI_44C40EEE"));
    }
    else {
        PlayerCreateEffectPoint(lp_player, "DangerPingPoint", lp_location);
        TextExpressionSetToken("Param/Expression/lib_UIUI_B79FD716", "A", UnitTypeGetName(UnitGetType(lv_pingingPlayerHero)));
        UIDisplayMessage(lv_pingPlayerGroup, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_UIUI_B79FD716"));
    }
}

void libUIUI_gf_UIPingPlayerUsesOnMyWayPing (int lp_player, point lp_location) {
    // Variable Declarations
    unit lv_pingingPlayerHero;
    playergroup lv_pingPlayerGroup;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingPlayerGroup = PlayerGroupEmpty();
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Implementation
    lv_pingingPlayerHero = libGame_gv_players[lp_player].lv_heroUnit;
    lv_pingPlayerGroup = libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lp_player), false);
    lv_pingSound = SoundLink("UI_Game_Ping_OMW", -1);
    lv_pingModel = "OnMyWayPingMinimap";
    libNtve_gf_CreatePingFacingAngle(lv_pingPlayerGroup, lv_pingModel, lp_location, Color(100.00, 100.00, 100.00), 3.0, 270.0);
    PingSetScale(PingLastCreated(), 0.6);
    SoundPlayForPlayer(lv_pingSound, lp_player, lv_pingPlayerGroup, 100.0, 0.0);
    PlayerCreateEffectPoint(lp_player, "OnMyWayPing", lp_location);
    TextExpressionSetToken("Param/Expression/lib_UIUI_FBCFA2A1", "A", UnitTypeGetName(UnitGetType(lv_pingingPlayerHero)));
    UIDisplayMessage(lv_pingPlayerGroup, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_UIUI_FBCFA2A1"));
}

void libUIUI_gf_UIPingPlayerUsesDefendPing (int lp_player, point lp_location) {
    // Variable Declarations
    unit lv_pingingPlayerHero;
    playergroup lv_pingPlayerGroup;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingPlayerGroup = PlayerGroupEmpty();
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Implementation
    lv_pingingPlayerHero = libGame_gv_players[lp_player].lv_heroUnit;
    lv_pingPlayerGroup = libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lp_player), false);
    lv_pingSound = SoundLink("UI_Game_Ping_Defend", -1);
    lv_pingModel = "DefendPingMinimap";
    libNtve_gf_CreatePingFacingAngle(lv_pingPlayerGroup, lv_pingModel, lp_location, Color(100.00, 100.00, 100.00), 3.0, 270.0);
    PingSetScale(PingLastCreated(), 0.6);
    SoundPlayForPlayer(lv_pingSound, lp_player, lv_pingPlayerGroup, 100.0, 0.0);
    PlayerCreateEffectPoint(lp_player, "DefendPing", lp_location);
    TextExpressionSetToken("Param/Expression/lib_UIUI_E60F1356", "A", UnitTypeGetName(UnitGetType(lv_pingingPlayerHero)));
    UIDisplayMessage(lv_pingPlayerGroup, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_UIUI_E60F1356"));
}

void libUIUI_gf_UIPingPlayerUsesRetreatPing (int lp_player, point lp_location) {
    // Variable Declarations
    unit lv_pingingPlayerHero;
    playergroup lv_pingPlayerGroup;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingPlayerGroup = PlayerGroupEmpty();
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Implementation
    lv_pingingPlayerHero = libGame_gv_players[lp_player].lv_heroUnit;
    lv_pingPlayerGroup = libGame_gf_PlayersOnTeamHeroes(libGame_gf_TeamNumberOfPlayer(lp_player), false);
    lv_pingSound = SoundLink("UI_Game_Ping_Retreat", -1);
    lv_pingModel = "RetreatPingMinimap";
    libNtve_gf_CreatePingFacingAngle(lv_pingPlayerGroup, lv_pingModel, lp_location, Color(100.00, 100.00, 100.00), 3.0, 270.0);
    PingSetScale(PingLastCreated(), 0.6);
    SoundPlayForPlayer(lv_pingSound, lp_player, lv_pingPlayerGroup, 100.0, 0.0);
    PlayerCreateEffectPoint(lp_player, "RetreatPing", lp_location);
    TextExpressionSetToken("Param/Expression/lib_UIUI_4F67313D", "A", UnitTypeGetName(UnitGetType(lv_pingingPlayerHero)));
    UIDisplayMessage(lv_pingPlayerGroup, c_messageAreaChat, TextExpressionAssemble("Param/Expression/lib_UIUI_4F67313D"));
}

bool libUIUI_gf_TalentsTalentProfileIsAvailableForPlayer (int lp_talentProfileIndex, int lp_player) {
    int auto3D648843_ae;
    int auto3D648843_ai;

    // Variable Declarations
    int lv_itProfile;
    int lv_heroIndex;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    auto3D648843_ae = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentProfileCount;
    auto3D648843_ai = 1;
    lv_itProfile = 1;
    for ( ; ( (auto3D648843_ai >= 0 && lv_itProfile <= auto3D648843_ae) || (auto3D648843_ai <= 0 && lv_itProfile >= auto3D648843_ae) ) ; lv_itProfile += auto3D648843_ai ) {
        if ((libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentProfiles[lv_itProfile] == lp_talentProfileIndex)) {
            return true;
        }
        else {
        }
    }
    return false;
}

bool libUIUI_gf_TalentsBucketTalentCanBeAddedToCurrentProfileForPlayer (int lp_talentIndex, int lp_player) {
    // Variable Declarations
    int lv_itProfileIndex;
    int lv_heroIndex;
    int lv_talentButton;
    int lv_activeProfilePointsSpent;
    int lv_activeProfileTalentRank;
    int lv_talentTier;
    int lv_requiredPointsSpent;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    lv_talentButton = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentToButtonMap[lp_talentIndex];
    if ((lv_talentButton == 0)) {
        return false;
    }
    else {
    }
    return true;
}

bool libUIUI_gf_TalentsBucketTalentCanBeRemovedFromCurrentProfileForPlayer (int lp_talentIndex, int lp_player) {
    // Variable Declarations
    int lv_itProfileIndex;
    int lv_activeProfileTalentRank;

    // Variable Initialization

    // Implementation
    return true;
}

void libUIUI_gf_TalentsBucketSetUpTalentsPanelForPlayer (int lp_player) {
    int auto4C79DBAC_ae;
    int auto4C79DBAC_ai;
    int auto088915AF_ae;
    int auto088915AF_ai;

    // Variable Declarations
    int lv_itTalentButton;
    int lv_heroIndex;
    int lv_talentCount;
    int lv_talentIndex;
    int lv_talentColumn;
    int lv_talentTier;
    int lv_xOffset;
    int lv_yOffset;
    int lv_itTalentPoint;
    int lv_itTier;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_heroNameLabel, libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_name, libCore_gv_playerGroupFromPlayer[lp_player]);
    auto4C79DBAC_ae = libCore_gv_talentsBucket_MaxTiers_C;
    auto4C79DBAC_ai = 1;
    lv_itTier = 1;
    for ( ; ( (auto4C79DBAC_ai >= 0 && lv_itTier <= auto4C79DBAC_ae) || (auto4C79DBAC_ai <= 0 && lv_itTier >= auto4C79DBAC_ae) ) ; lv_itTier += auto4C79DBAC_ai ) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_tierLevels[lv_itTier], IntToText(libCore_gv_talentsBucket_TierLevels[lv_itTier].lv_level), libCore_gv_playerGroupFromPlayer[lp_player]);
    }
    lv_talentCount = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentCount;
    auto088915AF_ae = lv_talentCount;
    auto088915AF_ai = 1;
    lv_itTalentPoint = 1;
    for ( ; ( (auto088915AF_ai >= 0 && lv_itTalentPoint <= auto088915AF_ae) || (auto088915AF_ai <= 0 && lv_itTalentPoint >= auto088915AF_ae) ) ; lv_itTalentPoint += auto088915AF_ai ) {
        lv_talentIndex = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentBucket[lv_itTalentPoint].lv_talentIndex;
        lv_talentTier = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentBucket[lv_itTalentPoint].lv_tier;
        lv_talentColumn = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentBucket[lv_itTalentPoint].lv_column;
        libNtve_gf_SetDialogItemImage(libUIUI_gv_talents_Panel.lv_talentIcons[lv_talentTier][lv_talentColumn], libCore_gv_talents_TalentData[lv_talentIndex].lv_icon[0], libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_talentTooltipLabels[lv_talentTier][lv_talentColumn], libCore_gv_talents_TalentData[lv_talentIndex].lv_tooltip[0], libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_talents_Panel.lv_talentFrames[lv_talentTier][lv_talentColumn], libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
}

void libUIUI_gf_TalentsBucketClearTalentsPanelForPlayer (int lp_player) {
    int autoB881F929_ae;
    int autoB881F929_ai;
    int auto87CED0C2_ae;
    int auto87CED0C2_ai;

    // Variable Declarations
    int lv_itTalentButton;
    int lv_heroIndex;
    int lv_talentCount;
    int lv_talentIndex;
    int lv_talentColumn;
    int lv_talentTier;
    int lv_xOffset;
    int lv_yOffset;
    int lv_itTalentPoint;
    int lv_itTier;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    autoB881F929_ae = libCore_gv_talentsBucket_MaxTiers_C;
    autoB881F929_ai = 1;
    lv_itTier = 1;
    for ( ; ( (autoB881F929_ai >= 0 && lv_itTier <= autoB881F929_ae) || (autoB881F929_ai <= 0 && lv_itTier >= autoB881F929_ae) ) ; lv_itTier += autoB881F929_ai ) {
        auto87CED0C2_ae = libCore_gv_talentsBucket_MaxTalentsPerTier_C;
        auto87CED0C2_ai = 1;
        lv_itTalentButton = 1;
        for ( ; ( (auto87CED0C2_ai >= 0 && lv_itTalentButton <= auto87CED0C2_ae) || (auto87CED0C2_ai <= 0 && lv_itTalentButton >= auto87CED0C2_ae) ) ; lv_itTalentButton += auto87CED0C2_ai ) {
            DialogControlSetVisible(libUIUI_gv_talents_Panel.lv_talentFrames[lv_itTier][lv_itTalentButton], libCore_gv_playerGroupFromPlayer[lp_player], false);
        }
    }
}

void libUIUI_gf_TalentsBucketUpdateHeroInfoTalentsForPlayer (int lp_player) {
    int auto2F39E43C_ae;
    int auto2F39E43C_ai;
    int auto0B8392C9_ae;
    int auto5C983EFF_ae;
    int auto5C983EFF_ai;
    int autoE4DBCC9D_ae;
    int autoE4DBCC9D_ai;
    int auto8C58BD54_ae;
    int auto8C58BD54_ai;

    // Variable Declarations
    int lv_itTalentButton;
    int lv_itProfileIndex;
    int lv_heroIndex;
    int lv_activeProfilePointsSpent;
    int lv_talentIndex;
    bool lv_canAddProfilePoints;
    bool lv_canRemoveProfilePoints;
    int lv_currentTalentRank;
    int lv_talentMaxRank;
    int lv_activeProfileRank;
    int lv_tierAvailable;
    int lv_line;
    int lv_itChoice;
    int lv_itButton;
    int lv_talentTier;
    int lv_talentColumn;

    // Variable Initialization

    // Implementation
    if ((DialogControlIsVisible(libUIUI_gv_talents_Panel.lv_mainDialog, lp_player) == false)) {
        return ;
    }
    else {
    }
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    libNtve_gf_SetDialogItemImage(libUIUI_gv_talents_Panel.lv_heroImage, libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_heroSelectScreenBackgroundImage, PlayerGroupSingle(lp_player));
    auto2F39E43C_ae = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentCount;
    auto2F39E43C_ai = 1;
    lv_itTalentButton = 1;
    for ( ; ( (auto2F39E43C_ai >= 0 && lv_itTalentButton <= auto2F39E43C_ae) || (auto2F39E43C_ai <= 0 && lv_itTalentButton >= auto2F39E43C_ae) ) ; lv_itTalentButton += auto2F39E43C_ai ) {
        lv_talentIndex = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentBucket[lv_itTalentButton].lv_talentIndex;
        lv_talentTier = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentBucket[lv_itTalentButton].lv_tier;
        lv_talentColumn = libCore_gv_dataHeroesHeroData[lv_heroIndex].lv_talentBucket[lv_itTalentButton].lv_column;
        lv_currentTalentRank = libGame_gv_players[lp_player].lv_talentsCurrentTalentRanks[lv_talentIndex];
        lv_talentMaxRank = libCore_gv_talents_TalentData[lv_talentIndex].lv_rankCount;
        lv_activeProfileRank = 0;
        auto0B8392C9_ae = libGame_gv_players[lp_player].lv_activeProfileTalentsPointsSpent;
        lv_itProfileIndex = 1;
        for ( ; lv_itProfileIndex <= auto0B8392C9_ae ; lv_itProfileIndex += 1 ) {
            if ((libGame_gv_players[lp_player].lv_activeProfileTalents[lv_itProfileIndex] == lv_talentIndex)) {
                lv_activeProfileRank += 1;
            }
            else {
            }
        }
        libNtve_gf_SetDialogItemColor(libUIUI_gv_talents_Panel.lv_talentIcons[lv_talentTier][lv_talentColumn], libUIUI_gv_talents_ButtonLitUp_C, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_talents_Panel.lv_talentSelectedImages[lv_talentTier][lv_talentColumn], libCore_gv_playerGroupFromPlayer[lp_player], false);
        auto5C983EFF_ae = libCore_gv_talentsBucket_NumberOfABChoices;
        auto5C983EFF_ai = 1;
        lv_itChoice = 1;
        for ( ; ( (auto5C983EFF_ai >= 0 && lv_itChoice <= auto5C983EFF_ae) || (auto5C983EFF_ai <= 0 && lv_itChoice >= auto5C983EFF_ae) ) ; lv_itChoice += auto5C983EFF_ai ) {
            if ((lv_talentIndex == libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentIndexArray[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_selection])) {
                DialogControlSetVisible(libUIUI_gv_talents_Panel.lv_talentSelectedImages[lv_talentTier][lv_talentColumn], libCore_gv_playerGroupFromPlayer[lp_player], true);
                break;
            }
            else {
            }
        }
        autoE4DBCC9D_ae = libCore_gv_talentsBucket_NumberOfABChoices;
        autoE4DBCC9D_ai = 1;
        lv_itChoice = 1;
        for ( ; ( (autoE4DBCC9D_ai >= 0 && lv_itChoice <= autoE4DBCC9D_ae) || (autoE4DBCC9D_ai <= 0 && lv_itChoice >= autoE4DBCC9D_ae) ) ; lv_itChoice += autoE4DBCC9D_ai ) {
            auto8C58BD54_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_numberOfButtons;
            auto8C58BD54_ai = 1;
            lv_itButton = 1;
            for ( ; ( (auto8C58BD54_ai >= 0 && lv_itButton <= auto8C58BD54_ae) || (auto8C58BD54_ai <= 0 && lv_itButton >= auto8C58BD54_ae) ) ; lv_itButton += auto8C58BD54_ai ) {
                if ((lv_talentIndex == libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentIndexArray[lv_itButton])) {
                    if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentChoiceData.lv_enabled[lv_itButton] == false)) {
                        libNtve_gf_SetDialogItemColor(libUIUI_gv_talents_Panel.lv_talentIcons[lv_talentTier][lv_talentColumn], libUIUI_gv_talents_ButtonInactive_C, libCore_gv_playerGroupFromPlayer[lp_player]);
                    }
                    else {
                    }
                    break;
                }
                else {
                }
            }
        }
    }
}

void libUIUI_gf_TalentsBucketUpdateHeroInfoStatsForPlayer (int lp_player) {
    string auto868C27FD_val;

    // Variable Declarations
    int lv_heroIndex;

    // Variable Initialization

    // Implementation
    if ((DialogControlIsVisible(libUIUI_gv_talents_Panel.lv_mainDialog, lp_player) == false)) {
        return ;
    }
    else {
    }
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    libNtve_gf_SetDialogItemImage(libUIUI_gv_talents_Panel.lv_heroImage, libCore_gv_dataHeroesHeroData[libGame_gv_players[lp_player].lv_heroIndex].lv_heroSelectScreenBackgroundImage, PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_heroLevelLabel, IntToText(UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "Level")), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_attackDamageLabel, IntToText(FixedToInt(libCore_gf_GetWeaponDamageForUnit(libGame_gv_players[lp_player].lv_heroUnit))), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_attackSpeedLabel, FixedToText(libCore_gf_GetWeaponAttackSpeedForUnit(libGame_gv_players[lp_player].lv_heroUnit), 2), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_damagePerSecondLabel, FixedToText((libCore_gf_GetWeaponDamageForUnit(libGame_gv_players[lp_player].lv_heroUnit) / libCore_gf_GetWeaponAttackSpeedForUnit(libGame_gv_players[lp_player].lv_heroUnit)), 2), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_healthLabel, IntToText(FixedToInt(UnitGetPropertyFixed(libGame_gv_players[lp_player].lv_heroUnit, c_unitPropLifeMax, c_unitPropCurrent))), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_healthRegenLabel, FixedToText(UnitGetPropertyFixed(libGame_gv_players[lp_player].lv_heroUnit, c_unitPropLifeRegen, c_unitPropCurrent), 2), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_shieldLabel, IntToText(libGame_gf_GetShieldsByTalentsForHero(libGame_gv_players[lp_player].lv_heroUnit)), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceLabel, IntToText(FixedToInt(UnitGetPropertyFixed(libGame_gv_players[lp_player].lv_heroUnit, c_unitPropEnergyMax, c_unitPropCurrent))), PlayerGroupSingle(lp_player));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceRegenLabel, FixedToText(UnitGetPropertyFixed(libGame_gv_players[lp_player].lv_heroUnit, c_unitPropEnergyRegen, c_unitPropCurrent), 2), PlayerGroupSingle(lp_player));
    TextExpressionSetToken("Param/Expression/lib_UIUI_5B203D84", "A", FixedToText((100 * (libGame_gf_GetAbilityPowerMultiplierForHero(libGame_gv_players[lp_player].lv_heroUnit) - 1)), 0));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_abilityPowerLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_5B203D84"), PlayerGroupSingle(lp_player));
    TextExpressionSetToken("Param/Expression/lib_UIUI_07D293A1", "A", FixedToText((libGame_gf_GetCDRMultiplierForHero(libGame_gv_players[lp_player].lv_heroUnit) * 100.0), 0));
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_cooldownReductionLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_07D293A1"), PlayerGroupSingle(lp_player));
    auto868C27FD_val = UnitGetType(libGame_gv_players[lp_player].lv_heroUnit);
    if (auto868C27FD_val == "HeroBarbarian") {
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceTitle, StringExternal("Param/Value/lib_UIUI_2EBEF849"), PlayerGroupSingle(lp_player));
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceRegenTitle, StringExternal("Param/Value/lib_UIUI_0099B511"), PlayerGroupSingle(lp_player));
    }
    else if (auto868C27FD_val == "HeroIllidan") {
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceTitle, StringToText(""), PlayerGroupSingle(lp_player));
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceRegenTitle, StringToText(""), PlayerGroupSingle(lp_player));
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceLabel, StringToText(""), PlayerGroupSingle(lp_player));
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_resourceRegenLabel, StringToText(""), PlayerGroupSingle(lp_player));
    }
    else {
    }
    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_Panel.lv_movementSpeedLabel, FixedToText(UnitGetPropertyFixed(libGame_gv_players[lp_player].lv_heroUnit, c_unitPropMovementSpeed, c_unitPropCurrent), 2), PlayerGroupSingle(lp_player));
}

void libUIUI_gf_TalentsBucketAddTalentToCurrentProfileForPlayer (int lp_talentIndex, int lp_player) {
    // Implementation
    if ((libUIUI_gf_TalentsBucketTalentCanBeAddedToCurrentProfileForPlayer(lp_talentIndex, lp_player) == false)) {
        return ;
    }
    else {
    }
    libGame_gv_players[lp_player].lv_activeProfileTalentsPointsSpent += 1;
    libGame_gv_players[lp_player].lv_activeProfileTalents[libGame_gv_players[lp_player].lv_activeProfileTalentsPointsSpent] = lp_talentIndex;
}

void libUIUI_gf_TalentsBucketRemoveTalentFromCurrentProfileForPlayer (int lp_talentIndex, int lp_player) {
    int auto3F203F1F_ae;
    int auto3F203F1F_ai;

    // Variable Declarations
    int lv_itProfileIndex;
    int lv_itValidateTalentIndex;
    int lv_lastProfileIndexThatReferencesTalent;
    int lv_numberOfTalentsToValidate;
    int[libCore_gv_talents_MaxTalentPoints_C + 1] lv_talentsToValidate;

    // Variable Initialization

    // Implementation
    auto3F203F1F_ae = 1;
    auto3F203F1F_ai = -1;
    lv_itProfileIndex = libGame_gv_players[lp_player].lv_activeProfileTalentsPointsSpent;
    for ( ; ( (auto3F203F1F_ai >= 0 && lv_itProfileIndex <= auto3F203F1F_ae) || (auto3F203F1F_ai <= 0 && lv_itProfileIndex >= auto3F203F1F_ae) ) ; lv_itProfileIndex += auto3F203F1F_ai ) {
        if ((libGame_gv_players[lp_player].lv_activeProfileTalents[lv_itProfileIndex] == lp_talentIndex)) {
            lv_lastProfileIndexThatReferencesTalent = lv_itProfileIndex;
            break;
        }
        else {
        }
    }
    if ((lv_lastProfileIndexThatReferencesTalent == 0)) {
        return ;
    }
    else {
    }
    libGame_gv_players[lp_player].lv_activeProfileTalentsPointsSpent -= 1;
}

void libUIUI_gf_TalentsBucketRespecHeroForPlayer (int lp_player) {
    int autoC805E4F2_ae;
    int autoC805E4F2_ai;
    int autoD8076106_ae;
    int autoD8076106_ai;
    int auto1F8350B5_ae;
    int auto1F8350B5_ai;
    int autoACEC470C_ae;
    int autoACEC470C_ai;
    int auto959E68D1_ae;
    int auto959E68D1_ai;

    // Variable Declarations
    int lv_itTalent;
    int lv_itChoice;
    int lv_itButton;
    int lv_itBehavior;
    int lv_itRank;
    int lv_itSlot;
    unit lv_heroUnit;
    int lv_heroIndex;
    int lv_currentRank;

    // Variable Initialization

    // Implementation
    lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    autoC805E4F2_ae = libCore_gv_talentsBucket_NumberOfABChoices;
    autoC805E4F2_ai = 1;
    lv_itChoice = 1;
    for ( ; ( (autoC805E4F2_ai >= 0 && lv_itChoice <= autoC805E4F2_ae) || (autoC805E4F2_ai <= 0 && lv_itChoice >= autoC805E4F2_ae) ) ; lv_itChoice += autoC805E4F2_ai ) {
        autoD8076106_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_numberOfButtons;
        autoD8076106_ai = 1;
        lv_itButton = 1;
        for ( ; ( (autoD8076106_ai >= 0 && lv_itButton <= autoD8076106_ae) || (autoD8076106_ai <= 0 && lv_itButton >= autoD8076106_ae) ) ; lv_itButton += autoD8076106_ai ) {
            libGame_gf_RemoveTalentAbilityModificationsForPlayerAtTalent(lp_player, libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentIndexArray[lv_itButton]);
            PlayerRemoveTalent(lp_player, libCore_gv_talents_TalentData[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentIndexArray[lv_itButton]].lv_talentCatalogLink);
            libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentChoiceData.lv_enabled[lv_itButton] = true;
            auto1F8350B5_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentChoiceData.lv_behaviorCount[lv_itButton];
            auto1F8350B5_ai = 1;
            lv_itBehavior = 1;
            for ( ; ( (auto1F8350B5_ai >= 0 && lv_itBehavior <= auto1F8350B5_ae) || (auto1F8350B5_ai <= 0 && lv_itBehavior >= auto1F8350B5_ae) ) ; lv_itBehavior += auto1F8350B5_ai ) {
                UnitBehaviorRemove(lv_heroUnit, libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_talentChoiceData.lv_behaviors[lv_itButton][lv_itBehavior], 1);
            }
        }
    }
    autoACEC470C_ae = libCore_gv_bALPlayerTotalInventorySlots;
    autoACEC470C_ai = 1;
    lv_itSlot = 1;
    for ( ; ( (autoACEC470C_ai >= 0 && lv_itSlot <= autoACEC470C_ae) || (autoACEC470C_ai <= 0 && lv_itSlot >= autoACEC470C_ae) ) ; lv_itSlot += autoACEC470C_ai ) {
        UnitRemove(UnitInventoryItem(lv_heroUnit, lv_itSlot));
    }
    if ((UnitGetType(lv_heroUnit) == "HeroSgtHammer")) {
        UnitCreateEffectUnit(lv_heroUnit, "SiegeModeRemoveSet", lv_heroUnit);
    }
    else {
    }
    auto959E68D1_ae = libCore_gv_talentsBucket_NumberOfABChoices;
    auto959E68D1_ai = 1;
    lv_itChoice = 1;
    for ( ; ( (auto959E68D1_ai >= 0 && lv_itChoice <= auto959E68D1_ae) || (auto959E68D1_ai <= 0 && lv_itChoice >= auto959E68D1_ae) ) ; lv_itChoice += auto959E68D1_ai ) {
        TalentTreeClearTier(lp_player, lv_itChoice);
        libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_selection = 0;
    }
    libGame_gf_UpdateHeroStatsSpecialCasesForHero(lv_heroUnit);
    libGame_gf_ApplyHeroStatBehaviors(lv_heroUnit);
    libUIUI_gf_UIUpdateEventPlayerStatsChange(lp_player);
    libUIUI_gf_TalentsBucketUpdateHeroInfoTalentsForPlayer(lp_player);
    libUIUI_gf_TalentsBucketUpdateABChoicePanelForPlayer(lp_player);
}

void libUIUI_gf_TalentsBucketSetTalentProfileForPlayerByIndex (int lp_talentProfileIndex, int lp_player) {
    int auto75930273_ae;
    int auto75930273_ai;
    int autoE49AE3CF_ae;
    int autoE49AE3CF_ai;

    // Variable Declarations
    int lv_itTalentPoint;
    int lv_activeProfilePointsSpent;

    // Variable Initialization

    // Implementation
    if ((libUIUI_gf_TalentsTalentProfileIsAvailableForPlayer(lp_talentProfileIndex, lp_player) == false)) {
        return ;
    }
    else {
    }
    lv_activeProfilePointsSpent = libGame_gv_players[lp_player].lv_activeProfileTalentsPointsSpent;
    auto75930273_ae = 1;
    auto75930273_ai = -1;
    lv_itTalentPoint = lv_activeProfilePointsSpent;
    for ( ; ( (auto75930273_ai >= 0 && lv_itTalentPoint <= auto75930273_ae) || (auto75930273_ai <= 0 && lv_itTalentPoint >= auto75930273_ae) ) ; lv_itTalentPoint += auto75930273_ai ) {
        libUIUI_gf_TalentsBucketRemoveTalentFromCurrentProfileForPlayer(libGame_gv_players[lp_player].lv_activeProfileTalents[lv_itTalentPoint], lp_player);
    }
    autoE49AE3CF_ae = libCore_gv_talents_TalentProfiles[lp_talentProfileIndex].lv_talentCount;
    autoE49AE3CF_ai = 1;
    lv_itTalentPoint = 1;
    for ( ; ( (autoE49AE3CF_ai >= 0 && lv_itTalentPoint <= autoE49AE3CF_ae) || (autoE49AE3CF_ai <= 0 && lv_itTalentPoint >= autoE49AE3CF_ae) ) ; lv_itTalentPoint += autoE49AE3CF_ai ) {
        libUIUI_gf_TalentsBucketAddTalentToCurrentProfileForPlayer(libCore_gv_talents_TalentProfiles[lp_talentProfileIndex].lv_talents[lv_itTalentPoint], lp_player);
    }
    libUIUI_gf_TalentsBucketUpdateHeroInfoTalentsForPlayer(lp_player);
}

void libUIUI_gf_TalentsShowHideTalentsPanelForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        if ((libGame_gv_players[lp_player].lv_isSwappingHero == false) && (libCore_gv_sYSGameMode != 1)) {
            DialogControlSetVisible(libUIUI_gv_talents_Panel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], true);
            libUIUI_gf_TalentsBucketUpdateHeroInfoTalentsForPlayer(lp_player);
            libUIUI_gf_TalentsBucketUpdateHeroInfoStatsForPlayer(lp_player);
        }
        else {
        }
    }
    else {
        DialogControlSetVisible(libUIUI_gv_talents_Panel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
}

void libUIUI_gf_TalentsShowHideTalentABChoicePanelForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        libSond_gf_SoundAnnouncerVOPlayAnnouncerVOForPlayer(53, lp_player);
        SoundPlayForPlayer(SoundLink("UI_Game_PickTalentSound", -1), c_maxPlayers, PlayerGroupSingle(lp_player), 100.0, 0.0);
        DialogControlSetVisible(libUIUI_gv_talents_ABChoicePanel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], true);
        libUIUI_gv_talents_ABChoiceVisibleForPlayer[lp_player] = true;
        libGame_gf_SendEventTalentPanelVisibilityChanged(lp_player, true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_talents_ABChoicePanel.lv_mainDialog, libCore_gv_playerGroupFromPlayer[lp_player], false);
        libUIUI_gv_talents_ABChoiceVisibleForPlayer[lp_player] = false;
        libGame_gf_SendEventTalentPanelVisibilityChanged(lp_player, false);
    }
}

void libUIUI_gf_TalentsBucketUpdateABChoicePanelForPlayer (int lp_player) {
    int auto57982FC9_ae;
    int auto57982FC9_ai;
    int autoA9BBE8ED_ae;
    int autoA9BBE8ED_ai;
    int autoC505238C_ae;
    int autoC505238C_ai;

    // Variable Declarations
    int lv_itChoice;
    int lv_itButton;
    int lv_itActiveButton;
    int lv_heroIndex;
    int lv_playerLevel;
    int lv_currentChoice;
    int lv_activeButtons;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    lv_playerLevel = UnitLevel(libGame_gv_players[lp_player].lv_heroUnit);
    auto57982FC9_ae = libCore_gv_talentsBucket_NumberOfABChoices;
    auto57982FC9_ai = 1;
    lv_itChoice = 1;
    for ( ; ( (auto57982FC9_ai >= 0 && lv_itChoice <= auto57982FC9_ae) || (auto57982FC9_ai <= 0 && lv_itChoice >= auto57982FC9_ae) ) ; lv_itChoice += auto57982FC9_ai ) {
        if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoice].lv_selection == 0) && (lv_playerLevel >= libCore_gv_talentsBucket_TierLevels[lv_itChoice].lv_level)) {
            lv_currentChoice = lv_itChoice;
            break;
        }
        else {
        }
    }
    libUIUI_gv_talents_ActiveABChoiceForPlayer[lp_player] = lv_currentChoice;
    if ((libCore_gv_tUTTalentsAutobuyOn == false) && (libCore_gv_dEBUGNewTalentUIEnabled == true)) {
        if ((lv_currentChoice > 0)) {
            DialogControlSendAnimationEvent(libUIUI_gv_uIGameUIHandles.lv_gameUIContainer, PlayerGroupSingle(lp_player), "TalentsAvailable");
            libSond_gf_SoundAnnouncerVOPlayAnnouncerVOForPlayer(53, lp_player);
            SoundPlayForPlayer(SoundLink("UI_Game_PickTalentSound", -1), c_maxPlayers, PlayerGroupSingle(lp_player), 100.0, 0.0);
        }
        else {
            DialogControlSendAnimationEvent(libUIUI_gv_uIGameUIHandles.lv_gameUIContainer, PlayerGroupSingle(lp_player), "TalentsNotAvailable");
        }
        return ;
    }
    else {
    }
    if ((lv_currentChoice > 0)) {
        lv_activeButtons = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_currentChoice].lv_numberOfButtons;
        libNtve_gf_SetDialogItemText(libUIUI_gv_talents_ABChoicePanel.lv_headerLabel, StringExternal("Param/Value/lib_UIUI_529D97E0"), libCore_gv_playerGroupFromPlayer[lp_player]);
        autoA9BBE8ED_ae = lv_activeButtons;
        autoA9BBE8ED_ai = 1;
        lv_itButton = 1;
        for ( ; ( (autoA9BBE8ED_ai >= 0 && lv_itButton <= autoA9BBE8ED_ae) || (autoA9BBE8ED_ai <= 0 && lv_itButton >= autoA9BBE8ED_ae) ) ; lv_itButton += autoA9BBE8ED_ai ) {
            if ((lv_itButton <= libCore_gv_talentsBucket_TierLevels[lv_currentChoice].lv_picks) && (libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_currentChoice].lv_numberOfButtons >= lv_itButton)) {
                if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_currentChoice].lv_talentChoiceData.lv_enabled[lv_itButton] == true)) {
                    lv_itActiveButton += 1;
                    libNtve_gf_SetDialogItemImage(libUIUI_gv_talents_ABChoicePanel.lv_talentIcons[lv_itActiveButton], libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_currentChoice].lv_talentChoiceData.lv_icon[lv_itButton], libCore_gv_playerGroupFromPlayer[lp_player]);
                    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_ABChoicePanel.lv_talentDescriptionLabels[lv_itActiveButton], libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_currentChoice].lv_talentChoiceData.lv_tooltipSimple[lv_itButton], libCore_gv_playerGroupFromPlayer[lp_player]);
                    libNtve_gf_SetDialogItemText(libUIUI_gv_talents_ABChoicePanel.lv_tooltipLabel[lv_itActiveButton], libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_currentChoice].lv_talentChoiceData.lv_tooltipExpanded[lv_itButton], libCore_gv_playerGroupFromPlayer[lp_player]);
                    DialogControlSetVisible(libUIUI_gv_talents_ABChoicePanel.lv_talentFrames[lv_itActiveButton], libCore_gv_playerGroupFromPlayer[lp_player], true);
                }
                else {
                    lv_activeButtons -= 1;
                }
            }
            else {
            }
        }
        autoC505238C_ae = libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C;
        autoC505238C_ai = 1;
        lv_itButton = (lv_activeButtons + 1);
        for ( ; ( (autoC505238C_ai >= 0 && lv_itButton <= autoC505238C_ae) || (autoC505238C_ai <= 0 && lv_itButton >= autoC505238C_ae) ) ; lv_itButton += autoC505238C_ai ) {
            DialogControlSetVisible(libUIUI_gv_talents_ABChoicePanel.lv_talentFrames[lv_itButton], libCore_gv_playerGroupFromPlayer[lp_player], false);
        }
        if ((libCore_gv_tUTTalentsAutobuyOn == false)) {
            DialogControlSetSize(libUIUI_gv_talents_ABChoicePanel.lv_mainDialog, PlayerGroupSingle(lp_player), 719, (libUIUI_gv_talents_ABChoicePanelBaseHeight_C + (libUIUI_gv_talents_ABChoicePanelButtonHeight_C * lv_activeButtons)));
            libUIUI_gf_TalentsShowHideTalentABChoicePanelForPlayer(true, lp_player);
        }
        else {
        }
    }
    else {
        libUIUI_gf_TalentsShowHideTalentABChoicePanelForPlayer(false, lp_player);
    }
}

void libUIUI_gf_TalentsBucketChooseABChoiceForPlayerOLD (int lp_choiceIndex, int lp_buttonIndex, int lp_player) {
    int auto02DAF52A_ae;
    int auto02DAF52A_ai;
    int auto948B26AB_ae;
    int auto948B26AB_ai;
    int autoF7763536_ae;

    // Variable Declarations
    int lv_itPlayer;
    int lv_itBehavior;
    int lv_heroIndex;
    unit lv_heroUnit;
    int lv_abilityIndex;
    int lv_itTalent;
    int lv_chosenTalentIndex;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
    lv_chosenTalentIndex = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentIndexArray[lp_buttonIndex];
    libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection = lp_buttonIndex;
    if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_behaviorCount[lp_buttonIndex] > 0)) {
        auto02DAF52A_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_behaviorCount[lp_buttonIndex];
        auto02DAF52A_ai = 1;
        lv_itBehavior = 1;
        for ( ; ( (auto02DAF52A_ai >= 0 && lv_itBehavior <= auto02DAF52A_ae) || (auto02DAF52A_ai <= 0 && lv_itBehavior >= auto02DAF52A_ae) ) ; lv_itBehavior += auto02DAF52A_ai ) {
            UnitBehaviorAdd(lv_heroUnit, libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_behaviors[lp_buttonIndex][lv_itBehavior], lv_heroUnit, 1);
        }
    }
    else {
    }
    UnitInventoryCreate(lv_heroUnit, libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_rankData[1].lv_item);
    libGame_gf_ApplyAbilityModificationsForPlayerAtTalent(lp_player, libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentIndexArray[lp_buttonIndex]);
    StatEventCreate("TalentChosen");
    StatEventAddDataInt(StatEventLastCreated(), "PlayerID", lp_player);
    StatEventAddDataString(StatEventLastCreated(), "PurchaseName", (libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_talentCatalogLink));
    StatEventSend(StatEventLastCreated());
    if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_isMastery[lp_buttonIndex] == true) && (lp_choiceIndex < libCore_gv_talentsBucket_NumberOfABChoices)) {
        auto948B26AB_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_numberOfButtons;
        auto948B26AB_ai = 1;
        lv_itTalent = 1;
        for ( ; ( (auto948B26AB_ai >= 0 && lv_itTalent <= auto948B26AB_ae) || (auto948B26AB_ai <= 0 && lv_itTalent >= auto948B26AB_ae) ) ; lv_itTalent += auto948B26AB_ai ) {
            if ((libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_masteryAbilLink != null) && (libCore_gv_talents_TalentData[libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_talentIndexArray[lv_itTalent]].lv_masteryAbilLink != null) && (libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_masteryAbilLink != libCore_gv_talents_TalentData[libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_talentIndexArray[lv_itTalent]].lv_masteryAbilLink)) {
                libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_talentChoiceData.lv_enabled[lv_itTalent] = false;
            }
            else {
            }
        }
    }
    else {
    }
    PlayerAddTalent(lp_player, libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_talentCatalogLink);
    libUIUI_gf_TalentsBucketUpdateABChoicePanelForPlayer(lp_player);
    libUIUI_gf_TalentsBucketUpdateHeroInfoTalentsForPlayer(lp_player);
    libGame_gf_ApplyHeroStatBehaviors(lv_heroUnit);
    libGame_gf_UpdateHeroStatsSpecialCasesForHero(lv_heroUnit);
    libUIUI_gf_UIUpdateEventPlayerStatsChange(lp_player);
    if ((lp_choiceIndex == 4)) {
        autoF7763536_ae = libCore_gv_bALMaxPlayers;
        lv_itPlayer = 1;
        for ( ; lv_itPlayer <= autoF7763536_ae ; lv_itPlayer += 1 ) {
            if ((libGame_gv_players[lv_itPlayer].lv_isViewingLeaderboard == true)) {
                libUIUI_gf_UILeaderboardSortingData(lv_itPlayer, libGame_gf_TeamNumberOfPlayer(lp_player), libUIUI_gv_uILeaderboardSorting.lv_playerSortingColumn[lv_itPlayer][libGame_gf_TeamNumberOfPlayer(lv_itPlayer)], libMapM_gf_PrimaryMapMechanic());
            }
            else {
            }
        }
    }
    else {
    }
}

void libUIUI_gf_TalentsBucketChooseABChoiceForPlayerNEW (int lp_choiceIndex, int lp_buttonIndex, int lp_player) {
    int auto3F8D4CDD_ae;
    int auto3F8D4CDD_ai;
    int autoFC8B6743_ae;
    int autoFC8B6743_ai;
    int autoBAC29A67_ae;
    int autoBAC29A67_ai;
    int autoA886CEFC_ae;

    // Variable Declarations
    int lv_itPlayer;
    int lv_itBehavior;
    int lv_heroIndex;
    unit lv_heroUnit;
    int lv_abilityIndex;
    int lv_itTalent;
    int lv_chosenTalentIndex;
    int lv_offsetIndexTEMP;
    int lv_itChoiceTierTEMP;

    // Variable Initialization

    // Implementation
    lv_heroIndex = libGame_gv_players[lp_player].lv_heroIndex;
    lv_heroUnit = libGame_gv_players[lp_player].lv_heroUnit;
    auto3F8D4CDD_ae = (lp_choiceIndex - 1);
    auto3F8D4CDD_ai = 1;
    lv_itChoiceTierTEMP = 1;
    for ( ; ( (auto3F8D4CDD_ai >= 0 && lv_itChoiceTierTEMP <= auto3F8D4CDD_ae) || (auto3F8D4CDD_ai <= 0 && lv_itChoiceTierTEMP >= auto3F8D4CDD_ae) ) ; lv_itChoiceTierTEMP += auto3F8D4CDD_ai ) {
        lv_offsetIndexTEMP += libGame_gv_players[lp_player].lv_talentsBucketABChoices[lv_itChoiceTierTEMP].lv_numberOfButtons;
    }
    libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection = (lp_buttonIndex - lv_offsetIndexTEMP);
    lv_chosenTalentIndex = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentIndexArray[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection];
    if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_behaviorCount[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection] > 0)) {
        autoFC8B6743_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_behaviorCount[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection];
        autoFC8B6743_ai = 1;
        lv_itBehavior = 1;
        for ( ; ( (autoFC8B6743_ai >= 0 && lv_itBehavior <= autoFC8B6743_ae) || (autoFC8B6743_ai <= 0 && lv_itBehavior >= autoFC8B6743_ae) ) ; lv_itBehavior += autoFC8B6743_ai ) {
            UnitBehaviorAdd(lv_heroUnit, libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_behaviors[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection][lv_itBehavior], lv_heroUnit, 1);
        }
    }
    else {
    }
    UnitInventoryCreate(lv_heroUnit, libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_rankData[1].lv_item);
    libGame_gf_ApplyAbilityModificationsForPlayerAtTalent(lp_player, libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentIndexArray[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection]);
    StatEventCreate("TalentChosen");
    StatEventAddDataInt(StatEventLastCreated(), "PlayerID", lp_player);
    StatEventAddDataString(StatEventLastCreated(), "PurchaseName", (libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_talentCatalogLink));
    StatEventSend(StatEventLastCreated());
    if ((libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_talentChoiceData.lv_isMastery[libGame_gv_players[lp_player].lv_talentsBucketABChoices[lp_choiceIndex].lv_selection] == true) && (lp_choiceIndex < libCore_gv_talentsBucket_NumberOfABChoices)) {
        autoBAC29A67_ae = libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_numberOfButtons;
        autoBAC29A67_ai = 1;
        lv_itTalent = 1;
        for ( ; ( (autoBAC29A67_ai >= 0 && lv_itTalent <= autoBAC29A67_ae) || (autoBAC29A67_ai <= 0 && lv_itTalent >= autoBAC29A67_ae) ) ; lv_itTalent += autoBAC29A67_ai ) {
            if ((libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_masteryAbilLink != null) && (libCore_gv_talents_TalentData[libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_talentIndexArray[lv_itTalent]].lv_masteryAbilLink != null) && (libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_masteryAbilLink != libCore_gv_talents_TalentData[libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_talentIndexArray[lv_itTalent]].lv_masteryAbilLink)) {
                libGame_gv_players[lp_player].lv_talentsBucketABChoices[libCore_gv_talentsBucket_NumberOfABChoices].lv_talentChoiceData.lv_enabled[lv_itTalent] = false;
            }
            else {
            }
        }
    }
    else {
    }
    PlayerAddTalent(lp_player, libCore_gv_talents_TalentData[lv_chosenTalentIndex].lv_talentCatalogLink);
    libUIUI_gf_TalentsBucketUpdateABChoicePanelForPlayer(lp_player);
    libUIUI_gf_TalentsBucketUpdateHeroInfoTalentsForPlayer(lp_player);
    libGame_gf_ApplyHeroStatBehaviors(lv_heroUnit);
    libGame_gf_UpdateHeroStatsSpecialCasesForHero(lv_heroUnit);
    libUIUI_gf_UIUpdateEventPlayerStatsChange(lp_player);
    if ((lp_choiceIndex == 4)) {
        autoA886CEFC_ae = libCore_gv_bALMaxPlayers;
        lv_itPlayer = 1;
        for ( ; lv_itPlayer <= autoA886CEFC_ae ; lv_itPlayer += 1 ) {
            if ((libGame_gv_players[lv_itPlayer].lv_isViewingLeaderboard == true)) {
                libUIUI_gf_UILeaderboardSortingData(lv_itPlayer, libGame_gf_TeamNumberOfPlayer(lp_player), libUIUI_gv_uILeaderboardSorting.lv_playerSortingColumn[lv_itPlayer][libGame_gf_TeamNumberOfPlayer(lv_itPlayer)], libMapM_gf_PrimaryMapMechanic());
            }
            else {
            }
        }
    }
    else {
    }
}

void libUIUI_gf_UITargetInfoPanelSetUpMapMechanicInfo (string lp_icon, text lp_tooltip) {
    // Implementation
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicIcon, lp_icon, PlayerGroupAll());
    libNtve_gf_SetDialogItemTooltip(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicIcon, lp_tooltip, PlayerGroupAll());
    libNtve_gf_SetDialogItemText(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicLabel, StringToText(""), PlayerGroupAll());
}

void libUIUI_gf_UITargetInfoPanelUpdateMapMechanicTextForPlayer (text lp_text, int lp_player) {
    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicLabel, lp_text, libCore_gv_playerGroupFromPlayer[lp_player]);
}

void libUIUI_gf_UITargetInfoPanelSetTargetForPlayer (unit lp_target, int lp_player) {
    // Variable Declarations
    string lv_groupOrWireframe;
    int lv_numberofIndexes;
    string lv_imagePath;
    fixed lv_weaponDamage;

    // Variable Initialization
    lv_groupOrWireframe = "";
    lv_imagePath = "";

    // Implementation
    if ((libUIUI_gv_uITargetInfoPanelEnabled == false)) {
        return ;
    }
    else {
    }
    if ((libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player] != null)) {
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_healthAndManaUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_healthOnlyUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_towerWithAmmoUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    else {
    }
    libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player] = lp_target;
    libNtve_gf_SetDialogItemText(libUIUI_gv_uITargetInfoPanel.lv_unitName, UnitTypeGetName(UnitGetType(lp_target)), libCore_gv_playerGroupFromPlayer[lp_player]);
    if ((UnitTypeTestAttribute(UnitGetType(lp_target), c_unitAttributeHeroic) == true)) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_uITargetInfoPanel.lv_level, IntToText(UnitLevel(lp_target)), libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_level, libCore_gv_playerGroupFromPlayer[lp_player], true);
        libNtve_gf_SetDialogItemText(libUIUI_gv_uITargetInfoPanel.lv_playerName, libGame_gv_players[UnitGetOwner(lp_target)].lv_name, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_playerName, libCore_gv_playerGroupFromPlayer[lp_player], true);
        if ((libMapM_gf_MapMechanicExistsOnMap(2) == true)) {
            libUIUI_gf_UITargetInfoPanelUpdateMapMechanicTextForPlayer(IntToText(libMapM_gf_MMCannonballsHeroCannonballsCount(UnitGetOwner(lp_target))), lp_player);
            DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicIcon, libCore_gv_playerGroupFromPlayer[lp_player], true);
            DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicLabel, libCore_gv_playerGroupFromPlayer[lp_player], true);
        }
        else {
        }
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_level, libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_playerName, libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicIcon, libCore_gv_playerGroupFromPlayer[lp_player], false);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_mapMechanicLabel, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    if ((UnitHasBehavior2(lp_target, "ShowDescriptionTextInTargetPanel") == true)) {
        libNtve_gf_SetDialogItemText(libUIUI_gv_uITargetInfoPanel.lv_descriptionLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogUnit, UnitGetType(lp_target), "Description", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_descriptionLabel, libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_descriptionLabel, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    if ((CatalogEntryIsValid(c_gameCatalogActor, (UnitGetType(lp_target))) == true)) {
        if ((libNtve_gf_PlayerIsEnemy(lp_player, UnitGetOwner(lp_target), 0) == true)) {
            lv_groupOrWireframe = "GroupIcon";
        }
        else {
            lv_groupOrWireframe = "Wireframe";
        }
        lv_numberofIndexes = CatalogFieldValueCount(c_gameCatalogActor, ((UnitGetType(lp_target))), ((lv_groupOrWireframe + ".Image")), lp_player);
        if ((lv_numberofIndexes > 0)) {
            lv_imagePath = CatalogFieldValueGet(c_gameCatalogActor, ((UnitGetType(lp_target))), ((lv_groupOrWireframe + ".Image[0]")), lp_player);
            libNtve_gf_SetDialogItemImage(libUIUI_gv_uITargetInfoPanel.lv_portraitImage, lv_imagePath, libCore_gv_playerGroupFromPlayer[lp_player]);
            DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_portraitImage, libCore_gv_playerGroupFromPlayer[lp_player], true);
        }
        else {
            DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_portraitImage, libCore_gv_playerGroupFromPlayer[lp_player], false);
        }
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_portraitImage, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_uITargetInfoPanel.lv_unitTargetFrame, lp_target, libCore_gv_playerGroupFromPlayer[lp_player]);
    if (((libGame_gf_TownGetTownStructurePresetFromUnitID(UnitGetType(lp_target)) == 5) || (libGame_gf_TownGetTownStructurePresetFromUnitID(UnitGetType(lp_target)) == 1))) {
        libNtve_gf_SetDialogItemUnit(libUIUI_gv_uITargetInfoPanel.lv_towerWithAmmoUnitStatusStatusFrame, lp_target, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_towerWithAmmoUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], true);
        libUIUI_gv_uITargetInfoPanelCurretTargetStatusBarType[lp_player] = 3;
    }
    else if ((UnitGetPropertyFixed(lp_target, c_unitPropEnergyMax, c_unitPropCurrent) > 0.0) && (libGame_gf_TownGetTownStructurePresetFromUnitID(UnitGetType(lp_target)) != 1)) {
        libNtve_gf_SetDialogItemUnit(libUIUI_gv_uITargetInfoPanel.lv_healthAndManaUnitStatusStatusFrame, lp_target, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_healthAndManaUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], true);
        libUIUI_gv_uITargetInfoPanelCurretTargetStatusBarType[lp_player] = 1;
    }
    else if ((UnitGetPropertyFixed(lp_target, c_unitPropLifeMax, c_unitPropCurrent) > 1.0)) {
        libNtve_gf_SetDialogItemUnit(libUIUI_gv_uITargetInfoPanel.lv_healthOnlyUnitStatusStatusFrame, lp_target, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_healthOnlyUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], true);
        libUIUI_gv_uITargetInfoPanelCurretTargetStatusBarType[lp_player] = 2;
    }
    DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], true);
}

void libUIUI_gf_UITargetInfoPanelClearTargetForPlayer (int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], false);
    DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_healthAndManaUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
    DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_healthOnlyUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
    DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_towerWithAmmoUnitStatusStatusFrame, libCore_gv_playerGroupFromPlayer[lp_player], false);
    libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player] = null;
}

void libUIUI_gf_UITargetInfoPanelUpdateForPlayer (int lp_player) {
    // Variable Declarations
    int lv_buff;
    int lv_numberOfBuffs;

    // Variable Initialization

    // Implementation
    if ((libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player] != null)) {
        if ((UnitIsAlive(libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player]) == false)) {
            libUIUI_gf_UITargetInfoPanelClearTargetForPlayer(lp_player);
            return ;
        }
        else {
        }
        if ((UnitTypeTestAttribute(UnitGetType(libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player]), c_unitAttributeStructure) == false) && (libNtve_gf_UnitIsVisibleToPlayer(libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player], lp_player) == false)) {
            libUIUI_gf_UITargetInfoPanelClearTargetForPlayer(lp_player);
            return ;
        }
        else {
        }
        if (((UnitHasBehavior2(libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player], "RavenLordsCurseStructures") == true) || (UnitHasBehavior2(libUIUI_gv_uITargetInfoPanelCurrentTargetForPlayer[lp_player], "RavenLordsCurseUnits") == true))) {
            DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_cursedBuildingIcon, libCore_gv_playerGroupFromPlayer[lp_player], true);
        }
        else {
            DialogControlSetVisible(libUIUI_gv_uITargetInfoPanel.lv_cursedBuildingIcon, libCore_gv_playerGroupFromPlayer[lp_player], false);
        }
    }
    else {
    }
}

void libUIUI_gf_UITargetInfoPanelEnableDisable (bool lp_enableDisable) {
    // Implementation
    if ((lp_enableDisable == true)) {
        libUIUI_gv_uITargetInfoPanelEnabled = true;
        TriggerEnable(libUIUI_gt_UITargetInfoPanelUpdate, true);
    }
    else {
        libUIUI_gv_uITargetInfoPanelEnabled = false;
        TriggerEnable(libUIUI_gt_UITargetInfoPanelUpdate, false);
    }
}

void libUIUI_gf_UITargetingHelperPanelHandleAbilityTargetModeChange (int lp_player, int lp_targetModeState, string lp_ability, bool lp_abilityIsOffensive) {
    int autoEE6B7FB0_ae;
    int autoEE6B7FB0_ai;

    // Variable Declarations
    int lv_i;

    // Variable Initialization

    // Implementation
    if ((lp_targetModeState == c_targetModeStateOn)) {
        libUIUI_gv_uITargetingHelperPanelNumberOfPlayersUsingPanel += 1;
        TriggerEnable(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, true);
        TriggerEnable(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, true);
        if ((lp_ability == "attack")) {
            libUIUI_gf_UITargetingHelperPanelUpdateForPlayer(lp_player, libAIAI_gf_AIGetActiveWeaponRange(libGame_gv_players[lp_player].lv_heroUnit), lp_abilityIsOffensive);
        }
        else {
            libUIUI_gf_UITargetingHelperPanelUpdateForPlayer(lp_player, StringToFixed(CatalogFieldValueGet(c_gameCatalogAbil, lp_ability, "Range[" + IntToString(0) + "]", lp_player)), lp_abilityIsOffensive);
        }
        if ((lp_abilityIsOffensive == true)) {
            libUIUI_gv_uITargetingHelperPanelPlayerIsTargetingOffensiveAbility[lp_player] = true;
            TriggerEnable(libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities, true);
        }
        else {
        }
        libUIUI_gf_UITargetingHelperPanelShowHideForPlayer(true, lp_player);
    }
    else {
        libUIUI_gf_UITargetingHelperPanelShowHideForPlayer(false, lp_player);
        autoEE6B7FB0_ae = libUIUI_gv_uITargetingHelperPanelNumberOfTargetUnitsForPlayer[lp_player];
        autoEE6B7FB0_ai = 1;
        lv_i = 1;
        for ( ; ( (autoEE6B7FB0_ai >= 0 && lv_i <= autoEE6B7FB0_ae) || (autoEE6B7FB0_ai <= 0 && lv_i >= autoEE6B7FB0_ae) ) ; lv_i += autoEE6B7FB0_ai ) {
            ActorSend(ActorFromActor(libNtve_gf_MainActorofUnit(libUIUI_gv_uITargetingHelperPanelTargetUnitsForPlayer[lp_player][lv_i]), ("FriendlyTargetHelperBeamPlayer" + IntToString(lp_player))), "Destroy");
        }
        libUIUI_gv_uITargetingHelperPanelPlayerIsTargetingOffensiveAbility[lp_player] = false;
        libUIUI_gv_uITargetingHelperPanelNumberOfPlayersUsingPanel -= 1;
        if ((libUIUI_gv_uITargetingHelperPanelNumberOfPlayersUsingPanel <= 0)) {
            TriggerEnable(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, false);
            TriggerEnable(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, false);
            TriggerEnable(libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities, false);
        }
        else {
        }
    }
}

void libUIUI_gf_UITargetingHelperPanelUpdateForPlayer (int lp_player, fixed lp_abilityRange, bool lp_abilityIsOffensive) {
    playergroup autoF57B81EF_g;
    int autoF57B81EF_p;
    int auto845BD2BE_ae;
    int auto845BD2BE_ai;
    int auto03723F66_ae;
    int auto03723F66_ai;
    int auto70455873_ae;
    int auto70455873_ai;
    int auto1CD3BFA1_ae;
    int auto1CD3BFA1_ai;

    // Variable Declarations
    int lv_i;
    int lv_k;
    int lv_p;
    int lv_frame;
    unit lv_hero;
    playergroup lv_targetPlayerGroup;
    unit lv_targetHero;
    int lv_numberOfHeroesToDisplay;
    int[libCore_gv_bALMaxPlayersOnATeam + 1] lv_heroPlayersToDisplay;
    fixed[libCore_gv_bALMaxPlayersOnATeam + 1] lv_heroPlayerHPValues;
    fixed lv_tempVal;

    // Variable Initialization
    lv_targetPlayerGroup = PlayerGroupEmpty();

    // Implementation
    lv_hero = libGame_gv_players[lp_player].lv_heroUnit;
    if ((lp_abilityIsOffensive == true)) {
        lv_targetPlayerGroup = libGame_gf_EnemyPlayerGroupOfPlayer(lp_player);
    }
    else {
        lv_targetPlayerGroup = libGame_gf_AlliedPlayerGroupOfPlayer(lp_player);
    }
    autoF57B81EF_g = lv_targetPlayerGroup; 
    autoF57B81EF_p = 1;
    for ( ; autoF57B81EF_p <= PlayerGroupCount(autoF57B81EF_g) ; autoF57B81EF_p += BoolToInt(lv_p == PlayerGroupPlayer(autoF57B81EF_g, autoF57B81EF_p)) ) {
        lv_p = PlayerGroupPlayer(autoF57B81EF_g, autoF57B81EF_p);
        if ((lv_p != libCore_gv_cOMPUTER_TeamOrder) && (lv_p != libCore_gv_cOMPUTER_TeamChaos) && (lv_p != lp_player)) {
            lv_targetHero = libGame_gv_players[lv_p].lv_heroUnit;
            if (((lp_abilityIsOffensive == false) || (libNtve_gf_UnitIsVisibleToPlayer(lv_targetHero, lp_player) == true)) && (DistanceBetweenPoints(UnitGetPosition(lv_hero), UnitGetPosition(lv_targetHero)) <= (lp_abilityRange + libUIUI_gv_uITargetingHelperPanelRangeSlop))) {
                lv_numberOfHeroesToDisplay += 1;
                lv_heroPlayersToDisplay[lv_numberOfHeroesToDisplay] = lv_p;
                lv_heroPlayerHPValues[lv_numberOfHeroesToDisplay] = UnitGetPropertyFixed(libGame_gv_players[lv_p].lv_heroUnit, c_unitPropLife, c_unitPropCurrent);
            }
            else {
            }
        }
        else {
        }
    }
    if ((lp_abilityIsOffensive == false)) {
        lv_numberOfHeroesToDisplay += 1;
        lv_heroPlayersToDisplay[lv_numberOfHeroesToDisplay] = lp_player;
        lv_heroPlayerHPValues[lv_numberOfHeroesToDisplay] = UnitGetPropertyFixed(lv_hero, c_unitPropLife, c_unitPropCurrent);
    }
    else {
    }
    auto845BD2BE_ae = 1;
    auto845BD2BE_ai = -1;
    lv_i = (lv_numberOfHeroesToDisplay - 1);
    for ( ; ( (auto845BD2BE_ai >= 0 && lv_i <= auto845BD2BE_ae) || (auto845BD2BE_ai <= 0 && lv_i >= auto845BD2BE_ae) ) ; lv_i += auto845BD2BE_ai ) {
        auto03723F66_ae = lv_i;
        auto03723F66_ai = 1;
        lv_k = 1;
        for ( ; ( (auto03723F66_ai >= 0 && lv_k <= auto03723F66_ae) || (auto03723F66_ai <= 0 && lv_k >= auto03723F66_ae) ) ; lv_k += auto03723F66_ai ) {
            if ((lv_heroPlayerHPValues[lv_k] > lv_heroPlayerHPValues[(lv_k + 1)])) {
                lv_tempVal = lv_heroPlayerHPValues[lv_k];
                lv_heroPlayerHPValues[lv_k] = lv_heroPlayerHPValues[(lv_k + 1)];
                lv_heroPlayerHPValues[(lv_k + 1)] = lv_tempVal;
                lv_tempVal = lv_heroPlayersToDisplay[lv_k];
                lv_heroPlayersToDisplay[lv_k] = lv_heroPlayersToDisplay[(lv_k + 1)];
                lv_heroPlayersToDisplay[(lv_k + 1)] = FixedToInt(lv_tempVal);
            }
            else {
            }
        }
    }
    libUIUI_gv_uITargetingHelperPanelNumberOfTargetUnitsForPlayer[lp_player] = lv_numberOfHeroesToDisplay;
    auto70455873_ae = lv_numberOfHeroesToDisplay;
    auto70455873_ai = 1;
    lv_frame = 1;
    for ( ; ( (auto70455873_ai >= 0 && lv_frame <= auto70455873_ae) || (auto70455873_ai <= 0 && lv_frame >= auto70455873_ae) ) ; lv_frame += auto70455873_ai ) {
        lv_p = lv_heroPlayersToDisplay[lv_frame];
        if ((lv_p == lp_player)) {
            libNtve_gf_SetDialogItemColor(libUIUI_gv_uITargetingHelperPanel.lv_heroBorderImages[lv_frame], libCore_gv_cOLORPlayerColor, libCore_gv_playerGroupFromPlayer[lp_player]);
        }
        else {
            if ((lp_abilityIsOffensive == true)) {
                libNtve_gf_SetDialogItemColor(libUIUI_gv_uITargetingHelperPanel.lv_heroBorderImages[lv_frame], libCore_gv_cOLOREnemyColor, libCore_gv_playerGroupFromPlayer[lp_player]);
            }
            else {
                libNtve_gf_SetDialogItemColor(libUIUI_gv_uITargetingHelperPanel.lv_heroBorderImages[lv_frame], libCore_gv_cOLORAllyColor, libCore_gv_playerGroupFromPlayer[lp_player]);
            }
        }
        libNtve_gf_SetDialogItemImage(libUIUI_gv_uITargetingHelperPanel.lv_heroIcons[lv_frame], libGame_gv_players[lv_p].lv_portraitIcon, libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemUnit(libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[lv_frame], libGame_gv_players[lv_p].lv_heroUnit, libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemUnit(libUIUI_gv_uITargetingHelperPanel.lv_heroStatusFrames[lv_frame], libGame_gv_players[lv_p].lv_heroUnit, libCore_gv_playerGroupFromPlayer[lp_player]);
        DialogControlSetVisible(libUIUI_gv_uITargetingHelperPanel.lv_heroFrames[lv_frame], libCore_gv_playerGroupFromPlayer[lp_player], true);
        libUIUI_gv_uITargetingHelperPanelTargetUnitsForPlayer[lp_player][lv_frame] = libGame_gv_players[lv_p].lv_heroUnit;
    }
    auto1CD3BFA1_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto1CD3BFA1_ai = 1;
    lv_frame = (lv_numberOfHeroesToDisplay + 1);
    for ( ; ( (auto1CD3BFA1_ai >= 0 && lv_frame <= auto1CD3BFA1_ae) || (auto1CD3BFA1_ai <= 0 && lv_frame >= auto1CD3BFA1_ae) ) ; lv_frame += auto1CD3BFA1_ai ) {
        DialogControlSetVisible(libUIUI_gv_uITargetingHelperPanel.lv_heroFrames[lv_frame], libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
}

void libUIUI_gf_UITargetingHelperPanelShowHideForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        DialogControlSetVisible(libUIUI_gv_uITargetingHelperPanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_uITargetingHelperPanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
}

void libUIUI_gf_TopBarPanelShowHideForPlayer (bool lp_showHide, int lp_player) {
    // Implementation
    DialogControlSetVisible(libUIUI_gv_topBarPanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], lp_showHide);
}

void libUIUI_gf_TopBarTeamLevelHookUpXPBarUnitForTeamAndShowTeamLevelLabel (int lp_team, unit lp_unit) {
    // Implementation
    libNtve_gf_SetDialogItemUnit(libUIUI_gv_topBarPanel.lv_xPUnitStatusFrame[lp_team], lp_unit, PlayerGroupAll());
    DialogControlSetVisible(libUIUI_gv_topBarPanel.lv_levelLabel[lp_team], PlayerGroupAll(), true);
}

void libUIUI_gf_TopBarTeamLevelUpdateTeamsLevelLabel (int lp_team, int lp_level) {
    // Variable Declarations
    int lv_enemyTeam;

    // Variable Initialization

    // Implementation
    libNtve_gf_SetDialogItemText(libUIUI_gv_topBarPanel.lv_levelLabel[lp_team], IntToText(lp_level), PlayerGroupAll());
    if ((lp_level > 1)) {
        lv_enemyTeam = (3 - lp_team);
        DialogControlSendAnimationEvent(libUIUI_gv_topBarPanel.lv_mainPanel, libGame_gv_teams[lp_team].lv_teamPlayerGroupNoNPCPlayers, ("Team" + IntToString(lp_team) + "LevelUpBlue"));
        DialogControlSendAnimationEvent(libUIUI_gv_topBarPanel.lv_mainPanel, libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, ("Team" + IntToString(lp_team) + "LevelUpRed"));
    }
    else {
    }
}

void libUIUI_gf_TryMeModePanelShowHide (bool lp_showHide, int lp_player) {
    // Implementation
    if ((lp_showHide == true)) {
        DialogControlSetVisible(libUIUI_gv_tryMeModePanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], true);
    }
    else {
        DialogControlSetVisible(libUIUI_gv_tryMeModePanel.lv_mainPanel, libCore_gv_playerGroupFromPlayer[lp_player], false);
    }
}

void libUIUI_gf_AddTutorialReferenceItem (text lp_item) {
    int auto4DAC34C7_ae;
    int auto4DAC34C7_ai;

    // Variable Declarations
    int lv_index;

    // Variable Initialization

    // Implementation
    if ((libUIUI_gv_tutorialReferenceCount >= libUIUI_gv_tutorialReferenceCount_Max)) {
        return ;
    }
    else {
    }
    libUIUI_gv_tutorialReferenceCount += 1;
    if ((libUIUI_gv_tutorialReferencePanel == c_invalidDialogControlId)) {
        DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/TutorialReferenceCard");
        libUIUI_gv_tutorialReferencePanel = DialogControlLastCreated();
        auto4DAC34C7_ae = libUIUI_gv_tutorialReferenceCount_Max;
        auto4DAC34C7_ai = 1;
        lv_index = 1;
        for ( ; ( (auto4DAC34C7_ai >= 0 && lv_index <= auto4DAC34C7_ae) || (auto4DAC34C7_ai <= 0 && lv_index >= auto4DAC34C7_ae) ) ; lv_index += auto4DAC34C7_ai ) {
            DialogControlHookupStandard(c_triggerControlTypeLabel, ("UIContainer/ConsoleUIContainer/TutorialReferenceCard/Item" + IntToString(lv_index)));
            libUIUI_gv_tutorialReferenceLabels[lv_index] = DialogControlLastCreated();
        }
    }
    else {
    }
    DialogControlSetVisible(libUIUI_gv_tutorialReferencePanel, PlayerGroupAll(), true);
    libNtve_gf_SetDialogItemText(libUIUI_gv_tutorialReferenceLabels[libUIUI_gv_tutorialReferenceCount], lp_item, PlayerGroupAll());
    DialogControlSetVisible(libUIUI_gv_tutorialReferenceLabels[libUIUI_gv_tutorialReferenceCount], PlayerGroupAll(), true);
    DialogControlSetSize(libUIUI_gv_tutorialReferencePanel, PlayerGroupAll(), 350, ((libUIUI_gv_tutorialReferenceCount * 40) + 25));
}

void libUIUI_gf_AddTutorialReferenceItemPreset (int lp_item) {
    int auto9DB8A3C3_val;

    // Implementation
    auto9DB8A3C3_val = lp_item;
    if (auto9DB8A3C3_val == 0) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_7E1E7B39", "A", libStEx_gf_HotkeyProfile_MouseButtonImageStringTag(libStEx_gf_HotkeyProfile_SmartCommandMouseButton(1), 25, 35));
        libUIUI_gf_AddTutorialReferenceItem(TextExpressionAssemble("Param/Expression/lib_UIUI_7E1E7B39"));
    }
    else if (auto9DB8A3C3_val == 1) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_7CD6357C", "A", StringExternal("Param/Value/lib_UIUI_2356944A"));
        TextExpressionSetToken("Param/Expression/lib_UIUI_7CD6357C", "B", libStEx_gf_HotkeyProfile_MouseButtonImageStringTag(1, 25, 35));
        libUIUI_gf_AddTutorialReferenceItem(TextExpressionAssemble("Param/Expression/lib_UIUI_7CD6357C"));
    }
    else if (auto9DB8A3C3_val == 2) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_6560E05F", "A", StringExternal("Param/Value/lib_UIUI_52CD2B75"));
        libUIUI_gf_AddTutorialReferenceItem(TextExpressionAssemble("Param/Expression/lib_UIUI_6560E05F"));
    }
    else if (auto9DB8A3C3_val == 3) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_8571BA1A", "A", StringExternal("Param/Value/lib_UIUI_F0F020D7"));
        libUIUI_gf_AddTutorialReferenceItem(TextExpressionAssemble("Param/Expression/lib_UIUI_8571BA1A"));
    }
    else if (auto9DB8A3C3_val == 4) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_C184B84B", "A", libStEx_gf_CameraLockHotkeyText());
        libUIUI_gf_AddTutorialReferenceItem(TextExpressionAssemble("Param/Expression/lib_UIUI_C184B84B"));
    }
    else if (auto9DB8A3C3_val == 5) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_D712BEEB", "A", StringExternal("Param/Value/lib_UIUI_7B4F3BB8"));
        libUIUI_gf_AddTutorialReferenceItem(TextExpressionAssemble("Param/Expression/lib_UIUI_D712BEEB"));
    }
    else {
    }
}

void libUIUI_gf_SetTutorialReferenceItemText (int lp_index, text lp_text) {
    // Implementation
    if ((lp_index > libUIUI_gv_tutorialReferenceCount)) {
        return ;
    }
    else {
    }
    libNtve_gf_SetDialogItemText(libUIUI_gv_tutorialReferenceLabels[lp_index], lp_text, PlayerGroupAll());
    DialogControlSetVisible(libUIUI_gv_tutorialReferenceLabels[lp_index], PlayerGroupAll(), true);
}

// Triggers
//--------------------------------------------------------------------------------------------------
// Trigger: #Include UI
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_IncludeUI_Func (bool testConds, bool runActions) {
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_IncludeUI_Init () {
    libUIUI_gt_IncludeUI = TriggerCreate("libUIUI_gt_IncludeUI_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Initialize UI
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InitializeUI_Func (bool testConds, bool runActions) {
    int autoB26F30E4_ae;
    int autoB26F30E4_ai;
    int autoF3372304_ae;
    int autoF3372304_ai;
    playergroup autoF5CB0BEB_g;
    int autoF5CB0BEB_p;
    playergroup autoE37598EE_g;
    int autoE37598EE_p;

    // Variable Declarations
    int lv_itPlayer;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    HelpPanelEnableTechGlossaryButton(PlayerGroupAll(), false);
    HelpPanelEnableTechTreeButton(PlayerGroupAll(), false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeSupply, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeAllianceButton, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeResourcePanel, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeControlGroupPanel, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeIdleWorkerButton, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeArmyButton, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeHeroPanel, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeInfoPanel, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeMissionTimePanel, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeLeaderPanel, false);
    UIUnitColorStyleOverride(PlayerGroupAll(), c_unitColorStyleOverrideWorld);
    UISetBattleNetButtonOffset(PlayerGroupAll(), 280, 0);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    PingSetPlayerPingsShown(PlayerGroupAll(), false);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogRestartButton, false);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogSaveButton, false);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogLoadButton, false);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogReturnToGameplayButton, true);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogMessageLogButton, false);
    UISetGameMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogAchievementsButton, false);
    UIClearCustomMenuItemList(PlayerGroupAll());
    UISetCustomMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogOptionsButton, true);
    if ((PlayerGroupCount(libCore_gv_activeHumanPlayers) > 1)) {
        UISetCustomMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogExitButton, true);
    }
    else {
        UISetCustomMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogQuitButton, true);
    }
    UISetCustomMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogReturnToGameplayButton, true);
    UISetCustomMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogMessageLogButton, false);
    UISetCustomMenuItemVisible(PlayerGroupAll(), c_gameMenuDialogAchievementsButton, false);
    TriggerExecute(libUIUI_gt_UIInitializeGameUIHandles, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeNotificationDisplay, true, true);
    TriggerExecute(libUIUI_gt_TalentsBucketInitialize, true, true);
    if ((libCore_gv_dEBUGNewTalentUIEnabled == true)) {
        TriggerEnable(libUIUI_gt_TalentsABChoiceSelectedNEW, true);
    }
    else {
        TriggerExecute(libUIUI_gt_TalentsABChoicesPanelInitializeOLD, true, true);
        TriggerEnable(libUIUI_gt_TalentsABChoiceButtonClicked, true);
    }
    TriggerExecute(libUIUI_gt_UIInitializeHeroConsole, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeDeathActionCamPanel, true, true);
    TriggerExecute(libUIUI_gt_EncouragementPanelInitialize, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeDamageFlashUI, true, true);
    TriggerExecute(libUIUI_gt_FullscreenOverlaysInitialize, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeTargetInfoPanel, true, true);
    TriggerExecute(libUIUI_gt_HeroConsoleUnitStatusBarsInitialize, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeTargetingHelperPanel, true, true);
    TriggerExecute(libUIUI_gt_DeathRecapPanelInitialize, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeLeaderboard, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeObserverUI, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeHeroTrackerArrow, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeDebugPanel, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeHealingFountainsHelpText, true, true);
    TriggerExecute(libUIUI_gt_TryMeModePanelInitialize, true, true);
    TriggerExecute(libUIUI_gt_GameOverSplashInitialize, true, true);
    TriggerExecute(libUIUI_gt_TopBarPanelInitialize, true, true);
    TriggerExecute(libUIUI_gt_DeathTimerPanelInitialize, true, true);
    TriggerExecute(libUIUI_gt_MapMechanicsPanelInitialize, true, true);
    TriggerExecute(libUIUI_gt_UIInitializeHeroSpecificStatusFrame, true, true);
    autoB26F30E4_ae = 15;
    autoB26F30E4_ai = 1;
    lv_itPlayer = 0;
    for ( ; ( (autoB26F30E4_ai >= 0 && lv_itPlayer <= autoB26F30E4_ae) || (autoB26F30E4_ai <= 0 && lv_itPlayer >= autoB26F30E4_ae) ) ; lv_itPlayer += autoB26F30E4_ai ) {
        PlayerOptionOverride(lv_itPlayer, "simplecommandcard", "0");
        PlayerSetState(lv_itPlayer, c_playerStateShowWorldTip, false);
    }
    autoF3372304_ae = libCore_gv_bALMaxPlayers;
    autoF3372304_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (autoF3372304_ai >= 0 && lv_itPlayer <= autoF3372304_ae) || (autoF3372304_ai <= 0 && lv_itPlayer >= autoF3372304_ae) ) ; lv_itPlayer += autoF3372304_ai ) {
        libUIUI_gf_UIGameUIChangeModeMinimapCommandsForPlayer(lv_itPlayer);
    }
    libUIUI_gf_UIHeroConsoleShowHideForPlayer(false, libCore_gv_oBSERVER_ObserverUIPlayer);
    autoF5CB0BEB_g = libCore_gv_nPCPlayers; 
    autoF5CB0BEB_p = 1;
    for ( ; autoF5CB0BEB_p <= PlayerGroupCount(autoF5CB0BEB_g) ; autoF5CB0BEB_p += BoolToInt(lv_itPlayer == PlayerGroupPlayer(autoF5CB0BEB_g, autoF5CB0BEB_p)) ) {
        lv_itPlayer = PlayerGroupPlayer(autoF5CB0BEB_g, autoF5CB0BEB_p);
        libUIUI_gf_UIHeroConsoleShowHideForPlayer(false, lv_itPlayer);
    }
    autoE37598EE_g = PlayerGroupAll(); 
    autoE37598EE_p = 1;
    for ( ; autoE37598EE_p <= PlayerGroupCount(autoE37598EE_g) ; autoE37598EE_p += BoolToInt(lv_itPlayer == PlayerGroupPlayer(autoE37598EE_g, autoE37598EE_p)) ) {
        lv_itPlayer = PlayerGroupPlayer(autoE37598EE_g, autoE37598EE_p);
        libUIUI_gf_TopBarPanelShowHideForPlayer(false, lv_itPlayer);
        libUIUI_gf_UIGameUIShowHideConsolePanelForPlayer(false, lv_itPlayer);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InitializeUI_Init () {
    libUIUI_gt_InitializeUI = TriggerCreate("libUIUI_gt_InitializeUI_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Update Event - Behavior Change That Affects Stats
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventPlayer() <= libCore_gv_bALMaxPlayers))) {
            return false;
        }

        if (!((UnitTypeTestAttribute(UnitGetType(EventUnit()), c_unitAttributeHeroic) == true))) {
            return false;
        }

        if (!((UnitTestState(EventUnit(), c_unitStateHallucination) == false))) {
            return false;
        }

        if (!(((EventUnitBehaviorChange() == c_unitBehaviorChangeIncrease) || (EventUnitBehaviorChange() == c_unitBehaviorChangeDecrease)))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIUpdateEventPlayerStatsChange(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats_Init () {
    libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats = TriggerCreate("libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats_Func");
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "TalentBucketShrinkRayDamageReduction", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "IllidanMetamorphosis", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "TychusStim", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "Overclock", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "MuradinAvatar", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "GatlingGunActive", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "ElectromagneticPulseGeneratorReadyBehavior", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "ElectromagneticPulseGeneratorReadyBehavior", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "TrueshotBowAura", c_unitBehaviorChangeAny);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats, null, "ZeratulPassiveWeaponBonus", c_unitBehaviorChangeAny);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Update Time Labels Timer Expires
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIUpdateTimeLabelsTimerExpires_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_gameOver == false))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIUpdateTimeLabels();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIUpdateTimeLabelsTimerExpires_Init () {
    libUIUI_gt_UIUpdateTimeLabelsTimerExpires = TriggerCreate("libUIUI_gt_UIUpdateTimeLabelsTimerExpires_Func");
    TriggerAddEventTimer(libUIUI_gt_UIUpdateTimeLabelsTimerExpires, libUIUI_gv_uITimeLabelUpdateTimer);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Damage Flash UI
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeDamageFlashUI_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/DamageOverlayImagesPanel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_cOMPUTER_TeamOrder], false);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_cOMPUTER_TeamChaos], false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIDamageFlashUI.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "LightDamageSplash");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_uIDamageFlashUI.lv_lightSplashImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "IntenseSplash");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_uIDamageFlashUI.lv_intenseSplashImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "PersistentLowHealthSplash");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_uIDamageFlashUI.lv_lowHealthPersistentImage = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeDamageFlashUI_Init () {
    libUIUI_gt_UIInitializeDamageFlashUI = TriggerCreate("libUIUI_gt_UIInitializeDamageFlashUI_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Damage Flash - Trigger Damage Flash
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDamageFlashTriggerDamageFlash_Func (bool testConds, bool runActions) {
    // Variable Declarations
    fixed lv_currentHP;
    fixed lv_damagePercentage;
    fixed lv_flashOpacity;
    fixed lv_fadeTime;

    // Variable Initialization
    lv_flashOpacity = 100.0;
    lv_fadeTime = 0.625;

    // Conditions
    if (testConds) {
        if (!((libGame_gv_gameOver == false))) {
            return false;
        }

        if (!((EventPlayer() > 0))) {
            return false;
        }

        if (!((EventPlayer() <= libCore_gv_bALMaxPlayers))) {
            return false;
        }

        if (!((EventUnit() == libGame_gv_players[UnitGetOwner(EventUnit())].lv_heroUnit))) {
            return false;
        }

        if (!((libGame_gv_players[EventPlayer()].lv_activeVehicle == null))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_currentHP = (UnitGetPropertyFixed(EventUnit(), c_unitPropLife, c_unitPropCurrent) + UnitGetPropertyFixed(EventUnit(), c_unitPropShields, c_unitPropCurrent));
    lv_currentHP += 1.0;
    lv_damagePercentage = (EventUnitDamageAmount() / lv_currentHP);
    if ((UnitHasBehavior2(EventUnit(), "SymbioteCasterDummyBehavior") == true)) {
        lv_flashOpacity -= 100.0;
        DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_intenseSplashImage, PlayerGroupSingle(EventPlayer()), 0.0, lv_flashOpacity);
        DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_intenseSplashImage, PlayerGroupSingle(EventPlayer()), lv_fadeTime, 100.0);
    }
    else {
        if ((UnitGetPropertyFixed(EventUnit(), c_unitPropLifePercent, c_unitPropCurrent) > libUIUI_gv_uIDamageFlashLowHPThreshold)) {
            if ((lv_damagePercentage >= 0.1)) {
                lv_flashOpacity -= 30.0;
            }
            else {
            }
            if ((lv_damagePercentage >= 0.25)) {
                lv_flashOpacity -= 40.0;
                lv_fadeTime += 0.125;
            }
            else {
            }
            if ((lv_damagePercentage >= 0.35)) {
                lv_flashOpacity -= 30.0;
                lv_fadeTime += 0.25;
            }
            else {
            }
            DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_lightSplashImage, PlayerGroupSingle(EventPlayer()), 0.0, lv_flashOpacity);
            DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_lightSplashImage, PlayerGroupSingle(EventPlayer()), lv_fadeTime, 100.0);
        }
        else {
            libUIUI_gf_UIDamageFlashStartLowHPSoundAndScreenEffects(EventPlayer());
            if ((lv_damagePercentage >= 0.05)) {
                lv_flashOpacity -= 30.0;
                if ((lv_damagePercentage >= 0.1)) {
                    lv_flashOpacity -= 40.0;
                    lv_fadeTime += 0.125;
                }
                else {
                }
                if ((lv_damagePercentage >= 0.2)) {
                    lv_flashOpacity -= 30.0;
                    lv_fadeTime += 0.25;
                }
                else {
                }
                DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_intenseSplashImage, PlayerGroupSingle(EventPlayer()), 0.0, lv_flashOpacity);
                DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_intenseSplashImage, PlayerGroupSingle(EventPlayer()), lv_fadeTime, 100.0);
            }
            else {
                lv_flashOpacity -= 60.0;
                DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_lightSplashImage, libCore_gv_playerGroupFromPlayer[EventPlayer()], 0.0, lv_flashOpacity);
                DialogControlFadeTransparency(libUIUI_gv_uIDamageFlashUI.lv_lightSplashImage, libCore_gv_playerGroupFromPlayer[EventPlayer()], lv_fadeTime, 100.0);
            }
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDamageFlashTriggerDamageFlash_Init () {
    libUIUI_gt_UIDamageFlashTriggerDamageFlash = TriggerCreate("libUIUI_gt_UIDamageFlashTriggerDamageFlash_Func");
    TriggerAddEventUnitDamaged(libUIUI_gt_UIDamageFlashTriggerDamageFlash, null, c_unitDamageTypeAny, c_unitDamageEither, null);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Damage Flash - Low HP Sounds Looper
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDamageFlashLowHPSoundsLooper_Func (bool testConds, bool runActions) {
    int auto1DC59C8C_ae;
    int auto1DC59C8C_ai;

    // Variable Declarations
    int lv_i;
    bool lv_triggerInUse;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto1DC59C8C_ae = libCore_gv_bALMaxPlayers;
    auto1DC59C8C_ai = 1;
    lv_i = 1;
    for ( ; ( (auto1DC59C8C_ai >= 0 && lv_i <= auto1DC59C8C_ae) || (auto1DC59C8C_ai <= 0 && lv_i >= auto1DC59C8C_ae) ) ; lv_i += auto1DC59C8C_ai ) {
        if ((libGame_gv_players[lv_i].lv_lowHPSoundPlaying == true)) {
            if (((libGame_gv_gameOver == true) || (UnitGetPropertyFixed(libGame_gv_players[lv_i].lv_heroUnit, c_unitPropLifePercent, c_unitPropCurrent) > libUIUI_gv_uIDamageFlashLowHPThreshold))) {
                libUIUI_gf_UIDamageFlashStopLowHPSoundAndScreenEffects(lv_i);
            }
            else {
                lv_triggerInUse = true;
            }
        }
        else {
        }
    }
    if ((lv_triggerInUse == false)) {
        TriggerEnable(TriggerGetCurrent(), false);
    }
    else {
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDamageFlashLowHPSoundsLooper_Init () {
    libUIUI_gt_UIDamageFlashLowHPSoundsLooper = TriggerCreate("libUIUI_gt_UIDamageFlashLowHPSoundsLooper_Func");
    TriggerEnable(libUIUI_gt_UIDamageFlashLowHPSoundsLooper, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_UIDamageFlashLowHPSoundsLooper, 0.25, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Death Action Cam Panel
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeDeathActionCamPanel_Func (bool testConds, bool runActions) {
    int init_i;

    int autoA7133E8D_ae;
    int autoA7133E8D_ai;

    // Variable Declarations
    int lv_player;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/DeathActionCamPanel");
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIDeathActionCamPanel.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "PreviousAllyButton");
    libUIUI_gv_uIDeathActionCamPanel.lv_previousAllyButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "NextAllyButton");
    libUIUI_gv_uIDeathActionCamPanel.lv_nextAllyButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "DeathActionCamCheckBox");
    libUIUI_gv_uIDeathActionCamPanel.lv_deathActionCamCheckbox = DialogControlLastCreated();
    autoA7133E8D_ae = libCore_gv_bALMaxPlayers;
    autoA7133E8D_ai = 1;
    lv_player = 1;
    for ( ; ( (autoA7133E8D_ai >= 0 && lv_player <= autoA7133E8D_ae) || (autoA7133E8D_ai <= 0 && lv_player >= autoA7133E8D_ae) ) ; lv_player += autoA7133E8D_ai ) {
        if ((libGame_gv_players[lv_player].lv_bankData.lv_settingDeathActionCam == true)) {
            libNtve_gf_SetDialogItemChecked(DialogControlLastCreated(), true, libCore_gv_playerGroupFromPlayer[lv_player]);
        }
        else {
            DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_previousAllyButton, libCore_gv_playerGroupFromPlayer[lv_player], false);
            DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_nextAllyButton, libCore_gv_playerGroupFromPlayer[lv_player], false);
        }
    }
    DialogControlSetVisible(libUIUI_gv_uIDeathActionCamPanel.lv_mainDialog, PlayerGroupAll(), false);
    TriggerEnable(libUIUI_gt_UIDeathActionCamPanelCheckboxClicked, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeDeathActionCamPanel_Init () {
    libUIUI_gt_UIInitializeDeathActionCamPanel = TriggerCreate("libUIUI_gt_UIInitializeDeathActionCamPanel_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Death Action Cam Panel - Previous Ally Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDeathActionCamPanelPreviousAllyButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_uIDeathActionCamPanel.lv_previousAllyButton))) {
            return false;
        }

        if (!((libGame_gv_players[EventPlayer()].lv_isDead == true))) {
            return false;
        }

        if (!((libGame_gv_players[EventPlayer()].lv_bankData.lv_settingDeathActionCam == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libGame_gf_CameraTrackPreviousAliveAllyForPlayer(EventPlayer());
    libGame_gf_CameraUpdateCameraForPlayer(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDeathActionCamPanelPreviousAllyButtonClicked_Init () {
    libUIUI_gt_UIDeathActionCamPanelPreviousAllyButtonClicked = TriggerCreate("libUIUI_gt_UIDeathActionCamPanelPreviousAllyButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDeathActionCamPanelPreviousAllyButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Death Action Cam Panel - Next Ally Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDeathActionCamPanelNextAllyButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_uIDeathActionCamPanel.lv_nextAllyButton))) {
            return false;
        }

        if (!((libGame_gv_players[EventPlayer()].lv_isDead == true))) {
            return false;
        }

        if (!((libGame_gv_players[EventPlayer()].lv_bankData.lv_settingDeathActionCam == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libGame_gf_CameraTrackNextAliveAllyForPlayer(EventPlayer());
    libGame_gf_CameraUpdateCameraForPlayer(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDeathActionCamPanelNextAllyButtonClicked_Init () {
    libUIUI_gt_UIDeathActionCamPanelNextAllyButtonClicked = TriggerCreate("libUIUI_gt_UIDeathActionCamPanelNextAllyButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDeathActionCamPanelNextAllyButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Death Action Cam Panel - Checkbox Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDeathActionCamPanelCheckboxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_uIDeathActionCamPanel.lv_deathActionCamCheckbox))) {
            return false;
        }

        if (!((libGame_gv_players[EventPlayer()].lv_isDead == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIDeathActionCamPanelToggleDeathActionCamForPlayer(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDeathActionCamPanelCheckboxClicked_Init () {
    libUIUI_gt_UIDeathActionCamPanelCheckboxClicked = TriggerCreate("libUIUI_gt_UIDeathActionCamPanelCheckboxClicked_Func");
    TriggerEnable(libUIUI_gt_UIDeathActionCamPanelCheckboxClicked, false);
    TriggerAddEventDialogControl(libUIUI_gt_UIDeathActionCamPanelCheckboxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeChecked);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Panel Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapPanelInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    int autoFB4EA985_ae;
    int autoFB4EA985_ai;
    int auto435E0EEB_ae;
    int auto435E0EEB_ai;
    int autoF23F4953_ae;
    int autoF23F4953_ai;
    int auto6ADC54EB_ae;
    int auto6ADC54EB_ai;
    int auto734CBE88_ae;
    int auto734CBE88_ai;
    int auto5FDAF765_ae;
    int auto5FDAF765_ai;

    // Variable Declarations
    int lv_itCategoryLabel;
    int lv_itDamageChunk;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypeButton, "UIContainer/FullscreenUpperContainer/DeathRecapButton");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_deathRecap_Panel.lv_openButton = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/DeathRecapPanel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "CloseButton");
    libUIUI_gv_deathRecap_Panel.lv_closeButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DebuffTimelinePanel");
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_debuffsPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Timeline");
    libUIUI_gv_deathRecap_Panel.lv_debuffsTimelineBar = DialogControlLastCreated();
    autoFB4EA985_ae = libGame_gv_deathRecap_DebuffCategoryCount_C;
    autoFB4EA985_ai = 1;
    lv_itCategoryLabel = 1;
    for ( ; ( (autoFB4EA985_ai >= 0 && lv_itCategoryLabel <= autoFB4EA985_ae) || (autoFB4EA985_ai <= 0 && lv_itCategoryLabel >= autoFB4EA985_ae) ) ; lv_itCategoryLabel += autoFB4EA985_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DebuffCategoryLabel" + IntToString(lv_itCategoryLabel));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_deathRecap_Panel.lv_debuffsCategoryLabels[lv_itCategoryLabel] = DialogControlLastCreated();
    }
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DamageTakenPanel");
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_damageTakenPanel = DialogControlLastCreated();
    auto435E0EEB_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    auto435E0EEB_ai = 1;
    lv_itDamageChunk = 1;
    for ( ; ( (auto435E0EEB_ai >= 0 && lv_itDamageChunk <= auto435E0EEB_ae) || (auto435E0EEB_ai <= 0 && lv_itDamageChunk >= auto435E0EEB_ae) ) ; lv_itDamageChunk += auto435E0EEB_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DamageChunk" + IntToString(lv_itDamageChunk));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarImages[lv_itDamageChunk] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Button");
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[lv_itDamageChunk] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "SourceNameLabel");
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarNameLabels[lv_itDamageChunk] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "BorderLines");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarBorderFrames[lv_itDamageChunk] = DialogControlLastCreated();
        lv_currentPanelLayer -= 1;
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DamageAmountLabel" + IntToString(lv_itDamageChunk));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarAmountLabels[lv_itDamageChunk] = DialogControlLastCreated();
    }
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DamageSummaryLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageTakenSummaryLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "BlankDetailsPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_deathRecap_Panel.lv_blankDetailsPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DebuffDetailsPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeaderLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeaderLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Timeline");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsTimelineBar = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TimeMarker2/TimeLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsEndTimeLabel = DialogControlLastCreated();
    autoF23F4953_ae = libGame_gv_deathRecap_MaxDebuffDetailsAbilities_C;
    autoF23F4953_ai = 1;
    lv_itCategoryLabel = 1;
    for ( ; ( (autoF23F4953_ai >= 0 && lv_itCategoryLabel <= autoF23F4953_ae) || (autoF23F4953_ai <= 0 && lv_itCategoryLabel >= autoF23F4953_ae) ) ; lv_itCategoryLabel += autoF23F4953_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DebuffCategoryLabel" + IntToString(lv_itCategoryLabel));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityDebuffLabels[lv_itCategoryLabel] = DialogControlLastCreated();
    }
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "AbilityInfo");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "AbilityIcon/IconImage");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoIcon = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "AbilityNameLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "AbilityAmountLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoAmountLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TooltipLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsAbilityInfoTooltipLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroInfoFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "PortraitImage");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoPortraitImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroNameLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoPlayerNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroTipLabel");
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsHeroInfoDescriptionLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "ClickForMoreDetailsLabel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_deathRecap_Panel.lv_debuffDetailsClickForMoreInfoLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DamageDetailsPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsPanel = DialogControlLastCreated();
    auto6ADC54EB_ae = libGame_gv_deathRecap_MaxDamageDetailsAbilities_C;
    auto6ADC54EB_ai = 1;
    lv_itDamageChunk = 1;
    for ( ; ( (auto6ADC54EB_ai >= 0 && lv_itDamageChunk <= auto6ADC54EB_ae) || (auto6ADC54EB_ai <= 0 && lv_itDamageChunk >= auto6ADC54EB_ae) ) ; lv_itDamageChunk += auto6ADC54EB_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DamageChunk" + IntToString(lv_itDamageChunk));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarImages[lv_itDamageChunk] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Button");
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[lv_itDamageChunk] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "SourceNameLabel");
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarNameLabels[lv_itDamageChunk] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "BorderLines");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarBorderFrames[lv_itDamageChunk] = DialogControlLastCreated();
        lv_currentPanelLayer -= 1;
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DamageAmountLabel" + IntToString(lv_itDamageChunk));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarAmountLabels[lv_itDamageChunk] = DialogControlLastCreated();
    }
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "AbilityInfo");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "AbilityIcon/IconImage");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoIcon = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "AbilityCountLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoCountLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "AbilityNameLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "AbilityAmountLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoAmountLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TooltipLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsAbilityInfoTooltipLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroInfoFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "PortraitImage");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPortraitImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroNameLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoPlayerNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroTipLabel");
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsHeroInfoDescriptionLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "ClickForMoreDetailsLabel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_deathRecap_Panel.lv_damageDetailsClickForMoreInfoLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    auto734CBE88_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    auto734CBE88_ai = 1;
    lv_itDamageChunk = 1;
    for ( ; ( (auto734CBE88_ai >= 0 && lv_itDamageChunk <= auto734CBE88_ae) || (auto734CBE88_ai <= 0 && lv_itDamageChunk >= auto734CBE88_ae) ) ; lv_itDamageChunk += auto734CBE88_ai ) {
        TriggerAddEventDialogControl(libUIUI_gt_DeathRecapDamageTakenBarMouseExit, c_playerAny, libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[lv_itDamageChunk], c_triggerControlEventTypeMouseExit);
        TriggerAddEventDialogControl(libUIUI_gt_DeathRecapDamageTakenBarMouseEnter, c_playerAny, libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[lv_itDamageChunk], c_triggerControlEventTypeMouseEnter);
    }
    auto5FDAF765_ae = libGame_gv_deathRecap_MaxDamageDetailsAbilities_C;
    auto5FDAF765_ai = 1;
    lv_itDamageChunk = 1;
    for ( ; ( (auto5FDAF765_ai >= 0 && lv_itDamageChunk <= auto5FDAF765_ae) || (auto5FDAF765_ai <= 0 && lv_itDamageChunk >= auto5FDAF765_ae) ) ; lv_itDamageChunk += auto5FDAF765_ai ) {
        TriggerAddEventDialogControl(libUIUI_gt_DeathRecapDamageDetailsBarMouseExit, c_playerAny, libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[lv_itDamageChunk], c_triggerControlEventTypeMouseExit);
        TriggerAddEventDialogControl(libUIUI_gt_DeathRecapDamageDetailsBarMouseEnter, c_playerAny, libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[lv_itDamageChunk], c_triggerControlEventTypeMouseEnter);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapPanelInitialize_Init () {
    libUIUI_gt_DeathRecapPanelInitialize = TriggerCreate("libUIUI_gt_DeathRecapPanelInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Open Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapOpenButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_openButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_DeathRecapShowHideForPlayer(true, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapOpenButtonClicked_Init () {
    libUIUI_gt_DeathRecapOpenButtonClicked = TriggerCreate("libUIUI_gt_DeathRecapOpenButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_DeathRecapOpenButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Close Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapCloseButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_closeButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_DeathRecapShowHideForPlayer(false, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapCloseButtonClicked_Init () {
    libUIUI_gt_DeathRecapCloseButtonClicked = TriggerCreate("libUIUI_gt_DeathRecapCloseButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_DeathRecapCloseButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Damage Taken Bar Mouse Enter
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapDamageTakenBarMouseEnter_Func (bool testConds, bool runActions) {
    int auto99C00121_ae;
    int auto99C00121_ai;

    // Variable Declarations
    int lv_itDamageBar;
    int lv_usedDamageBar;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto99C00121_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    auto99C00121_ai = 1;
    lv_itDamageBar = 1;
    for ( ; ( (auto99C00121_ai >= 0 && lv_itDamageBar <= auto99C00121_ae) || (auto99C00121_ai <= 0 && lv_itDamageBar >= auto99C00121_ae) ) ; lv_itDamageBar += auto99C00121_ai ) {
        if ((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[lv_itDamageBar])) {
            lv_usedDamageBar = lv_itDamageBar;
            break;
        }
        else {
        }
    }
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarBorderFrames[lv_usedDamageBar], libCore_gv_playerGroupFromPlayer[EventPlayer()], true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapDamageTakenBarMouseEnter_Init () {
    libUIUI_gt_DeathRecapDamageTakenBarMouseEnter = TriggerCreate("libUIUI_gt_DeathRecapDamageTakenBarMouseEnter_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Damage Taken Bar Mouse Exit
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapDamageTakenBarMouseExit_Func (bool testConds, bool runActions) {
    int auto46B61545_ae;
    int auto46B61545_ai;

    // Variable Declarations
    int lv_itDamageBar;
    int lv_usedDamageBar;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto46B61545_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    auto46B61545_ai = 1;
    lv_itDamageBar = 1;
    for ( ; ( (auto46B61545_ai >= 0 && lv_itDamageBar <= auto46B61545_ae) || (auto46B61545_ai <= 0 && lv_itDamageBar >= auto46B61545_ae) ) ; lv_itDamageBar += auto46B61545_ai ) {
        if ((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[lv_itDamageBar])) {
            lv_usedDamageBar = lv_itDamageBar;
            break;
        }
        else {
        }
    }
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarBorderFrames[lv_usedDamageBar], libCore_gv_playerGroupFromPlayer[EventPlayer()], false);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapDamageTakenBarMouseExit_Init () {
    libUIUI_gt_DeathRecapDamageTakenBarMouseExit = TriggerCreate("libUIUI_gt_DeathRecapDamageTakenBarMouseExit_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Damage Taken Bar Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapDamageTakenBarClicked_Func (bool testConds, bool runActions) {
    int auto4788B3CE_ae;
    int auto4788B3CE_ai;

    // Variable Declarations
    int lv_itDamageBar;
    int lv_usedDamageBar;
    int lv_player;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto4788B3CE_ae = libGame_gv_deathRecap_MaxDamageTakenBars_C;
    auto4788B3CE_ai = 1;
    lv_itDamageBar = 1;
    for ( ; ( (auto4788B3CE_ai >= 0 && lv_itDamageBar <= auto4788B3CE_ae) || (auto4788B3CE_ai <= 0 && lv_itDamageBar >= auto4788B3CE_ae) ) ; lv_itDamageBar += auto4788B3CE_ai ) {
        if ((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_damageTakenDamageBarButtons[lv_itDamageBar])) {
            lv_usedDamageBar = lv_itDamageBar;
            break;
        }
        else {
        }
    }
    if ((lv_usedDamageBar == 0)) {
        return true;
    }
    else {
    }
    lv_player = EventPlayer();
    libUIUI_gf_DeathRecapPopulateDamageDetailsPanelForPlayer(lv_player, libGame_gv_deathRecap_DeathData[lv_player][libUIUI_gv_deathRecap_CurrentDeathIndex[lv_player]].lv_damageTakenBarSortOrder[lv_usedDamageBar]);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapDamageTakenBarClicked_Init () {
    libUIUI_gt_DeathRecapDamageTakenBarClicked = TriggerCreate("libUIUI_gt_DeathRecapDamageTakenBarClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_DeathRecapDamageTakenBarClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Damage Details Bar Mouse Enter
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapDamageDetailsBarMouseEnter_Func (bool testConds, bool runActions) {
    int autoD223F522_ae;
    int autoD223F522_ai;

    // Variable Declarations
    int lv_itAbilityBar;
    int lv_usedAbilityBar;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    autoD223F522_ae = libGame_gv_deathRecap_MaxDamageDetailsAbilities_C;
    autoD223F522_ai = 1;
    lv_itAbilityBar = 1;
    for ( ; ( (autoD223F522_ai >= 0 && lv_itAbilityBar <= autoD223F522_ae) || (autoD223F522_ai <= 0 && lv_itAbilityBar >= autoD223F522_ae) ) ; lv_itAbilityBar += autoD223F522_ai ) {
        if ((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[lv_itAbilityBar])) {
            lv_usedAbilityBar = lv_itAbilityBar;
            break;
        }
        else {
        }
    }
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarBorderFrames[lv_usedAbilityBar], libCore_gv_playerGroupFromPlayer[EventPlayer()], true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapDamageDetailsBarMouseEnter_Init () {
    libUIUI_gt_DeathRecapDamageDetailsBarMouseEnter = TriggerCreate("libUIUI_gt_DeathRecapDamageDetailsBarMouseEnter_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Damage Details Bar Mouse Exit
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapDamageDetailsBarMouseExit_Func (bool testConds, bool runActions) {
    int auto2774128A_ae;
    int auto2774128A_ai;

    // Variable Declarations
    int lv_itAbilityBar;
    int lv_usedAbilityBar;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto2774128A_ae = libGame_gv_deathRecap_MaxDamageDetailsAbilities_C;
    auto2774128A_ai = 1;
    lv_itAbilityBar = 1;
    for ( ; ( (auto2774128A_ai >= 0 && lv_itAbilityBar <= auto2774128A_ae) || (auto2774128A_ai <= 0 && lv_itAbilityBar >= auto2774128A_ae) ) ; lv_itAbilityBar += auto2774128A_ai ) {
        if ((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[lv_itAbilityBar])) {
            lv_usedAbilityBar = lv_itAbilityBar;
            break;
        }
        else {
        }
    }
    DialogControlSetVisible(libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarBorderFrames[lv_usedAbilityBar], libCore_gv_playerGroupFromPlayer[EventPlayer()], false);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapDamageDetailsBarMouseExit_Init () {
    libUIUI_gt_DeathRecapDamageDetailsBarMouseExit = TriggerCreate("libUIUI_gt_DeathRecapDamageDetailsBarMouseExit_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Recap Damage Details Bar Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathRecapDamageDetailsBarClicked_Func (bool testConds, bool runActions) {
    int autoC24415AB_ae;
    int autoC24415AB_ai;

    // Variable Declarations
    int lv_itAbilityBar;
    int lv_usedAbilityBar;
    int lv_player;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    autoC24415AB_ae = libGame_gv_deathRecap_MaxDamageDetailsAbilities_C;
    autoC24415AB_ai = 1;
    lv_itAbilityBar = 1;
    for ( ; ( (autoC24415AB_ai >= 0 && lv_itAbilityBar <= autoC24415AB_ae) || (autoC24415AB_ai <= 0 && lv_itAbilityBar >= autoC24415AB_ae) ) ; lv_itAbilityBar += autoC24415AB_ai ) {
        if ((EventDialogControl() == libUIUI_gv_deathRecap_Panel.lv_damageDetailsDamageBarButtons[lv_itAbilityBar])) {
            lv_usedAbilityBar = lv_itAbilityBar;
            break;
        }
        else {
        }
    }
    if ((lv_usedAbilityBar == 0)) {
        return true;
    }
    else {
    }
    lv_player = EventPlayer();
    libUIUI_gf_DeathRecapPopulateDamageDetailsAbilityInfoForPlayer(EventPlayer(), libGame_gv_deathRecap_DeathData[lv_player][libUIUI_gv_deathRecap_CurrentDeathIndex[lv_player]].lv_damageTakenBars[libUIUI_gv_deathRecap_CurrentDamageTakenBarIndex[lv_player]].lv_abilitySortOrder[lv_usedAbilityBar]);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathRecapDamageDetailsBarClicked_Init () {
    libUIUI_gt_DeathRecapDamageDetailsBarClicked = TriggerCreate("libUIUI_gt_DeathRecapDamageDetailsBarClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_DeathRecapDamageDetailsBarClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Timer Panel Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathTimerPanelInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    int autoC5CEEC7C_ae;
    int autoC5CEEC7C_ai;
    int autoC6FB5086_ae;
    int autoC6FB5086_ai;
    int autoA9F7EA3B_ae;
    int autoA9F7EA3B_ai;
    int autoD0E687C3_ae;
    int autoD0E687C3_ai;
    int autoD916CFB6_ae;
    int autoD916CFB6_ai;
    int auto3FA9DD2A_ae;
    int auto3FA9DD2A_ai;

    // Variable Declarations
    int lv_itTeam;
    int lv_itPlayer;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_enemyTeam;
    int lv_eventFrame;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }
    lv_eventFrame = c_invalidDialogControlId;

    // Actions
    if (!runActions) {
        return true;
    }

    autoC5CEEC7C_ae = libCore_gv_bALMaxTeams;
    autoC5CEEC7C_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoC5CEEC7C_ai >= 0 && lv_itTeam <= autoC5CEEC7C_ae) || (autoC5CEEC7C_ai <= 0 && lv_itTeam >= autoC5CEEC7C_ae) ) ; lv_itTeam += autoC5CEEC7C_ai ) {
        lv_enemyTeam = (3 - lv_itTeam);
        DialogControlHookupStandard(c_triggerControlTypePanel, ("UIContainer/ConsoleUIContainer/Team" + IntToString(lv_itTeam) + "DeathTimerBar"));
        DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_deathTimerPanel.lv_mainPanel[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "TimerStartBlue");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, true);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "TimerStartRed");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, true);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "TimerBar");
        libUIUI_gv_deathTimerPanel.lv_timerBar[lv_itTeam] = DialogControlLastCreated();
        autoC6FB5086_ae = libCore_gv_bALMaxPlayersOnATeam;
        autoC6FB5086_ai = 1;
        lv_itPlayer = 1;
        for ( ; ( (autoC6FB5086_ai >= 0 && lv_itPlayer <= autoC6FB5086_ae) || (autoC6FB5086_ai <= 0 && lv_itPlayer >= autoC6FB5086_ae) ) ; lv_itPlayer += autoC6FB5086_ai ) {
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroFrame" + IntToString(lv_itPlayer));
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            lv_currentPanelLayer += 1;
            lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrame[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "PortraitImage");
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFramePortraitImage[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "BorderImage");
            libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_DeathTimer_PortraitBlue", libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers);
            libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_DeathTimer_PortraitRed", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DeathTimerLabel");
            libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_DeathTimer_TimerLabelRed", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameTimeLabel[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroNameLabel");
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            if ((lv_itTeam == libGame_gv_teamOrderIndex_C)) {
                libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_DeathTimer_TeamDeathTimerHeroNameLeftRed", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            }
            else {
                libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_DeathTimer_TeamDeathTimerHeroNameRightRed", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            }
            libUIUI_gv_deathTimerPanel.lv_timerBarHeroFrameHeroNameLabel[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            lv_currentPanelLayer -= 1;
        }
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DeathAnnouncementFrame");
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_deathTimerPanel.lv_announcementPanel[lv_itTeam] = DialogControlLastCreated();
        autoA9F7EA3B_ae = libCore_gv_bALMaxPlayersOnATeam;
        autoA9F7EA3B_ai = 1;
        lv_itPlayer = 1;
        for ( ; ( (autoA9F7EA3B_ai >= 0 && lv_itPlayer <= autoA9F7EA3B_ae) || (autoA9F7EA3B_ai <= 0 && lv_itPlayer >= autoA9F7EA3B_ae) ) ; lv_itPlayer += autoA9F7EA3B_ai ) {
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DeadPlayer" + IntToString(lv_itPlayer));
            lv_currentPanelLayer += 1;
            lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrame[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroNameLabel");
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameNameLabel[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "KillersLabel");
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameKillersLabel[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DeadPlayerFrame/PortraitImage");
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFramePortraitImage[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DeadPlayerFrame/BorderImage");
            libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_DeathAnnouncement_Portrait_Red", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameBorderImageBright[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DeadPlayerFrame/BorderImageFaded");
            libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_DeathAnnouncement_Portrait_RedFaded", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameBorderImageFaded[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DeadPlayerFrame/CrossImage");
            libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_DeathTimer_CrossBlue", libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers);
            libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_DeathTimer_CrossRed", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
            libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameCrossImage[lv_itTeam][lv_itPlayer] = DialogControlLastCreated();
            lv_currentPanelLayer -= 1;
        }
        lv_currentPanelLayer -= 1;
        lv_currentPanelLayer -= 1;
    }
    libNtve_gf_SetDialogItemImage(libUIUI_gv_deathTimerPanel.lv_timerBar[libGame_gv_teamOrderIndex_C], "@UI/HUD_DeathTimer_TimerBarBackRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_deathTimerPanel.lv_timerBar[libGame_gv_teamChaosIndex_C], "@UI/HUD_DeathTimer_TimerBarBackBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    autoD0E687C3_ae = libCore_gv_bALMaxPlayersOnATeam;
    autoD0E687C3_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (autoD0E687C3_ai >= 0 && lv_itPlayer <= autoD0E687C3_ae) || (autoD0E687C3_ai <= 0 && lv_itPlayer >= autoD0E687C3_ae) ) ; lv_itPlayer += autoD0E687C3_ai ) {
        libNtve_gf_SetDialogItemStyle(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameNameLabel[libGame_gv_teamOrderIndex_C][lv_itPlayer], "Storm_DeathTimer_DeathAnnouncementHeroNameLeftRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
        libNtve_gf_SetDialogItemStyle(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameNameLabel[libGame_gv_teamChaosIndex_C][lv_itPlayer], "Storm_DeathTimer_DeathAnnouncementHeroNameRightBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
        libNtve_gf_SetDialogItemStyle(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameKillersLabel[libGame_gv_teamOrderIndex_C][lv_itPlayer], "Storm_DeathTimer_DeathAnnouncementKilledByLeftRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
        libNtve_gf_SetDialogItemStyle(libUIUI_gv_deathTimerPanel.lv_announcementHeroFrameKillersLabel[libGame_gv_teamChaosIndex_C][lv_itPlayer], "Storm_DeathTimer_DeathAnnouncementKilledByRightBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    }
    autoD916CFB6_ae = libCore_gv_bALMaxTeams;
    autoD916CFB6_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoD916CFB6_ai >= 0 && lv_itTeam <= autoD916CFB6_ae) || (autoD916CFB6_ai <= 0 && lv_itTeam >= autoD916CFB6_ae) ) ; lv_itTeam += autoD916CFB6_ai ) {
        auto3FA9DD2A_ae = libCore_gv_bALMaxPlayersOnATeam;
        auto3FA9DD2A_ai = 1;
        lv_itPlayer = 1;
        for ( ; ( (auto3FA9DD2A_ai >= 0 && lv_itPlayer <= auto3FA9DD2A_ae) || (auto3FA9DD2A_ai <= 0 && lv_itPlayer >= auto3FA9DD2A_ae) ) ; lv_itPlayer += auto3FA9DD2A_ai ) {
            lv_eventFrame = libUIUI_gv_deathTimerPanel.lv_timerBarHeroFramePortraitImage[lv_itTeam][lv_itPlayer];
            TriggerAddEventDialogControl(libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseEnter, c_playerAny, lv_eventFrame, c_triggerControlEventTypeMouseEnter);
            TriggerAddEventDialogControl(libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseExit, c_playerAny, lv_eventFrame, c_triggerControlEventTypeMouseExit);
        }
    }
    TriggerEnable(libUIUI_gt_DeathTimerPanelUpdate, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathTimerPanelInitialize_Init () {
    libUIUI_gt_DeathTimerPanelInitialize = TriggerCreate("libUIUI_gt_DeathTimerPanelInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Announcement Panel Visible Timer Expires
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires_Func (bool testConds, bool runActions) {
    int auto049B4FCD_ae;
    int auto049B4FCD_ai;

    // Variable Declarations
    int lv_itTeam;
    int lv_itSlot;
    int lv_triggeringTimerTeam;
    int lv_triggeringTimerSlot;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libGame_gv_gameOver == false))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    auto049B4FCD_ae = libCore_gv_bALMaxTeams;
    auto049B4FCD_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (auto049B4FCD_ai >= 0 && lv_itTeam <= auto049B4FCD_ae) || (auto049B4FCD_ai <= 0 && lv_itTeam >= auto049B4FCD_ae) ) ; lv_itTeam += auto049B4FCD_ai ) {
        if ((EventTimer() == libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[lv_itTeam])) {
            lv_triggeringTimerTeam = lv_itTeam;
            break;
        }
        else {
        }
    }
    if ((libUIUI_gv_deathAnnouncement_VisibleHeroFrameCount[lv_triggeringTimerTeam] > 1)) {
        TimerStart(libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[lv_triggeringTimerTeam], libUIUI_gv_deathTimerPanel_AnnouncementVisibleDuration_C, false, c_timeGame);
    }
    else {
    }
    libUIUI_gf_DeathAnnouncementPanelTransitionFrameOut(lv_triggeringTimerTeam);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires_Init () {
    libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires = TriggerCreate("libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires_Func");
    TriggerAddEventTimer(libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires, libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[1]);
    TriggerAddEventTimer(libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires, libUIUI_gv_deathAnnouncement_AnnouncementVisibleTimers[2]);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Timer Panel Death Timer Frame Mouse Enter
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseEnter_Func (bool testConds, bool runActions) {
    int auto34E2B27A_ae;
    int auto34E2B27A_ai;
    int auto97512660_ae;
    int auto97512660_ai;

    // Variable Declarations
    int lv_itTeam;
    int lv_itFrameIndex;
    int lv_team;
    int lv_frameIndex;
    int lv_group;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libGame_gv_gameOver == false))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    auto34E2B27A_ae = libCore_gv_bALMaxTeams;
    auto34E2B27A_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (auto34E2B27A_ai >= 0 && lv_itTeam <= auto34E2B27A_ae) || (auto34E2B27A_ai <= 0 && lv_itTeam >= auto34E2B27A_ae) ) ; lv_itTeam += auto34E2B27A_ai ) {
        auto97512660_ae = libCore_gv_bALMaxPlayersOnATeam;
        auto97512660_ai = 1;
        lv_itFrameIndex = 1;
        for ( ; ( (auto97512660_ai >= 0 && lv_itFrameIndex <= auto97512660_ae) || (auto97512660_ai <= 0 && lv_itFrameIndex >= auto97512660_ae) ) ; lv_itFrameIndex += auto97512660_ai ) {
            if ((EventDialogControl() == libUIUI_gv_deathTimerPanel.lv_timerBarHeroFramePortraitImage[lv_itTeam][lv_itFrameIndex])) {
                lv_team = lv_itTeam;
                lv_frameIndex = lv_itFrameIndex;
                break;
            }
            else {
            }
        }
    }
    if (((lv_team == 0) || (lv_frameIndex == 0))) {
        return true;
    }
    else {
    }
    lv_group = libUIUI_gf_DeathTimerPanelGetGroupOfFrame(lv_team, lv_frameIndex);
    if ((libUIUI_gf_DeathTimerPanelGetLayerOfFrameInGroup(lv_team, lv_group, lv_frameIndex) != 1)) {
        return true;
    }
    else {
    }
    libUIUI_gf_DeathTimerPanelSlideGroupOutForPlayer(lv_team, lv_group, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseEnter_Init () {
    libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseEnter = TriggerCreate("libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseEnter_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Timer Panel Death Timer Frame Mouse Exit
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseExit_Func (bool testConds, bool runActions) {
    int autoDDD95D03_ae;
    int autoDDD95D03_ai;
    int auto711894D5_ae;
    int auto711894D5_ai;

    // Variable Declarations
    int lv_itTeam;
    int lv_itFrameIndex;
    int lv_team;
    int lv_frameIndex;
    int lv_group;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libGame_gv_gameOver == false))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    autoDDD95D03_ae = libCore_gv_bALMaxTeams;
    autoDDD95D03_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoDDD95D03_ai >= 0 && lv_itTeam <= autoDDD95D03_ae) || (autoDDD95D03_ai <= 0 && lv_itTeam >= autoDDD95D03_ae) ) ; lv_itTeam += autoDDD95D03_ai ) {
        auto711894D5_ae = libCore_gv_bALMaxPlayersOnATeam;
        auto711894D5_ai = 1;
        lv_itFrameIndex = 1;
        for ( ; ( (auto711894D5_ai >= 0 && lv_itFrameIndex <= auto711894D5_ae) || (auto711894D5_ai <= 0 && lv_itFrameIndex >= auto711894D5_ae) ) ; lv_itFrameIndex += auto711894D5_ai ) {
            if ((EventDialogControl() == libUIUI_gv_deathTimerPanel.lv_timerBarHeroFramePortraitImage[lv_itTeam][lv_itFrameIndex])) {
                lv_team = lv_itTeam;
                lv_frameIndex = lv_itFrameIndex;
                break;
            }
            else {
            }
        }
    }
    if (((lv_team == 0) || (lv_frameIndex == 0))) {
        return true;
    }
    else {
    }
    lv_group = libUIUI_gf_DeathTimerPanelGetGroupOfFrame(lv_team, lv_frameIndex);
    if ((libUIUI_gf_DeathTimerPanelGetLayerOfFrameInGroup(lv_team, lv_group, lv_frameIndex) != 1)) {
        return true;
    }
    else {
    }
    libUIUI_gf_DeathTimerPanelCollapseGroupForPlayer(lv_team, lv_group, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseExit_Init () {
    libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseExit = TriggerCreate("libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseExit_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Death Timer Panel Update
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_DeathTimerPanelUpdate_Func (bool testConds, bool runActions) {
    int auto40047F1D_ae;
    int auto40047F1D_ai;

    // Variable Declarations
    int lv_itTeam;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    if ((libGame_gv_gameOver == true)) {
        TriggerEnable(TriggerGetCurrent(), false);
        libNtve_gf_SetDialogItemTooltip(libUIUI_gv_deathTimerPanel.lv_timerBar[libGame_gv_teamOrderIndex_C], null, PlayerGroupAll());
        libNtve_gf_SetDialogItemTooltip(libUIUI_gv_deathTimerPanel.lv_timerBar[libGame_gv_teamChaosIndex_C], null, PlayerGroupAll());
        return true;
    }
    else {
    }
    auto40047F1D_ae = libCore_gv_bALMaxTeams;
    auto40047F1D_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (auto40047F1D_ai >= 0 && lv_itTeam <= auto40047F1D_ae) || (auto40047F1D_ai <= 0 && lv_itTeam >= auto40047F1D_ae) ) ; lv_itTeam += auto40047F1D_ai ) {
        libUIUI_gf_DeathTimerPanelUpdatePlayerPortraitsForTeam(lv_itTeam);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_DeathTimerPanelUpdate_Init () {
    libUIUI_gt_DeathTimerPanelUpdate = TriggerCreate("libUIUI_gt_DeathTimerPanelUpdate_Func");
    TriggerEnable(libUIUI_gt_DeathTimerPanelUpdate, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_DeathTimerPanelUpdate, 0.0625, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Debug Panel
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeDebugPanel_Func (bool testConds, bool runActions) {
    int init_i;

    int autoE0F0FF91_ae;
    int autoE0F0FF91_ai;

    // Variable Declarations
    int lv_itPlayer;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/DebugPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIDebugPanel.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "CloseButton");
    libUIUI_gv_uIDebugPanel.lv_closeButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "GeneralControlsFrame");
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "RefreshCooldownsButton");
    libUIUI_gv_uIDebugPanel.lv_refreshCooldownsButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "SelectionEnabledCheckBox");
    libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "StartGameButton");
    DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uIDebugPanel.lv_startGameButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "SpawnCreepCampsButton");
    DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uIDebugPanel.lv_spawnCreepCampsButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "ForceMinionWaveCompCheckBox");
    libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompCheckbox = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePulldown, "MinionWaveCompPulldown");
    libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroControlsFrame");
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "RespecHeroButton");
    libUIUI_gv_uIDebugPanel.lv_respecHeroButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerLabel");
    libUIUI_gv_uIDebugPanel.lv_playerLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeSlider, "PlayerSlider");
    libNtve_gf_SetDialogItemMinimumValue(DialogControlLastCreated(), 1.0, PlayerGroupAll());
    libNtve_gf_SetDialogItemMaximumValue(DialogControlLastCreated(), libCore_gv_bALMaxPlayers, PlayerGroupAll());
    libUIUI_gv_uIDebugPanel.lv_playerSlider = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "LevelLabel");
    libUIUI_gv_uIDebugPanel.lv_levelLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeSlider, "LevelSlider");
    libNtve_gf_SetDialogItemMinimumValue(DialogControlLastCreated(), 1.0, PlayerGroupAll());
    libNtve_gf_SetDialogItemMaximumValue(DialogControlLastCreated(), libCore_gv_bALMaxLevel, PlayerGroupAll());
    libUIUI_gv_uIDebugPanel.lv_levelSlider = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "SameXPCheckBox");
    libNtve_gf_SetDialogItemChecked(DialogControlLastCreated(), false, PlayerGroupAll());
    libUIUI_gv_uIDebugPanel.lv_useCurrentXPCheckbox = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "SpawnHeroButton");
    libUIUI_gv_uIDebugPanel.lv_spawnHeroButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "AllHeroesCheckBox");
    libUIUI_gv_uIDebugPanel.lv_allHeroesCheckbox = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePulldown, "HeroPulldown");
    libUIUI_gv_uIDebugPanel.lv_heroDropdown = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePulldown, "SkinPulldown");
    libUIUI_gv_uIDebugPanel.lv_skinDropdown = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePulldown, "MountPulldown");
    libUIUI_gv_uIDebugPanel.lv_mountDropdown = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePulldown, "AnnouncerPulldown");
    libUIUI_gv_uIDebugPanel.lv_announcerDropdown = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "AllTalentsCheckBox");
    libUIUI_gv_uIDebugPanel.lv_allTalentsCheckbox = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeEditBox, "MetaExperienceEditBox");
    libUIUI_gv_uIDebugPanel.lv_metaXPEditBox = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "SendMetaExperienceButton");
    libUIUI_gv_uIDebugPanel.lv_metaXPSendButton = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "XPLabel");
    libUIUI_gv_uIDebugPanel.lv_xPLabel = DialogControlLastCreated();
    libUIUI_gf_UIDebugPanelSetUpMinionCompDropdown();
    autoE0F0FF91_ae = libCore_gv_bALMaxPlayers;
    autoE0F0FF91_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (autoE0F0FF91_ai >= 0 && lv_itPlayer <= autoE0F0FF91_ae) || (autoE0F0FF91_ai <= 0 && lv_itPlayer >= autoE0F0FF91_ae) ) ; lv_itPlayer += autoE0F0FF91_ai ) {
        libUIUI_gf_UIDebugPanelPopulateHeroDropdownForPlayer(lv_itPlayer, false);
        libUIUI_gf_UIDebugPanelPopulateAnnouncerDropdownForPlayer(lv_itPlayer);
    }
    TriggerEnable(libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeDebugPanel_Init () {
    libUIUI_gt_UIInitializeDebugPanel = TriggerCreate("libUIUI_gt_UIInitializeDebugPanel_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Close Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelCloseButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_closeButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIDebugPanelShowHideDebugPanelForPlayer(false, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelCloseButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelCloseButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelCloseButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelCloseButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Refresh Cooldowns Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelRefreshCooldownsButtonClicked_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_i;
    unit lv_unit;
    int lv_heroIndex;
    string lv_abilLink;
    string lv_cooldownLink;
    string lv_chargeLink;
    string lv_itemUnitType;
    int lv_itemIndex;
    int lv_currentRank;

    // Variable Initialization
    lv_cooldownLink = "";
    lv_chargeLink = "";

    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_refreshCooldownsButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIDebugPanelRefreshCooldowns(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelRefreshCooldownsButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelRefreshCooldownsButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelRefreshCooldownsButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelRefreshCooldownsButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Selection Enabled Checkbox Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelSelectionEnabledCheckboxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libSprt_gf_DEBUGToggleSelection();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelSelectionEnabledCheckboxClicked_Init () {
    libUIUI_gt_UIDebugPanelSelectionEnabledCheckboxClicked = TriggerCreate("libUIUI_gt_UIDebugPanelSelectionEnabledCheckboxClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelSelectionEnabledCheckboxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeChecked);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Start Game Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelStartGameButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_startGameButton))) {
            return false;
        }

        if (!((DialogControlIsEnabled(libUIUI_gv_uIDebugPanel.lv_startGameButton, EventPlayer()) == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libSprt_gf_DEBUGStartGame();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelStartGameButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelStartGameButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelStartGameButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelStartGameButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Spawn Creep Camps Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelSpawnCreepCampsButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_spawnCreepCampsButton))) {
            return false;
        }

        if (!((DialogControlIsEnabled(libUIUI_gv_uIDebugPanel.lv_spawnCreepCampsButton, EventPlayer()) == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libSprt_gf_DEBUGSpawnCreepCamps();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelSpawnCreepCampsButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelSpawnCreepCampsButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelSpawnCreepCampsButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelSpawnCreepCampsButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Force Minion Wave Comp Checkbox Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelForceMinionWaveCompCheckboxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompCheckbox))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gv_uIDebugPanelForceMinionWaveComp = libNtve_gf_DialogItemIsChecked(EventDialogControl(), EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelForceMinionWaveCompCheckboxClicked_Init () {
    libUIUI_gt_UIDebugPanelForceMinionWaveCompCheckboxClicked = TriggerCreate("libUIUI_gt_UIDebugPanelForceMinionWaveCompCheckboxClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelForceMinionWaveCompCheckboxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeChecked);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Minion Wave Comp Dropdown Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelMinionWaveCompDropdownClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_forceMinionWaveCompDropdown))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gv_uIDebugPanelForcedMinionWaveCompIndex = DialogControlGetSelectedItem(EventDialogControl(), EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelMinionWaveCompDropdownClicked_Init () {
    libUIUI_gt_UIDebugPanelMinionWaveCompDropdownClicked = TriggerCreate("libUIUI_gt_UIDebugPanelMinionWaveCompDropdownClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelMinionWaveCompDropdownClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeSelectionChanged);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Respec Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelRespecButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_respecHeroButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_TalentsBucketRespecHeroForPlayer(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelRespecButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelRespecButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelRespecButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelRespecButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Player Slider Value Change
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelPlayerSliderValueChange_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_playerSlider))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    TextExpressionSetToken("Param/Expression/lib_UIUI_7777446E", "A", FixedToText(libNtve_gf_DialogItemValue(EventDialogControl(), EventPlayer()), 0));
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIDebugPanel.lv_playerLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_7777446E"), libCore_gv_playerGroupFromPlayer[EventPlayer()]);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelPlayerSliderValueChange_Init () {
    libUIUI_gt_UIDebugPanelPlayerSliderValueChange = TriggerCreate("libUIUI_gt_UIDebugPanelPlayerSliderValueChange_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelPlayerSliderValueChange, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeValueChanged);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Level Slider Value Change
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelLevelSliderValueChange_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_levelSlider))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    TextExpressionSetToken("Param/Expression/lib_UIUI_FA37F92E", "A", FixedToText(libNtve_gf_DialogItemValue(EventDialogControl(), EventPlayer()), 0));
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIDebugPanel.lv_levelLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_FA37F92E"), libCore_gv_playerGroupFromPlayer[EventPlayer()]);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelLevelSliderValueChange_Init () {
    libUIUI_gt_UIDebugPanelLevelSliderValueChange = TriggerCreate("libUIUI_gt_UIDebugPanelLevelSliderValueChange_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelLevelSliderValueChange, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeValueChanged);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Use Current XP Checkbox Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_useCurrentXPCheckbox))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    if ((libNtve_gf_DialogItemIsChecked(EventDialogControl(), EventPlayer()) == true)) {
        DialogControlSetEnabled(libUIUI_gv_uIDebugPanel.lv_levelSlider, libCore_gv_playerGroupFromPlayer[EventPlayer()], false);
    }
    else {
        DialogControlSetEnabled(libUIUI_gv_uIDebugPanel.lv_levelSlider, libCore_gv_playerGroupFromPlayer[EventPlayer()], true);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked_Init () {
    libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked = TriggerCreate("libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked_Func");
    TriggerEnable(libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked, false);
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeChecked);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - All Heroes Checkbox Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelAllHeroesCheckboxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_allHeroesCheckbox))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIDebugPanelPopulateHeroDropdownForPlayer(EventPlayer(), libNtve_gf_DialogItemIsChecked(EventDialogControl(), EventPlayer()));
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelAllHeroesCheckboxClicked_Init () {
    libUIUI_gt_UIDebugPanelAllHeroesCheckboxClicked = TriggerCreate("libUIUI_gt_UIDebugPanelAllHeroesCheckboxClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelAllHeroesCheckboxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeChecked);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - All Talents Checkbox Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelAllTalentsCheckboxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_allTalentsCheckbox))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libSprt_gf_DEBUGToggleAllTalentSelection(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelAllTalentsCheckboxClicked_Init () {
    libUIUI_gt_UIDebugPanelAllTalentsCheckboxClicked = TriggerCreate("libUIUI_gt_UIDebugPanelAllTalentsCheckboxClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelAllTalentsCheckboxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeChecked);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Hero Dropdown Selection Change
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_heroIndex;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_heroDropdown))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_heroIndex = libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[EventPlayer()][DialogControlGetSelectedItem(EventDialogControl(), EventPlayer())];
    libUIUI_gf_UIDebugPanelPopulateSkinDropdownForPlayer(EventPlayer(), lv_heroIndex);
    libUIUI_gf_UIDebugPanelPopulateMountDropdownForPlayer(EventPlayer(), lv_heroIndex);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange_Init () {
    libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange = TriggerCreate("libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeSelectionChanged);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Announcer Dropdown Selection Change
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelAnnouncerDropdownSelectionChange_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_announcerDropdown))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libGame_gv_players[EventPlayer()].lv_selectedAnnouncerVOPack = DialogControlGetSelectedItem(EventDialogControl(), EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelAnnouncerDropdownSelectionChange_Init () {
    libUIUI_gt_UIDebugPanelAnnouncerDropdownSelectionChange = TriggerCreate("libUIUI_gt_UIDebugPanelAnnouncerDropdownSelectionChange_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelAnnouncerDropdownSelectionChange, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeSelectionChanged);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Spawn Hero Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelSpawnHeroButtonClicked_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_heroIndex;
    int lv_skinIndex;
    int lv_mountIndex;
    fixed lv_xP;
    int lv_player;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_spawnHeroButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_heroIndex = libUIUI_gv_uIDebugPanelHeroIndexFromDropdownIndex[EventPlayer()][DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, EventPlayer())];
    lv_skinIndex = libUIUI_gv_uIDebugPanelSkinIndexFromDropdownIndex[EventPlayer()][DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, EventPlayer())];
    lv_mountIndex = libUIUI_gv_uIDebugPanelMountIndexFromDropdownIndex[EventPlayer()][DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_mountDropdown, EventPlayer())];
    lv_player = FixedToInt(libNtve_gf_DialogItemValue(libUIUI_gv_uIDebugPanel.lv_playerSlider, EventPlayer()));
    if ((libNtve_gf_DialogItemIsChecked(libUIUI_gv_uIDebugPanel.lv_useCurrentXPCheckbox, EventPlayer()) == true)) {
        lv_xP = UnitGetPropertyFixed(libGame_gv_players[lv_player].lv_heroUnit, c_unitPropXP, c_unitPropCurrent);
    }
    else {
        lv_xP = libCore_gf_GetTotalXPForLevel(FixedToInt(libNtve_gf_DialogItemValue(libUIUI_gv_uIDebugPanel.lv_levelSlider, EventPlayer())));
    }
    libUIUI_gf_UIDebugPanelSpawnOrSwapHeroForPlayer(lv_heroIndex, lv_skinIndex, lv_mountIndex, lv_xP, lv_player);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelSpawnHeroButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelSpawnHeroButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelSpawnHeroButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelSpawnHeroButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Meta XP Edit Box Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelMetaXPEditBoxClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_metaXPEditBox))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlRequestFocus(libUIUI_gv_uIDebugPanel.lv_metaXPEditBox, libCore_gv_playerGroupFromPlayer[EventPlayer()]);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelMetaXPEditBoxClicked_Init () {
    libUIUI_gt_UIDebugPanelMetaXPEditBoxClicked = TriggerCreate("libUIUI_gt_UIDebugPanelMetaXPEditBoxClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelMetaXPEditBoxClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Send Meta XP Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelSendMetaXPButtonClicked_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_player;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }

        if (!((EventDialogControl() == libUIUI_gv_uIDebugPanel.lv_metaXPSendButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_player = EventPlayer();
    libUIUI_gv_uIDebugPanelDebugMetaXPValue = StringToInt(libNtve_gf_DialogItemEditValue(libUIUI_gv_uIDebugPanel.lv_metaXPEditBox, lv_player));
    if ((libUIUI_gv_uIDebugPanelDebugMetaXPValue <= 0)) {
        TextExpressionSetToken("Param/Expression/lib_UIUI_8002416C", "A", IntToText(libUIUI_gv_uIDebugPanelDebugMetaXPValue));
        TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_UIUI_8002416C"), true);
        return true;
    }
    else {
    }
    ConsoleCommand("speed 5", true, true);
    while ((TimerGetElapsed(libGame_gv_totalTime) < (3.5 * 60))) {
        Wait(0.0625, c_timeGame);
    }
    ConsoleCommand("speed", true, true);
    Wait(1.0, c_timeGame);
    UnitKill(libGame_gv_teams[2].lv_core);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelSendMetaXPButtonClicked_Init () {
    libUIUI_gt_UIDebugPanelSendMetaXPButtonClicked = TriggerCreate("libUIUI_gt_UIDebugPanelSendMetaXPButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIDebugPanelSendMetaXPButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Debug Panel - Update
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIDebugPanelUpdate_Func (bool testConds, bool runActions) {
    playergroup auto45BE7191_g;
    int auto45BE7191_p;

    // Variable Declarations
    int lv_p;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libCore_gv_dEBUGDebuggingEnabled == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    auto45BE7191_g = libCore_gv_activeHumanPlayers; 
    auto45BE7191_p = 1;
    for ( ; auto45BE7191_p <= PlayerGroupCount(auto45BE7191_g) ; auto45BE7191_p += BoolToInt(lv_p == PlayerGroupPlayer(auto45BE7191_g, auto45BE7191_p)) ) {
        lv_p = PlayerGroupPlayer(auto45BE7191_g, auto45BE7191_p);
        if ((DialogControlIsVisible(libUIUI_gv_uIDebugPanel.lv_mainDialog, lv_p) == true)) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_5C4FEBA6", "A", FixedToText(UnitGetPropertyFixed(UnitGroupUnit(UnitGroupSelected(lv_p), 1), c_unitPropXP, c_unitPropCurrent), 0));
            libNtve_gf_SetDialogItemText(libUIUI_gv_uIDebugPanel.lv_xPLabel, TextExpressionAssemble("Param/Expression/lib_UIUI_5C4FEBA6"), libCore_gv_playerGroupFromPlayer[lv_p]);
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIDebugPanelUpdate_Init () {
    libUIUI_gt_UIDebugPanelUpdate = TriggerCreate("libUIUI_gt_UIDebugPanelUpdate_Func");
    TriggerEnable(libUIUI_gt_UIDebugPanelUpdate, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_UIDebugPanelUpdate, 0.0625, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Encouragement Panel Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_EncouragementPanelInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    int autoC1B6C4BF_ae;
    int autoC1B6C4BF_ai;
    int autoFFDEBF19_ae;
    int autoFFDEBF19_ai;

    // Variable Declarations
    int lv_itLabel;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/EncouragementPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_encouragement_Panel.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "CloseButton");
    libUIUI_gv_encouragement_Panel.lv_closeButton = DialogControlLastCreated();
    autoC1B6C4BF_ae = libUIUI_gv_encouragement_MaxNumberOfStatCalloutsDisplayed_C;
    autoC1B6C4BF_ai = 1;
    lv_itLabel = 1;
    for ( ; ( (autoC1B6C4BF_ai >= 0 && lv_itLabel <= autoC1B6C4BF_ae) || (autoC1B6C4BF_ai <= 0 && lv_itLabel >= autoC1B6C4BF_ae) ) ; lv_itLabel += autoC1B6C4BF_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "StatCalloutLabel" + IntToString(lv_itLabel));
        libUIUI_gv_encouragement_Panel.lv_statCalloutLabels[lv_itLabel] = DialogControlLastCreated();
    }
    autoFFDEBF19_ae = libUIUI_gv_encouragement_MaxNumberOfDeathTipsDisplayed_C;
    autoFFDEBF19_ai = 1;
    lv_itLabel = 1;
    for ( ; ( (autoFFDEBF19_ai >= 0 && lv_itLabel <= autoFFDEBF19_ae) || (autoFFDEBF19_ai <= 0 && lv_itLabel >= autoFFDEBF19_ae) ) ; lv_itLabel += autoFFDEBF19_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DeathTipLabel" + IntToString(lv_itLabel));
        libUIUI_gv_encouragement_Panel.lv_deathTipLabels[lv_itLabel] = DialogControlLastCreated();
    }
    if ((((10) - 1) != libGame_gv_encouragement_NumberOfDeathTips_C)) {
        TriggerDebugOutput(1, StringExternal("Param/Value/lib_UIUI_5B916ED0"), true);
    }
    else {
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_EncouragementPanelInitialize_Init () {
    libUIUI_gt_EncouragementPanelInitialize = TriggerCreate("libUIUI_gt_EncouragementPanelInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Encouragement Panel Close Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_EncouragementPanelCloseButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_encouragement_Panel.lv_closeButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_EncouragementShowHidePanelForPlayer(false, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_EncouragementPanelCloseButtonClicked_Init () {
    libUIUI_gt_EncouragementPanelCloseButtonClicked = TriggerCreate("libUIUI_gt_EncouragementPanelCloseButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_EncouragementPanelCloseButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Damage Dealt
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_FloatingCombatTextDamageDealtAttackMove_Func (bool testConds, bool runActions) {
    // Variable Declarations
    fixed lv_damageDone;
    fixed lv_vertOffset;
    fixed lv_horizOffset;
    fixed lv_impactUnitMaxHealth;
    fixed lv_damageAttempted;
    fixed lv_damageAbsorbed;
    fixed lv_leechAmount;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageSourcePlayer() > 0))) {
            return false;
        }

        if (!((EventUnitDamageSourcePlayer() != UnitGetOwner(EventUnit())))) {
            return false;
        }

        if (!(((EventUnitDamageSourcePlayer() <= libCore_gv_bALMaxPlayers)))) {
            return false;
        }

        if (!((UnitTestState(EventUnit(), c_unitStateInvulnerable) == false))) {
            return false;
        }

        if (!((UnitGetType(EventUnit()) != "Storm_Doodad_Luxoria_Destructible_Medium"))) {
            return false;
        }

        if (!((libSprt_gv_dEBUGCombatTextEnabled == true))) {
            return false;
        }

        if (!(((EventUnitDamageEffect() != "TwilightMessiahSplashDamage") && (EventUnitDamageEffect() != "ShadowMessiahSplashDamage") && (EventUnitDamageEffect() != "GiantKillerDummyDamage") && (EventUnitDamageEffect() != "BurningRageDamage1")))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_damageAttempted = EventUnitDamageAttemptedVitals();
    lv_damageAbsorbed = EventUnitDamageBehaviorShield();
    if ((lv_damageAttempted < 1.0) && (lv_damageAbsorbed < 1.0)) {
        return true;
    }
    else {
    }
    lv_damageDone = Round((EventUnitDamageAttemptedVitals() + EventUnitDamageBehaviorShield()));
    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(0.0001, 0.2);
    if ((UnitIsValid(EventUnitDamageSourceUnit()) == true) && (UnitIsValid(EventUnit()) == true) && ((PointGetX(UnitGetPosition(EventUnitDamageSourceUnit())) - PointGetX(UnitGetPosition(EventUnit()))) > 0.0)) {
        lv_horizOffset *= -1.0;
    }
    else {
    }
    lv_impactUnitMaxHealth = UnitGetPropertyFixed(EventUnit(), c_unitPropLifeMax, c_unitPropCurrent);
    if ((EventUnitDamageEffect() == "OctoGrabPokeDamage")) {
        libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextHighDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 3);
    }
    else {
        if ((lv_damageDone >= 1000.0)) {
            libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextHighDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 3);
        }
        else {
            if ((lv_damageDone >= 500.0)) {
                libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextHighDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 2);
            }
            else {
                if ((lv_damageDone >= 100.0)) {
                    libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextMediumDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 1);
                }
                else {
                    libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextNormalDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 0);
                }
            }
        }
    }
    if ((UnitGetPropertyFixed(EventUnitDamageSourceUnit(), c_unitPropLifePercent, c_unitPropCurrent) != 100.0) && (CatalogFieldValueGet(c_gameCatalogEffect, EventUnitDamageEffect(), "Kind", c_playerAny) == "Ranged") && ((UnitHasBehavior2(EventUnitDamageSourceUnit(), "TalentBucketVampiricAssault") == true) || (UnitHasBehavior2(EventUnitDamageSourceUnit(), "TalentBucketVampiricAssaultTychus") == true))) {
        lv_leechAmount = (lv_damageDone * 0.15);
        libUIUI_gf_UIFloatingCombatTextHeal(EventUnitDamageSourcePlayer(), EventUnitDamageSourceUnit(), EventUnitDamageSourcePlayer(), EventUnitDamageSourceUnit(), EventUnitDamageSourceUnit(), EventUnitDamageSourceUnit(), lv_leechAmount, EventUnitDamageEffect());
    }
    else {
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_FloatingCombatTextDamageDealtAttackMove_Init () {
    libUIUI_gt_FloatingCombatTextDamageDealtAttackMove = TriggerCreate("libUIUI_gt_FloatingCombatTextDamageDealtAttackMove_Func");
    TriggerAddEventUnitDamaged(libUIUI_gt_FloatingCombatTextDamageDealtAttackMove, null, c_unitDamageTypeAny, c_unitDamageEither, null);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Damage Dealt Bonus Damage
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_FloatingCombatTextDamageDealtAttackMove2_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_damageBracket;
    fixed lv_damageDone;
    fixed lv_vertOffset;
    fixed lv_horizOffset;
    fixed lv_impactUnitMaxHealth;

    // Variable Initialization
    lv_damageBracket = 11;

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageAttempted() >= 1.0))) {
            return false;
        }

        if (!((EventUnitDamageSourcePlayer() > 0))) {
            return false;
        }

        if (!((EventUnitDamageSourcePlayer() <= libCore_gv_bALMaxPlayers))) {
            return false;
        }

        if (!((EventUnitDamageSourcePlayer() != UnitGetOwner(EventUnit())))) {
            return false;
        }

        if (!((UnitTestState(EventUnit(), c_unitStateInvulnerable) == false))) {
            return false;
        }

        if (!((UnitGetType(EventUnit()) != "Storm_Doodad_Luxoria_Destructible_Medium"))) {
            return false;
        }

        if (!((UnitGetType(EventUnit()) != "TownGateConjoined"))) {
            return false;
        }

        if (!((libSprt_gv_dEBUGCombatTextEnabled == true))) {
            return false;
        }

        if (!(((EventUnitDamageEffect() == "TwilightMessiahSplashDamage") || (EventUnitDamageEffect() == "ShadowMessiahSplashDamage") || (EventUnitDamageEffect() == "GiantKillerDummyDamage") || (EventUnitDamageEffect() == "BurningRageDamage1")))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_damageDone = (EventUnitDamageAttemptedVitals() + EventUnitDamageBehaviorShield());
    lv_vertOffset = 2.5;
    lv_horizOffset = RandomFixed(0.001, 0.2);
    if ((UnitHasBehavior2(EventUnit(), "RavenLordsCurseStructures") == true)) {
        lv_damageDone = (lv_damageDone * (1.0 + StringToFixed(CatalogFieldValueGet(c_gameCatalogBehavior, "RavenLordsCurseStructures", "DamageResponse.ModifyFraction", c_playerAny))));
    }
    else {
    }
    if (((PointGetX(UnitGetPosition(EventUnitDamageSourceUnit())) - PointGetX(UnitGetPosition(EventUnit()))) > 0.0)) {
        lv_horizOffset *= -1.0;
    }
    else {
    }
    lv_impactUnitMaxHealth = UnitGetPropertyFixed(EventUnit(), c_unitPropLifeMax, c_unitPropCurrent);
    if ((lv_damageDone >= 1000.0)) {
        libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextHighDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 3);
    }
    else {
        if ((lv_damageDone >= 500.0)) {
            libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextHighDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 2);
        }
        else {
            if ((lv_damageDone >= 100.0)) {
                libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextMediumDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 1);
            }
            else {
                libUIUI_gf_UIFloatingCombatTextCreateTextTag(EventUnitDamageSourcePlayer(), libUIUI_gv_floatingCombatTextNormalDuration, IntToText(FixedToInt(lv_damageDone)), EventUnit(), lv_vertOffset, lv_horizOffset, 0);
            }
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_FloatingCombatTextDamageDealtAttackMove2_Init () {
    libUIUI_gt_FloatingCombatTextDamageDealtAttackMove2 = TriggerCreate("libUIUI_gt_FloatingCombatTextDamageDealtAttackMove2_Func");
    TriggerAddEventUnitDamaged(libUIUI_gt_FloatingCombatTextDamageDealtAttackMove2, null, c_unitDamageTypeAny, c_unitDamageEither, null);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Heal
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIFloatingCombatTextHeal_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_impactPlayer;
    unit lv_impactUnit;
    int lv_launchPlayer;
    unit lv_launchUnit;
    unit lv_casterUnit;
    unit lv_targetUnit;
    fixed lv_amount;
    fixed lv_vertOffset;
    fixed lv_horizOffset;
    playergroup lv_vOGroup;
    string lv_triggeringEffect;

    // Variable Initialization
    lv_vOGroup = PlayerGroupEmpty();

    // Conditions
    if (testConds) {
        if (!((libSprt_gv_dEBUGCombatTextEnabled == true))) {
            return false;
        }

        if (!((UnitIsAlive(EventPlayerEffectUsedUnitImpact()) == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_impactUnit = EventPlayerEffectUsedUnitImpact();
    lv_impactPlayer = UnitGetOwner(lv_impactUnit);
    lv_launchUnit = EventPlayerEffectUsedUnitLaunch();
    lv_launchPlayer = UnitGetOwner(lv_launchUnit);
    lv_targetUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);
    lv_casterUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
    lv_amount = Round(EventPlayerEffectUsedAmountFixed(c_effectAmountLifeChanged, false));
    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(-0.4, -0.6);
    lv_triggeringEffect = EventPlayerEffectUsed();
    if ((lv_triggeringEffect == "TalentBloodForBloodDamage")) {
        lv_impactUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
        lv_impactPlayer = UnitGetOwner(lv_impactUnit);
        lv_amount = EventPlayerEffectUsedAmountFixed(c_effectAmountLifeLeeched, false);
    }
    else {
    }
    if ((EventPlayerEffectUsedAmountFixed(c_effectAmountEnergyChanged, false) > 0.0) && (lv_amount <= 0.0)) {
        return true;
    }
    else {
    }
    libUIUI_gf_UIFloatingCombatTextHeal(lv_impactPlayer, lv_impactUnit, lv_launchPlayer, lv_launchUnit, lv_casterUnit, lv_targetUnit, lv_amount, lv_triggeringEffect);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIFloatingCombatTextHeal_Init () {
    libUIUI_gt_UIFloatingCombatTextHeal = TriggerCreate("libUIUI_gt_UIFloatingCombatTextHeal_Func");
    TriggerAddEventPlayerEffectUsedFromScope(libUIUI_gt_UIFloatingCombatTextHeal, c_playerAny, "CEffectCreateHealer");
    TriggerAddEventPlayerEffectUsed(libUIUI_gt_UIFloatingCombatTextHeal, c_playerAny, "TalentBloodForBloodDamage");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Regen Globe Pickup
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIFloatingCombatTextRegenGlobePickup_Func (bool testConds, bool runActions) {
    // Variable Declarations
    fixed lv_vertOffset;
    fixed lv_horizOffset;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((UnitGetOwner(EventUnit()) > 0))) {
            return false;
        }

        if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
            return false;
        }

        if (!((libSprt_gv_dEBUGCombatTextEnabled == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(-0.4, -0.6);
    libUIUI_gf_UIFloatingCombatTextCreateTextTag(UnitGetOwner(EventUnit()), libCore_gv_floatingCombatTextStandardDuration, StringExternal("Param/Value/lib_UIUI_CEFDA32C"), EventUnit(), lv_vertOffset, lv_horizOffset, 6);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIFloatingCombatTextRegenGlobePickup_Init () {
    libUIUI_gt_UIFloatingCombatTextRegenGlobePickup = TriggerCreate("libUIUI_gt_UIFloatingCombatTextRegenGlobePickup_Func");
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextRegenGlobePickup, null, "RegenGlobePercentBuff", c_unitBehaviorChangeActivate);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextRegenGlobePickup, null, "RegenGlobeFlatBuff", c_unitBehaviorChangeActivate);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Cloaked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIFloatingCombatTextCloaked_Func (bool testConds, bool runActions) {
    // Variable Declarations
    fixed lv_vertOffset;
    fixed lv_horizOffset;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((UnitGetOwner(EventUnit()) > 0))) {
            return false;
        }

        if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(-0.4, -0.6);
    libUIUI_gf_UIFloatingCombatTextCreateTextTag(UnitGetOwner(EventUnit()), libCore_gv_floatingCombatTextStandardDuration, StringExternal("Param/Value/lib_UIUI_C4766E06"), EventUnit(), lv_vertOffset, lv_horizOffset, 6);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIFloatingCombatTextCloaked_Init () {
    libUIUI_gt_UIFloatingCombatTextCloaked = TriggerCreate("libUIUI_gt_UIFloatingCombatTextCloaked_Func");
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextCloaked, null, "NovaPermanentCloak", c_unitBehaviorChangeActivate);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextCloaked, null, "ZeratulPermanentCloak", c_unitBehaviorChangeActivate);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextCloaked, null, "ShadowstalkCloak", c_unitBehaviorChangeActivate);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Invulnerable
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIFloatingCombatTextInvulnerable_Func (bool testConds, bool runActions) {
    int auto78D52366_ae;
    int auto78D52366_ai;

    // Variable Declarations
    int lv_i;
    fixed lv_vertOffset;
    fixed lv_horizOffset;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    lv_vertOffset = 1.5;
    lv_horizOffset = RandomFixed(-0.4, -0.6);
    auto78D52366_ae = libCore_gv_bALMaxPlayers;
    auto78D52366_ai = 1;
    lv_i = 1;
    for ( ; ( (auto78D52366_ai >= 0 && lv_i <= auto78D52366_ae) || (auto78D52366_ai <= 0 && lv_i >= auto78D52366_ae) ) ; lv_i += auto78D52366_ai ) {
        libUIUI_gf_UIFloatingCombatTextCreateTextTag(lv_i, libCore_gv_floatingCombatTextStandardDuration, StringExternal("Param/Value/lib_UIUI_360ABF1A"), EventUnit(), lv_vertOffset, lv_horizOffset, 6);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIFloatingCombatTextInvulnerable_Init () {
    libUIUI_gt_UIFloatingCombatTextInvulnerable = TriggerCreate("libUIUI_gt_UIFloatingCombatTextInvulnerable_Func");
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextInvulnerable, null, "DivineIntervention", c_unitBehaviorChangeActivate);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextInvulnerable, null, "Sanctification", c_unitBehaviorChangeActivate);
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextInvulnerable, null, "VoidShift", c_unitBehaviorChangeActivate);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Cleansed
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIFloatingCombatTextCleansed_Func (bool testConds, bool runActions) {
    int auto9ED8AC09_ae;
    int auto9ED8AC09_ai;

    // Variable Declarations
    int lv_i;
    fixed lv_vertOffset;
    fixed lv_horizOffset;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((UnitGetOwner(EventUnit()) > 0))) {
            return false;
        }

        if (!((UnitGetOwner(EventUnit()) <= libCore_gv_bALMaxPlayers))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(-0.4, -0.6);
    auto9ED8AC09_ae = libCore_gv_bALMaxPlayers;
    auto9ED8AC09_ai = 1;
    lv_i = 1;
    for ( ; ( (auto9ED8AC09_ai >= 0 && lv_i <= auto9ED8AC09_ae) || (auto9ED8AC09_ai <= 0 && lv_i >= auto9ED8AC09_ae) ) ; lv_i += auto9ED8AC09_ai ) {
        libUIUI_gf_UIFloatingCombatTextCreateTextTag(lv_i, libCore_gv_floatingCombatTextStandardDuration, StringExternal("Param/Value/lib_UIUI_927D6C4F"), EventUnit(), lv_vertOffset, lv_horizOffset, 6);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIFloatingCombatTextCleansed_Init () {
    libUIUI_gt_UIFloatingCombatTextCleansed = TriggerCreate("libUIUI_gt_UIFloatingCombatTextCleansed_Func");
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_UIFloatingCombatTextCleansed, null, "TalentCleanseBuff", c_unitBehaviorChangeActivate);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Floating Combat Text - Missed
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIFloatingCombatTextMissed_Func (bool testConds, bool runActions) {
    // Variable Declarations
    fixed lv_vertOffset;
    fixed lv_horizOffset;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libSprt_gv_dEBUGCombatTextEnabled == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_vertOffset = 2.0;
    lv_horizOffset = RandomFixed(0.0001, 0.2);
    libUIUI_gf_UIFloatingCombatTextCreateTextTag(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)), libCore_gv_floatingCombatTextStandardDuration, StringExternal("Param/Value/lib_UIUI_A4405ABF"), EventPlayerEffectUsedUnit(c_effectUnitTarget), lv_vertOffset, lv_horizOffset, 6);
    libUIUI_gf_UIFloatingCombatTextCreateTextTag(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitSource)), libCore_gv_floatingCombatTextStandardDuration, StringExternal("Param/Value/lib_UIUI_6DAE14D3"), EventPlayerEffectUsedUnit(c_effectUnitTarget), lv_vertOffset, lv_horizOffset, 6);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIFloatingCombatTextMissed_Init () {
    libUIUI_gt_UIFloatingCombatTextMissed = TriggerCreate("libUIUI_gt_UIFloatingCombatTextMissed_Func");
    TriggerAddEventPlayerEffectUsed(libUIUI_gt_UIFloatingCombatTextMissed, c_playerAny, "LiLiBlindingWindRemoveBehaviorBlind");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Fullscreen Overlays Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_FullscreenOverlaysInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenLowerContainer/FullscreenOverlayImagesPanel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_cOMPUTER_TeamOrder], false);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_cOMPUTER_TeamChaos], false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_fullscreenOverlaysPanel.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "AbathurSymbioteOverlay");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_fullscreenOverlaysPanel.lv_abathurSymbioteOverlay = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "CCOverlay");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_fullscreenOverlaysPanel.lv_cCSplashImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "FlashBangOverlay");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_fullscreenOverlaysPanel.lv_flashBangImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DeathOverlay");
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 100.0);
    libUIUI_gv_fullscreenOverlaysPanel.lv_deathOverlay = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_FullscreenOverlaysInitialize_Init () {
    libUIUI_gt_FullscreenOverlaysInitialize = TriggerCreate("libUIUI_gt_FullscreenOverlaysInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Game Over Splash Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_GameOverSplashInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/GameOverSplash");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_gameOverSplash.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "VictoryBackground");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    libUIUI_gv_gameOverSplash.lv_victoryFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DefeatBackground");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    libUIUI_gv_gameOverSplash.lv_defeatFrame = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_GameOverSplashInitialize_Init () {
    libUIUI_gt_GameOverSplashInitialize = TriggerCreate("libUIUI_gt_GameOverSplashInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Game UI Handles
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeGameUIHandles_Func (bool testConds, bool runActions) {
    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer");
    libUIUI_gv_uIGameUIHandles.lv_gameUIContainer = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer");
    libUIUI_gv_uIGameUIHandles.lv_fullscreenUpperContainer = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer");
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    libUIUI_gv_uIGameUIHandles.lv_consoleUIContainer = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsolePanel");
    libUIUI_gv_uIGameUIHandles.lv_consolePanel = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/MinimapPanel");
    libUIUI_gv_uIGameUIHandles.lv_minimapPanel = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypeButton, "UIContainer/FullscreenUpperContainer/MenuBar/TalentsButton");
    libUIUI_gv_uIGameUIHandles.lv_talentsButton = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypeButton, "UIContainer/FullscreenUpperContainer/MenuBar/MenuButton");
    libUIUI_gv_uIGameUIHandles.lv_gameMenuButton = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeGameUIHandles_Init () {
    libUIUI_gt_UIInitializeGameUIHandles = TriggerCreate("libUIUI_gt_UIInitializeGameUIHandles_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Game UI - Talents Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIGameUITalentsButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_uIGameUIHandles.lv_talentsButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    if ((DialogControlIsVisible(libUIUI_gv_talents_Panel.lv_mainDialog, EventPlayer()) == false)) {
        libUIUI_gf_TalentsShowHideTalentsPanelForPlayer(true, EventPlayer());
    }
    else {
        libUIUI_gf_TalentsShowHideTalentsPanelForPlayer(false, EventPlayer());
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIGameUITalentsButtonClicked_Init () {
    libUIUI_gt_UIGameUITalentsButtonClicked = TriggerCreate("libUIUI_gt_UIGameUITalentsButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_UIGameUITalentsButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - God Ray - Create
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIGodRayCreate_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_heroUnit != null))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    UnitCreateEffectUnit(libGame_gv_players[EventPlayer()].lv_heroUnit, "GodRayCreatePersistent", libGame_gv_players[EventPlayer()].lv_heroUnit);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIGodRayCreate_Init () {
    libUIUI_gt_UIGodRayCreate = TriggerCreate("libUIUI_gt_UIGodRayCreate_Func");
    TriggerAddEventKeyPressed(libUIUI_gt_UIGodRayCreate, c_playerAny, c_keySpace, true, c_keyModifierStateIgnore, c_keyModifierStateIgnore, c_keyModifierStateIgnore);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - God Ray - Destroy
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIGodRayDestroy_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_heroUnit != null))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    UnitCreateEffectUnit(libGame_gv_players[EventPlayer()].lv_heroUnit, "GodRayDestroyPersistent", libGame_gv_players[EventPlayer()].lv_heroUnit);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIGodRayDestroy_Init () {
    libUIUI_gt_UIGodRayDestroy = TriggerCreate("libUIUI_gt_UIGodRayDestroy_Func");
    TriggerAddEventKeyPressed(libUIUI_gt_UIGodRayDestroy, c_playerAny, c_keySpace, false, c_keyModifierStateIgnore, c_keyModifierStateIgnore, c_keyModifierStateIgnore);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - God Ray - Destroy On DC
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIGodRayDestroyOnDC_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_heroUnit != null))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    UnitCreateEffectUnit(libGame_gv_players[EventPlayer()].lv_heroUnit, "GodRayDestroyPersistent", libGame_gv_players[EventPlayer()].lv_heroUnit);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIGodRayDestroyOnDC_Init () {
    libUIUI_gt_UIGodRayDestroyOnDC = TriggerCreate("libUIUI_gt_UIGodRayDestroyOnDC_Func");
    TriggerAddEventPlayerLeft(libUIUI_gt_UIGodRayDestroyOnDC, c_playerAny, c_gameResultUndecided);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Healing Fountains Help Text 
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeHealingFountainsHelpText_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_itPlayer;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIHealingFountainsHelpTextCreateTextTagsForTeam(libGame_gv_teamOrderIndex_C);
    libUIUI_gf_UIHealingFountainsHelpTextCreateTextTagsForTeam(libGame_gv_teamOrderIndex_C);
    TriggerEnable(libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain, true);
    TriggerEnable(libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController, true);
    TriggerEnable(libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeHealingFountainsHelpText_Init () {
    libUIUI_gt_UIInitializeHealingFountainsHelpText = TriggerCreate("libUIUI_gt_UIInitializeHealingFountainsHelpText_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Healing Fountains Help Text - Player Uses Healing Fountain
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain_Func (bool testConds, bool runActions) {
    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gv_uIHealingFountainsHelpTextHasFountainBeenUsed[EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster)] = true;
    libUIUI_gf_UIHealingFountainsHelpTextShowHideForPlayer(EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster), false);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain_Init () {
    libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain = TriggerCreate("libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain_Func");
    TriggerEnable(libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain, false);
    TriggerAddEventPlayerEffectUsed(libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain, c_playerAny, "MoonwellDrinkStartingSet");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Healing Fountains Help Text - Text Display Controller
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController_Func (bool testConds, bool runActions) {
    int autoE686765A_ae;

    // Variable Declarations
    int lv_player;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    autoE686765A_ae = libCore_gv_bALMaxPlayers;
    lv_player = 1;
    for ( ; lv_player <= autoE686765A_ae ; lv_player += 1 ) {
        if (((libUIUI_gv_uIHealingFountainsHelpTextHasFountainBeenUsed[lv_player] == true) || (UnitIsValid(libGame_gv_players[lv_player].lv_heroUnit) == false))) {
            continue;
        }
        else {
        }
        if ((UnitGetPropertyFixed(libGame_gv_players[lv_player].lv_heroUnit, c_unitPropLifePercent, c_unitPropCurrent) <= 50.0) && (UnitIsValid(libGame_gv_players[lv_player].lv_activeVehicle) == false)) {
            if ((libUIUI_gv_uIHealingFountainsHelpTextTextShowing[lv_player] == false)) {
                libUIUI_gf_UIHealingFountainsHelpTextShowHideForPlayer(lv_player, true);
            }
            else {
            }
        }
        else {
            if ((libUIUI_gv_uIHealingFountainsHelpTextTextShowing[lv_player] == true)) {
                libUIUI_gf_UIHealingFountainsHelpTextShowHideForPlayer(lv_player, false);
            }
            else {
            }
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController_Init () {
    libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController = TriggerCreate("libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController_Func");
    TriggerEnable(libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController, 1.0, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Healing Fountains Help Text - Healing Fountain Dies
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies_Func (bool testConds, bool runActions) {
    int autoC6505DAD_ae;

    // Variable Declarations
    int lv_iter;
    int lv_arrayToUse;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((((UnitGetType(EventUnit()) == "TownMoonwellL2") || (UnitGetType(EventUnit()) == "TownMoonwellL3")) && ((UnitGetOwner(EventUnit()) == libCore_gv_cOMPUTER_TeamOrder) || (UnitGetOwner(EventUnit()) == libCore_gv_cOMPUTER_TeamChaos))))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_arrayToUse = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventUnit()));
    autoC6505DAD_ae = libUIUI_gv_uI_HealingFountainsHelpText_ArraySize_C;
    lv_iter = 1;
    for ( ; lv_iter <= autoC6505DAD_ae ; lv_iter += 1 ) {
        if ((libUIUI_gv_uIHealingFountainsHelpText[lv_arrayToUse][lv_iter].lv_healingFountain == EventUnit())) {
            TextTagShow(libUIUI_gv_uIHealingFountainsHelpText[lv_arrayToUse][lv_iter].lv_textTag, PlayerGroupAll(), false);
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies_Init () {
    libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies = TriggerCreate("libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies_Func");
    TriggerEnable(libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies, false);
    TriggerAddEventUnitDied(libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies, null);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Help Button Debug Position
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_HelpButtonDebugPosition_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlSetPosition(libUIUI_gv_helpButtonFrames[1], PlayerGroupAll(), c_anchorTopLeft, StringToInt(StringWord(EventChatMessage(false), 2)), StringToInt(StringWord(EventChatMessage(false), 3)));
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_HelpButtonDebugPosition_Init () {
    libUIUI_gt_HelpButtonDebugPosition = TriggerCreate("libUIUI_gt_HelpButtonDebugPosition_Func");
    TriggerAddEventChatMessage(libUIUI_gt_HelpButtonDebugPosition, c_playerAny, "-sss", false);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Hero Console
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeHeroConsole_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int lv_itInventoryButton;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/HeroConsolePanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gf_UISetDialogItemToSelectedOrObserved(DialogControlLastCreated());
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIHeroConsole.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroStatsFrame");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeSelectedOrObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIHeroConsole.lv_heroStatsFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "HeroUnitStatusFrame");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeSelectedOrObservedPlayerId);
    libUIUI_gv_uIHeroConsole.lv_heroStatsUnitStatusFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusBar, "HeroUnitStatusFrame/HealthBar");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeSelectedOrObservedPlayerId);
    libUIUI_gv_uIHeroConsole.lv_heroStatsHealthBar = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusBar, "HeroUnitStatusFrame/EnergyBar");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeSelectedOrObservedPlayerId);
    libUIUI_gv_uIHeroConsole.lv_heroStatsManaBar = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsolePanel/PortraitPanel");
    libUIUI_gf_UISetDialogItemToSelectedOrObserved(DialogControlLastCreated());
    libUIUI_gv_uIHeroConsole.lv_gameUIPortrait = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/CommandPanel");
    libUIUI_gf_UISetDialogItemToSelectedOrObserved(DialogControlLastCreated());
    libUIUI_gv_uIHeroConsole.lv_gameUICommandPanel = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/HeroCommandCardPanelFrame");
    libUIUI_gv_uIHeroConsole.lv_gameUICommandCardPanelFrame = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/InventoryPanel");
    libUIUI_gf_UISetDialogItemToSelectedOrObserved(DialogControlLastCreated());
    libUIUI_gv_uIHeroConsole.lv_gameUIInventoryPanel = DialogControlLastCreated();
    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/HeroBuffDebuffPanel");
    libUIUI_gv_uIHeroConsole.lv_buffDebuffPanel = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeHeroConsole_Init () {
    libUIUI_gt_UIInitializeHeroConsole = TriggerCreate("libUIUI_gt_UIInitializeHeroConsole_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Hero Console Unit Status Bars Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_HeroConsoleUnitStatusBarsInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookup(libUIUI_gv_uIGameUIHandles.lv_consoleUIContainer, c_triggerControlTypeUnitStatus, "HeroDeathStunFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusDurationBar, "UnitStatusDurationBarLeft");
    libNtve_gf_SetDialogItemBehavior(DialogControlLastCreated(), "Dead", PlayerGroupAll());
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusDurationBar, "UnitStatusDurationBarRight");
    libNtve_gf_SetDialogItemBehavior(DialogControlLastCreated(), "Dead", PlayerGroupAll());
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "DeathStunIcon");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DeathStunLabel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DeathStunTimeLabel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarTimeLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(libUIUI_gv_uIGameUIHandles.lv_consoleUIContainer, c_triggerControlTypeUnitStatus, "HeroCastChannelBarFrame");
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_heroConsoleUnitStatusBars.lv_castChannelBarParentFrame = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(libUIUI_gv_uIGameUIHandles.lv_consoleUIContainer, c_triggerControlTypeUnitStatus, "HeroBehaviorChannelBarFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarParentFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusDurationBar, "HeroBehaviorChannelBar");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarDurationBar = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroBehaviorChannelBar/ChannelNameLabel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarBehaviorLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    TriggerEnable(libUIUI_gt_HeroConsoleUnitStatusBarsUpdate, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_HeroConsoleUnitStatusBarsInitialize_Init () {
    libUIUI_gt_HeroConsoleUnitStatusBarsInitialize = TriggerCreate("libUIUI_gt_HeroConsoleUnitStatusBarsInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Hero Console Unit Status Bars Channel Behavior Added
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_HeroConsoleUnitStatusBarsChannelBehaviorAdded_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_player;
    unit lv_heroUnit;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((EventPlayer() >= 1))) {
            return false;
        }

        if (!((EventPlayer() <= libCore_gv_bALMaxPlayers))) {
            return false;
        }

        if (!((CatalogFieldValueGetAsInt(c_gameCatalogBehavior, EventUnitBehavior(), "BehaviorCategories[Restorable]", c_playerAny) == 1))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_player = EventPlayer();
    lv_heroUnit = libUIUI_gv_heroConsoleUnitStatusBars_CurrentUnitForPlayer[lv_player];
    if ((lv_heroUnit != EventUnit())) {
        return true;
    }
    else {
    }
    if ((UnitBehaviorDuration(lv_heroUnit, EventUnitBehavior()) >= UnitBehaviorDuration(lv_heroUnit, libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lv_player]))) {
        libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lv_player] = EventUnitBehavior();
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarDurationBar, EventUnitBehavior(), libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarBehaviorLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogBehavior, EventUnitBehavior(), "Name", c_playerAny)), libCore_gv_playerGroupFromPlayer[lv_player]);
    }
    else {
    }
    DialogControlSetVisible(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarParentFrame, libCore_gv_playerGroupFromPlayer[lv_player], true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_HeroConsoleUnitStatusBarsChannelBehaviorAdded_Init () {
    libUIUI_gt_HeroConsoleUnitStatusBarsChannelBehaviorAdded = TriggerCreate("libUIUI_gt_HeroConsoleUnitStatusBarsChannelBehaviorAdded_Func");
    TriggerAddEventUnitBehaviorChange(libUIUI_gt_HeroConsoleUnitStatusBarsChannelBehaviorAdded, null, null, c_unitBehaviorChangeActivate);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Hero Console Unit Status Bars Update
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_HeroConsoleUnitStatusBarsUpdate_Func (bool testConds, bool runActions) {
    int auto50FBA062_ae;
    int auto50FBA062_ai;

    // Variable Declarations
    int lv_itPlayer;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto50FBA062_ae = libCore_gv_bALMaxPlayers;
    auto50FBA062_ai = 1;
    lv_itPlayer = 1;
    for ( ; ( (auto50FBA062_ai >= 0 && lv_itPlayer <= auto50FBA062_ae) || (auto50FBA062_ai <= 0 && lv_itPlayer >= auto50FBA062_ae) ) ; lv_itPlayer += auto50FBA062_ai ) {
        libUIUI_gf_HeroConsoleUnitStatusBarsUpdateForPlayer(lv_itPlayer);
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_HeroConsoleUnitStatusBarsUpdate_Init () {
    libUIUI_gt_HeroConsoleUnitStatusBarsUpdate = TriggerCreate("libUIUI_gt_HeroConsoleUnitStatusBarsUpdate_Func");
    TriggerEnable(libUIUI_gt_HeroConsoleUnitStatusBarsUpdate, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_HeroConsoleUnitStatusBarsUpdate, 0.0625, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Hero Specific Status Frame
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeHeroSpecificStatusFrame_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int lv_itInventoryButton;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/HeroSpecificStatusPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gf_UISetDialogItemToSelectedOrObserved(DialogControlLastCreated());
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIHeroSpecificStatusFrame.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "MechanicIcon");
    libUIUI_gv_uIHeroSpecificStatusFrame.lv_mechanicIcon = DialogControlLastCreated();
    libNtve_gf_SetDialogItemImage(libUIUI_gv_uIHeroSpecificStatusFrame.lv_mechanicIcon, "Assets\\Textures\\storm_ui_ingame_heroui_murky_egg_status_dead.dds", PlayerGroupAll());
    lv_currentPanelLayer -= 1;
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeHeroSpecificStatusFrame_Init () {
    libUIUI_gt_UIInitializeHeroSpecificStatusFrame = TriggerCreate("libUIUI_gt_UIInitializeHeroSpecificStatusFrame_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Hero Tracker Arrow
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeHeroTrackerArrow_Func (bool testConds, bool runActions) {
    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/OffscreenUnitContainer");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    libUIUI_gv_uIHeroTrackerArrow.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(libUIUI_gv_uIHeroTrackerArrow.lv_mainPanel, c_triggerControlTypeOffscreenUnit, "OffscreenUnitFrame");
    libUIUI_gv_uIHeroTrackerArrow.lv_arrow = DialogControlLastCreated();
    DialogControlHookup(libUIUI_gv_uIHeroTrackerArrow.lv_arrow, c_triggerControlTypeImage, "HeroIcon");
    libUIUI_gv_uIHeroTrackerArrow.lv_portraitImage = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeHeroTrackerArrow_Init () {
    libUIUI_gt_UIInitializeHeroTrackerArrow = TriggerCreate("libUIUI_gt_UIInitializeHeroTrackerArrow_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Input - Player Clicks Unit
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InputPlayerClicksUnit_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_playerStatus == 2))) {
            return false;
        }

        if (!((UnitIsAlive(EventUnit()) == true))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    if ((EventUnit() == libGame_gv_players[EventPlayer()].lv_heroUnit)) {
        libSond_gf_HeroVOHeroPissedLineLogic(EventPlayer());
    }
    else {
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InputPlayerClicksUnit_Init () {
    libUIUI_gt_InputPlayerClicksUnit = TriggerCreate("libUIUI_gt_InputPlayerClicksUnit_Func");
    TriggerAddEventUnitClick(libUIUI_gt_InputPlayerClicksUnit, null, c_playerAny);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Input - Dialog Dismiss Key Down
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InputDialogDismissKeyDown_Func (bool testConds, bool runActions) {
    // Variable Declarations
    unit lv_heroUnit;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_playerStatus == 2))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    if ((libNtve_gf_PlayerInCinematicMode(EventPlayer()) == true)) {
        return true;
    }
    else {
    }
    if ((DialogControlIsVisible(libUIUI_gv_uIDebugPanel.lv_mainDialog, EventPlayer()) == true)) {
        libUIUI_gf_UIDebugPanelShowHideDebugPanelForPlayer(false, EventPlayer());
        return true;
    }
    else {
    }
    if ((DialogControlIsVisible(libUIUI_gv_talents_Panel.lv_mainDialog, EventPlayer()) == true)) {
        libUIUI_gf_TalentsShowHideTalentsPanelForPlayer(false, EventPlayer());
        return true;
    }
    else {
    }
    if ((DialogControlIsVisible(libUIUI_gv_talents_Panel.lv_mainDialog, EventPlayer()) == true)) {
        libUIUI_gf_TalentsShowHideTalentsPanelForPlayer(false, EventPlayer());
        return true;
    }
    else {
    }
    if ((DialogControlIsVisible(libUIUI_gv_deathRecap_Panel.lv_mainPanel, EventPlayer()) == true)) {
        libUIUI_gf_DeathRecapShowHideForPlayer(false, EventPlayer());
        return true;
    }
    else {
    }
    if ((DialogControlIsVisible(libUIUI_gv_uITargetInfoPanel.lv_mainPanel, EventPlayer()) == true)) {
        libUIUI_gf_UITargetInfoPanelClearTargetForPlayer(EventPlayer());
        return true;
    }
    else {
    }
    UIShowCustomMenu(libCore_gv_playerGroupFromPlayer[EventPlayer()], StringToText(""));
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InputDialogDismissKeyDown_Init () {
    libUIUI_gt_InputDialogDismissKeyDown = TriggerCreate("libUIUI_gt_InputDialogDismissKeyDown_Func");
    TriggerAddEventHotkeyPressed(libUIUI_gt_InputDialogDismissKeyDown, c_playerAny, c_hotkeyDialogDismiss, true);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Input - Backslash Key Down
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InputBackslashKeyDown_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_playerStatus == 2))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    if ((DialogControlIsVisible(libUIUI_gv_uIDebugPanel.lv_mainDialog, EventPlayer()) == false)) {
        libUIUI_gf_UIDebugPanelShowHideDebugPanelForPlayer(true, EventPlayer());
    }
    else {
        libUIUI_gf_UIDebugPanelShowHideDebugPanelForPlayer(false, EventPlayer());
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InputBackslashKeyDown_Init () {
    libUIUI_gt_InputBackslashKeyDown = TriggerCreate("libUIUI_gt_InputBackslashKeyDown_Func");
    TriggerAddEventKeyPressed(libUIUI_gt_InputBackslashKeyDown, c_playerAny, c_keyBackSlash, true, c_keyModifierStateIgnore, c_keyModifierStateIgnore, c_keyModifierStateIgnore);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Input - TAB Key Down
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InputTABKeyDown_Func (bool testConds, bool runActions) {
    int autoA6758D74_ae;
    int autoA6758D74_ai;

    // Variable Declarations
    int lv_itTeams;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_playerStatus == 2))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UILeaderboardShowHideForPlayer(true, EventPlayer());
    libGame_gv_players[EventPlayer()].lv_isViewingLeaderboard = true;
    autoA6758D74_ae = 2;
    autoA6758D74_ai = 1;
    lv_itTeams = 1;
    for ( ; ( (autoA6758D74_ai >= 0 && lv_itTeams <= autoA6758D74_ae) || (autoA6758D74_ai <= 0 && lv_itTeams >= autoA6758D74_ae) ) ; lv_itTeams += autoA6758D74_ai ) {
        libUIUI_gf_UILeaderboardSortingData(EventPlayer(), lv_itTeams, libUIUI_gv_uILeaderboardSorting.lv_playerSortingColumn[EventPlayer()][lv_itTeams], libMapM_gf_PrimaryMapMechanic());
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InputTABKeyDown_Init () {
    libUIUI_gt_InputTABKeyDown = TriggerCreate("libUIUI_gt_InputTABKeyDown_Func");
    TriggerAddEventKeyPressed(libUIUI_gt_InputTABKeyDown, c_playerAny, c_keyTab, true, c_keyModifierStateIgnore, c_keyModifierStateIgnore, c_keyModifierStateIgnore);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Input - TAB Key Up
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InputTABKeyUp_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((libGame_gv_players[EventPlayer()].lv_playerStatus == 2))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UILeaderboardShowHideForPlayer(false, EventPlayer());
    libGame_gv_players[EventPlayer()].lv_isViewingLeaderboard = false;
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InputTABKeyUp_Init () {
    libUIUI_gt_InputTABKeyUp = TriggerCreate("libUIUI_gt_InputTABKeyUp_Func");
    TriggerAddEventKeyPressed(libUIUI_gt_InputTABKeyUp, c_playerAny, c_keyTab, false, c_keyModifierStateIgnore, c_keyModifierStateIgnore, c_keyModifierStateIgnore);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Input - Ctrl-N Key Down
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_InputCtrlNKeyDown_Func (bool testConds, bool runActions) {
    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIGameUIToggleMinimapCommandsForPlayer(EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_InputCtrlNKeyDown_Init () {
    libUIUI_gt_InputCtrlNKeyDown = TriggerCreate("libUIUI_gt_InputCtrlNKeyDown_Func");
    TriggerAddEventKeyPressed(libUIUI_gt_InputCtrlNKeyDown, c_playerAny, c_keyN, true, c_keyModifierStateExclude, c_keyModifierStateRequire, c_keyModifierStateExclude);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Leaderboard
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeLeaderboard_Func (bool testConds, bool runActions) {
    int init_i;

    int autoA0A13136_ae;
    int autoA0A13136_ai;
    int autoA11D19DB_ae;
    int autoA11D19DB_ai;
    int autoAE43F728_ae;
    int autoAE43F728_ai;
    int auto1E7EDAE5_ae;
    int auto1E7EDAE5_ai;
    int auto6444AA21_ae;
    int auto6444AA21_ai;

    // Variable Declarations
    int lv_itLeaderboardPlayers;
    int lv_itTeam;
    int lv_slot;
    int lv_item;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/LeaderBoardPanelNew");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uILeaderboard.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team1Indicator");
    libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_BG_TabScreenTeamColor_Red", libCore_gv_teamChaos);
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team2Indicator");
    libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "@UI/HUD_BG_TabScreenTeamColor_Blue", libCore_gv_teamChaos);
    autoA0A13136_ae = libCore_gv_bALMaxTeams;
    autoA0A13136_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoA0A13136_ai >= 0 && lv_itTeam <= autoA0A13136_ae) || (autoA0A13136_ai <= 0 && lv_itTeam >= autoA0A13136_ae) ) ; lv_itTeam += autoA0A13136_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" +IntToString(lv_itTeam)+ "Header/HeaderLevelLabel");
        libUIUI_gv_uILeaderboard.lv_teamLevelLabels[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Team" +IntToString(lv_itTeam)+ "Header/HeaderXPLabel");
        libUIUI_gv_uILeaderboard.lv_xPSortingButton[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Team" +IntToString(lv_itTeam)+ "Header/HeaderTakedownsLabel");
        libUIUI_gv_uILeaderboard.lv_takedownSortingButton[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Team" +IntToString(lv_itTeam)+ "Header/HeaderDeathsLabel");
        libUIUI_gv_uILeaderboard.lv_deathsSortingButton[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Team" +IntToString(lv_itTeam)+ "Header/HeaderMapMechanicsLabel");
        libUIUI_gv_uILeaderboard.lv_mapMechanicSortingButton[lv_itTeam] = DialogControlLastCreated();
    }
    autoA11D19DB_ae = libCore_gv_bALMaxTeams;
    autoA11D19DB_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoA11D19DB_ai >= 0 && lv_itTeam <= autoA11D19DB_ae) || (autoA11D19DB_ai <= 0 && lv_itTeam >= autoA11D19DB_ae) ) ; lv_itTeam += autoA11D19DB_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "Team" + IntToString(lv_itTeam) + "LeaderBoard");
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        autoAE43F728_ae = libCore_gv_bALMaxPlayersOnATeam;
        autoAE43F728_ai = 1;
        lv_slot = 1;
        for ( ; ( (autoAE43F728_ai >= 0 && lv_slot <= autoAE43F728_ae) || (autoAE43F728_ai <= 0 && lv_slot >= autoAE43F728_ae) ) ; lv_slot += autoAE43F728_ai ) {
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroInfo" + IntToString(lv_slot));
            lv_currentPanelLayer += 1;
            lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroIconLevelFrame/HeroIcon");
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            libUIUI_gv_uILeaderboard.lv_portrait[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameTalentsFrame/PlayerNameLabel");
            libNtve_gf_SetDialogItemText(DialogControlLastCreated(), StringToText(""), PlayerGroupAll());
            libUIUI_gv_uILeaderboard.lv_playerName[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameTalentsFrame/PlayerHeroLabel");
            libNtve_gf_SetDialogItemText(DialogControlLastCreated(), StringToText(""), PlayerGroupAll());
            libUIUI_gv_uILeaderboard.lv_heroName[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "PlayerOwnerBackground");
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            libUIUI_gv_uILeaderboard.lv_playerOwnerBackground[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameTalentsFrame/PlayerXP");
            libNtve_gf_SetDialogItemText(DialogControlLastCreated(), StringToText(""), PlayerGroupAll());
            libUIUI_gv_uILeaderboard.lv_playerXPLabel[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameTalentsFrame/PlayerTakedowns");
            libUIUI_gv_uILeaderboard.lv_takedownsLabel[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameTalentsFrame/PlayerDeaths");
            libUIUI_gv_uILeaderboard.lv_deathsLabel[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "PlayerNameTalentsFrame/PlayerMapMechanics");
            libUIUI_gv_uILeaderboard.lv_mapMechanicLabel[lv_itTeam][lv_slot] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "PlayerNameTalentsFrame/PlayerHeroicAbility");
            libUIUI_gv_uILeaderboard.lv_heroicAbilityIcon[lv_itTeam][lv_slot] = DialogControlLastCreated();
            lv_currentPanelLayer -= 1;
        }
        lv_currentPanelLayer -= 1;
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TimerFrame/GameTime");
        libUIUI_gv_uILeaderboard.lv_timeLabel = DialogControlLastCreated();
    }
    libUIUI_gf_UILeaderboardUpdateMapMechanicLabels(libMapM_gf_PrimaryMapMechanic());
    auto1E7EDAE5_ae = libCore_gv_bALMaxPlayers;
    auto1E7EDAE5_ai = 1;
    lv_itLeaderboardPlayers = 1;
    for ( ; ( (auto1E7EDAE5_ai >= 0 && lv_itLeaderboardPlayers <= auto1E7EDAE5_ae) || (auto1E7EDAE5_ai <= 0 && lv_itLeaderboardPlayers >= auto1E7EDAE5_ae) ) ; lv_itLeaderboardPlayers += auto1E7EDAE5_ai ) {
        if ((libGame_gv_players[lv_itLeaderboardPlayers].lv_isViewingLeaderboard == true)) {
            auto6444AA21_ae = libCore_gv_bALMaxTeams;
            auto6444AA21_ai = 1;
            lv_itTeam = 1;
            for ( ; ( (auto6444AA21_ai >= 0 && lv_itTeam <= auto6444AA21_ae) || (auto6444AA21_ai <= 0 && lv_itTeam >= auto6444AA21_ae) ) ; lv_itTeam += auto6444AA21_ai ) {
                libUIUI_gf_UILeaderboardSortingData(lv_itLeaderboardPlayers, lv_itTeam, libUIUI_gv_uILeaderboardSorting.lv_playerSortingColumn[lv_itLeaderboardPlayers][libGame_gf_TeamNumberOfPlayer(lv_itLeaderboardPlayers)], libMapM_gf_PrimaryMapMechanic());
            }
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeLeaderboard_Init () {
    libUIUI_gt_UIInitializeLeaderboard = TriggerCreate("libUIUI_gt_UIInitializeLeaderboard_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Map Mechanics Panel Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_MapMechanicsPanelInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    int autoA85338A7_ae;
    int autoA85338A7_ai;
    int autoA70BE915_ae;
    int autoA70BE915_ai;
    int autoECCAEF98_ae;
    int autoECCAEF98_ai;
    int auto49841FC3_ae;
    int auto49841FC3_ai;
    int autoE09329D4_ae;
    int autoE09329D4_ai;

    // Variable Declarations
    int lv_itTeam;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_enemyTeam;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/MapMechanicPanel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "RavenCourtPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "CurseFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "CurseInfoLabel");
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseInfoLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "CurseTimerLabel");
    libUIUI_gv_mapMechanicsPanel.lv_ravenCourtCurseTimerLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    autoA85338A7_ae = libCore_gv_bALMaxTeams;
    autoA85338A7_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoA85338A7_ai >= 0 && lv_itTeam <= autoA85338A7_ae) || (autoA85338A7_ai <= 0 && lv_itTeam >= autoA85338A7_ae) ) ; lv_itTeam += autoA85338A7_ai ) {
        lv_enemyTeam = (3 - lv_itTeam);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "Team" + IntToString(lv_itTeam) + "TributeFrame");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeFrame[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "BackgroundBlue");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "RavenIconBlue");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "BackgroundRed");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "RavenIconRed");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TributeCounter");
        libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeCounterLabel[lv_itTeam] = DialogControlLastCreated();
        lv_currentPanelLayer -= 1;
    }
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeCounterLabel[libGame_gv_teamOrderIndex_C], "Storm_MapMechanic_MechanicCounterLeft_Red", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_ravenCourtTributeCounterLabel[libGame_gv_teamChaosIndex_C], "Storm_MapMechanic_MechanicCounterRight_Blue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "BlackheartsBayPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DoubloonModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonModeFrame = DialogControlLastCreated();
    autoA70BE915_ae = libCore_gv_bALMaxTeams;
    autoA70BE915_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoA70BE915_ai >= 0 && lv_itTeam <= autoA70BE915_ae) || (autoA70BE915_ai <= 0 && lv_itTeam >= autoA70BE915_ae) ) ; lv_itTeam += autoA70BE915_ai ) {
        lv_enemyTeam = (3 - lv_itTeam);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "BackgroundBlue");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "BackgroundRed");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" + IntToString(lv_itTeam) + "DoubloonCounter");
        libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonCounterLabel[lv_itTeam] = DialogControlLastCreated();
    }
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonCounterLabel[libGame_gv_teamOrderIndex_C], "Storm_MapMechanic_MechanicCounterLeft_Red", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayDoubloonCounterLabel[libGame_gv_teamChaosIndex_C], "Storm_MapMechanic_MechanicCounterRight_Blue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "CannonModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonModeFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "CannonballsLeftLabel");
    libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonRemainingCannonballsLabel = DialogControlLastCreated();
    autoECCAEF98_ae = libCore_gv_bALMaxTeams;
    autoECCAEF98_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoECCAEF98_ai >= 0 && lv_itTeam <= autoECCAEF98_ae) || (autoECCAEF98_ai <= 0 && lv_itTeam >= autoECCAEF98_ae) ) ; lv_itTeam += autoECCAEF98_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "Cannonball");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonCannonballImage[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" + IntToString(lv_itTeam) + "ShotCounter");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[lv_itTeam] = DialogControlLastCreated();
    }
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonCannonballImage[libGame_gv_teamOrderIndex_C], "@UI/HUD_MapMechanic_BlackheartsBay_CannonBallRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonCannonballImage[libGame_gv_teamChaosIndex_C], "@UI/HUD_MapMechanic_BlackheartsBay_CannonBallBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[libGame_gv_teamOrderIndex_C], "Storm_MapMechanic_MechanicCounterRight_Red", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayCannonShotCounterLabel[libGame_gv_teamChaosIndex_C], "Storm_MapMechanic_MechanicCounterRight_Blue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    lv_currentPanelLayer -= 1;
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HauntedMinesPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "SkullModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeFrame = DialogControlLastCreated();
    auto49841FC3_ae = libCore_gv_bALMaxTeams;
    auto49841FC3_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (auto49841FC3_ai >= 0 && lv_itTeam <= auto49841FC3_ae) || (auto49841FC3_ai <= 0 && lv_itTeam >= auto49841FC3_ae) ) ; lv_itTeam += auto49841FC3_ai ) {
        lv_enemyTeam = (3 - lv_itTeam);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "BackgroundBlue");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "BackgroundRed");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" + IntToString(lv_itTeam) + "SkullCounter");
        if ((lv_itTeam == libGame_gv_teamOrderIndex_C)) {
            libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_MapMechanic_MechanicCounterLeft_Blue", libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers);
            libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_MapMechanic_MechanicCounterLeft_Red", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
        }
        else {
            libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_MapMechanic_MechanicCounterRight_Blue", libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers);
            libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "Storm_MapMechanic_MechanicCounterRight_Red", libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers);
        }
        libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesSkullModeSkullCounterLabel[lv_itTeam] = DialogControlLastCreated();
    }
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "MineTimerModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerModeFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "MineOpenTimer");
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesMineTimerLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "GolemModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesGolemModeFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "AllyGolemHealthBar");
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesAllyGolemHealthUnitStatus = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "EnemyGolemHealthBar");
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesEnemyGolemHealthUnitStatus = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "AllySkullCounter");
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesAllyGolemModeSkullCounterLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "EnemySkullCounter");
    libUIUI_gv_mapMechanicsPanel.lv_hauntedMinesEnemyGolemModeSkullCounterLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DragonShirePanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_dragonShirePanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "ShrineTimerModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerModeFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "ShrineActivateTimer");
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineTimerLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "ShrineModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireShrineModeFrame = DialogControlLastCreated();
    autoE09329D4_ae = libCore_gv_bALMaxTeams;
    autoE09329D4_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (autoE09329D4_ai >= 0 && lv_itTeam <= autoE09329D4_ae) || (autoE09329D4_ai <= 0 && lv_itTeam >= autoE09329D4_ae) ) ; lv_itTeam += autoE09329D4_ai ) {
        lv_enemyTeam = (3 - lv_itTeam);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "BackgroundBlue");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "BackgroundRed");
        DialogControlSetVisible(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, false);
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "MoonShrineDisabled");
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineDisabledImage[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "StarShrineDisabled");
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineDisabledImage[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "MoonShrineEnabled");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "StarShrineEnabled");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[lv_itTeam] = DialogControlLastCreated();
    }
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineDisabledImage[libGame_gv_teamOrderIndex_C], "@UI/HUD_MapMechanic_DragonShire_MoonDisabledRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineDisabledImage[libGame_gv_teamChaosIndex_C], "@UI/HUD_MapMechanic_DragonShire_MoonDisabledBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineDisabledImage[libGame_gv_teamOrderIndex_C], "@UI/HUD_MapMechanic_DragonShire_StarDisabledRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineDisabledImage[libGame_gv_teamChaosIndex_C], "@UI/HUD_MapMechanic_DragonShire_StarDisabledBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[libGame_gv_teamOrderIndex_C], "@UI/HUD_MapMechanic_DragonShire_MoonEnabledRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireMoonShrineEnabledImage[libGame_gv_teamChaosIndex_C], "@UI/HUD_MapMechanic_DragonShire_MoonEnabledBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[libGame_gv_teamOrderIndex_C], "@UI/HUD_MapMechanic_DragonShire_StarEnabledRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemImage(libUIUI_gv_mapMechanicsPanel.lv_dragonShireStarShrineEnabledImage[libGame_gv_teamChaosIndex_C], "@UI/HUD_MapMechanic_DragonShire_StarEnabledBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    lv_currentPanelLayer -= 1;
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "DragonModeFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonModeFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DragonInfoLabel");
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonInfoLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DragonTimer");
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonTimerLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "DragonHealthBar");
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthUnitStatus = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DragonHealthBar/HealthLabel/StatusLabel");
    libUIUI_gv_mapMechanicsPanel.lv_dragonShireDragonHealthLabel = DialogControlLastCreated();
    lv_currentPanelLayer -= 1;
    lv_currentPanelLayer -= 1;
    TriggerEnable(libUIUI_gt_MapMechanicsPanelUpdate, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_MapMechanicsPanelInitialize_Init () {
    libUIUI_gt_MapMechanicsPanelInitialize = TriggerCreate("libUIUI_gt_MapMechanicsPanelInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Map Mechanics Panel Update
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_MapMechanicsPanelUpdate_Func (bool testConds, bool runActions) {
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_MapMechanicsPanelUpdate_Init () {
    libUIUI_gt_MapMechanicsPanelUpdate = TriggerCreate("libUIUI_gt_MapMechanicsPanelUpdate_Func");
    TriggerEnable(libUIUI_gt_MapMechanicsPanelUpdate, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_MapMechanicsPanelUpdate, 0.0625, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Notification Display
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeNotificationDisplay_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/GameAlertsPanel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uINotificationDisplay.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeFlash, "InGameAlerts");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    libUIUI_gv_uINotificationDisplay.lv_flashFrame = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeNotificationDisplay_Init () {
    libUIUI_gt_UIInitializeNotificationDisplay = TriggerCreate("libUIUI_gt_UIInitializeNotificationDisplay_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Observer UI
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeObserverUI_Func (bool testConds, bool runActions) {
    int init_i;

    int autoBAB376C6_ae;
    int autoBAB376C6_ai;
    int autoBCB352F9_ae;
    int autoBCB352F9_ai;

    // Variable Declarations
    int lv_team;
    int lv_hero;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_leaderboardIndex;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/ObserverHeroOverviewPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetVisible(DialogControlLastCreated(), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uIObserverUI.lv_mainPanel = DialogControlLastCreated();
    autoBAB376C6_ae = libCore_gv_bALMaxTeams;
    autoBAB376C6_ai = 1;
    lv_team = 1;
    for ( ; ( (autoBAB376C6_ai >= 0 && lv_team <= autoBAB376C6_ae) || (autoBAB376C6_ai <= 0 && lv_team >= autoBAB376C6_ae) ) ; lv_team += autoBAB376C6_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "Team" + IntToString(lv_team) + "HeroOverview");
        DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TeamKillsValueLabel");
        libNtve_gf_SetDialogItemText(DialogControlLastCreated(), StringToText(""), PlayerGroupAll());
        DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
        libUIUI_gv_uIObserverUI.lv_teamKillsLabel[lv_team] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TeamLevelValueLabel");
        libNtve_gf_SetDialogItemText(DialogControlLastCreated(), StringToText(""), PlayerGroupAll());
        DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
        libUIUI_gv_uIObserverUI.lv_teamLevelLabel[lv_team] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TownsRemainingValueLabel");
        libNtve_gf_SetDialogItemText(DialogControlLastCreated(), StringToText(""), PlayerGroupAll());
        DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
        libUIUI_gv_uIObserverUI.lv_teamTownsLabel[lv_team] = DialogControlLastCreated();
        autoBCB352F9_ae = libCore_gv_bALMaxPlayersOnATeam;
        autoBCB352F9_ai = 1;
        lv_hero = 1;
        for ( ; ( (autoBCB352F9_ai >= 0 && lv_hero <= autoBCB352F9_ae) || (autoBCB352F9_ai <= 0 && lv_hero >= autoBCB352F9_ae) ) ; lv_hero += autoBCB352F9_ai ) {
            lv_leaderboardIndex = ((lv_team - 1) * libCore_gv_bALMaxPlayersOnATeam + lv_hero);
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroOverview" + IntToString(lv_hero));
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
            libUIUI_gv_uIObserverUI.lv_heroPanels[lv_leaderboardIndex] = DialogControlLastCreated();
            lv_currentPanelLayer += 1;
            lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroPortraitImage");
            DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
            libUIUI_gv_uIObserverUI.lv_heroPortraitImages[lv_leaderboardIndex] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitTarget, "TargetHeroUnitFrame");
            DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
            libUIUI_gv_uIObserverUI.lv_heroTargetFrames[lv_leaderboardIndex] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroDeathTimeLabel");
            DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
            libUIUI_gv_uIObserverUI.lv_heroDeathTimeLabels[lv_leaderboardIndex] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroIconBorder");
            DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
            libUIUI_gv_uIObserverUI.lv_heroIconBorders[lv_leaderboardIndex] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "HeroStatus");
            DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
            libUIUI_gv_uIObserverUI.lv_heroStatusBars[lv_leaderboardIndex] = DialogControlLastCreated();
            lv_currentPanelLayer -= 1;
        }
        lv_currentPanelLayer -= 1;
    }
    TriggerEnable(libUIUI_gt_UIObserverUIUpdate, true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeObserverUI_Init () {
    libUIUI_gt_UIInitializeObserverUI = TriggerCreate("libUIUI_gt_UIInitializeObserverUI_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Observer UI - Hero Dies
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIObserverUIHeroDies_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_rosterSlot;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    lv_rosterSlot = libGame_gv_players[libGame_gf_HeroKilledPlayer()].lv_rosterSlot;
    libNtve_gf_SetDialogItemColor(libUIUI_gv_uIObserverUI.lv_heroPortraitImages[lv_rosterSlot], Color(29.41, 29.41, 29.41), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    libNtve_gf_SetDialogItemText(libUIUI_gv_uIObserverUI.lv_heroDeathTimeLabels[lv_rosterSlot], StringToText(""), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_heroDeathTimeLabels[lv_rosterSlot], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_heroStatusBars[lv_rosterSlot], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIObserverUIHeroDies_Init () {
    libUIUI_gt_UIObserverUIHeroDies = TriggerCreate("libUIUI_gt_UIObserverUIHeroDies_Func");
    libGame_gf_HeroKilled(libUIUI_gt_UIObserverUIHeroDies);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Observer UI - Hero Respawn
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIObserverUIHeroRespawn_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_rosterSlot;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    lv_rosterSlot = libGame_gv_players[libGame_gf_HeroRespawnPlayer()].lv_rosterSlot;
    libNtve_gf_SetDialogItemColor(libUIUI_gv_uIObserverUI.lv_heroPortraitImages[lv_rosterSlot], Color(100.00, 100.00, 100.00), libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer]);
    DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_heroDeathTimeLabels[lv_rosterSlot], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], false);
    DialogControlSetVisible(libUIUI_gv_uIObserverUI.lv_heroStatusBars[lv_rosterSlot], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIObserverUIHeroRespawn_Init () {
    libUIUI_gt_UIObserverUIHeroRespawn = TriggerCreate("libUIUI_gt_UIObserverUIHeroRespawn_Func");
    libGame_gf_HeroRespawn(libUIUI_gt_UIObserverUIHeroRespawn);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Observer UI - Update
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIObserverUIUpdate_Func (bool testConds, bool runActions) {
    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_UIObserverUIUpdateForPlayer(libCore_gv_oBSERVER_ObserverUIPlayer);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIObserverUIUpdate_Init () {
    libUIUI_gt_UIObserverUIUpdate = TriggerCreate("libUIUI_gt_UIObserverUIUpdate_Func");
    TriggerEnable(libUIUI_gt_UIObserverUIUpdate, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_UIObserverUIUpdate, 0.125, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Ping - Listen For Player Ping
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIPingListenForPlayerPing_Func (bool testConds, bool runActions) {
    int auto45732B5C_val;

    // Variable Declarations
    int lv_pingType;
    unit lv_targetUnit;
    int lv_pingingPlayer;
    unit lv_pingingPlayerHero;
    playergroup lv_pingPlayerGroup;
    string lv_pingModel;
    soundlink lv_pingSound;

    // Variable Initialization
    lv_pingPlayerGroup = PlayerGroupEmpty();
    lv_pingModel = "StormGeneralPing";
    lv_pingSound = SoundLink("UI_Game_Ping_General", -1);

    // Conditions
    if (testConds) {
        if (!((TimerGetRemaining(libGame_gv_players[EventPlayer()].lv_pingCooldownTimer) == 0.0))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    lv_pingType = EventPingOption();
    lv_targetUnit = EventPingUnit();
    lv_pingingPlayer = EventPlayer();
    lv_pingingPlayerHero = libGame_gv_players[lv_pingingPlayer].lv_heroUnit;
    if ((libGame_gv_players[lv_pingingPlayer].lv_faction == 0)) {
        lv_pingPlayerGroup = libCore_gv_teamOrder;
    }
    else {
        lv_pingPlayerGroup = libCore_gv_teamChaos;
    }
    TimerStart(libGame_gv_players[lv_pingingPlayer].lv_pingCooldownTimer, libUIUI_gv_uI_PingCooldownTime_C, false, c_timeGame);
    auto45732B5C_val = lv_pingType;
    if (auto45732B5C_val == (2)) {
        libUIUI_gf_UIPingPlayerUsesAssistMePing(lv_pingingPlayer, EventPingPoint());
    }
    else if (auto45732B5C_val == (0)) {
        libUIUI_gf_UIPingPlayerUsesDangerPing(lv_pingingPlayer, EventPingPoint(), lv_targetUnit);
    }
    else if (auto45732B5C_val == (1)) {
        libUIUI_gf_UIPingPlayerUsesOnMyWayPing(lv_pingingPlayer, EventPingPoint());
    }
    else if (auto45732B5C_val == (3)) {
        libUIUI_gf_UIPingPlayerUsesDefendPing(lv_pingingPlayer, EventPingPoint());
    }
    else if (auto45732B5C_val == (5)) {
        libUIUI_gf_UIPingPlayerUsesRetreatPing(lv_pingingPlayer, EventPingPoint());
    }
    else {
    }
    if (((lv_pingType == (-1)) || (lv_pingType == (4)))) {
        if ((lv_targetUnit != null)) {
            libUIUI_gf_UIPingPlayerPingsUnit(lv_pingingPlayer, lv_targetUnit, lv_pingPlayerGroup);
        }
        else {
            lv_targetUnit = libUIUI_gf_UIPingGetSpecialPingTargetInRangeOfPoint(EventPingPoint(), EventPingedMinimap(), lv_pingingPlayer);
            if ((lv_targetUnit != null)) {
                libUIUI_gf_UIPingPlayerPingsUnit(lv_pingingPlayer, lv_targetUnit, lv_pingPlayerGroup);
            }
            else {
                libNtve_gf_CreatePingFacingAngle(lv_pingPlayerGroup, lv_pingModel, EventPingPoint(), Color(100.00, 100.00, 100.00), 3.0, 270.0);
                SoundPlayForPlayer(lv_pingSound, lv_pingingPlayer, lv_pingPlayerGroup, 100.0, 0.0);
            }
        }
    }
    else {
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIPingListenForPlayerPing_Init () {
    libUIUI_gt_UIPingListenForPlayerPing = TriggerCreate("libUIUI_gt_UIPingListenForPlayerPing_Func");
    TriggerAddEventPing(libUIUI_gt_UIPingListenForPlayerPing, c_playerAny);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Talents Bucket Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TalentsBucketInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    int auto9B3AB884_ae;
    int auto9B3AB884_ai;
    int autoFC5CCB8A_ae;
    int autoFC5CCB8A_ai;
    int auto3D90F51D_ae;
    int auto3D90F51D_ai;

    // Variable Declarations
    int lv_itTalentButton;
    int lv_itPrerequisiteLine;
    int lv_itTierLevel;
    int lv_itTierTalent;
    int lv_itProgressLine;
    int lv_itMutuallyExclusiveFrame;
    int lv_itLevel;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_tooltip;
    int lv_talentPointIndex;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }
    lv_tooltip = c_invalidDialogControlId;

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/TalentsPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_talents_Panel.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroImage");
    libUIUI_gv_talents_Panel.lv_heroImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "CloseButton");
    libUIUI_gv_talents_Panel.lv_closeButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroNameLabel");
    libUIUI_gv_talents_Panel.lv_heroNameLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "LevelValueLabel");
    libUIUI_gv_talents_Panel.lv_heroLevelLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AttackDetailsFrame/AttackDamageValueLabel");
    libUIUI_gv_talents_Panel.lv_attackDamageLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AttackDetailsFrame/AttackSpeedValueLabel");
    libUIUI_gv_talents_Panel.lv_attackSpeedLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AttackDetailsFrame/DPSValueLabel");
    libUIUI_gv_talents_Panel.lv_damagePerSecondLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/DefenseDetailsFrame/HealthValueLabel");
    libUIUI_gv_talents_Panel.lv_healthLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/DefenseDetailsFrame/HealthRegenValueLabel");
    libUIUI_gv_talents_Panel.lv_healthRegenLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/DefenseDetailsFrame/ShieldsValueLabel");
    libUIUI_gv_talents_Panel.lv_shieldLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AbilityDetailsFrame/AbilityPowerValueLabel");
    libUIUI_gv_talents_Panel.lv_abilityPowerLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AbilityDetailsFrame/ManaLabel");
    libUIUI_gv_talents_Panel.lv_resourceTitle = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AbilityDetailsFrame/ManaValueLabel");
    libUIUI_gv_talents_Panel.lv_resourceLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AbilityDetailsFrame/ManaRegenLabel");
    libUIUI_gv_talents_Panel.lv_resourceRegenTitle = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AbilityDetailsFrame/ManaRegenValueLabel");
    libUIUI_gv_talents_Panel.lv_resourceRegenLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/AbilityDetailsFrame/CooldownReductionValueLabel");
    libUIUI_gv_talents_Panel.lv_cooldownReductionLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "HeroStatsFrame/UtilityDetailsFrame/MovementSpeedValueLabel");
    libUIUI_gv_talents_Panel.lv_movementSpeedLabel = DialogControlLastCreated();
    auto9B3AB884_ae = libCore_gv_talentsBucket_MaxTiers_C;
    auto9B3AB884_ai = 1;
    lv_itTierLevel = 1;
    for ( ; ( (auto9B3AB884_ai >= 0 && lv_itTierLevel <= auto9B3AB884_ae) || (auto9B3AB884_ai <= 0 && lv_itTierLevel >= auto9B3AB884_ae) ) ; lv_itTierLevel += auto9B3AB884_ai ) {
        autoFC5CCB8A_ae = libCore_gv_talentsBucket_MaxTalentsPerTier_C;
        autoFC5CCB8A_ai = 1;
        lv_itTierTalent = 1;
        for ( ; ( (autoFC5CCB8A_ai >= 0 && lv_itTierTalent <= autoFC5CCB8A_ae) || (autoFC5CCB8A_ai <= 0 && lv_itTierTalent >= autoFC5CCB8A_ae) ) ; lv_itTierTalent += autoFC5CCB8A_ai ) {
            lv_itTalentButton += 1;
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "TalentFrame" + IntToString(lv_itTalentButton));
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            lv_currentPanelLayer += 1;
            lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
            libUIUI_gv_talents_Panel.lv_talentFrames[lv_itTierLevel][lv_itTierTalent] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Button");
            libUIUI_gv_talents_Panel.lv_talentButtons[lv_itTierLevel][lv_itTierTalent] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Button/IconImage");
            libUIUI_gv_talents_Panel.lv_talentIcons[lv_itTierLevel][lv_itTierTalent] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "SelectedImage");
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            libUIUI_gv_talents_Panel.lv_talentSelectedImages[lv_itTierLevel][lv_itTierTalent] = DialogControlLastCreated();
            DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "GlowImage");
            DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
            libUIUI_gv_talents_Panel.lv_talentGlowImages[lv_itTierLevel][lv_itTierTalent] = DialogControlLastCreated();
            DialogControlCreateFromTemplate(DialogControlGetDialog(libUIUI_gv_talents_Panel.lv_mainDialog), c_triggerControlTypeTooltip, "StandardTooltip/ItemPreviewTooltip");
            libNtve_gf_SetDialogItemCustomTooltip(libUIUI_gv_talents_Panel.lv_talentButtons[lv_itTierLevel][lv_itTierTalent], DialogControlLastCreated(), PlayerGroupAll());
            lv_tooltip = DialogControlLastCreated();
            DialogControlHookup(lv_tooltip, c_triggerControlTypeLabel, "ItemDescriptionLabel");
            libUIUI_gv_talents_Panel.lv_talentTooltipLabels[lv_itTierLevel][lv_itTierTalent] = DialogControlLastCreated();
            lv_currentPanelLayer -= 1;
        }
    }
    auto3D90F51D_ae = libCore_gv_talentsBucket_MaxTiers_C;
    auto3D90F51D_ai = 1;
    lv_itTierLevel = 1;
    for ( ; ( (auto3D90F51D_ai >= 0 && lv_itTierLevel <= auto3D90F51D_ae) || (auto3D90F51D_ai <= 0 && lv_itTierLevel >= auto3D90F51D_ae) ) ; lv_itTierLevel += auto3D90F51D_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TierLevelLabel" + IntToString(lv_itTierLevel));
        libUIUI_gv_talents_Panel.lv_tierLevels[lv_itTierLevel] = DialogControlLastCreated();
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TalentsBucketInitialize_Init () {
    libUIUI_gt_TalentsBucketInitialize = TriggerCreate("libUIUI_gt_TalentsBucketInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Talents Close Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TalentsCloseButtonClicked_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((EventDialogControl() == libUIUI_gv_talents_Panel.lv_closeButton))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_TalentsShowHideTalentsPanelForPlayer(false, EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TalentsCloseButtonClicked_Init () {
    libUIUI_gt_TalentsCloseButtonClicked = TriggerCreate("libUIUI_gt_TalentsCloseButtonClicked_Func");
    TriggerAddEventDialogControl(libUIUI_gt_TalentsCloseButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Talents A/B Choices Panel Initialize OLD
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TalentsABChoicesPanelInitializeOLD_Func (bool testConds, bool runActions) {
    int init_i;

    int autoFAC22B85_ae;
    int autoFAC22B85_ai;

    // Variable Declarations
    int lv_itTalentButton;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_backgroundImage;
    int lv_tooltip;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }
    lv_backgroundImage = c_invalidDialogControlId;
    lv_tooltip = c_invalidDialogControlId;

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/ABChoicePanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_talents_ABChoicePanel.lv_mainDialog = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Background");
    lv_backgroundImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "ChoiceHeaderLabel");
    libUIUI_gv_talents_ABChoicePanel.lv_headerLabel = DialogControlLastCreated();
    autoFAC22B85_ae = libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C;
    autoFAC22B85_ai = 1;
    lv_itTalentButton = 1;
    for ( ; ( (autoFAC22B85_ai >= 0 && lv_itTalentButton <= autoFAC22B85_ae) || (autoFAC22B85_ai <= 0 && lv_itTalentButton >= autoFAC22B85_ae) ) ; lv_itTalentButton += autoFAC22B85_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "TalentFrame" + IntToString(lv_itTalentButton));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_talents_ABChoicePanel.lv_talentFrames[lv_itTalentButton] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "Button");
        libUIUI_gv_talents_ABChoicePanel.lv_talentButtons[lv_itTalentButton] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Button/IconImage");
        libUIUI_gv_talents_ABChoicePanel.lv_talentIcons[lv_itTalentButton] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Button/TalentDetails");
        libUIUI_gv_talents_ABChoicePanel.lv_talentDescriptionLabels[lv_itTalentButton] = DialogControlLastCreated();
        DialogControlCreateInPanelFromTemplate(libUIUI_gv_talents_ABChoicePanel.lv_mainDialog, c_triggerControlTypeTooltip, "TalentsPanel/ABChoiceTooltip");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, lv_backgroundImage, c_anchorTopLeft, 0, 0);
        lv_tooltip = DialogControlLastCreated();
        DialogControlHookup(lv_tooltip, c_triggerControlTypeLabel, "ItemDescriptionLabel");
        libUIUI_gv_talents_ABChoicePanel.lv_tooltipLabel[lv_itTalentButton] = DialogControlLastCreated();
        libNtve_gf_SetDialogItemCustomTooltip(libUIUI_gv_talents_ABChoicePanel.lv_talentButtons[lv_itTalentButton], lv_tooltip, PlayerGroupAll());
        lv_currentPanelLayer -= 1;
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TalentsABChoicesPanelInitializeOLD_Init () {
    libUIUI_gt_TalentsABChoicesPanelInitializeOLD = TriggerCreate("libUIUI_gt_TalentsABChoicesPanelInitializeOLD_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Talents A/B Choices Panel Initialize NEW
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TalentsABChoicesPanelInitializeNEW_Func (bool testConds, bool runActions) {
    int init_i;

    int auto44C7DD94_ae;
    int auto44C7DD94_ai;

    // Variable Declarations
    int lv_itTalentButton;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_backgroundImage;
    int lv_tooltip;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }
    lv_backgroundImage = c_invalidDialogControlId;
    lv_tooltip = c_invalidDialogControlId;

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/HeroTalentTreeSelectionPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_talents_ABChoicePanel.lv_mainDialog = DialogControlLastCreated();
    auto44C7DD94_ae = (libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C - 1);
    auto44C7DD94_ai = 1;
    lv_itTalentButton = 0;
    for ( ; ( (auto44C7DD94_ai >= 0 && lv_itTalentButton <= auto44C7DD94_ae) || (auto44C7DD94_ai <= 0 && lv_itTalentButton >= auto44C7DD94_ae) ) ; lv_itTalentButton += auto44C7DD94_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "TalentTreeButton" + IntToString(lv_itTalentButton));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_talents_ABChoicePanel.lv_talentButtons[(lv_itTalentButton + 1)] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroTalentTierButton/IconImage");
        libUIUI_gv_talents_ABChoicePanel.lv_talentIcons[(lv_itTalentButton + 1)] = DialogControlLastCreated();
        lv_currentPanelLayer -= 1;
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TalentsABChoicesPanelInitializeNEW_Init () {
    libUIUI_gt_TalentsABChoicesPanelInitializeNEW = TriggerCreate("libUIUI_gt_TalentsABChoicesPanelInitializeNEW_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Talents A/B Choice Button Clicked
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TalentsABChoiceButtonClicked_Func (bool testConds, bool runActions) {
    int auto4C9163C9_ae;
    int auto4C9163C9_ai;

    // Variable Declarations
    int lv_itButton;
    int lv_choiceOffset;

    // Variable Initialization

    // Conditions
    if (testConds) {
        if (!((libGame_gv_gameOver == false))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    auto4C9163C9_ae = libCore_gv_talents_MaxABChoiceButtonCount_DEBUG_C;
    auto4C9163C9_ai = 1;
    lv_itButton = 1;
    for ( ; ( (auto4C9163C9_ai >= 0 && lv_itButton <= auto4C9163C9_ae) || (auto4C9163C9_ai <= 0 && lv_itButton >= auto4C9163C9_ae) ) ; lv_itButton += auto4C9163C9_ai ) {
        if ((libGame_gv_players[EventPlayer()].lv_talentsBucketABChoices[libUIUI_gv_talents_ActiveABChoiceForPlayer[EventPlayer()]].lv_talentChoiceData.lv_enabled[lv_itButton] == false)) {
            lv_choiceOffset += 1;
        }
        else {
        }
        if ((EventDialogControl() == libUIUI_gv_talents_ABChoicePanel.lv_talentButtons[lv_itButton])) {
            libUIUI_gf_TalentsBucketChooseABChoiceForPlayerOLD(libUIUI_gv_talents_ActiveABChoiceForPlayer[EventPlayer()], (lv_itButton + lv_choiceOffset), EventPlayer());
            break;
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TalentsABChoiceButtonClicked_Init () {
    libUIUI_gt_TalentsABChoiceButtonClicked = TriggerCreate("libUIUI_gt_TalentsABChoiceButtonClicked_Func");
    TriggerEnable(libUIUI_gt_TalentsABChoiceButtonClicked, false);
    TriggerAddEventDialogControl(libUIUI_gt_TalentsABChoiceButtonClicked, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Talents A/B Choice Selected NEW
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TalentsABChoiceSelectedNEW_Func (bool testConds, bool runActions) {
    // Actions
    if (!runActions) {
        return true;
    }

    libUIUI_gf_TalentsBucketChooseABChoiceForPlayerOLD(libUIUI_gv_talents_ActiveABChoiceForPlayer[EventPlayer()], TalentTreeGetSelectedHeroTalentTreeColumn(EventPlayer(), libUIUI_gv_talents_ActiveABChoiceForPlayer[EventPlayer()]), EventPlayer());
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TalentsABChoiceSelectedNEW_Init () {
    libUIUI_gt_TalentsABChoiceSelectedNEW = TriggerCreate("libUIUI_gt_TalentsABChoiceSelectedNEW_Func");
    TriggerEnable(libUIUI_gt_TalentsABChoiceSelectedNEW, false);
    TriggerAddEventHeroTalentTreeSelected(libUIUI_gt_TalentsABChoiceSelectedNEW, c_playerAny);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Target Info Panel
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeTargetInfoPanel_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int lv_i;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int lv_statBoostIndex;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/TargetInfoPanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uITargetInfoPanel.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TargetNameLabel");
    libUIUI_gv_uITargetInfoPanel.lv_unitName = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TargetPlayerNameLabel");
    libUIUI_gv_uITargetInfoPanel.lv_playerName = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TargetLevelLabel");
    libUIUI_gv_uITargetInfoPanel.lv_level = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "TargetHeroImage");
    libUIUI_gv_uITargetInfoPanel.lv_portraitImage = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitTarget, "TargetHeroUnitFrame");
    libUIUI_gv_uITargetInfoPanel.lv_unitTargetFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "TargetMechanicLabelIcon");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_mapMechanicIcon = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "TargetMechanicLabel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_mapMechanicLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "CursedBuildingIcon");
    libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), StringExternal("Param/Value/lib_UIUI_9EB66CFD"), PlayerGroupAll());
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_cursedBuildingIcon = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "DescriptionLabel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_descriptionLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "HealthAndManaUnitStatusFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_healthAndManaUnitStatusStatusFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "HealthOnlyUnitStatusFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_healthOnlyUnitStatusStatusFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "TowerWithAmmoUnitStatusFrame");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_uITargetInfoPanel.lv_towerWithAmmoUnitStatusStatusFrame = DialogControlLastCreated();
    libUIUI_gf_UITargetInfoPanelEnableDisable(true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeTargetInfoPanel_Init () {
    libUIUI_gt_UIInitializeTargetInfoPanel = TriggerCreate("libUIUI_gt_UIInitializeTargetInfoPanel_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Target Info Panel - Update
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UITargetInfoPanelUpdate_Func (bool testConds, bool runActions) {
    int auto665DC756_ae;
    int auto665DC756_ai;

    // Variable Declarations
    int lv_player;
    int lv_firstPlayer;
    const int lv_playerStep = 2;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    lv_firstPlayer = ModI(FixedToInt((GameGetMissionTime() / 0.0625)), lv_playerStep);
    auto665DC756_ae = libCore_gv_bALMaxPlayers;
    auto665DC756_ai = lv_playerStep;
    lv_player = lv_firstPlayer;
    for ( ; ( (auto665DC756_ai >= 0 && lv_player <= auto665DC756_ae) || (auto665DC756_ai <= 0 && lv_player >= auto665DC756_ae) ) ; lv_player += auto665DC756_ai ) {
        if ((libGame_gv_players[lv_player].lv_playerStatus == 2)) {
            libUIUI_gf_UITargetInfoPanelUpdateForPlayer(lv_player);
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UITargetInfoPanelUpdate_Init () {
    libUIUI_gt_UITargetInfoPanelUpdate = TriggerCreate("libUIUI_gt_UITargetInfoPanelUpdate_Func");
    TriggerEnable(libUIUI_gt_UITargetInfoPanelUpdate, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_UITargetInfoPanelUpdate, 0.0625, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Initialize Targeting Helper Panel
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UIInitializeTargetingHelperPanel_Func (bool testConds, bool runActions) {
    int init_i;

    int auto56AF556C_ae;
    int auto56AF556C_ai;

    // Variable Declarations
    int lv_i;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/FriendlyAbilityTargetHelper");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_uITargetingHelperPanel.lv_mainPanel = DialogControlLastCreated();
    auto56AF556C_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto56AF556C_ai = 1;
    lv_i = 1;
    for ( ; ( (auto56AF556C_ai >= 0 && lv_i <= auto56AF556C_ae) || (auto56AF556C_ai <= 0 && lv_i >= auto56AF556C_ae) ) ; lv_i += auto56AF556C_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypePanel, "HeroFrame" + IntToString(lv_i));
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        lv_currentPanelLayer += 1;
        lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
        libUIUI_gv_uITargetingHelperPanel.lv_heroFrames[lv_i] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroIcon");
        libUIUI_gv_uITargetingHelperPanel.lv_heroIcons[lv_i] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "HeroIconBorder");
        libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), libCore_gv_cOLORAllyColor, PlayerGroupAll());
        libUIUI_gv_uITargetingHelperPanel.lv_heroBorderImages[lv_i] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitTarget, "TargetHeroUnitFrame");
        libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[lv_i] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "HeroStatus");
        libUIUI_gv_uITargetingHelperPanel.lv_heroStatusFrames[lv_i] = DialogControlLastCreated();
        lv_currentPanelLayer -= 1;
    }
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[1], c_triggerControlEventTypeMouseExit);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[2], c_triggerControlEventTypeMouseExit);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[3], c_triggerControlEventTypeMouseExit);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[4], c_triggerControlEventTypeMouseExit);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[5], c_triggerControlEventTypeMouseExit);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[1], c_triggerControlEventTypeMouseEnter);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[2], c_triggerControlEventTypeMouseEnter);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[3], c_triggerControlEventTypeMouseEnter);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[4], c_triggerControlEventTypeMouseEnter);
    TriggerAddEventDialogControl(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, c_playerAny, libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[5], c_triggerControlEventTypeMouseEnter);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UIInitializeTargetingHelperPanel_Init () {
    libUIUI_gt_UIInitializeTargetingHelperPanel = TriggerCreate("libUIUI_gt_UIInitializeTargetingHelperPanel_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Targeting Helper Panel - Unit Frame Mouse Enter
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter_Func (bool testConds, bool runActions) {
    int auto4E0DCE1A_ae;
    int auto4E0DCE1A_ai;
    int auto1D8443F8_ae;
    int auto1D8443F8_ai;

    // Variable Declarations
    int lv_i;
    int lv_frameIndex;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto4E0DCE1A_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto4E0DCE1A_ai = 1;
    lv_i = 1;
    for ( ; ( (auto4E0DCE1A_ai >= 0 && lv_i <= auto4E0DCE1A_ae) || (auto4E0DCE1A_ai <= 0 && lv_i >= auto4E0DCE1A_ae) ) ; lv_i += auto4E0DCE1A_ai ) {
        if ((EventDialogControl() == libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[lv_i])) {
            lv_frameIndex = lv_i;
            break;
        }
        else {
        }
    }
    TextExpressionSetToken("Param/Expression/lib_UIUI_CFF72C0A", "A", IntToText(EventPlayer()));
    ActorSendAsText(libNtve_gf_MainActorofUnit(libUIUI_gv_uITargetingHelperPanelTargetUnitsForPlayer[EventPlayer()][lv_frameIndex]), TextExpressionAssemble("Param/Expression/lib_UIUI_CFF72C0A"));
    auto1D8443F8_ae = libCore_gv_bALMaxPlayers;
    auto1D8443F8_ai = 1;
    lv_i = 1;
    for ( ; ( (auto1D8443F8_ai >= 0 && lv_i <= auto1D8443F8_ae) || (auto1D8443F8_ai <= 0 && lv_i >= auto1D8443F8_ae) ) ; lv_i += auto1D8443F8_ai ) {
        if ((lv_i != EventPlayer())) {
            TextExpressionSetToken("Param/Expression/lib_UIUI_99C703B2", "A", IntToText(lv_i));
            ActorSendAsText(ActorFromActor(libNtve_gf_MainActorofUnit(libUIUI_gv_uITargetingHelperPanelTargetUnitsForPlayer[EventPlayer()][lv_frameIndex]), ("FriendlyTargetHelperBeamPlayer" + IntToString(EventPlayer()))), TextExpressionAssemble("Param/Expression/lib_UIUI_99C703B2"));
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter_Init () {
    libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter = TriggerCreate("libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter_Func");
    TriggerEnable(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter, false);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Targeting Helper Panel - Unit Frame Mouse Exit
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit_Func (bool testConds, bool runActions) {
    int auto9AF623AC_ae;
    int auto9AF623AC_ai;

    // Variable Declarations
    int lv_i;
    int lv_frameIndex;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto9AF623AC_ae = libCore_gv_bALMaxPlayersOnATeam;
    auto9AF623AC_ai = 1;
    lv_i = 1;
    for ( ; ( (auto9AF623AC_ai >= 0 && lv_i <= auto9AF623AC_ae) || (auto9AF623AC_ai <= 0 && lv_i >= auto9AF623AC_ae) ) ; lv_i += auto9AF623AC_ai ) {
        if ((EventDialogControl() == libUIUI_gv_uITargetingHelperPanel.lv_heroTargetFrames[lv_i])) {
            lv_frameIndex = lv_i;
            break;
        }
        else {
        }
    }
    ActorSend(ActorFromActor(libNtve_gf_MainActorofUnit(libUIUI_gv_uITargetingHelperPanelTargetUnitsForPlayer[EventPlayer()][lv_frameIndex]), ("FriendlyTargetHelperBeamPlayer" + IntToString(EventPlayer()))), "Destroy");
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit_Init () {
    libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit = TriggerCreate("libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit_Func");
    TriggerEnable(libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit, false);
}

//--------------------------------------------------------------------------------------------------
// Trigger: UI - Targeting Helper Panel - Update Visibility For Offensive Abilities
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities_Func (bool testConds, bool runActions) {
    int auto1CF92869_ae;
    int auto1CF92869_ai;
    int auto9982399D_ae;
    int auto9982399D_ai;

    // Variable Declarations
    int lv_i;
    int lv_p;

    // Variable Initialization

    // Actions
    if (!runActions) {
        return true;
    }

    auto1CF92869_ae = libCore_gv_bALMaxPlayers;
    auto1CF92869_ai = 1;
    lv_p = 1;
    for ( ; ( (auto1CF92869_ai >= 0 && lv_p <= auto1CF92869_ae) || (auto1CF92869_ai <= 0 && lv_p >= auto1CF92869_ae) ) ; lv_p += auto1CF92869_ai ) {
        if ((libUIUI_gv_uITargetingHelperPanelPlayerIsTargetingOffensiveAbility[lv_p] == true)) {
            auto9982399D_ae = libUIUI_gv_uITargetingHelperPanelNumberOfTargetUnitsForPlayer[lv_p];
            auto9982399D_ai = 1;
            lv_i = 1;
            for ( ; ( (auto9982399D_ai >= 0 && lv_i <= auto9982399D_ae) || (auto9982399D_ai <= 0 && lv_i >= auto9982399D_ae) ) ; lv_i += auto9982399D_ai ) {
                if ((libNtve_gf_UnitIsVisibleToPlayer(libUIUI_gv_uITargetingHelperPanelTargetUnitsForPlayer[lv_p][lv_i], lv_p) == false)) {
                    DialogControlSetVisible(libUIUI_gv_uITargetingHelperPanel.lv_heroFrames[lv_i], libCore_gv_playerGroupFromPlayer[lv_p], false);
                }
                else {
                }
            }
        }
        else {
        }
    }
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities_Init () {
    libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities = TriggerCreate("libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities_Func");
    TriggerEnable(libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities, false);
    TriggerAddEventTimePeriodic(libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities, 0.0625, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: Top Bar Panel Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TopBarPanelInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    int auto4D936E5E_ae;
    int auto4D936E5E_ai;
    int auto507A4472_ae;
    int auto507A4472_ai;

    // Variable Declarations
    int lv_itTeam;
    int[6] lv_panels;
    int lv_currentPanelLayer;
    int[libCore_gv_bALMaxTeams + 1] lv_coreHealthPercentLabels;
    int lv_enemyTeam;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }
    for (init_i = 0; init_i <= libCore_gv_bALMaxTeams; init_i += 1) {
        lv_coreHealthPercentLabels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/ConsoleUIContainer/TopPanel");
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeDefaultObservedPlayerId);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_topBarPanel.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "GameTimerLabel");
    libUIUI_gv_topBarPanel.lv_gameTimerLabel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "CoreHealthLabel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    libUIUI_gv_topBarPanel.lv_coreHealthLabel = DialogControlLastCreated();
    auto4D936E5E_ae = libCore_gv_bALMaxTeams;
    auto4D936E5E_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (auto4D936E5E_ai >= 0 && lv_itTeam <= auto4D936E5E_ae) || (auto4D936E5E_ai <= 0 && lv_itTeam >= auto4D936E5E_ae) ) ; lv_itTeam += auto4D936E5E_ai ) {
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "XPBackgroundBlue");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_topBarPanel.lv_xPBackgroundBlue[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeImage, "Team" + IntToString(lv_itTeam) + "XPBackgroundRed");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_topBarPanel.lv_xPBackgroundRed[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "Team" + IntToString(lv_itTeam) + "XPUnitStatusFrame");
        libUIUI_gv_topBarPanel.lv_xPUnitStatusFrame[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusBar, "Team" + IntToString(lv_itTeam) + "XPUnitStatusFrame/XPBar");
        libUIUI_gv_topBarPanel.lv_xPVeterancyBar[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" + IntToString(lv_itTeam) + "LevelLabel");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_topBarPanel.lv_levelLabel[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" + IntToString(lv_itTeam) + "LevelUpLabel");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        libUIUI_gv_topBarPanel.lv_levelUpLabel[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatus, "Team" + IntToString(lv_itTeam) + "CoreUnitStatus");
        DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
        if ((libGame_gv_teams[lv_itTeam].lv_core != null)) {
            libNtve_gf_SetDialogItemUnit(DialogControlLastCreated(), libGame_gv_teams[lv_itTeam].lv_core, PlayerGroupAll());
        }
        else {
        }
        libUIUI_gv_topBarPanel.lv_coreHealthUnitStatusFrames[lv_itTeam] = DialogControlLastCreated();
        DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeLabel, "Team" + IntToString(lv_itTeam) + "CoreUnitStatus/HealthLabel/StatusLabel");
        lv_coreHealthPercentLabels[lv_itTeam] = DialogControlLastCreated();
    }
    auto507A4472_ae = libCore_gv_bALMaxTeams;
    auto507A4472_ai = 1;
    lv_itTeam = 1;
    for ( ; ( (auto507A4472_ai >= 0 && lv_itTeam <= auto507A4472_ae) || (auto507A4472_ai <= 0 && lv_itTeam >= auto507A4472_ae) ) ; lv_itTeam += auto507A4472_ai ) {
        lv_enemyTeam = (3 - lv_itTeam);
        DialogControlSetVisible(libUIUI_gv_topBarPanel.lv_xPBackgroundBlue[lv_itTeam], libGame_gv_teams[lv_itTeam].lv_teamPlayerGroupNoNPCPlayers, true);
        DialogControlSetVisible(libUIUI_gv_topBarPanel.lv_xPBackgroundRed[lv_itTeam], libGame_gv_teams[lv_enemyTeam].lv_teamPlayerGroupNoNPCPlayers, true);
    }
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_topBarPanel.lv_levelUpLabel[libGame_gv_teamOrderIndex_C], "Storm_TopBar_TeamLevelUpLeftRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(libUIUI_gv_topBarPanel.lv_levelUpLabel[libGame_gv_teamChaosIndex_C], "Storm_TopBar_TeamLevelUpRightBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(lv_coreHealthPercentLabels[libGame_gv_teamOrderIndex_C], "Storm_TopBar_CoreHealthPercentLeftRed", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    libNtve_gf_SetDialogItemStyle(lv_coreHealthPercentLabels[libGame_gv_teamChaosIndex_C], "Storm_TopBar_CoreHealthPercentRightBlue", libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_teamPlayerGroupNoNPCPlayers);
    DialogControlSetVisible(libUIUI_gv_topBarPanel.lv_xPBackgroundBlue[libGame_gv_teamOrderIndex_C], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    DialogControlSetVisible(libUIUI_gv_topBarPanel.lv_xPBackgroundRed[libGame_gv_teamChaosIndex_C], libCore_gv_playerGroupFromPlayer[libCore_gv_oBSERVER_ObserverUIPlayer], true);
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TopBarPanelInitialize_Init () {
    libUIUI_gt_TopBarPanelInitialize = TriggerCreate("libUIUI_gt_TopBarPanelInitialize_Func");
}

//--------------------------------------------------------------------------------------------------
// Trigger: Try Me Mode Panel Initialize
//--------------------------------------------------------------------------------------------------
bool libUIUI_gt_TryMeModePanelInitialize_Func (bool testConds, bool runActions) {
    int init_i;

    // Variable Declarations
    int lv_itLabel;
    int[6] lv_panels;
    int lv_currentPanelLayer;

    // Variable Initialization
    for (init_i = 0; init_i <= 5; init_i += 1) {
        lv_panels[init_i] = c_invalidDialogControlId;
    }

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlHookupStandard(c_triggerControlTypePanel, "UIContainer/FullscreenUpperContainer/TryMeModePanel");
    DialogControlSetVisible(DialogControlLastCreated(), PlayerGroupAll(), false);
    lv_currentPanelLayer += 1;
    lv_panels[lv_currentPanelLayer] = DialogControlLastCreated();
    libUIUI_gv_tryMeModePanel.lv_mainPanel = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "ToggleMinionsButton");
    libUIUI_gv_tryMeModePanel.lv_toggleMinionsButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "RefreshFortsButton");
    libUIUI_gv_tryMeModePanel.lv_refreshFortsButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "LevelUpButton");
    libUIUI_gv_tryMeModePanel.lv_levelUpButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "ResetLevelButton");
    libUIUI_gv_tryMeModePanel.lv_resetLevelButton = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeButton, "ClearCooldownsButton");
    libUIUI_gv_tryMeModePanel.lv_clearCooldownsButton = DialogControlLastCreated();
    return true;
}

//--------------------------------------------------------------------------------------------------
void libUIUI_gt_TryMeModePanelInitialize_Init () {
    libUIUI_gt_TryMeModePanelInitialize = TriggerCreate("libUIUI_gt_TryMeModePanelInitialize_Func");
}

void libUIUI_InitTriggers () {
    libUIUI_gt_IncludeUI_Init();
    libUIUI_gt_InitializeUI_Init();
    libUIUI_gt_UIUpdateEventBehaviorChangeThatAffectsStats_Init();
    libUIUI_gt_UIUpdateTimeLabelsTimerExpires_Init();
    libUIUI_gt_UIInitializeDamageFlashUI_Init();
    libUIUI_gt_UIDamageFlashTriggerDamageFlash_Init();
    libUIUI_gt_UIDamageFlashLowHPSoundsLooper_Init();
    libUIUI_gt_UIInitializeDeathActionCamPanel_Init();
    libUIUI_gt_UIDeathActionCamPanelPreviousAllyButtonClicked_Init();
    libUIUI_gt_UIDeathActionCamPanelNextAllyButtonClicked_Init();
    libUIUI_gt_UIDeathActionCamPanelCheckboxClicked_Init();
    libUIUI_gt_DeathRecapPanelInitialize_Init();
    libUIUI_gt_DeathRecapOpenButtonClicked_Init();
    libUIUI_gt_DeathRecapCloseButtonClicked_Init();
    libUIUI_gt_DeathRecapDamageTakenBarMouseEnter_Init();
    libUIUI_gt_DeathRecapDamageTakenBarMouseExit_Init();
    libUIUI_gt_DeathRecapDamageTakenBarClicked_Init();
    libUIUI_gt_DeathRecapDamageDetailsBarMouseEnter_Init();
    libUIUI_gt_DeathRecapDamageDetailsBarMouseExit_Init();
    libUIUI_gt_DeathRecapDamageDetailsBarClicked_Init();
    libUIUI_gt_DeathTimerPanelInitialize_Init();
    libUIUI_gt_DeathAnnouncementPanelVisibleTimerExpires_Init();
    libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseEnter_Init();
    libUIUI_gt_DeathTimerPanelDeathTimerFrameMouseExit_Init();
    libUIUI_gt_DeathTimerPanelUpdate_Init();
    libUIUI_gt_UIInitializeDebugPanel_Init();
    libUIUI_gt_UIDebugPanelCloseButtonClicked_Init();
    libUIUI_gt_UIDebugPanelRefreshCooldownsButtonClicked_Init();
    libUIUI_gt_UIDebugPanelSelectionEnabledCheckboxClicked_Init();
    libUIUI_gt_UIDebugPanelStartGameButtonClicked_Init();
    libUIUI_gt_UIDebugPanelSpawnCreepCampsButtonClicked_Init();
    libUIUI_gt_UIDebugPanelForceMinionWaveCompCheckboxClicked_Init();
    libUIUI_gt_UIDebugPanelMinionWaveCompDropdownClicked_Init();
    libUIUI_gt_UIDebugPanelRespecButtonClicked_Init();
    libUIUI_gt_UIDebugPanelPlayerSliderValueChange_Init();
    libUIUI_gt_UIDebugPanelLevelSliderValueChange_Init();
    libUIUI_gt_UIDebugPanelUseCurrentXPCheckboxClicked_Init();
    libUIUI_gt_UIDebugPanelAllHeroesCheckboxClicked_Init();
    libUIUI_gt_UIDebugPanelAllTalentsCheckboxClicked_Init();
    libUIUI_gt_UIDebugPanelHeroDropdownSelectionChange_Init();
    libUIUI_gt_UIDebugPanelAnnouncerDropdownSelectionChange_Init();
    libUIUI_gt_UIDebugPanelSpawnHeroButtonClicked_Init();
    libUIUI_gt_UIDebugPanelMetaXPEditBoxClicked_Init();
    libUIUI_gt_UIDebugPanelSendMetaXPButtonClicked_Init();
    libUIUI_gt_UIDebugPanelUpdate_Init();
    libUIUI_gt_EncouragementPanelInitialize_Init();
    libUIUI_gt_EncouragementPanelCloseButtonClicked_Init();
    libUIUI_gt_FloatingCombatTextDamageDealtAttackMove_Init();
    libUIUI_gt_FloatingCombatTextDamageDealtAttackMove2_Init();
    libUIUI_gt_UIFloatingCombatTextHeal_Init();
    libUIUI_gt_UIFloatingCombatTextRegenGlobePickup_Init();
    libUIUI_gt_UIFloatingCombatTextCloaked_Init();
    libUIUI_gt_UIFloatingCombatTextInvulnerable_Init();
    libUIUI_gt_UIFloatingCombatTextCleansed_Init();
    libUIUI_gt_UIFloatingCombatTextMissed_Init();
    libUIUI_gt_FullscreenOverlaysInitialize_Init();
    libUIUI_gt_GameOverSplashInitialize_Init();
    libUIUI_gt_UIInitializeGameUIHandles_Init();
    libUIUI_gt_UIGameUITalentsButtonClicked_Init();
    libUIUI_gt_UIGodRayCreate_Init();
    libUIUI_gt_UIGodRayDestroy_Init();
    libUIUI_gt_UIGodRayDestroyOnDC_Init();
    libUIUI_gt_UIInitializeHealingFountainsHelpText_Init();
    libUIUI_gt_UIHealingFountainsHelpTextPlayerUsesHealingFountain_Init();
    libUIUI_gt_UIHealingFountainsHelpTextTextDisplayController_Init();
    libUIUI_gt_UIHealingFountainsHelpTextHealingFountainDies_Init();
    libUIUI_gt_HelpButtonDebugPosition_Init();
    libUIUI_gt_UIInitializeHeroConsole_Init();
    libUIUI_gt_HeroConsoleUnitStatusBarsInitialize_Init();
    libUIUI_gt_HeroConsoleUnitStatusBarsChannelBehaviorAdded_Init();
    libUIUI_gt_HeroConsoleUnitStatusBarsUpdate_Init();
    libUIUI_gt_UIInitializeHeroSpecificStatusFrame_Init();
    libUIUI_gt_UIInitializeHeroTrackerArrow_Init();
    libUIUI_gt_InputPlayerClicksUnit_Init();
    libUIUI_gt_InputDialogDismissKeyDown_Init();
    libUIUI_gt_InputBackslashKeyDown_Init();
    libUIUI_gt_InputTABKeyDown_Init();
    libUIUI_gt_InputTABKeyUp_Init();
    libUIUI_gt_InputCtrlNKeyDown_Init();
    libUIUI_gt_UIInitializeLeaderboard_Init();
    libUIUI_gt_MapMechanicsPanelInitialize_Init();
    libUIUI_gt_MapMechanicsPanelUpdate_Init();
    libUIUI_gt_UIInitializeNotificationDisplay_Init();
    libUIUI_gt_UIInitializeObserverUI_Init();
    libUIUI_gt_UIObserverUIHeroDies_Init();
    libUIUI_gt_UIObserverUIHeroRespawn_Init();
    libUIUI_gt_UIObserverUIUpdate_Init();
    libUIUI_gt_UIPingListenForPlayerPing_Init();
    libUIUI_gt_TalentsBucketInitialize_Init();
    libUIUI_gt_TalentsCloseButtonClicked_Init();
    libUIUI_gt_TalentsABChoicesPanelInitializeOLD_Init();
    libUIUI_gt_TalentsABChoicesPanelInitializeNEW_Init();
    libUIUI_gt_TalentsABChoiceButtonClicked_Init();
    libUIUI_gt_TalentsABChoiceSelectedNEW_Init();
    libUIUI_gt_UIInitializeTargetInfoPanel_Init();
    libUIUI_gt_UITargetInfoPanelUpdate_Init();
    libUIUI_gt_UIInitializeTargetingHelperPanel_Init();
    libUIUI_gt_UITargetingHelperPanelUnitFrameMouseEnter_Init();
    libUIUI_gt_UITargetingHelperPanelUnitFrameMouseExit_Init();
    libUIUI_gt_UITargetingHelperPanelUpdateVisibilityForOffensiveAbilities_Init();
    libUIUI_gt_TopBarPanelInitialize_Init();
    libUIUI_gt_TryMeModePanelInitialize_Init();
}

//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
bool libUIUI_InitLib_completed = false;

void libUIUI_InitLib () {
    if (libUIUI_InitLib_completed) {
        return;
    }

    libUIUI_InitLib_completed = true;

    libUIUI_InitLibraries();
    libUIUI_InitVariables();
    libUIUI_InitTriggers();
}

include "TriggerLibs/HeroesLib"
include "TriggerLibs/GameLib"
include "TriggerLibs/MapMechanicsLib"
include "TriggerLibs/AILib"
include "TriggerLibs/StartingExperienceLib"
include "TriggerLibs/SoundLib"
include "TriggerLibs/GameDataHelperLib"
include "TriggerLibs/SupportLib"

