
using System.Collections.Generic;

namespace Server.Config
{
    public partial class TingConfigCategory
    {
        public TingConfig[] GetTings(int gameId)
        {
            List<TingConfig> configs = new List<TingConfig>();
            foreach (var ting in _dataList)
            {
                if (ting.GameId == gameId)
                {
                    configs.Add(ting);
                } 
            }

            TingConfig[] tings = new TingConfig[configs.Count];
            foreach (var config in configs)
            {
                tings[config.TingId] = config;
            }

            return tings;
        }
    }
}