From 96c625cf59fa4b68aa7e32285e3df88cc6930799 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期一, 10 九月 2018 15:49:06 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Strengthening/GodBeastModel.cs | 86 ++++++++++++++++++++++++++++++++++++++++---
1 files changed, 80 insertions(+), 6 deletions(-)
diff --git a/System/Strengthening/GodBeastModel.cs b/System/Strengthening/GodBeastModel.cs
index f3656b0..0864a34 100644
--- a/System/Strengthening/GodBeastModel.cs
+++ b/System/Strengthening/GodBeastModel.cs
@@ -13,28 +13,32 @@
// 鍏充簬绁炲吔寮哄寲
public class GodBeastModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
{
- public Dictionary<int, int> Absorption_Dic=new Dictionary<int, int>();//鑾峰彇閫夋嫨鐨勭墿鍝�
+ public Dictionary<int, int> Absorption_Dic = new Dictionary<int, int>();//鑾峰彇閫夋嫨鐨勭墿鍝�
public event Action AbsorbEvent;
- public int ItemInde=0;//鐗╁搧涓嬫爣
+ public int ItemInde = 0;//鐗╁搧涓嬫爣
public ItemModel Crystal_ItemModel;
+ 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()
{
-
+
}
public void OnBeforePlayerDataInitialize()
{
-
+
}
public void OnPlayerLoginOk()
{
-
+
}
public override void UnInit()
{
-
+
}
public void AbsorbEventUpdate()
@@ -44,6 +48,76 @@
AbsorbEvent();
}
}
+
+ private Dictionary<int, int> AllEnhancedPropertiesDic = new Dictionary<int, int>();//key:涓哄睘鎬х紪鍙凤紝value鏄睘鎬у��
+ public Dictionary<int, int> AllEnhancedProperties(int GodBeastNumber)//鑾峰彇鏁村彧绁炲吔寮哄寲灞炴��
+ {
+ AllEnhancedPropertiesDic.Clear();
+ List<ItemModel> itemModel = dogz_model.GetDogzEquips(GodBeastNumber);
+ if (itemModel == null)
+ {
+ return AllEnhancedPropertiesDic;
+ }
+ for (int i = 0; i < itemModel.Count; i++)
+ {
+ ItemModel item = itemModel[i];
+ var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ if (IudetDogzEquipPlus != null)
+ {
+ int lv = IudetDogzEquipPlus[0];
+ if (lv > 0)
+ {
+ var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(item.EquipPlace, lv);
+ int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
+ int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
+ for (int j = 0; j < AttType.Length; j++)
+ {
+ if (AllEnhancedPropertiesDic.ContainsKey(AttType[j]))
+ {
+ var value = AllEnhancedPropertiesDic[(AttType[j])];
+ AllEnhancedPropertiesDic[(AttType[j])] = value + AttValue[j];
+ }
+ else
+ {
+ AllEnhancedPropertiesDic.Add(AttType[j], AttValue[j]);
+ }
+ }
+ }
+ }
+ }
+ return AllEnhancedPropertiesDic;
+ }
+ private Dictionary<int, int> SiteEnhancementAttributeDic = new Dictionary<int, int>();//key:涓哄睘鎬х紪鍙凤紝value鏄睘鎬у��
+ public Dictionary<int, int> SiteEnhancementAttribute(PackType PackTypeGodBeast, int GodBeastIndex)//鑾峰彇鏌愬彧绁炲吔韬笂鏌愪釜瑁呭灞炴�у��
+ {
+ SiteEnhancementAttributeDic.Clear();
+ ItemModel item = playerPack.GetItemModelByIndex(PackTypeGodBeast, GodBeastIndex);
+ if (item == null)
+ {
+ return SiteEnhancementAttributeDic;
+ }
+ var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
+ if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
+ {
+ var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(item.EquipPlace, IudetDogzEquipPlus[0]);
+ int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
+ int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
+ for (int j = 0; j < AttType.Length; j++)
+ {
+ if (SiteEnhancementAttributeDic.ContainsKey(AttType[j]))
+ {
+ SiteEnhancementAttributeDic[(AttType[j])] = AttValue[j];
+ }
+ else
+ {
+ SiteEnhancementAttributeDic.Add(AttType[j], AttValue[j]);
+ }
+ }
+ }
+ return SiteEnhancementAttributeDic;
+ }
+
+
}
--
Gitblit v1.8.0