Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | int[] fixedCounts = config.itemCount;
|
| | | for ( int i = 0; i < fixedCounts.Length; i++)
|
| | | {
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem,fixedIds[i]);
|
| | | var fixedId = fixedIds[i];
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(fixedId);
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
|
| | | int haveCount = playerPack.GetItemCountByID(packType,fixedIds[i]);
|
| | | if (haveCount < fixedCounts[i])
|
| | | {
|
| | | return false;
|
| | |
| | |
|
| | | return activeSuit != null || nextSuit != null;
|
| | | }
|
| | |
|
| | | public bool IsPlayStoneSuitEffect()
|
| | | {
|
| | | List<int> suitTypes = null;
|
| | | List<int> suitLvs = null;
|
| | | bool isActiveSuit = TryGetIsActiveStoneSuit(out suitTypes, out suitLvs);
|
| | | if (isActiveSuit)
|
| | | {
|
| | | for (int i = 0; i < suitTypes.Count; i++)
|
| | | {
|
| | | int suitType = suitTypes[i];
|
| | | int suitLv = suitLvs[i];
|
| | | bool isLocalSaveActiveSuit = IsLocalSaveActiveStoneSuit(suitType, suitLv);
|
| | | if (!isLocalSaveActiveSuit)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void StopPlayStoneSuitEffect(UIEffect effect,bool isSave = false)
|
| | | {
|
| | | if(!isSave)
|
| | | {
|
| | | if (effect.IsPlaying)
|
| | | {
|
| | | effect.Stop();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (effect.IsPlaying)
|
| | | {
|
| | | List<int> suitTypes = null;
|
| | | List<int> suitLvs = null;
|
| | | bool isActiveSuit = TryGetIsActiveStoneSuit(out suitTypes, out suitLvs);
|
| | | SetLockLocalSaveActiveStoneSuit(suitTypes, suitLvs);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | UpdatePlayerUI3DModel();
|
| | | UpdateFightPower();
|
| | | UpdateSuitBtnPlayerEffect();
|
| | | UpdateStoneSuitBtnPlayerEffect();
|
| | | TimeDownMgr.CoolTimeData data;
|
| | | if (TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.BagSort, out data))
|
| | | {
|
| | |
| | | UpdatePlayerUI3DModel();
|
| | | UpdateFightPower();
|
| | | UpdateSuitBtnPlayerEffect();
|
| | | UpdateStoneSuitBtnPlayerEffect();
|
| | | if (config != null)
|
| | | {
|
| | | UpdateSuitPlayerEffect(equipModel.GetJadeDynastyEquipPlace(index));
|
| | |
| | |
|
| | | private void UpdateStoneSuitBtnPlayerEffect(bool isSave = false)
|
| | | {
|
| | | List<int> suitTypes = null;
|
| | | List<int> suitLvs = null;
|
| | | bool isActiveSuit = equipModel.TryGetIsActiveStoneSuit(out suitTypes, out suitLvs);
|
| | | if (isActiveSuit)
|
| | | bool isPlay = equipModel.IsPlayStoneSuitEffect();
|
| | | if(isPlay && !isSave)
|
| | | {
|
| | | for (int i = 0; i < suitTypes.Count; i++)
|
| | | if (!stoneBtnEffect.IsPlaying)
|
| | | {
|
| | | int suitType = suitTypes[i];
|
| | | int suitLv = suitLvs[i];
|
| | | bool isLocalSaveActiveSuit = equipModel.IsLocalSaveActiveStoneSuit(suitType, suitLv);
|
| | | if (!isLocalSaveActiveSuit)
|
| | | {
|
| | | if (!stoneBtnEffect.IsPlaying)
|
| | | {
|
| | | stoneBtnEffect.Play();
|
| | | }
|
| | | break;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (stoneBtnEffect.IsPlaying)
|
| | | {
|
| | | stoneBtnEffect.Stop();
|
| | | }
|
| | | }
|
| | | stoneBtnEffect.Play();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (stoneBtnEffect.IsPlaying)
|
| | | {
|
| | | stoneBtnEffect.Stop();
|
| | | }
|
| | | }
|
| | |
|
| | | if (isSave && stoneBtnEffect.IsPlaying)
|
| | | {
|
| | | stoneBtnEffect.Stop();
|
| | | equipModel.SetLockLocalSaveActiveStoneSuit(suitTypes, suitLvs);
|
| | | equipModel.StopPlayStoneSuitEffect(stoneBtnEffect, isSave);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void ClickStoneAttr()
|
| | | {
|
| | | UpdateStoneSuitBtnPlayerEffect(true);
|
| | | WindowCenter.Instance.Open<JadeDynastyStoneSuitAttrWin>();
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | var itemId = equipData.items[index];
|
| | | var isBind = equipData.binds[index] == 1;
|
| | | var _isBind = equipData.binds[index];
|
| | | if (itemId != 0)
|
| | | {
|
| | | var _isBind = 0;
|
| | | m_GemHoles[index].m_GemEffect.Stop();
|
| | | if (model.inlayHole == index)
|
| | | {
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | // if (attrData.itemConfig.Type == 25 && attrData.itemConfig.Effect1 == 225)
|
| | | // {
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.inlay, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.ClickInlayBtn(ItemWinBtnType.inlay, attrData.guid); });
|
| | | // }
|
| | | if (attrData.itemConfig.Effect1 == 225)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.inlay, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.ClickInlayBtn(ItemWinBtnType.inlay, attrData.guid); });
|
| | | }
|
| | |
|
| | | // if (attrData.itemConfig.CanTrade == 1 && attrData.isBind == 0)
|
| | | // {
|
| | |
| | | #region 点击镶嵌按钮
|
| | | public void ClickInlayBtn(ItemWinBtnType btnType, string guid)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc2);
|
| | | ItemModel model = playerPack.GetItemModelByGUID(guid);
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(model.chinItemModel.Type);
|
| | | switch(packType)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.JadeDynastyGem304);
|
| | | break;
|
| | | default:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc2);
|
| | | break;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | case JumpUIType.EquipCompose296:
|
| | | case JumpUIType.EquipCompose297:
|
| | | case JumpUIType.EquipCompose298:
|
| | | case JumpUIType.ToolCompose305:
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | if(types.Length > 2)
|
| | | {
|
| | |
| | | SetJumpLogic<LootPreciousFrameWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.JadeDynastyEquip292:
|
| | | case JumpUIType.JadeDynastyGem304:
|
| | | SetJumpLogic<JadeDynastyKnapSackWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.LootPreciousFrameSpec:
|
| | |
| | | case JumpUIType.EquipCompose269:
|
| | | case JumpUIType.EquipCompose270:
|
| | | case JumpUIType.EquipCompose291:
|
| | | case JumpUIType.ToolCompose305:
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | if (types.Length > 0)
|
| | | {
|
| | |
| | | NewYearTour300 = 300, //2019春节巡礼
|
| | | NewYearTour301 = 301, //2019春节巡礼
|
| | | NewYearTour302 = 302, //2019春节巡礼
|
| | | FestivalRedBag303 = 303, //节日红包界面
|
| | | FestivalRedBag303 = 303, //节日红包界面
|
| | | JadeDynastyGem304 = 304, //诛仙宝石
|
| | | ToolCompose305 = 305, //诛仙附伤宝石合成
|
| | |
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| | | GyzTs = 1003,//鬼牙刃功法提升界面
|