Esempio n. 1
0
        private static void onClickedInventory(SleekInventory button)
        {
            int num  = MenuSurvivorsClothingUI.packageButtons.Length * MenuSurvivorsClothingUI.page;
            int num2 = MenuSurvivorsClothingUI.inventory.search(button);

            if (num + num2 < MenuSurvivorsClothingUI.filteredItems.Count)
            {
                if (Input.GetKey(ControlsSettings.other) && MenuSurvivorsClothingUI.packageButtons[num2].itemAsset != null)
                {
                    if (MenuSurvivorsClothingUI.packageButtons[num2].itemAsset.type == EItemType.BOX)
                    {
                        MenuSurvivorsClothingItemUI.viewItem(MenuSurvivorsClothingUI.filteredItems[num + num2].m_iDefinition.m_SteamItemDef, MenuSurvivorsClothingUI.filteredItems[num + num2].m_unQuantity, MenuSurvivorsClothingUI.filteredItems[num + num2].m_itemId.m_SteamItemInstanceID);
                        MenuSurvivorsClothingBoxUI.viewItem(MenuSurvivorsClothingUI.filteredItems[num + num2].m_iDefinition.m_SteamItemDef, MenuSurvivorsClothingUI.filteredItems[num + num2].m_unQuantity, MenuSurvivorsClothingUI.filteredItems[num + num2].m_itemId.m_SteamItemInstanceID);
                        MenuSurvivorsClothingBoxUI.open();
                        MenuSurvivorsClothingUI.close();
                    }
                    else
                    {
                        Characters.package(MenuSurvivorsClothingUI.filteredItems[num + num2].m_itemId.m_SteamItemInstanceID);
                    }
                }
                else
                {
                    MenuSurvivorsClothingItemUI.viewItem(MenuSurvivorsClothingUI.filteredItems[num + num2].m_iDefinition.m_SteamItemDef, MenuSurvivorsClothingUI.filteredItems[num + num2].m_unQuantity, MenuSurvivorsClothingUI.filteredItems[num + num2].m_itemId.m_SteamItemInstanceID);
                    MenuSurvivorsClothingItemUI.open();
                    MenuSurvivorsClothingUI.close();
                }
            }
        }
Esempio n. 2
0
 private static void onClickedUseButton(SleekButton button)
 {
     if (MenuSurvivorsClothingItemUI.packageBox.itemAsset == null)
     {
         return;
     }
     if (MenuSurvivorsClothingItemUI.packageBox.itemAsset.type == EItemType.BOX)
     {
         MenuSurvivorsClothingBoxUI.viewItem(MenuSurvivorsClothingItemUI.item, MenuSurvivorsClothingItemUI.quantity, MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingBoxUI.open();
         MenuSurvivorsClothingItemUI.close();
     }
     else
     {
         Characters.package(MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingItemUI.viewItem();
     }
 }
 // Token: 0x06003748 RID: 14152 RVA: 0x00182500 File Offset: 0x00180900
 private static void onClickedUseButton(SleekButton button)
 {
     if (MenuSurvivorsClothingItemUI.packageBox.itemAsset != null && MenuSurvivorsClothingItemUI.packageBox.itemAsset.type == EItemType.KEY)
     {
         MenuSurvivorsClothingUI.setFilter(EEconFilterMode.STAT_TRACKER, MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingUI.open();
         MenuSurvivorsClothingItemUI.close();
     }
     else if (MenuSurvivorsClothingItemUI.packageBox.itemAsset != null && MenuSurvivorsClothingItemUI.packageBox.itemAsset.type == EItemType.BOX)
     {
         MenuSurvivorsClothingBoxUI.viewItem(MenuSurvivorsClothingItemUI.item, MenuSurvivorsClothingItemUI.quantity, MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingBoxUI.open();
         MenuSurvivorsClothingItemUI.close();
     }
     else
     {
         Characters.package(MenuSurvivorsClothingItemUI.instance);
         MenuSurvivorsClothingItemUI.viewItem();
     }
 }
Esempio n. 4
0
        // Token: 0x06002A36 RID: 10806 RVA: 0x00106B0C File Offset: 0x00104F0C
        private void onClickedMouse()
        {
            if (!MenuSurvivorsClothingUI.active && !MenuSurvivorsClothingItemUI.active)
            {
                return;
            }
            Ray        ray = MainCamera.instance.ScreenPointToRay(Input.mousePosition);
            RaycastHit raycastHit;

            Physics.Raycast(ray, out raycastHit, 64f, RayMasks.CLOTHING_INTERACT);
            if (raycastHit.transform != null)
            {
                if (raycastHit.transform.CompareTag("Player"))
                {
                    ELimb limb = DamageTool.getLimb(raycastHit.transform);
                    if (limb == ELimb.LEFT_FOOT || limb == ELimb.LEFT_LEG || limb == ELimb.RIGHT_FOOT || limb == ELimb.RIGHT_LEG)
                    {
                        if (Characters.active.packagePants != 0UL)
                        {
                            Characters.package(Characters.active.packagePants);
                        }
                    }
                    else if ((limb == ELimb.LEFT_HAND || limb == ELimb.LEFT_ARM || limb == ELimb.RIGHT_HAND || limb == ELimb.RIGHT_ARM || limb == ELimb.SPINE) && Characters.active.packageShirt != 0UL)
                    {
                        Characters.package(Characters.active.packageShirt);
                    }
                }
                else if (raycastHit.transform.CompareTag("Enemy"))
                {
                    if (raycastHit.transform.name == "Hat")
                    {
                        if (Characters.active.packageHat != 0UL)
                        {
                            Characters.package(Characters.active.packageHat);
                        }
                    }
                    else if (raycastHit.transform.name == "Glasses")
                    {
                        if (Characters.active.packageGlasses != 0UL)
                        {
                            Characters.package(Characters.active.packageGlasses);
                        }
                    }
                    else if (raycastHit.transform.name == "Mask")
                    {
                        if (Characters.active.packageMask != 0UL)
                        {
                            Characters.package(Characters.active.packageMask);
                        }
                    }
                    else if (raycastHit.transform.name == "Vest")
                    {
                        if (Characters.active.packageVest != 0UL)
                        {
                            Characters.package(Characters.active.packageVest);
                        }
                    }
                    else if (raycastHit.transform.name == "Backpack" && Characters.active.packageBackpack != 0UL)
                    {
                        Characters.package(Characters.active.packageBackpack);
                    }
                }
                if (MenuSurvivorsClothingItemUI.active)
                {
                    MenuSurvivorsClothingItemUI.viewItem();
                }
            }
        }