private bool AttemptToStackIntoCrate(StorageCrate lCrate, ItemBase lItem)
 {
     for (int i = 0; i < lCrate.mItems.Length; i++)
     {
         if (lCrate.mItems[i] != null)
         {
             if (ItemManager.AreItemsTheSame(lItem, lCrate.mItems[i]))
             {
                 ItemBase itemBase = ItemManager.CloneItem(lItem);
                 if (ItemManager.StackWholeItems(itemBase, lCrate.mItems[i], true))
                 {
                     int currentStackSize  = ItemManager.GetCurrentStackSize(lCrate.mItems[i]);
                     int currentStackSize2 = ItemManager.GetCurrentStackSize(itemBase);
                     StorageCrateWindow.SetSlotAndSendNetworkUpdate(WorldScript.mLocalPlayer, lCrate, i, itemBase);
                     int num = currentStackSize2 - currentStackSize;
                     this.RemoveItem(lItem, null);
                     UIManager.instance.SetInfoText(string.Concat(new object[]
                     {
                         "Stacked ",
                         num,
                         "x ",
                         ItemManager.GetItemName(itemBase)
                     }), 3f, true);
                     return(true);
                 }
                 return(false);
             }
         }
     }
     return(false);
 }