| System/Strengthening/GodBeastAttributes.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastReinforcementWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Strengthening/GodBeastAttributes.cs
@@ -39,9 +39,9 @@ [SerializeField] GameObject m_Text_two;//下级属性 [SerializeField] Button m_StrengthenDoubleBtn;//双倍强化按钮 [SerializeField] Text m_NeedFairy;//所需的仙玉 [SerializeField] GameObject m_BottomBox; DogzModel Dogz_model; DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } private Dictionary<int, int> QualityLimit = new Dictionary<int, int>(); PlayerPackModel _playerPack; PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } } ItemTipsModel _itemTipsModel; @@ -74,17 +74,14 @@ } private void OnDisable() { GodBeast_Number = 0; GodBeast_Part = 0; GodBeastReinforcementWin.ChooseToModify -= ChooseToModify; godBeastModel.AbsorbEvent -= AbsorbEvent; } public void Init() { if (QualityLimit.Count <= 0) { string DogzAssist = Config.Instance.Get<FuncConfigConfig>("DogzAssist").Numerical4;//获取不同品质的神兽强化上限 QualityLimit = ConfigParse.GetDic<int, int>(DogzAssist); } } public void Unit() @@ -161,7 +158,6 @@ m_UIAlphaTween.gameObject.SetActive(true); m_FrameNull.SetActive(true); m_FullLevel.SetActive(false); m_StrengthenBtn.interactable = true; GetDogZLevelAndExp(); AttributeAssignment(); } @@ -182,7 +178,7 @@ m_FrameNull.SetActive(false); m_FullLevel.SetActive(false); m_UIAlphaTween.gameObject.SetActive(false); m_StrengthenBtn.interactable = false; m_BottomBox.SetActive(false); } } @@ -193,13 +189,15 @@ return; } GainProficiency();//获取熟练度 m_BottomBox.SetActive(true); var IudetDogzEquipPlus = m_DogZItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus); if (IudetDogzEquipPlus != null) { int lv = QualityLimit[m_DogZItemModel.chinItemModel.ItemColor]; int lv = godBeastModel.QualityLimit[m_DogZItemModel.chinItemModel.ItemColor]; var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, lv); if (DogZLv >= lv) { m_BottomBox.SetActive(false); m_Text_two.SetActive(false); m_FrameNull.SetActive(false); m_TextAttributes1.gameObject.SetActive(false); @@ -220,10 +218,13 @@ var Dogz_EquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv - 1); NeedExp -= Dogz_EquipConfig.upExpTotal; } m_ExpNum.text = DogZExp + "/" + NeedExp; m_ExpNum.text = NeedExp + "/" + NeedExp; } else { m_StrengthenDoubleBtn.interactable = true; m_StrengthenBtn.interactable = true; m_Text_two.SetActive(true); if (m_DoubleToggle.isOn) { @@ -373,7 +374,7 @@ { return DogzLv; } int lv = QualityLimit[m_DogZItemModel.chinItemModel.ItemColor]; int lv = godBeastModel.QualityLimit[m_DogZItemModel.chinItemModel.ItemColor]; var IudetDogzEquipPlus = m_DogZItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus); if (IudetDogzEquipPlus != null) { System/Strengthening/GodBeastModel.cs
@@ -16,15 +16,20 @@ public Dictionary<int, int> Absorption_Dic = new Dictionary<int, int>();//获取选择的物品 public event Action AbsorbEvent; public int ItemInde = 0;//物品下标 public ItemModel Crystal_ItemModel; public ItemModel Crystal_ItemModel;//当前所选中的水晶物品 public int ItemPlace =-1;//神兽装备位置信息 public Dictionary<int, int> QualityLimit = new Dictionary<int, int>();//对应品质所能选择的最大强化等级 DogzModel Dogz_model; DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } PlayerPackModel _playerPack; PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } } public override void Init() { if (QualityLimit.Count <= 0) { string DogzAssist = Config.Instance.Get<FuncConfigConfig>("DogzAssist").Numerical4;//获取不同品质的神兽强化上限 QualityLimit = ConfigParse.GetDic<int, int>(DogzAssist); } } public void OnBeforePlayerDataInitialize() @@ -118,7 +123,72 @@ return SiteEnhancementAttributeDic; } public int DogZBagIndex = 0; public bool IsFullLevel()//是都满级能够继续吸收 { bool IsBool = false; int DogZLV = 0;//获取当前神兽等级 int DogProficiency = 0;//当前神兽的熟练度 int SingleProficiency = 0;//单倍熟练度 int DoubleProficiency = 0;//双倍熟练度 ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, DogZBagIndex); if (itemModel == null) { return false; } int lv = QualityLimit[itemModel.chinItemModel.ItemColor]; var DogzEquipMaxConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(itemModel.chinItemModel.EquipPlace, lv); var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus); if (IudetDogzEquipPlus != null) { DogZLV = IudetDogzEquipPlus[0]; DogProficiency = IudetDogzEquipPlus[1]; } foreach (var key in Absorption_Dic.Keys) { ItemModel item_Model = playerPack.GetItemModelByIndex(PackType.rptDogzItem, key); if (item_Model != null) { if (item_Model.chinItemModel.Effect1 == 235) { var _IudetDogzEquipPlus = item_Model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus); SingleProficiency += item_Model.chinItemModel.EffectValueA1 * Absorption_Dic[key]; if (_IudetDogzEquipPlus != null) { SingleProficiency += _IudetDogzEquipPlus[1]; DoubleProficiency += item_Model.chinItemModel.EffectValueA1; } else { DoubleProficiency += item_Model.chinItemModel.EffectValueA1 * 2 * Absorption_Dic[key]; } } } } if (true) { if (DogProficiency + DoubleProficiency >= DogzEquipMaxConfig.upExpTotal) { return true; } else { return false; } } else { if (DogProficiency + SingleProficiency >= DogzEquipMaxConfig.upExpTotal) { return true; } else { return false; } } } } System/Strengthening/GodBeastReinforcementWin.cs
@@ -61,6 +61,7 @@ if (GodBeastList[i].ItemPlace == godBeastModel.ItemPlace) { CurrentlySelected = GodBeastList[i].LocationMarker; GetDogZBagIndex(); int Index = 0; Index = GodBeastList.FindIndex((x) => { @@ -75,6 +76,7 @@ if (GodBeastList.Count > 0) { CurrentlySelected = GodBeastList[0].LocationMarker; GetDogZBagIndex(); m_ScrollerController.JumpIndex(0); } } @@ -94,6 +96,7 @@ protected override void OnPreClose() { godBeastModel.ItemPlace = -1; // godBeastModel.Absorption_Dic.Clear(); playerPack.RefreshItemCountAct -= RefreshItemCountAct; m_ScrollerController.OnRefreshCell -= OnRefreshGridCell; DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent; @@ -219,6 +222,7 @@ if (locationMarker != CurrentlySelected) { CurrentlySelected = locationMarker; GetDogZBagIndex(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 if (ChooseToModify != null) { @@ -227,6 +231,20 @@ } }); } private void GetDogZBagIndex()//获取选择的神兽装备的装备下标 { for (int i = 0; i < GodBeastList.Count; i++) { if (CurrentlySelected == GodBeastList[i].LocationMarker) { godBeastModel.DogZBagIndex = GodBeastList[i].ItemPlace; // DebugEx.LogError(godBeastModel.DogZBagIndex); return; } } } } }