/// <summary>
        /// Initializes the <see cref="LogicQuests"/> class.
        /// </summary>
        internal static void Init()
        {
            if (LogicQuests.Initialized)
            {
                return;
            }

            LogicDataTable questCsv      = CSV.Tables.Get(Gamefile.Quests);
            Table          questCsvTable = questCsv.Table;

            string lastStoredName = "";

            Task.Run(() =>
            {
                for (int i = 0; i < questCsvTable.GetColumnRowCount(); i++)
                {
                    string name  = questCsvTable.GetValue("Name", i);
                    string value = questCsvTable.GetValueAt(questCsvTable.GetColumnIndexByName("LevelFile"), i);

                    if (name.IsNullOrEmptyOrWhitespace())
                    {
                        name = lastStoredName;
                    }
                    else
                    {
                        lastStoredName = name;
                    }

                    if (LogicQuests.Quests.ContainsKey(questCsv.GetDataByName(lastStoredName).GlobalID))
                    {
                        LogicQuest.LogicLevel level = JsonConvert.DeserializeObject <LogicQuest.LogicLevel>(File.ReadAllText($"Gamefiles/{value}"));
                        LogicQuests.Quests[questCsv.GetDataByName(lastStoredName).GlobalID].Levels.Add(level);
                    }
                    else
                    {
                        LogicQuest quest = new LogicQuest
                        {
                            Name = lastStoredName,
                            Data = (LogicQuestData)questCsv.GetDataByName(lastStoredName)
                        };

                        quest.Levels.Add(JsonConvert.DeserializeObject <LogicQuest.LogicLevel>(File.ReadAllText($"Gamefiles/{value}")));

                        LogicQuests.Quests.Add(quest.GlobalID, quest);
                    }
                }

                Console.WriteLine($"Loaded {LogicQuests.Quests.Count} Quests." + Environment.NewLine);
            }).Wait();

            LogicQuests.Initialized = true;
        }
        internal override void Execute()
        {
            LogicDataTable globals = CSV.Tables.Get(Gamefile.Globals);

            int cost  = ((LogicGlobalData)globals.GetDataByName("SHIP_UPGRADE_COST")).NumberArray.Find(value => value == this.Connection.Avatar.ShipLevel);
            int xpLvl = ((LogicGlobalData)globals.GetDataByName("SHIP_UPGRADE_REQUIRED_XP_LEVEL")).NumberArray.Find(value => value == this.Connection.Avatar.ExpLevel);

            if (this.Connection.Avatar.Gold >= cost && this.Connection.Avatar.ExpLevel >= xpLvl)
            {
                this.Connection.Avatar.Gold -= cost;
                this.Connection.Avatar.ShipUpgrade.Start();
            }
        }