From a16ebfc11595a6f7dc0c34c89c7a794a95fb075c Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 21 八月 2018 17:08:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Core/GameEngine/Model/ConfigManager.cs | 2
Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs.meta | 12 +
UI/Common/UI3DShowHero.cs | 24 +++
System/Strengthening/GodBeastSlidingList.cs | 6
System/Strengthening/GodBeastAttributes.cs.meta | 12 +
Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs.meta | 12 +
System/Strengthening/GodBeastReinforcementWin.cs | 18 +
System/Strengthening/GodBeastAttributes.cs | 192 +++++++++++++++++++++++++++
Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs | 53 +++++++
Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs | 43 ++++++
10 files changed, 367 insertions(+), 7 deletions(-)
diff --git a/Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs b/Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs
new file mode 100644
index 0000000..4ea95ad
--- /dev/null
+++ b/Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs
@@ -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);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs.meta b/Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs.meta
new file mode 100644
index 0000000..7d76db3
--- /dev/null
+++ b/Core/GameEngine/Model/Config/DogzEquipPlusConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5a8ad533389d88346977ca087da005bf
+timeCreated: 1534838849
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 82dbee8..4d507d0 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -188,7 +188,7 @@
AddAsyncTask<OrderInfoConfig>();
AddAsyncTask<TrialExchangeConfig>();
AddAsyncTask<TrialRewardsConfig>();
-
+ AddAsyncTask<DogzEquipPlusConfig>();
while (!AllCompleted())
{
var completedCount = 0;
diff --git a/Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs b/Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs
new file mode 100644
index 0000000..7442fa8
--- /dev/null
+++ b/Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs
@@ -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;
+ }
+
+ }
+
+}
+
+
+
diff --git a/Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs.meta b/Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs.meta
new file mode 100644
index 0000000..20a38a2
--- /dev/null
+++ b/Core/GameEngine/Model/TelPartialConfig/DogzEquipPlusConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cc906249dfc57304ea684b122b443af3
+timeCreated: 1534839974
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/Strengthening/GodBeastAttributes.cs b/System/Strengthening/GodBeastAttributes.cs
new file mode 100644
index 0000000..e206770
--- /dev/null
+++ b/System/Strengthening/GodBeastAttributes.cs
@@ -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;//绁炲吔瑁呭浣岻D
+ 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];
+ }
+ }
+ }
+ }
+
+ }
+
+
+ }
+
+}
+
+
+
diff --git a/System/Strengthening/GodBeastAttributes.cs.meta b/System/Strengthening/GodBeastAttributes.cs.meta
new file mode 100644
index 0000000..fd709fa
--- /dev/null
+++ b/System/Strengthening/GodBeastAttributes.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 28dabca18ec1b3f448dce661e9eda839
+timeCreated: 1534831509
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/Strengthening/GodBeastReinforcementWin.cs b/System/Strengthening/GodBeastReinforcementWin.cs
index a9825a7..9c927ec 100644
--- a/System/Strengthening/GodBeastReinforcementWin.cs
+++ b/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);
+ }
}
});
}
diff --git a/System/Strengthening/GodBeastSlidingList.cs b/System/Strengthening/GodBeastSlidingList.cs
index 584545d..fbefb21 100644
--- a/System/Strengthening/GodBeastSlidingList.cs
+++ b/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>();
diff --git a/UI/Common/UI3DShowHero.cs b/UI/Common/UI3DShowHero.cs
index 6c430dd..b8e552a 100644
--- a/UI/Common/UI3DShowHero.cs
+++ b/UI/Common/UI3DShowHero.cs
@@ -50,6 +50,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(weaponId);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(weaponModel);
pool.Release(weaponModel);
weaponModel = null;
}
@@ -58,6 +59,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(secondaryId);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(secondaryModel);
pool.Release(secondaryModel);
secondaryModel.SetActive(true);
secondaryModel = null;
@@ -67,6 +69,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(wingsId);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(wingsModel);
pool.Release(wingsModel);
wingsModel = null;
wingsAnimator = null;
@@ -76,6 +79,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(clothesId);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(clothesModel);
pool.Release(clothesModel);
clothesModel = null;
if (clothesAnimator)
@@ -116,6 +120,7 @@
if (weaponModel)
{
+ ResetModelLayer(weaponModel);
GameObject prefab = InstanceResourcesLoader.LoadModelRes(weaponId);
GameObjectPoolManager.Instance.ReleaseGameObject(prefab, weaponModel);
weaponModel = null;
@@ -220,6 +225,7 @@
var prefab = InstanceResourcesLoader.LoadModelRes(clothesId);
var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(clothesModel);
pool.Release(clothesModel);
clothesModel = null;
if (clothesAnimator != null)
@@ -262,6 +268,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(oldWeapon);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(weaponModel);
pool.Release(weaponModel);
weaponModel = null;
}
@@ -311,6 +318,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(secondaryModel);
pool.Release(secondaryModel);
secondaryModel = null;
}
@@ -325,6 +333,13 @@
}
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
secondaryModel = pool.Request();
+
+ secondaryModel.layer = LayerUtility.Player;
+ SkinnedMeshRenderer _renderer = secondaryModel.GetComponentInChildren<SkinnedMeshRenderer>();
+ if (_renderer)
+ {
+ _renderer.gameObject.layer = LayerUtility.Player;
+ }
var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
@@ -357,6 +372,7 @@
{
prefab = InstanceResourcesLoader.LoadModelRes(oldWings);
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+ ResetModelLayer(wingsModel);
pool.Release(wingsModel);
wingsModel = null;
}
@@ -523,6 +539,14 @@
}
closthesSFXList.Clear();
}
+
+ void ResetModelLayer(GameObject _go)
+ {
+ if (_go != null)
+ {
+ LayerUtility.SetLayer(_go, LayerUtility.Player, true);
+ }
+ }
}
}
--
Gitblit v1.8.0