From 78bfe524ea4776c47f6314e56e97f39970b00fce Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 25 九月 2018 15:07:07 +0800
Subject: [PATCH] Merge branch 'master' into 1871天赋功能
---
System/Strengthening/GodBeastModel.cs | 75 ++++++++++++++++++++++++++++++++++++-
1 files changed, 73 insertions(+), 2 deletions(-)
diff --git a/System/Strengthening/GodBeastModel.cs b/System/Strengthening/GodBeastModel.cs
index 0864a34..eac4735 100644
--- a/System/Strengthening/GodBeastModel.cs
+++ b/System/Strengthening/GodBeastModel.cs
@@ -16,14 +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()
@@ -117,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;
+ }
+ }
+ }
}
--
Gitblit v1.8.0