public void ExecuteNode(int id)
    {
        CareerNode node = CareerNode.GetNode(id, careerNodes);

        if (node == null)
        {
            GD.Print("Can't execute null node id " + id);
            return;
        }

        stats.SetBaseStat(StatsManager.Stats.LastNode, stats.GetStat(StatsManager.Stats.CurrentNode));
        stats.SetBaseStat(StatsManager.Stats.CurrentNode, id);
        stats.SetBaseStat(StatsManager.Stats.NodeInProgress, 1);
        CareerDb.SaveCareer(this);

        switch (node.nodeType)
        {
        case CareerNode.NodeTypes.None:
            GD.Print("NullEncounter");
            CompleteEncounter();
            break;

        case CareerNode.NodeTypes.ArenaMatch:
            ArenaEncounter(node.extraInfo);
            break;

        case CareerNode.NodeTypes.BossMatch:
            ArenaEncounter(node.extraInfo);
            break;

        case CareerNode.NodeTypes.FinalBoss:
            ArenaEncounter(node.extraInfo);
            break;

        case CareerNode.NodeTypes.Shop:
            ShopEncounter(node.extraInfo);
            break;

        case CareerNode.NodeTypes.RestSite:
            RestSiteEncounter(node.extraInfo);
            break;

        case CareerNode.NodeTypes.PressEvent:
            PressEventEncounter(node.extraInfo);
            break;
        }
    }
    public void CompleteEncounter()
    {
        if (Session.session.player != null)
        {
            playerData = Session.session.player.GetData();
            if (playerData != null && playerData.stats != null)
            {
                int health = playerData.stats.GetBaseStat(StatsManager.Stats.Health);
                stats.SetBaseStat(StatsManager.Stats.Health, health);
                playerData.stats = stats;
            }
        }

        Session.ClearGame();
        int        id        = stats.GetStat(StatsManager.Stats.CurrentNode);
        CareerNode node      = CareerNode.GetNode(id, careerNodes);
        int        nodeLevel = CareerNode.GetLevel(node, careerNodes);
        int        nextLevel = nodeLevel - 1;

        stats.SetBaseStat(StatsManager.Stats.CurrentLevel, nextLevel);
        stats.SetBaseStat(StatsManager.Stats.LastNode, id);
        stats.SetBaseStat(StatsManager.Stats.CurrentNode, 0);
        stats.SetBaseStat(StatsManager.Stats.NodeInProgress, 0);

        CareerDb.SaveCareer(this);


        Session.session.player = null;
        if (nextLevel == -1)
        {
            CompleteGame();
        }
        else
        {
            Session.ChangeMenu(Menu.Menus.Career);
        }
    }
    void ExecuteNode(int id)
    {
        GD.Print("Executing node " + id + ".");
        Session.session.career.ExecuteNode(id);
        return;

        Career     career    = Session.session.career;
        CareerNode node      = CareerNode.GetNode(id, career.careerNodes);
        int        nodeLevel = CareerNode.GetLevel(node, career.careerNodes);
        int        nextLevel = nodeLevel - 1;



        if (nodeLevel == 0)
        {
            GD.Print("Final boss time!");
            return;
        }
        else
        {
            GD.Print("Changing current level to " + nextLevel);
        }
        ScaleControls();
    }