Пример #1
0
 private List <SWAFItem> this[SWAFItem.SWAFItemType value] {
     get { List <SWAFItem> res = new List <SWAFItem>(); foreach (SWAFItem item in items)
           {
               if (item.ItemType == value)
               {
                   res.Add(item);
               }
           }
           return(res); }
 }
Пример #2
0
        int CountForType(SWAFItem.SWAFItemType type)
        {
            switch (type)
            {
            case SWAFItem.SWAFItemType.LifetimeWants: return(LifetimeWants.Count);

            case SWAFItem.SWAFItemType.Wants: return(Wants.Count);

            case SWAFItem.SWAFItemType.Fears: return(Fears.Count);

            default: return(-1);
            }
        }
Пример #3
0
        int LimitForType(SWAFItem.SWAFItemType type)
        {
            switch (type)
            {
            case SWAFItem.SWAFItemType.LifetimeWants: return(version < 0x05 ? 0 : -1);

            case SWAFItem.SWAFItemType.Wants: return((int)maxWants);

            case SWAFItem.SWAFItemType.Fears: return((int)maxFears);

            default: return(-1);
            }
        }