| Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/ConfigManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastAttributes.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastAttributes.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastReinforcementWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastSlidingList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs
New file @@ -0,0 +1,53 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, August 21, 2018 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class DogzEquipPlusConfig : ConfigBase { public int id { get ; private set ; } public int equipplace { get ; private set ; } public int level { get ; private set ; } public string attType { get ; private set; } public string attValue { get ; private set; } public int upExpTotal { get ; private set ; } public override string getKey() { return id.ToString(); } public override void Parse() { try { id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; equipplace=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; level=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; attType = rawContents[3].Trim(); attValue = rawContents[4].Trim(); upExpTotal=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 5a8ad533389d88346977ca087da005bf timeCreated: 1534838849 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/ConfigManager.cs
@@ -188,7 +188,7 @@ AddAsyncTask<OrderInfoConfig>(); AddAsyncTask<TrialExchangeConfig>(); AddAsyncTask<TrialRewardsConfig>(); AddAsyncTask<DogzEquipPlusConfig>(); while (!AllCompleted()) { var completedCount = 0; Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs
New file @@ -0,0 +1,43 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, August 21, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using System; using System.Collections.Generic; namespace TableConfig { public partial class DogzEquipPlusConfig : ConfigBase, IConfigPostProcess { private static Dictionary<string, DogzEquipPlusConfig> t_ItemPM = new Dictionary<string, DogzEquipPlusConfig>(); private static Dictionary<int, List<DogzEquipPlusConfig>> m_ItemPlusMaxLvDict = new Dictionary<int, List<DogzEquipPlusConfig>>(); public void OnConfigParseCompleted() { t_ItemPM.Add(StringUtility.Contact(equipplace, level).ToString(), this); if (!m_ItemPlusMaxLvDict.ContainsKey(equipplace)) { List<DogzEquipPlusConfig> list = new List<DogzEquipPlusConfig>(); list.Add(this); m_ItemPlusMaxLvDict.Add(equipplace, list); } else { m_ItemPlusMaxLvDict[equipplace].Add(this); } } public static DogzEquipPlusConfig GetEquipplaceAndLevel(int equipplace, int level ) { DogzEquipPlusConfig dogzEquipPlus = null; t_ItemPM.TryGetValue(StringUtility.Contact(equipplace, level).ToString(),out dogzEquipPlus); return dogzEquipPlus; } } } Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: cc906249dfc57304ea684b122b443af3 timeCreated: 1534839974 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Strengthening/GodBeastAttributes.cs
New file @@ -0,0 +1,192 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, August 21, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using System.Collections.Generic; using System; using TableConfig; //神兽强化(神兽属性展示) namespace Snxxz.UI { public class GodBeastAttributes:MonoBehaviour { [SerializeField] ItemCell m_ItemCell; [SerializeField] GameObject m_FrameNull; [SerializeField] GameObject m_FullLevel; [SerializeField] GameObject m_BottomDisplay; [SerializeField] IntensifySmoothSlider m_ExpSlider; [SerializeField] Text m_ExpNum; [SerializeField] Text m_TextAttributes; [SerializeField] Text m_TextAttributesAdd; [SerializeField] GodBeastSlidingList m_GodBeastSlidingList; 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>()); } } private int GodBeastNumber=0;//神兽编号 private int GodBeastPart = 0;//神兽装备ID private int SingleProficiency = 0;//单倍熟练度 private int DoubleProficiency = 0;//双倍熟练度 private int NeedFairyJade = 0;//所需仙玉 private void Start() { } private void OnEnable() { GodBeastReinforcementWin.ChooseToModify += ChooseToModify; GodBeastSlidingList.AbsorbEvent += AbsorbEvent; } private void OnDisable() { GodBeastReinforcementWin.ChooseToModify -= ChooseToModify; GodBeastSlidingList.AbsorbEvent -= AbsorbEvent; } public void Init() { if (QualityLimit.Count <= 0) { string DogzAssist = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DogzAssist").Numerical4;//获取不同品质的神兽强化上限 QualityLimit = ConfigParse.GetDic<int, int>(DogzAssist); } } public void Unit() { } private void ChooseToModify(int locationMarker) { GetGodBeastLocationMarker(locationMarker); } private void AbsorbEvent(Dictionary<int, int> absorb) { AttributeAssignment(); } public void GetGodBeastLocationMarker(int LocationMarker)//获取神兽装备的标记信息 { if (LocationMarker != 0) { m_ItemCell.gameObject.SetActive(true); GodBeastNumber = LocationMarker % 100;//神兽编号 GodBeastPart = LocationMarker / 100;//神兽装备位ID List<ItemModel> itemModel = dogz_model.GetDogzEquips(GodBeastNumber); if (itemModel != null) { for (int i = 0; i < itemModel.Count; i++) { if (itemModel[i].EquipPlace == GodBeastPart) { ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1); m_ItemCell.Init(ItemModel); } } } m_FrameNull.SetActive(true); m_FullLevel.SetActive(false); AttributeAssignment(); } else { m_ItemCell.gameObject.SetActive(false); m_ExpSlider.stage = 0; m_ExpSlider.delay = 0f; m_ExpSlider.ResetStage(); m_ExpSlider.value = 0; m_ExpNum.text = "0/0"; m_FrameNull.SetActive(false); m_FullLevel.SetActive(false); } } public void AttributeAssignment() { List<ItemModel> itemModel = dogz_model.GetDogzEquips(GodBeastNumber); ItemModel ItemModel=null; if (itemModel != null) { for (int i = 0; i < itemModel.Count; i++) { if (itemModel[i].EquipPlace == GodBeastPart) { ItemModel = itemModel[i]; } } } if (ItemModel == null) { return; } GainProficiency();//获取熟练度 var IudetDogzEquipPlus = ItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus); if (IudetDogzEquipPlus != null) { int lv = QualityLimit[ItemModel.chinItemModel.ItemColor]; var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, lv); if (IudetDogzEquipPlus[0] >= lv) { m_FrameNull.SetActive(false); m_FullLevel.SetActive(true); m_ExpSlider.stage = lv; m_ExpSlider.delay = 0f; m_ExpSlider.ResetStage(); m_ExpSlider.value = 1; m_ExpNum.text = DogzEquipConfig.upExpTotal + "/" + DogzEquipConfig.upExpTotal; } else { } } else { var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart,0); m_ExpNum.text = "0/" + DogzEquipConfig.upExpTotal; } } private void GainProficiency()//获取熟练度 { SingleProficiency = 0; DoubleProficiency = 0; NeedFairyJade = 0; Dictionary<int,int> DicAb=m_GodBeastSlidingList.Absorption_Dic; foreach (var key in DicAb.Keys) { ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptDogzItem, key); if (itemModel != null) { if (itemModel.chinItemModel.Effect1 == 235) { var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus); SingleProficiency += itemModel.chinItemModel.EffectValueA1* DicAb[key]; if (IudetDogzEquipPlus != null) { SingleProficiency += IudetDogzEquipPlus[1]; DoubleProficiency += itemModel.chinItemModel.EffectValueA1; } else { DoubleProficiency += itemModel.chinItemModel.EffectValueA1 * 2* DicAb[key]; NeedFairyJade += itemModel.chinItemModel.Effect2* DicAb[key]; } } } } } } } System/Strengthening/GodBeastAttributes.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 28dabca18ec1b3f448dce661e9eda839 timeCreated: 1534831509 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Strengthening/GodBeastReinforcementWin.cs
@@ -27,9 +27,10 @@ [SerializeField] ScrollerController m_ScrollerController; [SerializeField] GodBeastSlidingList m_GodBeastSlidingList; [SerializeField] GameObject m_Listprompt_Text; [SerializeField] GodBeastAttributes m_GodBeastAttributes; DogzModel Dogz_model; DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } public static event Action<int> ChooseToModify; private List<GodBeastClass> GodBeastList = new List<GodBeastClass>(); private int CurrentlySelected = 0; #region Built-in @@ -44,15 +45,18 @@ protected override void OnPreOpen() { CurrentlySelected = 0; GetGodBeast();//获取神兽强化装备信息 m_ScrollerController.OnRefreshCell += OnRefreshGridCell; OnCreateGridLineCell(m_ScrollerController); if (GodBeastList.Count > 0) { CurrentlySelected = GodBeastList[0].LocationMarker; m_ScrollerController.JumpIndex(0); } } m_ScrollerController.OnRefreshCell += OnRefreshGridCell; OnCreateGridLineCell(m_ScrollerController); m_GodBeastSlidingList.Init(); m_GodBeastAttributes.Init(); m_GodBeastAttributes.GetGodBeastLocationMarker(CurrentlySelected); } protected override void OnAfterOpen() @@ -166,6 +170,10 @@ { CurrentlySelected = locationMarker; m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 if (ChooseToModify != null) { ChooseToModify(CurrentlySelected); } } }); } System/Strengthening/GodBeastSlidingList.cs
@@ -38,7 +38,11 @@ [SerializeField] Toggle m_ToggleAll; public int LINE = 10; public Dictionary<int, int> Absorption_Dic { get { return AbsorptionDic; } set { AbsorptionDic = value; } } public static event Action<Dictionary<int, int>> AbsorbEvent; private List<GodBeastBagClass> GodBeastBagList = new List<GodBeastBagClass>(); private List<int> DeleteIndexList = new List<int>();