Esempio n. 1
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. 2
0
        /// <summary>
        /// 显示经脉介绍文字
        /// </summary>
        public void ShowMeridiansDesInfo(int MeridiansID, bool IsUnlock, string needAddNumber)
        {
            if (MeridiansID == 0)
            {
                MeridiansDesLabel.gameObject.SetActive(false);
                return;
            }
            MeridiansDesLabel.gameObject.SetActive(true);
            PlayerMeridiansData playerMeridiansData = PlayerMeridiansDataManager.GetMeridiansData(MeridiansID);
            string meridiansName = LanguageTextManager.GetString(playerMeridiansData.KongfuName);

            string[]   addEffect  = playerMeridiansData.EffectAdd.Split('+');
            EffectData effectData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == addEffect[0]);
            string     addEffName = LanguageTextManager.GetString(effectData.IDS);
            string     addEffNum  = NGUIColor.SetTxtColor(HeroAttributeScale.GetScaleAttribute(effectData, int.Parse(addEffect[1])), TextColor.white);

            if (!IsUnlock)
            {
                needAddNumber = needAddNumber == "0" ? playerMeridiansData.LevelUpNeed.ToString() : needAddNumber;
                needAddNumber = NGUIColor.SetTxtColor(needAddNumber, TextColor.white);
                MeridiansDesLabel.Show(meridiansName, addEffName, addEffNum, needAddNumber);
            }
            else
            {
                MeridiansDesLabel.Show(meridiansName, addEffName, addEffNum);
            }
        }
Esempio n. 3
0
 void Start()
 {
     EquipBtn.SetCallBackFuntion(OnEquipBtnClick);
     QuitBtn.ApplyAllItem(P => P.SetCallBackFuntion(ClosePanelEvent));
     //UIEventManager.Instance.RegisterUIEvent(UIEventType.OpentMainUI, Close);
     CurrentAtkNumber = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);
 }
Esempio n. 4
0
//        void TweenShowPanel01Value02(object obj)
//        {
//            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields");
//            TweenFloat.Begin(TweenAnimTime,0,this.sMSGEctypeSettleAccounts.dwKillPercent,SetDoubleKillLabel,TweenShowPanel01Value03);
//        }
//        void SetDoubleKillLabel(float value)
//        {
//            DoubleKillLabel.SetText((int)value);
//            DoubleKillSlider.sliderValue = value / 100f;
//        }

        void TweenShowPanel01Value03(object obj)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_AppraisalFields");
            int atk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            TweenFloat.Begin(TweenAnimTime, 0, atk, SetForceLabel, null);
            DoForTime.DoFunForTime(TweenAnimTime, TweenShowPanel02Value01, null);
        }
Esempio n. 5
0
        void UpdateHeroAttribute()
        {
            NameLabel.SetText(PlayerManager.Instance.FindHeroDataModel().Name);
            int newAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            ForceLabel.SetText(newAtk);
            Levellabel.SetText(string.Format("Lv:{0}", PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL));
        }
Esempio n. 6
0
        void UpdateLabel()
        {
            int atk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            MyAtkForceLabel.SetButtonText(atk.ToString());
            SeggesionForcelabel.SetButtonText(CurrentSelectEctypeContaienrData.FightingCapacity.ToString());
            JoinTackLabel.spriteSwith.ChangeSprite(CurrentSelectEctypeContaienrData.lCostType);
            JoinTackLabel.SetButtonText(CurrentSelectEctypeContaienrData.lCostEnergy);
        }
Esempio n. 7
0
    public static float GetEquipForce(ItemFielInfo itemfielInfo)
    {
        var effectData  = ItemDataManager.Instance.GetEffectData(GetEffNameOrValue(itemfielInfo.LocalItemData as EquipmentData, 0, true));
        int value       = HeroAttributeScale.GetScaleAttribute(effectData, StrengthenMainValue(itemfielInfo, 0));
        var effectData1 = ItemDataManager.Instance.GetEffectData(GetEffNameOrValue(itemfielInfo.LocalItemData as EquipmentData, 1, true));
        int value1      = HeroAttributeScale.GetScaleAttribute(effectData, StrengthenMainValue(itemfielInfo, 1));
        var force       = value * effectData.CombatPara / 1000.0f + value1 * effectData1.CombatPara / 1000.0f;

        return(force);
    }
Esempio n. 8
0
        void UpdateAttribute()
        {
            RoleAttributePanel.ShowAttributePanelInfo();
            var m_HeroDataModel = PlayerManager.Instance.FindHeroDataModel();

            ExpLabel.SetText(string.Format("{0}/{1}", m_HeroDataModel.PlayerValues.PLAYER_FIELD_EXP, m_HeroDataModel.PlayerValues.PLAYER_FIELD_NEXT_LEVEL_EXP));
            ExpSliderBar.sliderValue = (float)m_HeroDataModel.PlayerValues.PLAYER_FIELD_EXP / (float)m_HeroDataModel.PlayerValues.PLAYER_FIELD_NEXT_LEVEL_EXP;
            VocationSprite.ChangeSprite(m_HeroDataModel.PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION);
            int newAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            AtkLabel.SetText(newAtk);
            ShowSirenItem();
        }
Esempio n. 9
0
        public void Show(ItemData selectFashionData, FashionPanel_V3 fashionPanel)
        {
            //CreatTitleIconPoint.ClearChild();
            //CreatObjectToNGUI.InstantiateObj(selectFashionData._picPrefab, CreatTitleIconPoint);
            //TitleSpriteSwith.ChangeSprite(seleteFashionBtn.DataToSpriteID(seleteFashionBtn.MyFashionData));
            SingleAtbPanelList.ApplyAllItem(P => P.Close());
            this.MyParent = fashionPanel;
            NamePos.ClearChild();
            NamePos.InstantiateNGUIObj(selectFashionData.DisplayBig_prefab);
            this.LevelLabel.SetText(selectFashionData._Level);
            EquipmentData itemdata = selectFashionData as EquipmentData;

            string[] neweffects     = itemdata._vectEffects.Split('|');
            string[] currentEffects = MyParent.CurrentMaxFashionData == null ? null : MyParent.CurrentMaxFashionData._vectEffects.Split('|');
            int      forceNum       = 0;

            for (int i = 0; i < neweffects.Length; i++)
            {
                bool   IsUp          = false;
                string currentEffect = currentEffects == null ? string.Empty : currentEffects.FirstOrDefault(P => P.Split('+')[0] == neweffects[i].Split('+')[0]);
                IsUp = string.IsNullOrEmpty(currentEffect);
                string[]   newEffectsStr = neweffects[i].Split('+');
                EffectData effectdata    = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == newEffectsStr[0]);
                string     newEffectName = LanguageTextManager.GetString(effectdata.IDS);
                int        newAddNumber  = HeroAttributeScale.GetScaleAttribute(newEffectName, int.Parse(newEffectsStr[1]));
                //string[] currentEffectsStr = currentEffects.FirstOrDefault(P=>P);

                int currentNumber = 0;
                if (!IsUp)
                {
                    string[] curef             = currentEffect.Split('+');
                    var      currentEffectData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == curef[0]);
                    currentNumber = HeroAttributeScale.GetScaleAttribute(currentEffectData, int.Parse(curef[1]));
                    //if (newAddNumber > currentNumber)
                    //{
                    //    IsUp = true;
                    //}
                    //else
                    //{
                    //    newAddNumber = currentNumber;
                    //}
                }
                SingleAtbPanelList[i].Show(effectdata, currentNumber, newAddNumber);
                forceNum += newAddNumber;
            }
            int newAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, forceNum);

            ForceLabel.SetText(newAtk);
        }
Esempio n. 10
0
        public void AddNumber(EffectData effectData, int AddNumber)
        {
            //TraceUtil.Log("显示增加属性:"+LanguageTextManager.GetString(effectData.IDS)+",Number:"+AddNumber);
            if (myEffectData.BaseProp != effectData.BaseProp)
            {
                return;
            }
            AddNumber               = HeroAttributeScale.GetScaleAttribute(effectData, AddNumber);
            CurrentAddNumber       += AddNumber;
            this.AtbIcon.spriteName = effectData.EffectRes;
            string AtbName = LanguageTextManager.GetString(effectData.IDS);

            StbLabel.SetText(AtbName);
            AddStbNumberLabel.SetText(CurrentAddNumber);
        }
Esempio n. 11
0
        public void Init(SMsgTradeOpenShopGoodsInfo_SC sMsgTradeOpenShopGoodsInfo_SC, ShopGoodsListPanel_V2 MyParent)
        {
            ////TODO GuideBtnManager.Instance.RegGuideButton(this.gameObject, UIType.ShopInfo, SubType.ShopInfoGoodItem, out m_guideBtnID);
            OverlayLabel.SetText("");
            this.MyParent = MyParent;
            this.sMsgTradeOpenShopGoodsInfo_SC = sMsgTradeOpenShopGoodsInfo_SC;
            Effect01.gameObject.SetActive(false);
            Effect02.gameObject.SetActive(false);
            this.LocalGoodsData = ItemDataManager.Instance.GetItemData((int)sMsgTradeOpenShopGoodsInfo_SC.dGoodsID);
            NameLabel.text      = GetGoodsName(LocalGoodsData);
            AllowLvLabel.SetButtonText(LocalGoodsData._AllowLevel.ToString());
            CreatItemIconPoint.ClearChild();
            CreatObjectToNGUI.InstantiateObj(LocalGoodsData._picPrefab, CreatItemIconPoint);
            //var AddString = LocalGoodsData('+');
            //var EfferData = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_SzName == AddString[0]);
            switch ((BoxItemType)LocalGoodsData._GoodsClass)
            {
            case BoxItemType.Equipment:
                var AddString = (LocalGoodsData as EquipmentData)._vectEffects.Split('|');
                for (int i = 0; i < AddString.Length; i++)
                {
                    var efferData = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_SzName == AddString[i].Split('+')[0]);
                    if (i == 0)
                    {
                        Effect01.gameObject.SetActive(true);
                        Effect01.SetButtonText(HeroAttributeScale.GetScaleAttribute(efferData, int.Parse(AddString[i].Split('+')[1])).ToString());
                        Effect01.SetButtonBackground(efferData.EffectRes);
                    }
                    else if (i == 1)
                    {
                        Effect02.gameObject.SetActive(true);
                        Effect02.SetButtonText(HeroAttributeScale.GetScaleAttribute(efferData, int.Parse(AddString[i].Split('+')[1])).ToString());
                        Effect02.SetButtonBackground(efferData.EffectRes);
                    }
                }
                break;

            case BoxItemType.Materien:
                OverlayLabel.SetText(string.Format("x{0}", LocalGoodsData._PileQty));
                break;

            case BoxItemType.Medicament:
                OverlayLabel.SetText(string.Format("x{0}", LocalGoodsData._PileQty));
                break;
            }
            FlashBackground();
        }
Esempio n. 12
0
        public void ShowEffect(ItemFielInfo itemFielInfo, int EffectIndex)
        {
            EffectData      effectData      = null;
            EquipmentEntity equipmentEntity = itemFielInfo.equipmentEntity;

            switch (EffectIndex)
            {
            case 0:
                effectData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_IEquipmentID == equipmentEntity.EQUIP_FIELD_EFFECTBASE0);
                break;

            case 1:
                effectData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_IEquipmentID == equipmentEntity.EQUIP_FIELD_EFFECTBASE1);
                break;
            }
            EffectIcon.spriteName = effectData.EffectRes;
            EffectLabel.SetText(HeroAttributeScale.GetScaleAttribute(effectData, NormalStrengthenNormalValue(itemFielInfo, EffectIndex)));
        }
Esempio n. 13
0
        void ShowAtkInfo()
        {
            int NewAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            if (CurrentAtkNumber >= NewAtk)
            {
                CurrentAtkNumber = NewAtk;
                return;
            }
            //TraceUtil.Log("刷新人物信息");
            var addAtkNum = NewAtk - CurrentAtkNumber;
            var heroPos   = PlayerManager.Instance.FindHero().transform.position + new Vector3(CommonDefineManager.Instance.CommonDefine.HitNumber_VectorX, CommonDefineManager.Instance.CommonDefine.HitNumber_VectorY, CommonDefineManager.Instance.CommonDefine.HitNumber_VectorZ);

            PopupTextController.SettleResult(heroPos, addAtkNum.ToString(), FightEffectType.TOWN_EFFECT_ZHANLI, false);

            CurrentAtkNumber   = NewAtk;
            m_isShowZhanLiAnim = false;
        }
Esempio n. 14
0
        void SetPanelAttribute(EctypeContainerData ectypeData)
        {
            string[] addEffectStr = ectypeData.TrialsAward.Split('|');
            Dictionary <int, int> addEffectList = new Dictionary <int, int>();

            foreach (var child in addEffectStr)
            {
                string[]   str     = child.Split('+');
                EffectData addData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == str[0]);
                addEffectList.Add(addData.BasePropView, int.Parse(str[1]));
            }
            foreach (var child in SingleAtrributeLsit)
            {
                int addNumber = 0;
                addEffectList.TryGetValue(child.EffectBasePropID, out addNumber);
                addNumber = HeroAttributeScale.GetScaleAttribute(child.EffectBasePropID, addNumber);
                child.ResetInfo(addNumber.ToString());
            }
        }
Esempio n. 15
0
        public void Show()
        {
            isShow = true;
            gameObject.SetActive(true);
            UIType[] enabelUIType = UIDataManager.Instance.InitMainButtonList.First(P => P._EnableIndex == GameManager.Instance.MainButtonIndex)._MainButtonList;
            for (int i = 0; i < MissionFailData.MissionFailDataTable.Length; i++)
            {
                bool isActive = enabelUIType.FirstOrDefault(P => P == MissionFailData.MissionFailDataTable[i].BtnType) != UIType.Empty;
                MissionFailBtnList[i].SetBtnActive(MissionFailData.MissionFailDataTable[i], this, isActive);
            }
            var m_HeroDataModel = PlayerManager.Instance.FindHeroDataModel();

            LevelLabel.SetText(m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL);
            int NewAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            ForceLabel.SetText(NewAtk);
            MoneyLabel.SetText(m_HeroDataModel.PlayerValues.PLAYER_FIELD_HOLDMONEY);
            EnergyLabel.SetText(m_HeroDataModel.PlayerValues.PLAYER_FIELD_CURRENCY_ACTIVELIFE);
        }
Esempio n. 16
0
        public void ShowEffect(ItemFielInfo itemFielInfo, int EffectIndex)
        {
            EffectData      selectEffectData       = null;
            EquipmentEntity selectEquipmentEntity  = itemFielInfo.equipmentEntity;
            EffectData      currentEffectData      = null;
            var             equipItem              = ContainerInfomanager.Instance.GetSSyncContainerGoods_SCList(1).FirstOrDefault(P => P.nPlace == int.Parse((itemFielInfo.LocalItemData as EquipmentData)._vectEquipLoc) && P.uidGoods != 0);
            ItemFielInfo    currentItemfile        = ContainerInfomanager.Instance.itemFielArrayInfo.FirstOrDefault(P => P.sSyncContainerGoods_SC.uidGoods == equipItem.uidGoods);
            EquipmentEntity currentEquipmentEntity = currentItemfile == null?new EquipmentEntity(): currentItemfile.equipmentEntity;
            bool            haveEquipItem          = equipItem.uidGoods != 0;

            switch (EffectIndex)
            {
            case 0:
                selectEffectData  = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_IEquipmentID == selectEquipmentEntity.EQUIP_FIELD_EFFECTBASE0);
                currentEffectData = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_IEquipmentID == currentEquipmentEntity.EQUIP_FIELD_EFFECTBASE0);
                break;

            case 1:
                selectEffectData  = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_IEquipmentID == selectEquipmentEntity.EQUIP_FIELD_EFFECTBASE1);
                currentEffectData = ItemDataManager.Instance.EffectDatas._effects.FirstOrDefault(P => P.m_IEquipmentID == currentEquipmentEntity.EQUIP_FIELD_EFFECTBASE1);
                break;
            }
            bool effectAtive = selectEffectData != null || currentEffectData != null;

            gameObject.SetActive(effectAtive);
            TraceUtil.Log(string.Format("设置主属性{0}显示:{1}", EffectIndex, effectAtive.ToString()));
            if (effectAtive == false)
            {
                return;
            }
            EffectIcon.spriteName = selectEffectData == null?currentEffectData.EffectRes: selectEffectData.EffectRes;
            EffectNameLabel.SetText(LanguageTextManager.GetString(selectEffectData == null?currentEffectData.IDS:selectEffectData.IDS));
            CurrentEffectLabel.SetText(currentEffectData == null ? 0 : HeroAttributeScale.GetScaleAttribute(selectEffectData, NormalStrengthenNormalValue(currentItemfile, EffectIndex)));
            int addEffectNumber = (selectEffectData == null ? 0 : HeroAttributeScale.GetScaleAttribute(selectEffectData, NormalStrengthenNormalValue(itemFielInfo, EffectIndex))) - int.Parse(CurrentEffectLabel.text);

            AddEffectLabel.SetText(addEffectNumber < 0 ? string.Format("[f73232]{0}[-]", addEffectNumber.ToString()) : string.Format("[9bfc3b]+{0}[-]", addEffectNumber));
            AddEffectLabel.color = addEffectNumber < 0 ? Color.red : Color.green;
            //TraceUtil.Log(string.Format("设置显示的属性:{0}>{1}",CurrentEffectLabel.text,SelectEffectLabel.text));
        }
Esempio n. 17
0
        void InitialShowAttributePanelInfoFuntion()
        {
            var m_HeroDataModel = PlayerManager.Instance.FindHeroDataModel();

            //RoleAtbList[RoleAttributeType.MaxHP].ResetInfo(GetRoleValue(25, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXHP));
            //RoleAtbList[RoleAttributeType.MaxMP].ResetInfo(GetRoleValue(26, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXMP));
            //RoleAtbList[RoleAttributeType.ATK].ResetInfo(GetRoleValue(30, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_ATTACK));
            //RoleAtbList[RoleAttributeType.DEF].ResetInfo(GetRoleValue(31, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_DEFEND));
            //RoleAtbList[RoleAttributeType.HIT].ResetInfo(GetRoleValue(32, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_NICETY));
            //RoleAtbList[RoleAttributeType.EVA].ResetInfo(GetRoleValue(29, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_JOOK));
            //RoleAtbList[RoleAttributeType.Crit].ResetInfo(GetRoleValue(27, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_BURST));
            //RoleAtbList[RoleAttributeType.ResCrit].ResetInfo(GetRoleValue(28, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_UNBURST));
            RoleAtbList[RoleAttributeType.MaxHP].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_MaxHp, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXHP).ToString());
            RoleAtbList[RoleAttributeType.MaxMP].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_MaxMP, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_MAXMP).ToString());
            RoleAtbList[RoleAttributeType.ATK].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_ATK, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_ATTACK).ToString());
            RoleAtbList[RoleAttributeType.DEF].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_DEF, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_DEFEND).ToString());
            RoleAtbList[RoleAttributeType.HIT].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_HIT, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_NICETY).ToString());
            RoleAtbList[RoleAttributeType.EVA].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_EVA, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_JOOK).ToString());
            RoleAtbList[RoleAttributeType.Crit].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Crit, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_BURST).ToString());
            RoleAtbList[RoleAttributeType.ResCrit].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_ResCrit, m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitInvisibleValue.UNIT_FIELD_UNBURST).ToString());
            //RoleAtbList[RoleAttributeType.Force].ResetInfo(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat,m_HeroDataModel.UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING).ToString());
        }
Esempio n. 18
0
        /// <summary>
        /// 显示战力信息
        /// </summary>
        void ShowAtkInfo()
        {
            int NewAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING);

            if (CurrentAtkNumber == NewAtk)
            {
                return;
            }
            //TraceUtil.Log("刷新人物信息");
            if (IsFirstShow)
            {
                IsFirstShow = false;
                AtkLabel.SetText(NewAtk);
            }
            else
            {
                if (NewAtk > CurrentAtkNumber)
                {
                    StartCoroutine(ShowAddAtkAnim(NewAtk - CurrentAtkNumber));
                }
                TweenFloat.Begin(1, CurrentAtkNumber, NewAtk, SetAtkLabel);
            }
            CurrentAtkNumber = NewAtk;
        }
Esempio n. 19
0
    public static string GetItemInfoDetail(ItemFielInfo itemFileInfo, EquipInfoType equipInfoType, bool isNormal)
    {
        string result   = string.Empty;
        var    EffName0 = GetEffNameOrValue(itemFileInfo.LocalItemData as EquipmentData, 0, true);
        var    EffName1 = GetEffNameOrValue(itemFileInfo.LocalItemData as EquipmentData, 1, true);

        if (itemFileInfo != null)
        {
            switch (equipInfoType)
            {
            case EquipInfoType.EquipName:
                result = GetEquipName(itemFileInfo);
                break;

            case EquipInfoType.EquipStrenLevel:
                if (itemFileInfo.sSyncContainerGoods_SC.uidGoods != 0)
                {
                    result = "+" + PlayerDataManager.Instance.GetEquipmentStrengthLevel((EquiptSlotType)int.Parse((itemFileInfo.LocalItemData as EquipmentData)._vectEquipLoc)).ToString();
                }
                else
                {
                    result = "+0";
                }
                break;

            case EquipInfoType.EquipStarLevel:
                if (itemFileInfo.sSyncContainerGoods_SC.uidGoods != 0)
                {
                    result = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)int.Parse((itemFileInfo.LocalItemData as EquipmentData)._vectEquipLoc)).ToString();
                }
                break;

            case EquipInfoType.EquipStarColorIndex:
                result = GetEquipStarIndex(itemFileInfo).ToString();
                break;

            case EquipInfoType.Prop1IconName:

                if (!string.IsNullOrEmpty(EffName0))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName0);
                    if (effectData != null)
                    {
                        result = effectData.EffectRes;
                    }
                }
                break;

            case EquipInfoType.Prop1Name:
                if (!string.IsNullOrEmpty(EffName0))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName0);
                    result = LanguageTextManager.GetString(effectData.IDS);
                }
                break;

            case EquipInfoType.Prop1Value:
                if (!string.IsNullOrEmpty(EffName0))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName0);
                    result = HeroAttributeScale.GetScaleAttribute(effectData, StrengthenMainValue(itemFileInfo, 0)).ToString();                    // string.Format("{0}+{1}", NormalStrengthenNormalValue(ItemFielInfo, 0), NormalStrengthenAddValue(ItemFielInfo, 0));
                }
                break;

            case EquipInfoType.Prop1Add:
                if (!string.IsNullOrEmpty(EffName0))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName0);
                    result = "+" + HeroAttributeScale.GetScaleAttribute(effectData, (int)StrengthenAddValue(itemFileInfo, 0, isNormal));                 // string.Format("{0}+{1}", NormalStrengthenNormalValue(ItemFielInfo, 0), NormalStrengthenAddValue(ItemFielInfo, 0));
                }
                break;

            case EquipInfoType.Prop1TotalAdd:
                if (!string.IsNullOrEmpty(EffName0))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName0);
                    //总属性-基础属性
                    result = "+" + HeroAttributeScale.GetScaleAttribute(effectData, StrengthenMainValue(itemFileInfo, 0) - int.Parse(GetEffNameOrValue(itemFileInfo.LocalItemData as EquipmentData, 0, false)));
                }
                break;

            case EquipInfoType.Prop2IconName:
                if (!string.IsNullOrEmpty(EffName1))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName1);
                    if (effectData != null)
                    {
                        result = effectData.EffectRes;
                    }
                }
                break;

            case EquipInfoType.Prop2Name:
                if (!string.IsNullOrEmpty(EffName1))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName1);
                    result = LanguageTextManager.GetString(effectData.IDS);
                }
                break;

            case EquipInfoType.Prop2Value:
                if (!string.IsNullOrEmpty(EffName1))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName1);
                    result = HeroAttributeScale.GetScaleAttribute(effectData, StrengthenMainValue(itemFileInfo, 1)).ToString();
                }
                break;

            case EquipInfoType.Prop2Add:
                if (!string.IsNullOrEmpty(EffName1))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName1);
                    result = "+" + HeroAttributeScale.GetScaleAttribute(effectData, (int)StrengthenAddValue(itemFileInfo, 1, isNormal)).ToString();
                }
                break;

            case EquipInfoType.Prop2TotalAdd:
                if (!string.IsNullOrEmpty(EffName1))
                {
                    var effectData = ItemDataManager.Instance.GetEffectData(EffName1);
                    //总属性-基础属性
                    result = "+" + HeroAttributeScale.GetScaleAttribute(effectData, StrengthenMainValue(itemFileInfo, 1) - int.Parse(GetEffNameOrValue(itemFileInfo.LocalItemData as EquipmentData, 1, false)));
                }
                break;

            case EquipInfoType.Prop1MainAdd:
                result = "+" + GetNorMalMainProAdd(itemFileInfo, 0).ToString();
                break;

            case EquipInfoType.Prop1StarAdd:
                result = "+" + GetNormalMainProAddForStar(itemFileInfo, 0).ToString();
                break;

            case EquipInfoType.Prop2MainAdd:
                result = "+" + GetNorMalMainProAdd(itemFileInfo, 1).ToString();
                break;

            case EquipInfoType.Prop2StarAdd:
                result = "+" + GetNormalMainProAddForStar(itemFileInfo, 1).ToString();
                break;
            }
        }
        return(result);
    }
Esempio n. 20
0
        //选择女妖调用
        void SirenBeSelectedHandle(int sirenId)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_Default");
            //安全判断
            if (m_SirenItemDict.ContainsKey(sirenId) == false)
            {
                TraceUtil.Log(SystemModel.Common, TraceLevel.Error, "sirenId is null");
                return;
            }
            //更新当前选择的妖女id
            m_CurSelectedSirenItemID = sirenId;

            //选择框
            //if (m_BeSelectedSirenItem == null)
            //{
            //    m_BeSelectedSirenItem = (GameObject)Instantiate(BeSelectedSirenItem);
            //}
            //m_BeSelectedSirenItem.transform.parent = m_SirenItemDict[sirenId].transform;
            //m_BeSelectedSirenItem.transform.localPosition = Vector3.zero;
            //m_BeSelectedSirenItem.transform.localScale = Vector3.one;

            //获得妖女配置信息
            var playerSirenConfigData = m_SirenItemDict[sirenId].GetPlayerSirenConfigData();
            var sirenData             = m_SirenItemDict[sirenId].GetSirenConfigData();

            SirenDataManager.Instance.CurSelectSiren = m_SirenItemDict [sirenId];

            //重置默认对白信息
            ResetDefaultDialogConfigData(playerSirenConfigData._defaultWordCd, sirenData._defaultWord);

            if (m_SirenItemDict[sirenId].IsUnlock())//解锁
            {
                //界面
                Interface_Lock.SetActive(false);
                Interface_Unlock.SetActive(true);
                Button_Lock.SetActive(false);

                //显示进度
                Label_Process.text = m_SirenItemDict[sirenId].GetProcessValue();
                //显示花费
                Label_RefineryCost.text = sirenData._growthCost.ToString();
                //显示打坐
                Label_Meditation.transform.parent.gameObject.SetActive(true);
                Label_Meditation.text = sirenData._sitEffect + "%";

                //TraceUtil.Log("[选择妖女]is maxLevel = " + m_SirenItemDict[sirenId].IsMaxLevel());
                //满级 置灰按钮
                if (m_SirenItemDict[sirenId].IsMaxLevel())
                {
                    Button_Refinery.SetEnabled(false);
                    RefineryComplete.SetActive(true);
                    RefineryCost.SetActive(false);
                    //出现打坐加成提示
                    Label_SitExplanation.text = LanguageTextManager.GetString(sirenData._sitEffectTips);
                }
                else
                {
                    Button_Refinery.SetEnabled(true);
                    RefineryComplete.SetActive(false);
                    RefineryCost.SetActive(true);
                }

                //内丹
                Label_NeiDanNum.text = sirenData._refiningItem_itemNum.ToString();
                SetCollectionNedanButtonCDTime();
            }
            else//未解锁
            {
                //界面
                Interface_Lock.SetActive(true);
                Interface_Unlock.SetActive(false);

                //判断道具是否足够
                int itemNum = UI.MainUI.ContainerInfomanager.Instance.GetItemNumber(playerSirenConfigData._composeCost_itemID);
                if (itemNum < playerSirenConfigData._composeCost_itemNum)
                {
                    ///道具不足
                    Button_Lock.SetActive(true);
                    Button_Unlock.gameObject.SetActive(false);
                    Swith_EffUnlock.gameObject.SetActive(false);
                    Label_NeedItemNum.color = Color.red;
                }
                else
                {
                    Button_Lock.SetActive(false);
                    Button_Unlock.gameObject.SetActive(true);
                    Swith_EffUnlock.gameObject.SetActive(true);
                    InvokeRepeating("EffUnlockFlashing", 0, EffUnlockFlashTime);
                    Label_NeedItemNum.color = Color.green;
                }

                //不显示打坐
                Label_Meditation.transform.parent.gameObject.SetActive(false);

                //显示需要道具
                //var itemData = ItemDataManager.Instance.GetItemData(playerSirenConfigData._composeCost_itemID);
                //Sprite_Item.spriteName = itemData.smallDisplay;
                Label_NeedItemNum.text = itemNum.ToString() + "/" + playerSirenConfigData._composeCost_itemNum.ToString();
                //道具来源说明
                Label_Explanation.text = LanguageTextManager.GetString(playerSirenConfigData._unlockTips);
            }
            //显示模型
            ViewControl_Siren.ShowSiren(sirenId, sirenData);

            //显示属性加成信息
            var sirenGrowthEffectList = m_SirenItemDict[sirenId].GetSirenGrowthEffect();
            int growthItemLength      = sirenGrowthEffectList.Count;

            for (int i = 0; i < 3; i++)
            {
                if (i >= growthItemLength)
                {
                    AddAttributeParent[i].SetActive(false);
                }
                else
                {
                    AddAttributeParent[i].SetActive(true);

                    Sprite_AddAttribute[i].spriteName = sirenGrowthEffectList[i].EffectData.EffectRes;
                    Label_AddAttributeName[i].text    = LanguageTextManager.GetString(sirenGrowthEffectList[i].EffectData.IDS);
                    Label_AddAttributeValue[i].text   = HeroAttributeScale.GetScaleAttribute(sirenGrowthEffectList[i].EffectData, sirenGrowthEffectList[i].GrowthEffectValue).ToString();
                }
            }

            //显示奥义
            Label_Upanishads.text = sirenData._sirenPower.ToString();

            //收集数量、炼妖进度、奥义、打坐信息位置重置
            Label_Process.transform.parent.position     = ProcessPos[growthItemLength + 1].position;
            Label_NeedItemNum.transform.parent.position = ProcessPos[growthItemLength + 1].position;
            Label_Upanishads.transform.parent.position  = ProcessPos[growthItemLength].position;
            Label_Meditation.transform.parent.position  = ProcessPos[growthItemLength + 2].position;

            //关闭对话框
            DialogManager_Siren.CloseDialogImmediately();

            //显示名字
            Sprite_SirenName.spriteName = playerSirenConfigData._nameRes;

            //消除残留炼化结果
            if (gEffRefineryResult != null)
            {
                Destroy(gEffRefineryResult);
            }
        }
Esempio n. 21
0
    public void Show(EffectData effectData, int AddNumber)
    {
        string AddInfo = string.Format("{0}+{1}", LanguageTextManager.GetString(effectData.IDS), HeroAttributeScale.GetScaleAttribute(effectData, AddNumber));

        AddInfoLabel.SetText(AddInfo);
        MoveUp();
        ScaleBig();
    }
Esempio n. 22
0
 /// <summary>
 ///获取玩家战力
 /// </summary>
 /// <returns>The hero force.</returns>
 public int GetHeroForce()
 {
     return(HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING));
 }