| System/FindPrecious/DemonJarAutoChallenge.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/EquipDevourWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/PackModelInterface.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/OpenServerActivity/FlashRushToBuyCoolDown.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmBossShow.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/RoleParticulars/RoleParticularModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Team/TeamPrepareWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/FindPrecious/DemonJarAutoChallenge.cs
@@ -60,6 +60,8 @@ timer = 0f; var bossIds = findPreciousModel.GetBossSubscribes(); var maxLevelBoss = 0; var maxLevel = 0; for (var i = 0; i < bossIds.Count; i++) { var bossId = bossIds[i]; @@ -70,12 +72,21 @@ var alive = findPreciousModel.IsBossAlive(bossId); if (alive) { findPreciousModel.AutoGotoSkillDemonJarBoss(new FindPreciousModel.BossNotify(bossId, true)); var npcConfig = Config.Instance.Get<NPCConfig>(bossId); if (npcConfig.NPCLV > maxLevel) { maxLevelBoss = bossId; maxLevel = npcConfig.NPCLV; } } } } } if (maxLevelBoss != 0) { findPreciousModel.AutoGotoSkillDemonJarBoss(new FindPreciousModel.BossNotify(maxLevelBoss, true)); } } } System/KnapSack/Logic/EquipDevourWin.cs
@@ -80,16 +80,8 @@ isOpen = true; playerPack.selectDevourlist.Clear(); devourModellist = playerPack.GetDevourModellist(); playerPack.RefreshColorSelectAct += RefreshColor; playerPack.RefreshLvSelectAct += RefreshLv; playerPack.RefreshStarSelectAct += RefreshStar; playerPack.ItemCntAddAct += RefreshAddItem; playerPack.ItemCntReduceAct += RefreshReduceItem; playerPack.RefreshPackAct += RefreshPack; playerPack.RefreshDecomAttrAct += RefreshDecomAttr; equipDevourEffect.OnComplete += OnCompleteEvent; playerPack.RefreshEquipDecomNumAct += RefreshDecomPreviewAttr; InitUI(); } protected override void OnAfterOpen() @@ -100,6 +92,16 @@ RefreshColor(playerPack.colorType); RefreshLv(playerPack.lvType); StartCoroutine(SetJumpIndex(0)); playerPack.RefreshColorSelectAct += RefreshColor; playerPack.RefreshLvSelectAct += RefreshLv; playerPack.RefreshStarSelectAct += RefreshStar; playerPack.ItemCntAddAct += RefreshAddItem; playerPack.ItemCntReduceAct += RefreshReduceItem; playerPack.RefreshPackAct += RefreshPack; playerPack.RefreshDecomAttrAct += RefreshDecomAttr; equipDevourEffect.OnComplete += OnCompleteEvent; playerPack.RefreshEquipDecomNumAct += RefreshDecomPreviewAttr; } protected override void OnPreClose() System/KnapSack/Logic/PackModelInterface.cs
@@ -130,38 +130,24 @@ { List<int> legendIdlist = new List<int>(); List<int> legendValuelist = new List<int>(); if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace)) switch (itemConfig.EquipPlace) { foreach (var attrType in itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace].Keys) { switch (attrType) { case LegendAttrType.Pursuit: legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]); break; case LegendAttrType.Fixed: legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]); break; } } } int i = 0; for (i = 0; i < legendIdlist.Count; i++) { if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i])) { if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor)) { legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]); } } else if (itemTipsModel.legendAttrLvValuePreviewDict.ContainsKey(legendIdlist[i])) { if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.LV)) { legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][itemConfig.LV]); } } case 11: CalculateWingsLegendAttr(itemConfig,out legendIdlist, out legendValuelist); break; case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 12: CalculateEquipLegendAttr(itemConfig,out legendIdlist,out legendValuelist); break; } if (legendIdlist.Count == legendValuelist.Count) @@ -190,6 +176,79 @@ } private void CalculateEquipLegendAttr(ItemConfig itemConfig,out List<int> legendIdlist, out List<int> legendValuelist) { legendIdlist = new List<int>(); legendValuelist = new List<int>(); string attrCntKey = StringUtility.Contact(itemConfig.ItemColor, itemConfig.StarLevel); var attrIDDict = itemTipsModel.legendAttrIDPreviewDict; var attrCntDict = itemTipsModel.legendAttrCntPreviewDict; if (attrIDDict.ContainsKey(itemConfig.EquipPlace)) { var attrTypeDict = itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace]; foreach (var attrType in attrTypeDict.Keys) { var attrIds = attrTypeDict[attrType]; int attrCnt = 0; if (attrCntDict.ContainsKey(attrCntKey)) { attrCnt = attrCntDict[attrCntKey][attrType]; } for(int i = 0; i < attrIds.Count; i++) { if(attrCnt > i) { legendIdlist.Add(attrIds[i]); } } } } for (int i = 0; i < legendIdlist.Count; i++) { if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i])) { if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor)) { legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]); } } else if (itemTipsModel.legendAttrLvValuePreviewDict.ContainsKey(legendIdlist[i])) { if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.LV)) { legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][itemConfig.LV]); } } } } private void CalculateWingsLegendAttr(ItemConfig itemConfig,out List<int> legendIdlist, out List<int> legendValuelist) { legendIdlist = new List<int>(); legendValuelist = new List<int>(); var attrCntDict = itemTipsModel.wingsLegendAttrCntPreviewDict; var attrValueDict = itemTipsModel.wingsLegendAttrValuePreviewDict; int attrCnt = 0; if (attrCntDict.ContainsKey(itemConfig.LV)) { attrCnt = attrCntDict[itemConfig.LV]; } if (attrValueDict.ContainsKey(itemConfig.LV)) { var attrIdDict = attrValueDict[itemConfig.LV]; foreach (var attrId in attrIdDict.Keys) { if(legendIdlist.Count < attrCnt) { legendIdlist.Add(attrId); legendValuelist.Add(attrIdDict[attrId][0]); } } } } #region 预览定制属性逻辑处理 public bool CheckIsCustomItem(ItemConfig itemConfig) { System/OpenServerActivity/FlashRushToBuyCoolDown.cs
@@ -14,21 +14,23 @@ private void OnEnable() { SecondEvent(); GlobalTimeEvent.Instance.secondEvent -= SecondEvent; GlobalTimeEvent.Instance.secondEvent += SecondEvent; DisplayTime(); WindowCenter.Instance.windowBeforeOpenEvent += OpenWindow; } private void OnDisable() { GlobalTimeEvent.Instance.secondEvent -= SecondEvent; WindowCenter.Instance.windowBeforeOpenEvent -= OpenWindow; } private void SecondEvent() private void OpenWindow(Window win) { if (win.name != typeof(MainInterfaceWin).Name) return; DisplayTime(); } void DisplayTime() { @@ -43,22 +45,38 @@ case FlashRushToBuyModel.FlashRushToBuySate.NoOpen: break; case FlashRushToBuyModel.FlashRushToBuySate.InAdvance: if(seconds <= 3600) int saleDay = operation.startDate.day + saleShop.dayIndex; int offsetDay = saleDay - TimeUtility.ServerNow.Day; if(offsetDay > 1) { int split = (3600 - seconds)/30 % 2; if(split == 0) { timeText.text = Language.Get("FlashRushToBuy109", TimeUtility.SecondsToMS(seconds)); } else { timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute)); } string saleDate = StringUtility.Contact(operation.startDate.month, Language.Get("Month"),saleDay,Language.Get("Day")); timeText.text = saleDate; } else if(offsetDay == 1) { timeText.text = Language.Get("FlashRushToBuy110"); } else { timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute)); } //if(seconds <= 3600) //{ // int split = (3600 - seconds)/30 % 2; // if(split == 0) // { // timeText.text = Language.Get("FlashRushToBuy109", TimeUtility.SecondsToMS(seconds)); // } // else // { // timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute)); // } //} //else //{ // timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute)); //} break; case FlashRushToBuyModel.FlashRushToBuySate.Begining: timeText.text = Language.Get("FlashRushToBuy107"); System/Realm/RealmBossShow.cs
@@ -12,6 +12,7 @@ [SerializeField, Header("特效位置")] Vector3 m_EffectPosition = Vector3.zero; GameObject clothesModel; GameObject secondaryModel; Animator clothesAnimator; Transform showPoint; @@ -124,23 +125,10 @@ var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2); var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID; int _suitLevel = 0; if (clothes != null) { if (clothes.itemInfo.IsSuite == 1) { if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0) { _suitLevel = clothes.GetUseDataModel(30)[0]; } } } #endregion showPoint = m_HeroStage; var _hero = ShowHero(_job, _clothesId, _suitLevel, _weaponId, _wingsId, _secondaryId); var _hero = ShowHero(_job, _clothesId, _weaponId, _wingsId, _secondaryId); if (_hero != null) { SitDown(); @@ -212,11 +200,37 @@ clothesModel = null; clothesAnimator = null; } if (secondaryModel != null) { Destroy(secondaryModel); secondaryModel = null; } } GameObject ShowHero(int _job, int _clothes, int suitID, int _weaponId, int _wingsId, int _secondaryId) GameObject ShowHero(int _job, int _clothes, int _weaponId, int _wingsId, int _secondaryId) { PutOnClothes(_job, _clothes, suitID); PutOnClothes(_job, _clothes); var jobConfig = Config.Instance.Get<JobSetupConfig>(_job); var secondaryResId = 0; if (_secondaryId == 0) { if (_job == 1) { secondaryResId = _clothes + 2900; } else { secondaryResId = jobConfig.BaseEquip[2]; } } else { var item = Config.Instance.Get<ItemConfig>(_secondaryId); secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd; } PutOnSecondary(_job, secondaryResId); return clothesModel; } @@ -229,7 +243,7 @@ } } public void PutOnClothes(int _job, int itemID, int suitID) public void PutOnClothes(int _job, int itemID) { var newClothes = 0; var config = Config.Instance.Get<JobSetupConfig>(_job); @@ -250,12 +264,38 @@ newClothes = config.BaseEquip[0]; } LoadClothes(newClothes); LoadClothesEffect(_job, itemID, suitID); LoadClothes(newClothes, _job); } private void LoadClothes(int resID) private void PutOnSecondary(int _job, int secondaryResId) { if (_job == 2) { return; } if (secondaryResId != 0) { var prefab = InstanceResourcesLoader.LoadModelRes(secondaryResId); if (!prefab) { var config = Config.Instance.Get<JobSetupConfig>(_job); secondaryResId = config.BaseEquip[2]; prefab = InstanceResourcesLoader.LoadModelRes(secondaryResId); } if (prefab) { if (secondaryModel == null) { secondaryModel = Instantiate(prefab, Constants.Special_Hide_Position, Quaternion.identity); var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[_job - 1]); secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one); } } } } private void LoadClothes(int resID,int job) { var prefab = InstanceResourcesLoader.LoadModelRes(resID,true); if (clothesModel == null) @@ -268,6 +308,10 @@ LayerUtility.SetLayer(clothesModel, LayerUtility.Player, false); var skinnedMeshRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>(true); var mat = MaterialLoader.LoadClothesMaterial(resID, false, IsSuit(job, resID)); skinnedMeshRenderer.material = mat; LayerUtility.SetLayer(skinnedMeshRenderer.gameObject, LayerUtility.Player, false); clothesModel.SetActive(true); clothesModel.transform.SetParentEx(showPoint, Vector3.zero, Quaternion.identity, Vector3.one); @@ -287,12 +331,12 @@ } } public void LoadClothesEffect(int job, int clothedID, int suitLevel) public bool IsSuit(int job, int clothedID) { var _equipModel = ModelCenter.Instance.GetModel<PlayerPackModel>().GetSinglePackModel(PackType.rptEquip); if (_equipModel == null) { return; return false; } int _suitCount = 0; @@ -306,7 +350,7 @@ if (_itemModel == null) { return; return false; } int _rank = _itemModel.chinItemModel.LV; @@ -344,27 +388,7 @@ } } PutOnEffect(clothedID, _suitCount >= 5); } public void PutOnEffect(int clothedID, bool isSuit) { if (clothesModel == null) { return; } var smRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>(); if (smRenderer == null) { return; } var newMat = MaterialLoader.LoadClothesMaterial(clothedID, true, isSuit); if (newMat != null) { smRenderer.material = newMat; } return _suitCount >= 5; } } } System/RoleParticulars/RoleParticularModel.cs
@@ -693,10 +693,9 @@ } } } if (_suitCount == 5) if (_suitCount >= 5) { int _type = 1; return _type * 1000 + rolePropData.Job * 100 + _rank; return _suitCount; } return 0; } System/Team/TeamPrepareWin.cs
@@ -196,15 +196,21 @@ m_TimeSlider.value = (float)(DateTime.Now - model.prepareBeginTime).TotalSeconds / GeneralDefine.teamReadyTime; if (DateTime.Now > endTime && !alreadyAutoPrepare) var myPlayerId = PlayerDatas.Instance.baseData.PlayerID; var prepareState = model.teamPrepare.GetPlayerPrepareSate((int)myPlayerId); if (prepareState == TeammatePrepareState.UnPrepared) { alreadyAutoPrepare = true; Reject(); if (DateTime.Now > endTime && !alreadyAutoPrepare) { alreadyAutoPrepare = true; Reject(); } } if (Time.time > timeOut) { WindowCenter.Instance.Close<TeamPrepareWin>(); SysNotifyMgr.Instance.ShowTip("TeamPrepareTimeOut"); } }