Esempio n. 1
0
        /// <summary>
        /// 初始装备信息栏,添加信息prefab
        /// </summary>
        /// <param name="itemFielInfo">Item fiel info.</param>

        public void Show(ItemFielInfo itemFielInfo, bool isEquiptItem, bool isLeftPos)
        {
            Btn_PathLink.gameObject.SetActive(false);
            ISShowing              = true;
            this.m_curGoodID       = itemFielInfo.LocalItemData._goodID;
            this.m_curItemFielInfo = itemFielInfo;
            jewel = ItemDataManager.Instance.GetItemData(m_curGoodID) as Jewel;

            SetTitleColor(jewel._ColorLevel, LanguageTextManager.GetString(itemFielInfo.LocalItemData._szGoodsName));
            Background_spr.ChangeSprite(jewel._ColorLevel + 1);
            JewelType.ChangeSprite(jewel.StoneType + 1);
            JewelLevel.SetText(itemFielInfo.materiel.ESTORE_FIELD_LEVEL);
            ItemPriceLabel.SetText(jewel._SaleCost);
            JewelPosition.SetText(ItemInfoTips_Jewel.getJewelPosion(jewel.StonePosition, "、"));
            if (itemFielInfo.materiel.ESTORE_FIELD_LEVEL == jewel.MaxLevel)
            {
                ProgressText.SetText("[fe768b]满级[-]");
                ProgressSlider.sliderValue = 1;
            }
            else
            {
                ProgressText.SetText(itemFielInfo.materiel.ESTORE_FIELD_EXP + "/" + jewel.StoneExp [itemFielInfo.materiel.ESTORE_FIELD_LEVEL - 1]);
                ProgressSlider.sliderValue = (float)itemFielInfo.materiel.ESTORE_FIELD_EXP / (float)jewel.StoneExp [itemFielInfo.materiel.ESTORE_FIELD_LEVEL - 1];
            }
            IconPos.ClearChild();
            CreatObjectToNGUI.InstantiateObj(itemFielInfo.LocalItemData._picPrefab, IconPos);
            CreatAttribute(itemFielInfo);
            TweenShow();
        }
Esempio n. 2
0
        /// <summary>
        /// 检测是否满级
        /// </summary>
        /// <returns></returns>
        public bool CheckIsFullLevel(ItemFielInfo itemFileInfo)
        {
            bool flag = false;

            //flag = itemFileInfo.equipmentEntity.EQUIP_FIELD_SOPHISTICATION_LEVEL >= CommonDefineManager.Instance.CommonDefineFile._dataTable.RefiningLevel;
            return(flag);
        }
Esempio n. 3
0
 public void Show(ItemFielInfo selectItem, GoodsOperateArtificePanel myParent)
 {
     gameObject.SetActive(true);
     transform.localPosition = new Vector3(290, -86, -50);
     this.SelectItem         = selectItem;
     this.MyParent           = myParent;
 }
Esempio n. 4
0
        void Init()
        {
            Grid.ClearChild();
            MyItemList.Clear();
            SelectItemList.Clear();
            List <ItemFielInfo> packItemList = ContainerInfomanager.Instance.GetPackItemList().Where(p => (!p.GetIfBesetJewel(1)) && (!p.GetIfBesetJewel(2)) && (p.LocalItemData._TradeFlag == 1)).ToList();

            // 所有已装备的装备本地信息
            List <EquipmentData> equipedDataList = new List <EquipmentData>();

            ContainerInfomanager.Instance.GetEquiptItemList().ApplyAllItem(P => equipedDataList.Add(P.LocalItemData as EquipmentData));

            packItemList.Sort((left, right) => {
                bool leftCanSelectFast  = IsCanFastSelect(left.LocalItemData, equipedDataList);
                bool rightCanSelectFast = IsCanFastSelect(right.LocalItemData, equipedDataList);

                if (leftCanSelectFast && !rightCanSelectFast)
                {
                    return(-1);
                }
                else if (!leftCanSelectFast && rightCanSelectFast)
                {
                    return(1);
                }
                else
                {
                    if (left.sSyncContainerGoods_SC.nPlace < right.sSyncContainerGoods_SC.nPlace)
                    {
                        return(-1);
                    }
                    else if (left.sSyncContainerGoods_SC.nPlace == right.sSyncContainerGoods_SC.nPlace)
                    {
                        return(0);
                    }
                    else
                    {
                        return(1);
                    }
                }
            });
            for (int i = 0; i < ContainerInfomanager.Instance.GetAllPackMaxNum(); i++)
            {
                int        indexX = i % 4;
                int        indexY = i / 4;
                GameObject newObj = CreatObjectToNGUI.InstantiateObj(SinglePackItemPrefab, Grid);
                newObj.transform.localScale    = new Vector3(0.85f, 0.85f, 1);
                newObj.transform.localPosition = new Vector3(-136 + 90 * indexX, 140 - 94 * indexY, 0);
                SinglePackItemSlot newItemSlot     = newObj.GetComponent <SinglePackItemSlot>();
                ItemFielInfo       newItemFielInfo = packItemList.Count > i?packItemList[i]:null;
                newItemSlot.Init(newItemFielInfo, false, SinglePackItemSlot.ItemStatus.Sell, OnItemCLick);
                MyItemList.Add(newItemSlot);

                //引导注入
                if (newItemFielInfo != null)
                {
                    newObj.RegisterBtnMappingId(newItemFielInfo.LocalItemData._goodID, UIType.Package, BtnMapId_Sub.Package_Cell);
                }
            }
            //UpdateSellBtnStatus();
        }
Esempio n. 5
0
        TextColor GetNameLabelColor(ItemFielInfo itemFielInfo)
        {
            //TraceUtil.Log(string.Format("显示物品:{0},品质:{1}",itemFielInfo.LocalItemData._goodID,itemFielInfo.LocalItemData._ColorLevel));
            TextColor labelColor = TextColor.white;

            switch (itemFielInfo.LocalItemData._ColorLevel)
            {
            case 0:
                //labelColor = Color.green;
                //labelColor = new Color(47,119,25);
                labelColor = TextColor.EquipmentGreen;
                break;

            case 1:
                //labelColor = Color.blue;
                //labelColor = new Color(0,162,255);
                labelColor = TextColor.EquipmentBlue;
                break;

            case 2:
                //labelColor = Color.magenta;
                //labelColor = new Color(215,75,255);
                labelColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                //labelColor = Color.yellow;
                //labelColor = new Color(255,198,0);
                labelColor = TextColor.EquipmentYellow;
                break;
            }
            return(labelColor);
        }
Esempio n. 6
0
 public void Show(ItemFielInfo itemFielInfo)
 {
     this.m_curGoodID       = itemFielInfo.LocalItemData._goodID;
     this.m_curItemFielInfo = itemFielInfo;
     m_MedicamentData       = ItemDataManager.Instance.GetItemData(m_curGoodID) as MedicamentData;
     Show(m_MedicamentData, false);
 }
Esempio n. 7
0
        public new void Init(ItemFielInfo itemFileInfo)
        {
            base.Init(itemFileInfo);
            if (itemFileInfo == null)
            {
                LevelLabel.SetText("");
                AddLevelLabel.SetText("");
                UpgradIcon.gameObject.SetActive(false);
                return;
            }
            EquipmentData itemData = itemFileInfo.LocalItemData as EquipmentData;

            LevelLabel.SetText(itemData._AllowLevel);
            if (itemData.UpgradeID != 0)
            {
                int targetLevel = ItemDataManager.Instance.GetItemData(itemData.UpgradeID)._AllowLevel;
                UpgradIcon.SetActive(true);
                AddLevelLabel.SetText(targetLevel - itemData._AllowLevel);
            }
            else
            {
                UpgradIcon.SetActive(false);
                AddLevelLabel.SetText("");
            }
        }
Esempio n. 8
0
        void InitPassiveSkill()
        {
            ResetGrid();
            List <PassiveSkillData> passiveSkillDataList = new List <PassiveSkillData>();

            foreach (var child in ContainerInfomanager.Instance.GetSSyncContainerGoods_SCList(1))
            {
                ItemFielInfo equiptItem = ContainerInfomanager.Instance.itemFielArrayInfo.SingleOrDefault(P => P.sSyncContainerGoods_SC.uidGoods == child.uidGoods);
                if (equiptItem != null && equiptItem.LocalItemData._GoodsClass == 1)
                {
//                    if (equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID1 != 0)
//                    {
//                        TraceUtil.Log(equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID1 + "," + equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_VALUE1);
//                        passiveSkillDataList.Add(PassiveSkillDataBase._dataTable.First(P => P.SkillID == equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID1 &&
//                            P.SkillLevel == equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_VALUE1));
//                    }
//                    if (equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID2 != 0)
//                    {
//                        passiveSkillDataList.Add(PassiveSkillDataBase._dataTable.First(P => P.SkillID == equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID2 &&
//                            P.SkillLevel == equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_VALUE2));
//                    }
//                    if (equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID3 != 0)
//                    {
//                        passiveSkillDataList.Add(PassiveSkillDataBase._dataTable.First(P => P.SkillID == equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_ID3 &&
//                            P.SkillLevel == equiptItem.equipmentEntity.EQUIP_FIELD_SKILL_VALUE3));
//                    }
                }
            }
            for (int i = 0; i < passiveSkillDataList.Count; i++)
            {
                HeroInfoPanel_SinglePassiveSkillItem passiveSkillItem = CreatObjectToNGUI.InstantiateObj(SinglePassiveSkillItemPrefab, CreatSkillItemTransForm).GetComponent <HeroInfoPanel_SinglePassiveSkillItem>();
                passiveSkillItem.Show(passiveSkillDataList[i]);
                passiveSkillItem.transform.localPosition = new Vector3(0, -130 - 60 * i, 0);
            }
        }
Esempio n. 9
0
        public void Show(ItemFielInfo itemFielInfo, bool isEquiptItem, bool isLeftPos, bool ShowPathLinkBtn)
        {
            ISShowing = true;
            bool CanSale = true;

            IsShowEquiptItem = isEquiptItem;
            TitleLabel.SetText(LanguageTextManager.GetString(isEquiptItem?"IDS_I3_57":"IDS_I3_58"));

            if (ShowPathLinkBtn)
            {
                CanSale = false;
                Init(itemFielInfo, isLeftPos, CanSale);
                Btn_PathLink.gameObject.SetActive(true);
                transform.localPosition = Vector3.zero;
                foreach (var item in MyPanelList)
                {
                    item.alpha = 1;
                }
            }
            else
            {
                CanSale = true;
                Init(itemFielInfo, isLeftPos, itemFielInfo.LocalItemData._TradeFlag == 1);
                Btn_PathLink.gameObject.SetActive(false);
                TweenShow();
            }
        }
Esempio n. 10
0
    public void SetUpgradeAddValue(ItemFielInfo itemfileInfo)
    {
        ItemFielInfo NextLevelItem = new ItemFielInfo((itemfileInfo.LocalItemData as EquipmentData).UpgradeID);

        if (NextLevelItem != null)
        {
            int nextValue1    = Convert.ToInt32(EquipItem.GetItemInfoDetail(NextLevelItem, EquipInfoType.Prop1Value));
            int CurrentValue1 = Convert.ToInt32(EquipItem.GetItemInfoDetail(itemfileInfo, EquipInfoType.Prop1Value));
            if (nextValue1 > CurrentValue1)
            {
                Lable_nxtValue1.gameObject.SetActive(true);
                Lable_nxtValue1.SetText("+" + (nextValue1 - CurrentValue1));
            }
            else
            {
                Lable_nxtValue1.gameObject.SetActive(false);
            }

            int nextValue2    = Convert.ToInt32(EquipItem.GetItemInfoDetail(NextLevelItem, EquipInfoType.Prop2Value));
            int CurrentValue2 = Convert.ToInt32(EquipItem.GetItemInfoDetail(itemfileInfo, EquipInfoType.Prop2Value));
            if (nextValue2 > CurrentValue2)
            {
                Lable_nxtValue2.gameObject.SetActive(true);
                Lable_nxtValue2.SetText("+" + (nextValue2 - CurrentValue2));
            }
            else
            {
                Lable_nxtValue2.gameObject.SetActive(false);
            }
        }
        else
        {
            Lable_nxtValue2.gameObject.SetActive(false);
        }
    }
Esempio n. 11
0
    public void  SetItemLevel(UpgradeType type, ItemFielInfo itemfileInfo)
    {
        string         text  = "";
        EquiptSlotType place = (EquiptSlotType)itemfileInfo.sSyncContainerGoods_SC.nPlace;

        switch (type)
        {
        case UpgradeType.Strength:
            text = string.Format(LanguageTextManager.GetString("IDS_I3_85"), PlayerDataManager.Instance.GetEquipmentStrengthLevel(place));
            text = UI.NGUIColor.SetTxtColor(text, TextColor.yellow);
            break;

        case UpgradeType.StarUp:
            int level = PlayerDataManager.Instance.GetEquipmentStarLevel(place);
            int temp  = level - 1;
            int par   = temp / 10;
            int star  = (temp % 10) + 1;
            if (level > 0)
            {
                text = string.Format(LanguageTextManager.GetString(StarLeveNameDic[par]), star);
            }


            break;

        case UpgradeType.Upgrade:
            text = string.Format(LanguageTextManager.GetString("IDS_I3_86"), itemfileInfo.LocalItemData._AllowLevel);
            text = UI.NGUIColor.SetTxtColor(text, TextColor.yellow);
            break;
        }
        lable_Level.SetText(text);
    }
Esempio n. 12
0
    public void Init(UpgradeRequire upgradeRequire)
    {
        ItemFielInfo itemfileinfo = new ItemFielInfo(upgradeRequire.GoodsId);

        iconItem.Init(itemfileinfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileinfo.LocalItemData._szGoodsName), (TextColor)itemfileinfo.LocalItemData._ColorLevel));
        if (upgradeRequire.GoodsId == 3050001)
        {
            if (upgradeRequire.Count <= ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire))
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(upgradeRequire.Count, TextColor.green));
            }
            else
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(upgradeRequire.Count, TextColor.red));
            }
        }
        else
        {
            if (upgradeRequire.Count <= ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire))
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire) + "/" + upgradeRequire.Count, TextColor.green));
            }
            else
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire) + "/" + upgradeRequire.Count, TextColor.red));
            }
        }
    }
Esempio n. 13
0
        public override void Show(ItemFielInfo itemFielInfo)
        {
//            MyItemfileInfo = itemFielInfo;
//            EffectLabel1.ShowEffect(itemFielInfo,0);
//            EffectLabel2.ShowEffect(itemFielInfo,1);
//            //int currentLv = PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL;
//            CreatItemIconPoint.ClearChild();
//            CreatObjectToNGUI.InstantiateObj(itemFielInfo.LocalItemData._picPrefab, CreatItemIconPoint);
//
//            string ItemName = LanguageTextManager.GetString(itemFielInfo.LocalItemData._szGoodsName);
//            int StrengLevel = itemFielInfo.equipmentEntity.EQUIP_FIELD_STRONGE_LEVEL;
//            this.ItemNameLabel.SetText(NGUIColor.SetTxtColor(StrengLevel > 0 ? string.Format("{0}+{1}", ItemName, StrengLevel) : ItemName, GetNameLabelColor(itemFielInfo)));
//            ItemDesLabel.SetText(LanguageTextManager.GetString(itemFielInfo.LocalItemData._szDesc));
//
//            LevelLabel.SetText(string.Format("[9bfc3b]{0}[-]{1}",itemFielInfo.LocalItemData._AllowLevel, LanguageTextManager.GetString("IDS_H1_156")));
//            //LevelLabel.color = currentLv >= itemFielInfo.LocalItemData._AllowLevel ? Color.green : Color.red;
//            PriceLabel.SetText(itemFielInfo.LocalItemData._SaleCost);
//            ProfessionLabel.SetText(GetProfession(itemFielInfo.LocalItemData._AllowProfession));
//            OperateArtificeLabel.SetText(string.Format("[9bfc3b]{0}[-]{1}", itemFielInfo.equipmentEntity.EQUIP_FIELD_SOPHISTICATION_LEVEL, LanguageTextManager.GetString("IDS_H1_156")));
//            PassiveSkillData pasSkill01 = GetPassiveData(itemFielInfo.equipmentEntity.EQUIP_FIELD_SKILL_ID1, itemFielInfo.equipmentEntity.EQUIP_FIELD_SKILL_VALUE1);
//            PassiveSkillLabelList[0].ShowEffect(pasSkill01);
//            PassiveSkillData pasSkill02 = GetPassiveData(itemFielInfo.equipmentEntity.EQUIP_FIELD_SKILL_ID2, itemFielInfo.equipmentEntity.EQUIP_FIELD_SKILL_VALUE2);
//            PassiveSkillLabelList[1].ShowEffect(pasSkill02);
//            PassiveSkillData pasSkill03 = GetPassiveData(itemFielInfo.equipmentEntity.EQUIP_FIELD_SKILL_ID3, itemFielInfo.equipmentEntity.EQUIP_FIELD_SKILL_VALUE3);
//            PassiveSkillLabelList[2].ShowEffect(pasSkill03);
//            TransitionItem.transform.localPosition = TransitionItemPos[pasSkill01 == null?0:(pasSkill02 == null?1:(pasSkill03 == null?2:3))];
//            transform.localPosition = Vector3.zero;
        }
Esempio n. 14
0
        public void Show(ItemFielInfo itemFielInfo)
        {
            Init();
            //transform.localPosition = new Vector3(-204,0,50);
            this.itemFielInfo = itemFielInfo;
            CreatItemPoint.ClearChild();
            GameObject skillIcon = NGUITools.AddChild(CreatItemPoint.gameObject, itemFielInfo.LocalItemData._picPrefab);

            skillIcon.transform.localScale = new Vector3(90, 90, 1);
            if (itemFielInfo.LocalItemData._GoodsClass == 2)
            {
                btnLabel.text = LanguageTextManager.GetString("IDS_I31_3");
                titleGoods.SetActive(true);
                titleEquip.SetActive(false);
            }
            else
            {
                btnLabel.text = LanguageTextManager.GetString("IDS_I31_1");
                titleEquip.SetActive(true);
                titleGoods.SetActive(false);
            }

            /*SingleContainerBox singleContainerBox = CreatObjectToNGUI.InstantiateObj(DragItemPrefab, CreatItemPoint).GetComponent<SingleContainerBox>();
             * singleContainerBox.collider.enabled = false;
             * singleContainerBox.gameObject.layer = 26;
             * singleContainerBox.gameObject.GetChildTransforms().ApplyAllItem(P => P.gameObject.layer = 26);
             * singleContainerBox.Background.ChangeSprite(0);
             * //singleContainerBox.ViewAtbButton.gameObject.SetActive(false);
             * singleContainerBox.Init(itemFielInfo, SingleContainerBoxType.HeroEquip);
             */
        }
Esempio n. 15
0
        /// <summary>
        /// 物品能否装备
        /// </summary>
        /// <param name="itemFielInfo"></param>
        /// <returns></returns>
        public EquipButtonType GetEquipItemStatus(ItemFielInfo itemFielInfo)
        {
            //print("EquipItemChild");
            int ItemEquipLevel = itemFielInfo.LocalItemData._AllowLevel;
            int HeroLevel      = PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL;

            string[] ItemVocation = itemFielInfo.LocalItemData._AllowProfession.Split('+');
            int      HeroVocation = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION;

            if (HeroLevel >= ItemEquipLevel)
            {
                foreach (string child in ItemVocation)
                {
                    int Vocation = int.Parse(child);
                    if (Vocation == 5 || HeroVocation == Vocation)
                    {//装备
                        return(EquipButtonType.CanEquip);
                    }
                }
                //职业不符
                return(EquipButtonType.ProfesionNotEnough);
            }
            else
            {
                //等级不符
                return(EquipButtonType.LVNotEnough);
            }
        }
Esempio n. 16
0
    public static float GetNextLevelEquipForce(ItemFielInfo itemfielInfo, UpgradeType type)
    {
        float force = 0;

        if (type == UpgradeType.Strength)
        {
            var effectData  = ItemDataManager.Instance.GetEffectData(GetEffNameOrValue(itemfielInfo.LocalItemData as EquipmentData, 0, true));
            int value       = HeroAttributeScale.GetScaleAttribute(effectData, nextStrengthLevelValue(itemfielInfo, 0));
            var effectData1 = ItemDataManager.Instance.GetEffectData(GetEffNameOrValue(itemfielInfo.LocalItemData as EquipmentData, 1, true));
            int value1      = HeroAttributeScale.GetScaleAttribute(effectData, nextStrengthLevelValue(itemfielInfo, 1));
            force = value * effectData.CombatPara / 1000.0f + value1 * effectData1.CombatPara / 1000.0f;
        }
        else if (type == UpgradeType.StarUp)
        {
            var effectData  = ItemDataManager.Instance.GetEffectData(GetEffNameOrValue(itemfielInfo.LocalItemData as EquipmentData, 0, true));
            int value       = HeroAttributeScale.GetScaleAttribute(effectData, nextStarUpLevelValue(itemfielInfo, 0));
            var effectData1 = ItemDataManager.Instance.GetEffectData(GetEffNameOrValue(itemfielInfo.LocalItemData as EquipmentData, 1, true));
            int value1      = HeroAttributeScale.GetScaleAttribute(effectData, nextStarUpLevelValue(itemfielInfo, 1));
            force = value * effectData.CombatPara / 1000.0f + value1 * effectData1.CombatPara / 1000.0f;
        }
        else
        {
            GetEquipForce(itemfielInfo);
        }
        return(force);
    }
Esempio n. 17
0
 public void Init(ItemFielInfo SelectEuqItemfielInfo, int Place)
 {
     Button_Beset.SetMyButtonActive(true);
     CurrentItemFileInfo = SelectEuqItemfielInfo;
     EquipID             = SelectEuqItemfielInfo.sSyncContainerGoods_SC.uidGoods;
     this.place          = Place;
     StartCoroutine(RefreshList(JewelState.JewelBeset));
     //����
     if (ItemList != null)
     {
         ItemList.ApplyAllItem(P =>
         {
             if (P != null)
             {
                 P.gameObject.RegisterBtnMappingId(P.ItemFielInfo.LocalItemData._goodID, UIType.Gem, BtnMapId_Sub.Gem_ChoseJewelContainerListPanel_Item
                                                   , NoticeToDragSlerp, P.DragAmount);
             }
         });
     }
     if (m_noticeToDragAmount != 0)
     {
         StartCoroutine(DragAmountSlerp(m_noticeToDragAmount));
         m_noticeToDragAmount = 0;
     }
 }
Esempio n. 18
0
 public void Show(ItemFielInfo selectItem, EquipmentUpgradePanel myParent)
 {
     MyParent = myParent;
     UpdateItemList();
     OnMyItemClick(selectItem);
     base.TweenShow();
 }
Esempio n. 19
0
        public void OnMyItemClick(object obj)
        {
            ItemFielInfo selectIteminfo = obj as ItemFielInfo;

            MyItemList.ApplyAllItem(C => C.SetSelectStatus(selectIteminfo));
            MyParent.OnItemSelect(selectIteminfo);
        }
Esempio n. 20
0
    void SetAddValue(ItemFielInfo itemfileInfo, bool isNormal)
    {
        string value1 = EquipItem.GetItemInfoDetail(itemfileInfo, EquipInfoType.Prop1Add, isNormal);

        if (value1 == "+0")
        {
            Lable_nxtValue1.gameObject.SetActive(false);
        }
        else
        {
            Lable_nxtValue1.gameObject.SetActive(true);
            Lable_nxtValue1.SetText(value1);
        }
        string value2 = EquipItem.GetItemInfoDetail(itemfileInfo, EquipInfoType.Prop2Add, isNormal);

        if (value2 == "+0")
        {
            Lable_nxtValue2.gameObject.SetActive(false);
        }
        else
        {
            Lable_nxtValue2.gameObject.SetActive(true);
            Lable_nxtValue2.SetText(value2);
        }
    }
Esempio n. 21
0
        public void Show(ItemFielInfo itemFielInfo)
        {
            //TraceUtil.Log("ShowTips");
            CloseTips();
            switch (itemFielInfo.LocalItemData._GoodsClass)
            {
            case 1:
                if (equipmentTips == null)
                {
                    equipmentTips = CreatObjectToNGUI.InstantiateObj(EquipmentContainerTipsPrefab, TipsPos).GetComponent <ContainerTips_Equipment>();
                }
                equipmentTips.Show(itemFielInfo);
                break;

            case 2:
                if (medicineTips == null)
                {
                    medicineTips = CreatObjectToNGUI.InstantiateObj(MedicineConteinrTipsPrefab, TipsPos).GetComponent <ContainerTips_Medicine>();
                }
                medicineTips.Show(itemFielInfo);
                break;

            case 3:
                if (materialTips == null)
                {
                    materialTips = CreatObjectToNGUI.InstantiateObj(MaterialContainerTipsPrefab, TipsPos).GetComponent <ContainerTips_Materiel>();
                }
                materialTips.Show(itemFielInfo);
                break;
            }
        }
Esempio n. 22
0
    /// <summary>
    /// 计算主属性名称
    /// </summary>
    /// <returns>The main pro name.</returns>
    /// <param name="itemFielInfo">Item fiel info.</param>
    /// <param name="index">Index.</param>
    private static string GetMainProName(ItemFielInfo itemFielInfo, int index)
    {
        int    mainProId;
        string mainProName = string.Empty;

        if (itemFielInfo != null)
        {
            EquipmentEntity equipmentEntity = itemFielInfo.equipmentEntity;

            switch (index)
            {
            case 1:
                mainProId = equipmentEntity.EQUIP_FIELD_EFFECTBASE0;
                var mainEffect1 = ItemDataManager.Instance.EffectDatas._effects.SingleOrDefault(P => P.m_IEquipmentID == mainProId);
                mainProName = mainEffect1.IDS;                  //命中
                break;

            case 2:
                mainProId = equipmentEntity.EQUIP_FIELD_EFFECTBASE1;
                var mainEffect2 = ItemDataManager.Instance.EffectDatas._effects.SingleOrDefault(P => P.m_IEquipmentID == mainProId);
                mainProName = mainEffect2.IDS;                //闪避
                break;
            }
        }
        return(LanguageTextManager.GetString(mainProName));
    }
Esempio n. 23
0
    public void Init(ItemFielInfo itemfileInfo)
    {
        IconItem.Init(itemfileInfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileInfo.LocalItemData._szGoodsName), (TextColor)itemfileInfo.LocalItemData._ColorLevel));
        Lable_position.SetText(EquipmentUpgradeDataManger.Instance.PositionDic[itemfileInfo.LocalItemData._GoodsSubClass]);
        Lable_Currentforce.SetText((int)EquipItem.GetEquipForce(itemfileInfo));
        int addforce = ((int)EquipItem.GetNextLevelEquipForce(itemfileInfo, UpgradeType.StarUp) - (int)EquipItem.GetEquipForce(itemfileInfo));

        if (addforce > 0)
        {
            Lable_addForce.gameObject.SetActive(true);
            Lable_addForce.SetText("+" + addforce);
        }
        else
        {
            Lable_addForce.gameObject.SetActive(false);
        }
        //Lable_strengthLevle.SetText(EquipmentUpgradeDataManger.Instance.GetStrengthLevel(itemfileInfo));
        int starLevel = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)itemfileInfo.sSyncContainerGoods_SC.nPlace);

        if (starLevel < CommonDefineManager.Instance.CommonDefine.StartStrengthLimit)
        {
            Eff_go.SetActive(true);
        }
        else
        {
            Eff_go.SetActive(false);
        }
        SetStarColor(starLevel);
    }
Esempio n. 24
0
        public void Init(ItemFielInfo itemfileInfo)
        {
            TotalExp = 0;
            SelectedJewelTotalExp.SetText(TotalExp);
            UpdateSwallowButton();
            this._itemFielInfo = itemfileInfo;
            Jewel jewel = ItemDataManager.Instance.GetItemData(itemfileInfo.LocalItemData._goodID) as Jewel;
            int   level = itemfileInfo.materiel.ESTORE_FIELD_LEVEL;

            LevelUPNeedExp.SetText(jewel.StoneExp[level - 1] - itemfileInfo.materiel.ESTORE_FIELD_EXP);
            StartCoroutine(RefreshList(JewelState.jewelChose_Upgrade));
            //引导
            if (ItemList != null)
            {
                ItemList.ApplyAllItem(P =>
                {
                    if (P != null)
                    {
                        P.gameObject.RegisterBtnMappingId(P.ItemFielInfo.LocalItemData._goodID, UIType.Gem, BtnMapId_Sub.Gem_SwallowContainerListPanel_Item
                                                          , NoticeToDragSlerp, P.DragAmount);
                    }
                });
            }
            if (m_noticeToDragAmount != 0)
            {
                StartCoroutine(DragAmountSlerp(m_noticeToDragAmount));
                m_noticeToDragAmount = 0;
            }
        }
Esempio n. 25
0
        /// <summary>
        /// 是否为最新时装
        /// </summary>
        public bool IsNewItem(ItemData itemData)
        {
            bool         flag    = false;
            ItemFielInfo getData = GetUnlockData(itemData);

            flag = getData != null && getData.equipmentEntity.ITEM_FIELD_VISIBLE_NEW == 0;
            return(flag);
        }
Esempio n. 26
0
        /// <summary>
        /// 计算普通强化主属性
        /// </summary>
        /// <param name="itemFielInfo"></param>
        /// <param name="index"></param>
        /// <returns></returns>
        private int NormalStrengthenNormalValue(ItemFielInfo itemFielInfo, int index)
        {
            ItemData        itemData        = itemFielInfo.LocalItemData;
            EquipmentEntity equipmentEntity = itemFielInfo.equipmentEntity;
            var             normalValue     = EquipMainProp(itemData, equipmentEntity, index, true, true);

            return(normalValue);
        }
Esempio n. 27
0
 public void TweenShow(ItemFielInfo selectItemFileInfo)
 {
     this.SelectItemFileInfo = selectItemFileInfo;
     IsShow = true;
     gameObject.SetActive(true);
     TweenScale.Begin(gameObject, 0.1f, transform.localScale, ShowScale, TweenShowComplete);
     UpdatePanel(null);
 }
Esempio n. 28
0
 public void ShowEquipmentUpgradePanel(ItemFielInfo selectItem)
 {
     if (m_EquipmentUpgradePanel == null)
     {
         m_EquipmentUpgradePanel = NewPanelPos.InstantiateNGUIObj(EquipmentUpgradPanelPrefab).GetComponent <EquipmentUpgradePanel>();
     }
     m_EquipmentUpgradePanel.Show(selectItem);
 }
Esempio n. 29
0
        void ShowItem(ItemFielInfo itemFielInfo)
        {
            CreatContainerBoxPoint.ClearChild();
            SingleContainerBox creatItem = CreatObjectToNGUI.InstantiateObj(ContainerBoxPrefab, CreatContainerBoxPoint).GetComponent <SingleContainerBox>();

            creatItem.Init(itemFielInfo, SingleContainerBoxType.HeroEquip);
            creatItem.SetDragComponentEnabel(CanDrag);
            MyItem = creatItem;
        }
Esempio n. 30
0
    /// <summary>
    /// 初始化处理,实例化(如果没有)。
    /// 初始化数据
    /// 动画
    /// </summary>
    public void Init(ItemFielInfo selectedItem)
    {
        if (m_createInstance)
        {
            m_createInstance    = false;
            m_euiqpListInstance = NGUITools.AddChild(gameObject, Prefab_EquipList);
            m_euiqpListInstance.transform.localPosition = Prefab_EquipList.transform.localPosition;
            m_equipListBehaviour = m_euiqpListInstance.GetComponent <EquipListBehaviour>();

            m_equipDetails = NGUITools.AddChild(gameObject, Prefab_EquipDetails);
            m_equipDetails.transform.localPosition = Prefab_EquipDetails.transform.localPosition;
            m_equipListBehaviour.CurrrEquipDetails = m_equipDetails.GetComponent <EquipDetails>();

            m_packRightBtnList = NGUITools.AddChild(gameObject, Prefab_PackRightBtnList);
            m_packRightBtnList.transform.localPosition = Prefab_PackRightBtnList.transform.localPosition;
            m_equipListBehaviour.PackRightBtnManager   = m_packRightBtnList.GetComponent <PackRightBtnManager>();

            m_equipListBehaviour.PackRightBtnManager.PackBtnOnClick = (packBtnType) =>
            {
                //点击处理(TODO)向服务器发送强化或升星请求
                TraceUtil.Log(SystemModel.Rocky, packBtnType.ToString());
                switch (packBtnType)
                {
                case PackBtnType.Package:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click");
                    MainUIController.Instance.OpenMainUI(UIType.Package);
                    break;

                case PackBtnType.Strength:
                    EquipStrength(packBtnType);
                    break;

                case PackBtnType.StarUpgrade:

                    EquipStrength(packBtnType);
                    break;

                case PackBtnType.QuickStrengthen:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Click");
                    MessageBox.Instance.Show(1, "", LanguageTextManager.GetString("IDS_I3_69"), LanguageTextManager.GetString("IDS_I3_71"), LanguageTextManager.GetString("IDS_I3_72"), () => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Confirm"); QuickEquipStrength(packBtnType); }, () => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Cancel"); MessageBox.Instance.CloseMsgBox(); });

                    break;

                case PackBtnType.QuickUpgradeStar:
                    SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Click");
                    MessageBox.Instance.Show(1, "", LanguageTextManager.GetString("IDS_I3_70"), LanguageTextManager.GetString("IDS_I3_71"), LanguageTextManager.GetString("IDS_I3_72"), () => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Confirm"); QuickEquipStrength(packBtnType); }, () => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Cancel"); MessageBox.Instance.CloseMsgBox(); });

                    break;
                }
            };
        }
        m_equipListBehaviour.Init(selectedItem);
        m_equipListBehaviour.ChangeStrenType(true);

        //引导代码
        StartCoroutine(RegisterRightBtn());
    }