Example #1
0
        private static int TryToApply(ItemData data, int pool, ItemPool pl)
        {
            if (!pl.Contains(pool))
            {
                List <ItemData> datas;

                if (!byPool.TryGetValue(pl.Id, out datas))
                {
                    datas         = new List <ItemData>();
                    byPool[pl.Id] = datas;
                }

                datas.Add(data);
                return(pl.Apply(pool));
            }

            return(pool);
        }