예제 #1
0
        public void InitAttribute(ItemFielInfo itemFileInfo, JewelBset_ContainerItem item)
        {
            if (CurrentSelectJewelItem != null && CurrentSelectJewelItem.ItemFielInfo.LocalItemData._GoodsClass == 3)
            {
                if (CurrentSelectJewelItem.CanCancel)
                {
                    CurrentSelectJewelItem.OnLoseFocus();
                }
            }
            CurrentSelectJewelItem = item;
            if (itemFileInfo != null && itemFileInfo.LocalItemData._GoodsClass == 3 && itemFileInfo.LocalItemData._GoodsSubClass == 3)
            {
                NoneAttriture.SetActive(false);
                jewelAttriture.gameObject.SetActive(true);
                suitAttriture.gameObject.SetActive(true);
                jewelAttriture.Init(itemFileInfo, false);
                //if(itemFileInfo.)

                var ItemId = itemFileInfo.LocalItemData._goodID;
                var jewel  = ItemDataManager.Instance.GetItemData(ItemId) as Jewel;
                if (jewel.StoneGrop == 0)
                {
                    suitAttriture.gameObject.SetActive(false);
                }
                else
                {
                    suitAttriture.Init(itemFileInfo, true);
                    suitAttriture.gameObject.SetActive(true);
                }
            }
            else
            {
                NoneAttriture.SetActive(true);
                jewelAttriture.gameObject.SetActive(false);
                suitAttriture.gameObject.SetActive(false);
            }
        }
예제 #2
0
        public override void ItemSelectedEventHandle(JewelBset_ContainerItem selectedEquipItem)
        {
            int   cexp  = 0;
            Jewel jewel = ItemDataManager.Instance.GetItemData(selectedEquipItem.ItemFielInfo.LocalItemData._goodID) as Jewel;

            for (int i = 0; i < selectedEquipItem.ItemFielInfo.materiel.ESTORE_FIELD_LEVEL; i++)
            {
                int lexp = 0;
                for (int j = 0; j < selectedEquipItem.ItemFielInfo.materiel.ESTORE_FIELD_LEVEL - 1; j++)
                {
                    lexp += jewel.StoneExp[j];
                }
                cexp += lexp + selectedEquipItem.ItemFielInfo.materiel.ESTORE_FIELD_EXP;
            }

            float rate = ((float)jewel.StoneExpRate / 1000.0f);

            cexp = System.Convert.ToInt32(cexp * rate);
            if (SelectedItemList.Contains(selectedEquipItem))
            {
                selectedEquipItem.OnLoseFocus();
                SelectedItemList.Remove(selectedEquipItem);
                TotalExp -= cexp;
                //SelectedItemFileInfoList.Remove(selectedEquipItem.ItemFielInfo);
            }
            else
            {
                TotalExp += cexp;
                selectedEquipItem.OnGetFocus(true);
                SelectedItemList.Add(selectedEquipItem);
                //SelectedItemFileInfoList.Add(selectedEquipItem.ItemFielInfo);
            }
            SelectedJewelTotalExp.SetText(TotalExp);
            UpdateSwallowButton();
            //JewelBesetManager.GetInstance().InitBeset_Attribute(selectedEquipItem.ItemFielInfo);
            //StoreID=selectedEquipItem.ItemFielInfo.LocalItemData._goodID;
        }