Exemple #1
0
        void UpdateStatu()
        {
            CreatObjectToNGUI.InstantiateObj(MyItemFileInfo.LocalItemData._picPrefab, CreatItemIconPoint);
            QualityBackground.gameObject.SetActive(true);
            QualityBackground.ChangeSprite(MyItemFileInfo.LocalItemData._ColorLevel + 2);

            if (MyItemFileInfo.LocalItemData._GoodsClass == 1)
            {
                switch (GetBestItem.GetEquipItemStatus(MyItemFileInfo))
                {
                case EquipButtonType.CanEquip:
//					var strengLevel = EquipItem.GetItemInfoDetail(MyItemFileInfo,EquipInfoType.EquipStrenLevel);
//					if(strengLevel!="+0")
//					{
//						StrengthenLevelLabel.gameObject.SetActive(true);
//						StrengthenLevelLabel.SetButtonText(strengLevel);
//
//					}
//                        var StartLevel= EquipItem.GetItemInfoDetail(MyItemFileInfo,EquipInfoType.EquipStarLevel);
//                        if(StartLevel!="0")
//                        {
//
//                            EquiptStartSprite.ChangeSprite(int.Parse(StartLevel));
//                        }
                    break;

                case EquipButtonType.LVNotEnough:

                    NeedLabel.gameObject.SetActive(true);
                    NeedLabel.SetButtonText(string.Format(LanguageTextManager.GetString("IDS_I1_22"), MyItemFileInfo.LocalItemData._AllowLevel));
                    break;

                case EquipButtonType.ProfesionNotEnough:
                    NeedLabel.gameObject.SetActive(true);
                    NeedLabel.SetButtonText(GetVocation());
                    break;
                }
            }

            if (MyItemFileInfo.sSyncContainerGoods_SC.byNum > 1)
            {
                ItemNumLabel.gameObject.SetActive(true);
                ItemNumLabel.SetButtonText(MyItemFileInfo.sSyncContainerGoods_SC.byNum.ToString());
            }
//            //第一个判断是“是装备”,第二个判断是“两个孔都有器魂”,第三个判断是“第一个器魂与第二个器魂不是相同id的”,第四/五个判断是“器魂套装id不等于0且第一个套装id等于第二个套装id”,
//            if(MyItemFileInfo.LocalItemData._GoodsClass==1&&(MyItemFileInfo.GetIfBesetJewel(1)&&MyItemFileInfo.GetIfBesetJewel(2))&&MyItemFileInfo.GetJewelIndex(1)!=MyItemFileInfo.GetJewelIndex(2)&& MyItemFileInfo.GetJewel(1).StoneGrop!=0&&MyItemFileInfo.GetJewel(1).StoneGrop==MyItemFileInfo.GetJewel(2).StoneGrop)
//			{
//				ShowBesetjewelEff();
//			}
//			else
//			{
//				HideBesetjewelEff();
//			}
            if (MyItemFileInfo.LocalItemData._GoodsClass == 3 && MyItemFileInfo.LocalItemData._GoodsSubClass == 3)     //器魂
            {
                NeedLabel.gameObject.SetActive(true);
                NeedLabel.SetButtonText("Lv." + MyItemFileInfo.materiel.ESTORE_FIELD_LEVEL);              //临时
            }
        }
Exemple #2
0
 void GetBestItemList()
 {
     BestItemList.Clear();
     foreach (EquiptSlotType child in Enum.GetValues(typeof(EquiptSlotType)))
     {
         if (child == EquiptSlotType.Medicine)
         {
             continue;
         }
         var bestItem = GetBestItem.GetBestItemInPlace(child);
         if (bestItem != null)
         {
             BestItemList.Add(child, bestItem);
         }
     }
 }
Exemple #3
0
        void OnButtonClick(PackBtnType clickBtnType)
        {
            if (!HasClik)
            {
                HasClik = true;
                switch (clickBtnType)
                {
                case PackBtnType.Sell:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_PackageSaleItem");

                    List <ItemFielInfo> sellItemList = new List <ItemFielInfo>()
                    {
                        CurrentItem
                    };
                    MyParent.m_SellItemConfirmPanel.SellItem(sellItemList);

                    break;

                case PackBtnType.PutOn:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_PackageWearEquipment");
                    switch (GetBestItem.GetEquipItemStatus(CurrentItem))
                    {
                    case EquipButtonType.CanEquip:
                        EquiptItem();
                        break;

                    case EquipButtonType.LVNotEnough:
                        MessageBox.Instance.ShowTips(1, LanguageTextManager.GetString("IDS_I1_28"), 1);
                        break;

                    case EquipButtonType.ProfesionNotEnough:
                        MessageBox.Instance.ShowTips(1, LanguageTextManager.GetString("IDS_I1_27"), 1);
                        break;
                    }

                    break;

                case PackBtnType.PutOff:
                {
                    if (ContainerInfomanager.Instance.PackIsFull())
                    {
                        MessageBox.Instance.ShowTips(2, LanguageTextManager.GetString("IDS_I3_76"), 1.5f);
                    }
                    else
                    {
                        UnEquipItem();
                    }
                }
                break;

                case PackBtnType.Strength:
                    MainUIController.Instance.OpenMainUI(UIType.EquipmentUpgrade, UpgradeType.Strength, CurrentItem);
                    break;

                case PackBtnType.StarUpgrade:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                    MainUIController.Instance.OpenMainUI(UIType.EquipmentUpgrade, UpgradeType.StarUp, CurrentItem);
                    break;

                case PackBtnType.Upgrade:
                    MainUIController.Instance.OpenMainUI(UIType.EquipmentUpgrade, UpgradeType.Upgrade, CurrentItem);
                    break;

                case PackBtnType.Diamond:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                    MainUIController.Instance.OpenMainUI(UIType.Gem, JewelState.JewelBeset, CurrentItem);
                    break;

                case PackBtnType.Swallow:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                    MainUIController.Instance.OpenMainUI(UIType.Gem, JewelState.JewelUpgrad, CurrentItem);
                    break;

                default:
                    break;
                }
                Close(null);
            }
        }