Exemplo n.º 1
0
		private void RefreshSlotType()
		{
			this._slotType = (ClothingItem.SlotTypes)0;
			ClothingItem.DisplayTypes displayType = this._displayType;
			switch (displayType)
			{
			case ClothingItem.DisplayTypes.TopPartial_Hands:
			case ClothingItem.DisplayTypes.TopPartial_Arms:
			case ClothingItem.DisplayTypes.TopFull_Hands:
			case ClothingItem.DisplayTypes.TopFull_Arms:
				break;
			default:
				if (displayType != ClothingItem.DisplayTypes.TShirt)
				{
					if (displayType == ClothingItem.DisplayTypes.Pants)
					{
						this._slotType = ClothingItem.SlotTypes.Bottom;
						return;
					}
					if (displayType == ClothingItem.DisplayTypes.Hat)
					{
						this._slotType = ClothingItem.SlotTypes.Hat;
						return;
					}
					if (displayType != ClothingItem.DisplayTypes.FullBody)
					{
						return;
					}
					this._slotType = ClothingItem.SlotTypes.Exclusive;
					return;
				}
				break;
			}
			this._slotType = ClothingItem.SlotTypes.Top;
		}
Exemplo n.º 2
0
 public static IEnumerable <ClothingItem> ItemsByType(ClothingItem.DisplayTypes typeMask)
 {
     if (ClothingItemDatabase._instance._itemCollection != null)
     {
         return(from i in ClothingItemDatabase._instance._itemCollection
                where (i._displayType & typeMask) != (ClothingItem.DisplayTypes) 0
                select i);
     }
     return(from i in ClothingItemDatabase._instance._items
            where (i._displayType & typeMask) != (ClothingItem.DisplayTypes) 0
            select i);
 }
Exemplo n.º 3
0
 private static Dictionary <ClothingItem, int> GetPonderatedClothingByTypeChance(ClothingItem.DisplayTypes typeMask, ClothingItem.DisplayTypes ignoreMask = (ClothingItem.DisplayTypes) 0)
 {
     return((from ci in ClothingItemDatabase.ItemsByType(typeMask)
             where ci._displayType != ignoreMask
             select ci).ToDictionary((ClothingItem c) => c, (ClothingItem c) => Mathf.Max(c._baseRollChance - LocalPlayer.Clothing.AmountOf(c._id) * c._ownedRollChanceReduction, 0)));
 }
Exemplo n.º 4
0
 public ClothingItemIdPicker(ClothingItem.DisplayTypes restrictedToType)
 {
     this.Type       = restrictedToType;
     this.Restricted = true;
 }