예제 #1
0
        void OnItemClick(JewelBset_ContainerItem selectedEquipItem)
        {
            if (selectedEquipItem != null && selectedEquipItem.ItemFielInfo != null)
            {
                JewelBesetManager.GetInstance().InitBeset_Attribute(selectedEquipItem.ItemFielInfo, selectedEquipItem);

                selectedEquipItem.OnGetFocus(false);
            }
        }
예제 #2
0
 public virtual void ItemSelectedEventHandle(JewelBset_ContainerItem selectedEquipItem)
 {
     //所有项LoseFocus
     ItemList.ApplyAllItem(P => P.OnLoseFocus());
     SelectedItemList.Clear();
     //当前项GetFocus
     selectedEquipItem.OnGetFocus(false);
     SelectedItemList.Add(selectedEquipItem);
 }
예제 #3
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;
        }