From d10eb06e8d935a453ad85dc359eab2d8401b2ba9 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期四, 06 十二月 2018 10:31:24 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Rune/RuneModel.cs |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/System/Rune/RuneModel.cs b/System/Rune/RuneModel.cs
index 307897d..767e86e 100644
--- a/System/Rune/RuneModel.cs
+++ b/System/Rune/RuneModel.cs
@@ -60,6 +60,7 @@
         public const int RUNE_TYPE = 30;
         public const int RUNE_CREAMTYPE = 31;
         public const int RUNE_HOLE_COUNT = 9;
+        public Dictionary<int, Dictionary<int, int>> runeBasePropretyDict = new Dictionary<int, Dictionary<int, int>>();
         public Dictionary<int, Dictionary<int, float>> runeAttrDic = new Dictionary<int, Dictionary<int, float>>();
         public Dictionary<int, float> runeAttrAdditionDic = new Dictionary<int, float>();
         public Dictionary<int, float> runeExpDic = new Dictionary<int, float>();
@@ -82,6 +83,7 @@
                     {
                         runeAttrDic.Add(key, ConfigParse.GetDic<int, float>(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical2));
                         runeAttrAdditionDic.Add(key, float.Parse(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical3));
+                        runeBasePropretyDict.Add(key, ConfigParse.GetDic<int, int>(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical4));
                     }
                     runeExpDic = ConfigParse.GetDic<int, float>(FuncConfigConfig.GetRuneNeedExpFormula().Numerical2);
                     runeExpAddition = float.Parse(FuncConfigConfig.GetRuneNeedExpFormula().Numerical3);
@@ -208,15 +210,24 @@
                 }
                 int[] runeTypes = _tagRuneModel.AttrType;
                 float params2 = runeAttrDic[type][_tagChinModel.ItemColor];
+                var baseValue = 0;
+                if (runeBasePropretyDict.ContainsKey(type))
+                {
+                    var dict = runeBasePropretyDict[type];
+                    if (dict.ContainsKey(_tagChinModel.ItemColor))
+                    {
+                        baseValue = dict[_tagChinModel.ItemColor];
+                    }
+                }
                 if (runeTypes.Length > 1)
                 {
                     float coe = runeAttrAdditionDic[type];
                     coe = coe == 0 ? 1 : coe;
-                    runeValue = params1 * params2 * coe;
+                    runeValue = (params1 * params2 + baseValue) * coe;
                 }
                 else
                 {
-                    runeValue = params1 * params2;
+                    runeValue = params1 * params2 + baseValue;
                 }
             }
             return Mathf.RoundToInt(runeValue);

--
Gitblit v1.8.0