| Fight/GameActor/GActorNpcNoFight.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HttpRequest/HttpRequest.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastAttributes.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/GodBeastReinforcementWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Voice/SpeechTranslate.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/WorldMap/LocalMapFindPath.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| UI/Common/UI3DModelFactory.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Fight/GameActor/GActorNpcNoFight.cs
@@ -140,6 +140,11 @@ Object.Destroy(m_Dig.gameObject); m_Dig = null; } if(Root) { Root.localScale = Vector3.one; } } public override void Destroy() System/HttpRequest/HttpRequest.cs
@@ -11,73 +11,6 @@ public const string defaultHttpContentType = "application/x-www-form-urlencoded"; public const string jsonHttpContentType = "application/json ; charset=utf-8"; public void RequestWWW(string _url, int _retry = 3, Action<bool, string> _result = null) { StartCoroutine(Co_RequestWWW(_url, null, _retry, _result)); } public void RequestWWW(string _url, IDictionary<string, string> _parameters, int _retry = 3, Action<bool, string> _result = null) { StartCoroutine(Co_RequestWWW(_url, _parameters, _retry, _result)); } IEnumerator Co_RequestWWW(string _url, IDictionary<string, string> _parameters, int _retry = 3, Action<bool, string> _result = null) { if (_url == null || _url.Length == 0) { DebugEx.LogError("PHPDataComm post 参数有错"); if (_result != null) { _result(false, string.Empty); _result = null; } yield break; } int i = 0; bool isSuccess = false; byte[] data = null; if (_parameters != null) { data = Encoding.UTF8.GetBytes(HashtablaToString(_parameters)); } var PostData = data == null ? new WWW(_url) : new WWW(_url, data); while (!PostData.isDone) { yield return null; } if (PostData.error != null) { Debug.LogErrorFormat("WWW 数据通信,请求数据失败:{0},已经尝试,{1},次", PostData.error, i); } else { if (!string.IsNullOrEmpty(PostData.text)) { DebugEx.LogFormat("WWW 数据通信,请求数据成功:{0}", PostData.text); isSuccess = true; if (_result != null) { _result(true, PostData.text); _result = null; } } } if (!isSuccess) { if (_result != null) { _result(false, string.Empty); _result = null; } } } public void RequestHttpPost(string _url, IDictionary<string, string> _parameters, string _contentType, int _retry = 3, Action<bool, string> _result = null) { var content = HashtablaToString(_parameters); 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>(); 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>()); } } ItemTipsModel _itemTipsModel; @@ -74,17 +74,15 @@ } 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() @@ -94,7 +92,11 @@ private void OnClickToggle(bool Isbool) { AttributeAssignment(); if (GodBeastNumber != 0 && GodBeastPart != 0) { AttributeAssignment(); } } private void OnClickStrengthBtn() { @@ -160,13 +162,14 @@ } m_UIAlphaTween.gameObject.SetActive(true); m_FrameNull.SetActive(true); m_FullLevel.SetActive(false); m_StrengthenBtn.interactable = true; m_FullLevel.SetActive(false); GetDogZLevelAndExp(); AttributeAssignment(); } else { GodBeastNumber = 0; GodBeastPart = 0; m_ItemCell.gameObject.SetActive(false); m_ExpSlider.stage = 0; m_ExpSlider.delay = 0f; @@ -182,7 +185,7 @@ m_FrameNull.SetActive(false); m_FullLevel.SetActive(false); m_UIAlphaTween.gameObject.SetActive(false); m_StrengthenBtn.interactable = false; m_BottomBox.SetActive(false); } } @@ -193,13 +196,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 +225,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 +381,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 int ItemPlace =-1;//神兽装备位置信息 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; } } } } } System/Voice/SpeechTranslate.cs
@@ -26,7 +26,7 @@ public void RequestGetToken() { var url = "https://openapi.baidu.com/oauth/2.0/token?grant_type=client_credentials" + "&client_id=" + apiKey + "&client_secret=" + secretKey; HttpRequest.Instance.RequestWWW(url, 2, OnGetToken); HttpRequest.Instance.RequestHttpGet(url, HttpRequest.defaultHttpContentType, 2, OnGetToken); } private void OnGetToken(bool _ok, string _result) System/WorldMap/LocalMapFindPath.cs
@@ -27,7 +27,7 @@ private List<GameObject> pathNodeBehaviours = new List<GameObject>(); //寻路点池 List<LocalMapTag> tagBehaviours = new List<LocalMapTag>(); MapModel model { get { return ModelCenter.Instance.GetModel<MapModel>(); } } MapModel model { get { return ModelCenter.Instance.GetModel<MapModel>(); } } int mapId = 0; public void Init(int _mapId) @@ -42,7 +42,17 @@ mapId = _mapId; var tagChinMap = Config.Instance.Get<MapConfig>(mapId); var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(); MapResourcesConfig mapResConfig = null; if (mapId == PlayerDatas.Instance.baseData.MapID) { mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(); } else { mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(mapId, 0); } var mapWidth = mapResConfig.MapScale.x; var mapHeight = mapResConfig.MapScale.y; UI/Common/UI3DModelFactory.cs
@@ -100,6 +100,11 @@ animator.enabled = false; } if (model) { model.transform.localScale = Vector3.one; } var prefab = InstanceResourcesLoader.LoadNpcPrefab(id); if (prefab) {