Ejemplo n.º 1
0
        public void RefreshVisibleClothing()
        {
            bool flag = !LocalPlayer.Inventory.IsSlotEmpty(Item.EquipmentSlot.FullBody);

            this._wornClothingItemsFinal.Clear();
            for (int i = 0; i < this._wornClothingItems.Count; i++)
            {
                if (flag)
                {
                    ClothingItem clothingItem = ClothingItemDatabase.ClothingItemById(this._wornClothingItems[i]);
                    if (clothingItem._displayType == ClothingItem.DisplayTypes.Hat)
                    {
                        this._wornClothingItemsFinal.Add(this._wornClothingItems[i]);
                    }
                }
                else
                {
                    this._wornClothingItemsFinal.Add(this._wornClothingItems[i]);
                }
            }
            if (flag)
            {
                this._wornClothingItemsFinal.Add(-1);
            }
            this._playerVariation.SetVariation(LocalPlayer.Stats.PlayerVariation, LocalPlayer.Stats.PlayerVariationHair, this._wornClothingItemsFinal);
            this._playerVariation.UpdateSkinVariation(LocalPlayer.Stats.IsBloody, LocalPlayer.Stats.IsMuddy, LocalPlayer.Stats.IsRed, LocalPlayer.Stats.IsCold);
            this.ToggleClothingInventoryViews();
            this.MpSync();
        }
Ejemplo n.º 2
0
 private bool IsUnique(List <int> availableClothingOutfit)
 {
     foreach (int id in availableClothingOutfit)
     {
         ClothingItem clothingItem = ClothingItemDatabase.ClothingItemById(id);
         if (clothingItem != null)
         {
             if ((float)clothingItem._baseRollChance <= 0f)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
 public static bool CombineClothingItemWithOutfit(List <int> outfitItemIds, ClothingItem addingCloth)
 {
     for (int i = outfitItemIds.Count - 1; i >= 0; i--)
     {
         ClothingItem clothingItem = ClothingItemDatabase.ClothingItemById(outfitItemIds[i]);
         if (clothingItem == null)
         {
             Debug.LogError("Null worn cloth id =" + outfitItemIds[i]);
         }
         else if (!addingCloth.CompatibleWith(clothingItem._slotType) && (addingCloth._slotType != ClothingItem.SlotTypes.Exclusive || (clothingItem._slotType != ClothingItem.SlotTypes.Bottom && clothingItem._slotType != ClothingItem.SlotTypes.Top)))
         {
             return(false);
         }
     }
     outfitItemIds.Add(addingCloth._id);
     return(true);
 }