少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-21 fa53e1b1c6d2c15db12c7946767383c0be04bd5e
3335 物品相关类型重构
11个文件已添加
11个文件已修改
964 ■■■■■ 已修改文件
Core/GameEngine/Model/TelPartialConfig/tagEquipGSParamConfig.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ClientPack.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAE_Truck.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAF_Merge.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HB0_Event.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/Utilities/StructEx.cs 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/Utilities/StructEx.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/EquipGSParamConfigWrap.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIPackModelInterfaceWrap.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/PlayerFairyAuTreasureData.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GeneralConfig/GeneralDefine.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOperateUtility.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackModelInterface.cs 580 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PlayerPackModels.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/CommonItemBaisc.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/tagEquipGSParamConfig.cs
@@ -12,7 +12,7 @@
        s_tagGSModelDict.Add(key, this);
    }
    public static EquipGSParamConfig GetTagGSModel(int lv, int color, int star)
    public static EquipGSParamConfig GetGSModel(int lv, int color, int star)
    {
        string key = StringUtility.Contact(lv, color, star);
        EquipGSParamConfig gsModel = null;
@@ -23,7 +23,7 @@
    public static Dictionary<AttrEnum, int> GetTagGsProValueDict(int lv, int color, int star)
    {
        _tagGsProValueDict.Clear();
        EquipGSParamConfig gsModel = GetTagGSModel(lv, color, star);
        EquipGSParamConfig gsModel = GetGSModel(lv, color, star);
        if (gsModel == null)
            return null;
Core/NetworkPackage/DTCFile/ClientPack.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 722e5e3d30096674e811f5bd191246a0
folderAsset: yes
timeCreated: 1539228128
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3e05761d690b75440a6be79207d0fb01
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1d70ccd06161e0443b7a802ad94292f8
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 71e878ac60c49ad4f964dd2dbc725739
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: eed34091b0568664b9fb42f0634496c1
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 32ceb8b7faf99f84a8b73ce53c5e3e4d
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HAE_Truck.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 77f69c2b862d1704299a32d0d8eeb71e
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HAF_Merge.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: fa14960fa44b0d1439bab471a764e34f
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HB0_Event.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d914565b65f8e8145988734c4d915834
folderAsset: yes
timeCreated: 1547643019
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/Utilities/StructEx.cs
New file
@@ -0,0 +1,227 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Text.RegularExpressions;
public struct Int2
{
    public int x;
    public int y;
    public Int2(int _x, int _y)
    {
        this.x = _x;
        this.y = _y;
    }
    public int this[int index]
    {
        get
        {
            return index == 0 ? this.x : index == 1 ? this.y : 0;
        }
        set
        {
            if (index == 0)
            {
                this.x = value;
            }
            else if (index == 1)
            {
                this.y = value;
            }
        }
    }
    public static Int2 zero = new Int2(0, 0);
    public static bool TryParse(string input, out Int2 _value)
    {
        if (string.IsNullOrEmpty(input))
        {
            _value = Int2.zero;
            return false;
        }
        else
        {
            var matches = Regex.Matches(input.Trim(), "[-]{0,1}\\d+");
            if (matches.Count == 2)
            {
                _value = new Int2(int.Parse(matches[0].Value), int.Parse(matches[1].Value));
                return true;
            }
            else
            {
                _value = Int2.zero;
                return false;
            }
        }
    }
    public override bool Equals(object other)
    {
        if (other == null)
        {
            return false;
        }
        if ((other.GetType().Equals(this.GetType())) == false)
        {
            return false;
        }
        var temp = (Int2)other;
        return this.x.Equals(temp.x) && this.y.Equals(temp.y);
    }
    public override int GetHashCode()
    {
        return this.x.GetHashCode() + this.y.GetHashCode();
    }
    public override string ToString()
    {
        return string.Format("({0},{1})", this.x, this.y);
    }
    public static bool operator ==(Int2 lhs, Int2 rhs)
    {
        return lhs.x == rhs.x && lhs.y == rhs.y;
    }
    public static bool operator !=(Int2 lhs, Int2 rhs)
    {
        return lhs.x != rhs.x || lhs.y != rhs.y;
    }
    public static Int2 operator +(Int2 lhs, Int2 rhs)
    {
        return new Int2(lhs.x + rhs.x, lhs.y + rhs.y);
    }
    public static Int2 operator -(Int2 lhs, Int2 rhs)
    {
        return new Int2(lhs.x - rhs.x, lhs.y - rhs.y);
    }
}
public struct Int3
{
    public int x;
    public int y;
    public int z;
    public Int3(int _x, int _y)
    {
        this.x = _x;
        this.y = _y;
        this.z = 0;
    }
    public Int3(int _x, int _y, int _z)
    {
        this.x = _x;
        this.y = _y;
        this.z = _z;
    }
    public int this[int index]
    {
        get
        {
            return index == 0 ? this.x : index == 1 ? this.y : index == 2 ? this.z : 0;
        }
        set
        {
            if (index == 0)
            {
                this.x = value;
            }
            else if (index == 1)
            {
                this.y = value;
            }
            else if (index == 2)
            {
                this.z = value;
            }
        }
    }
    public static Int3 zero = new Int3(0, 0, 0);
    public static bool TryParse(string input, out Int3 _value)
    {
        if (string.IsNullOrEmpty(input))
        {
            _value = Int3.zero;
            return false;
        }
        else
        {
            var matches = Regex.Matches(input.Trim(), "[-]{0,1}\\d+");
            if (matches.Count == 2)
            {
                _value = new Int3(int.Parse(matches[0].Value), int.Parse(matches[1].Value), 0);
                return true;
            }
            else if (matches.Count == 3)
            {
                _value = new Int3(int.Parse(matches[0].Value), int.Parse(matches[1].Value), int.Parse(matches[2].Value));
                return true;
            }
            else
            {
                _value = Int3.zero;
                return false;
            }
        }
    }
    public override bool Equals(object other)
    {
        if (other == null)
        {
            return false;
        }
        if ((other.GetType().Equals(this.GetType())) == false)
        {
            return false;
        }
        var temp = (Int3)other;
        return this.x.Equals(temp.x) && this.y.Equals(temp.y) && this.z.Equals(temp.z);
    }
    public override int GetHashCode()
    {
        return this.x.GetHashCode() + this.y.GetHashCode() + this.z.GetHashCode();
    }
    public override string ToString()
    {
        return string.Format("({0},{1},{2})", this.x, this.y, this.z);
    }
    public static bool operator ==(Int3 lhs, Int3 rhs)
    {
        return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z;
    }
    public static bool operator !=(Int3 lhs, Int3 rhs)
    {
        return lhs.x != rhs.x || lhs.y != rhs.y || lhs.z != rhs.z;
    }
    public static Int3 operator +(Int3 lhs, Int3 rhs)
    {
        return new Int3(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z);
    }
    public static Int3 operator -(Int3 lhs, Int3 rhs)
    {
        return new Int3(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z);
    }
}
Core/Utilities/StructEx.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 73b469187d4ad04449e3119d202d7dd8
timeCreated: 1550717582
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Lua/Gen/EquipGSParamConfigWrap.cs
@@ -345,7 +345,7 @@
                    int _color = LuaAPI.xlua_tointeger(L, 2);
                    int _star = LuaAPI.xlua_tointeger(L, 3);
                    
                        EquipGSParamConfig gen_ret = EquipGSParamConfig.GetTagGSModel( _lv, _color, _star );
                        EquipGSParamConfig gen_ret = EquipGSParamConfig.GetGSModel( _lv, _color, _star );
                        translator.Push(L, gen_ret);
                    
                    
Lua/Gen/SnxxzUIPackModelInterfaceWrap.cs
@@ -188,7 +188,6 @@
                
                {
                    
                    gen_to_be_invoked.OnPlayerLoginOk(  );
                    
                    
                    
@@ -248,7 +247,7 @@
                    System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>> _useDataDic = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>>)translator.GetObject(L, 4, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>>));
                    bool _isPreview = LuaAPI.lua_toboolean(L, 5);
                    
                        int gen_ret = gen_to_be_invoked.SetEquipScore( _type, _itemId, _useDataDic, _isPreview );
                        int gen_ret = gen_to_be_invoked.GetEquipScore( _type, _itemId, _useDataDic, _isPreview );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    
                    
@@ -261,7 +260,7 @@
                    int _itemId = LuaAPI.xlua_tointeger(L, 3);
                    System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>> _useDataDic = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>>)translator.GetObject(L, 4, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>>));
                    
                        int gen_ret = gen_to_be_invoked.SetEquipScore( _type, _itemId, _useDataDic );
                        int gen_ret = gen_to_be_invoked.GetEquipScore( _type, _itemId, _useDataDic );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    
                    
@@ -273,7 +272,7 @@
                    PackType _type;translator.Get(L, 2, out _type);
                    int _itemId = LuaAPI.xlua_tointeger(L, 3);
                    
                        int gen_ret = gen_to_be_invoked.SetEquipScore( _type, _itemId );
                        int gen_ret = gen_to_be_invoked.GetEquipScore( _type, _itemId );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    
                    
@@ -303,9 +302,6 @@
                
                {
                    ItemConfig _itemConfig = (ItemConfig)translator.GetObject(L, 2, typeof(ItemConfig));
                        bool gen_ret = gen_to_be_invoked.CheckIsCustomItem( _itemConfig );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
@@ -1181,7 +1177,6 @@
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
                Snxxz.UI.PackModelInterface gen_to_be_invoked = (Snxxz.UI.PackModelInterface)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.preciousItemType);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
@@ -1195,7 +1190,6 @@
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
                Snxxz.UI.PackModelInterface gen_to_be_invoked = (Snxxz.UI.PackModelInterface)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.betterEquipExceptDungeonDict);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
@@ -1209,7 +1203,6 @@
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
                Snxxz.UI.PackModelInterface gen_to_be_invoked = (Snxxz.UI.PackModelInterface)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.promptUseLimitDict);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
@@ -1265,7 +1258,6 @@
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
                Snxxz.UI.PackModelInterface gen_to_be_invoked = (Snxxz.UI.PackModelInterface)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.pushBuffTypeIds);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
@@ -1310,7 +1302,6 @@
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
                Snxxz.UI.PackModelInterface gen_to_be_invoked = (Snxxz.UI.PackModelInterface)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.pushBuffTypeIds = (int[])translator.GetObject(L, 2, typeof(int[]));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
System/FairyAu/PlayerFairyAuTreasureData.cs
@@ -213,7 +213,7 @@
                    int ItemId = _DicfamilyStoreItem[key].ItemID;
                    var itemConfig = ItemConfig.Get(ItemId);
                    int RealmLevel = PlayerDatas.Instance.baseData.realmLevel;
                    int equipScore = modelInterface.SetEquipScore(PackType.Equip, ItemId, _DicfamilyStoreItem[key]._UserData);
                    int equipScore = modelInterface.GetEquipScore(PackType.Equip, ItemId, _DicfamilyStoreItem[key]._UserData);
                    if (ItemModel.config.EquipPlace == Type && RealmLevel >= itemConfig.RealmLimit && equipScore >= ItemModel.equipScore)
                    {
                        IsBool = true;
System/GeneralConfig/GeneralDefine.cs
@@ -9,6 +9,11 @@
public class GeneralDefine
{
    public static int initDepotGridCount { get; private set; }
    public static int maxDepotGridCount { get; private set; }
    public static int initBagGridCount { get; private set; }
    public static int maxBagGridCount { get; private set; }
    public static int greatMasterStartLV { get; private set; }
    public static int playerMaxLevel { get; private set; }
    public static float potentialUpSuccessRecommend { get; private set; }
@@ -181,6 +186,11 @@
    {
        try
        {
            initDepotGridCount = GetInt("InitDepotCellCount");
            maxDepotGridCount = GetInt("MaxDepotCellCount");
            initBagGridCount = GetInt("InitBagCellCount");
            maxBagGridCount = GetInt("MaxBagCellCount");
            CompareEquipPlaces = GetIntArray("EquipUpType");
            greatMasterStartLV = GetInt("GreatMasterStartLV");
            playerMaxLevel = GetInt("PlayerMaxLV");
System/KnapSack/Logic/ItemModel.cs
@@ -60,7 +60,7 @@
                serverSurplusTime = useDataDict[48][0];
            }
            this.equipScore = modelInterface.SetEquipScore(packType, itemId, useDataDict);
            this.equipScore = modelInterface.GetEquipScore(packType, itemId, useDataDict);
            if (GetUseDataModel((int)ItemUseDataKey.itemCount) != null)
            {
                itemInfo.count = GetUseDataModel((int)ItemUseDataKey.itemCount)[0];
System/KnapSack/Logic/ItemOperateUtility.cs
@@ -759,7 +759,7 @@
            switch (useItemModel.config.ID)
            {
                case 951:
                    int startLockIndex = singlePack.unlockedGridCount - playerPack.InitBagGridCnt;
                    int startLockIndex = singlePack.unlockedGridCount - GeneralDefine.initBagGridCount;
                    int chooseGridCnt = singlePack.unlockedGridCount + GetExtendGridCnt(startLockIndex);
                    modelInterface.OpenGrid(chooseGridCnt, PackType.Item);
                    return;
@@ -854,7 +854,7 @@
                {
                    extendCnt = 1;
                }
                int remianLock = playerPack.MaxBagGridCnt - playerPack.GetSinglePack(PackType.Item).unlockedGridCount;
                int remianLock = GeneralDefine.maxBagGridCount - playerPack.GetSinglePack(PackType.Item).unlockedGridCount;
                if (extendCnt > remianLock)
                {
                    extendCnt = remianLock;
System/KnapSack/Logic/ItemTipsModel.cs
@@ -3080,7 +3080,7 @@
                    SetWingsRefineMat(GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID), GetUseDataModel((int)ItemUseDataKey.wingMaterialItemCount));
                }
            }
            this.score = modelInterface.SetEquipScore(type, id, useDataDict, isPreview);
            this.score = modelInterface.GetEquipScore(type, id, useDataDict, isPreview);
            PetEatEquipConfig petEatConfig = PetEatEquipConfig.GetEquipColorAndEquipClass(itemConfig.ItemColor, itemConfig.LV);//仙盟仓库装备积分兑换表
            this.unionWarehouseScore = 0;
            if (petEatConfig != null)
System/KnapSack/Logic/PackModelInterface.cs
@@ -1,38 +1,30 @@
using Snxxz.UI;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using LitJson;
using UnityEngine;
namespace Snxxz.UI
{
    [XLua.LuaCallCSharp]
    public class PackModelInterface : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    public class PackModelInterface : Model, IBeforePlayerDataInitialize
    {
        private ItemConfig tagChinModel;
        private FuncConfigConfig _equipGSFormula;
        private FuncConfigConfig _itemPush;
        private FuncConfigConfig _drugIDFunc;
        private FuncConfigConfig _oneKeySellFunc;
        private string jadeDynastyGSFormula;
        private string dogzGSFormula;
        private string normalGSFormula;
        public int[] preciousItemType { get; private set; }
        private int[] preciousItemType;
        private int[] drugIDs;
        public Dictionary<int, List<int>> betterEquipExceptDungeonDict { get; private set; }
        private int[] onekeySellTypes;
        PlayerPackModel _playerPack;
        PlayerPackModel playerPack {
            get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
        }
        private int[] pushItemIds;
        private int[] pushBuffTypeIds;
        ItemTipsModel _itemTipsModel;
        ItemTipsModel itemTipsModel {
            get {
                return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
            }
        }
        private List<int> equipBaseProperties = new List<int>();
        private Dictionary<int, int> promptUseLimitDict;
        private Dictionary<int, List<int>> betterEquipExceptDungeonDict;
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        PlayerBuffDatas buffDatas { get { return ModelCenter.Instance.GetModel<PlayerBuffDatas>(); } }
        PlayerMountDatas mountDatas { get { return ModelCenter.Instance.GetModel<PlayerMountDatas>(); } }
        PlayerPetDatas petDatas { get { return ModelCenter.Instance.GetModel<PlayerPetDatas>(); } }
@@ -41,50 +33,44 @@
        TrialDungeonModel trialModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
        ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
        private int[] pushItemIds;
        public int[] pushBuffTypeIds;
        private List<int> equipBaseAttrlist = new List<int>();
        public Dictionary<int, int> promptUseLimitDict { get; private set; }
        public override void Init()
        {
            _equipGSFormula = FuncConfigConfig.Get("EquipGSFormula");
            equipBaseAttrlist.Clear();
            JsonData baseAttr = JsonMapper.ToObject(_equipGSFormula.Numerical2);
            var GSFormulaConfig = FuncConfigConfig.Get("EquipGSFormula");
            jadeDynastyGSFormula = GSFormulaConfig.Numerical4;
            dogzGSFormula = GSFormulaConfig.Numerical3;
            normalGSFormula = GSFormulaConfig.Numerical1;
            var baseAttr = JsonMapper.ToObject(GSFormulaConfig.Numerical2);
            if (baseAttr.IsArray)
            {
                for (int i = 0; i < baseAttr.Count; i++)
                {
                    equipBaseAttrlist.Add(int.Parse(baseAttr[i].ToString()));
                    equipBaseProperties.Add(int.Parse(baseAttr[i].ToString()));
                }
            }
            _itemPush = FuncConfigConfig.Get("ItemPush");
            preciousItemType = ConfigParse.GetMultipleStr<int>(_itemPush.Numerical1);
            preciousItemType = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("ItemPush").Numerical1);
            promptUseLimitDict = ConfigParse.GetDic<int, int>(FuncConfigConfig.Get("NoPromptUsetItem").Numerical1);
            FuncConfigConfig noPromptUsetItem = FuncConfigConfig.Get("NoPromptUsetItem");
            promptUseLimitDict = ConfigParse.GetDic<int, int>(noPromptUsetItem.Numerical1);
            drugIDs = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("LifePotionlist").Numerical1);
            onekeySellTypes = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("OneKeySellItemType").Numerical1);
            _drugIDFunc = FuncConfigConfig.Get("LifePotionlist");
            drugIDs = ConfigParse.GetMultipleStr<int>(_drugIDFunc.Numerical1);
            _oneKeySellFunc = FuncConfigConfig.Get("OneKeySellItemType");
            onekeySellTypes = ConfigParse.GetMultipleStr<int>(_oneKeySellFunc.Numerical1);
            FuncConfigConfig funcConfig = FuncConfigConfig.Get("IntroductionItem");
            pushItemIds = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1);
            pushBuffTypeIds = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical2);
            FuncConfigConfig betterEquipExcConfig = FuncConfigConfig.Get("GoodItemDungeon");
            pushItemIds = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("IntroductionItem").Numerical1);
            pushBuffTypeIds = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("IntroductionItem").Numerical2);
            betterEquipExceptDungeonDict = new Dictionary<int, List<int>>();
            JsonData excEquipData = JsonMapper.ToObject(betterEquipExcConfig.Numerical1);
            var excEquipData = JsonMapper.ToObject(FuncConfigConfig.Get("GoodItemDungeon").Numerical1);
            foreach (var dungeonId in excEquipData.Keys)
            {
                List<int> idlist = new List<int>();
                betterEquipExceptDungeonDict.Add(int.Parse(dungeonId), idlist);
                for (int i = 0; i < excEquipData[dungeonId].Count; i++)
                var itemIds = new List<int>();
                betterEquipExceptDungeonDict.Add(int.Parse(dungeonId), itemIds);
                for (var i = 0; i < excEquipData[dungeonId].Count; i++)
                {
                    int itemId = int.Parse(excEquipData[dungeonId][i].ToString());
                    idlist.Add(itemId);
                    var itemId = int.Parse(excEquipData[dungeonId][i].ToString());
                    itemIds.Add(itemId);
                }
            }
        }
        public void OnBeforePlayerDataInitialize()
@@ -94,12 +80,6 @@
            itemEffectCDDict.Clear();
            itemEffectTimelist.Clear();
        }
        public void OnPlayerLoginOk()
        {
        }
        public override void UnInit()
        {
@@ -111,87 +91,174 @@
        /// 得到特殊属性的字典
        /// </summary>
        private Dictionary<AttrEnum, int> specAttrDic = new Dictionary<AttrEnum, int>();
        public int SetEquipScore(PackType type, int itemId, Dictionary<int, List<int>> useDataDic = null, bool isPreview = false)
        class EquipSorceProperties
        {
            specAttrDic.Clear();
            int id = itemId;
            ItemConfig itemConfig = ItemConfig.Get(itemId);
            if (CheckIsCustomItem(itemConfig))
            Dictionary<int, int> properties = new Dictionary<int, int>();
            public int this[int id] { get { return properties[id]; } }
            public List<int> Keys { get { return new List<int>(properties.Keys); } }
            public void Add(int id, int value)
            {
                AppointItemConfig appointItemConfig = AppointItemConfig.Get(itemId);
                SetCustomAttrData(appointItemConfig);
                id = itemConfig.EffectValueA1;
            }
            else
            {
                if (isPreview)
                if (properties.ContainsKey(id))
                {
                    List<int> legendIdlist = new List<int>();
                    List<int> legendValuelist = new List<int>();
                    switch (itemConfig.EquipPlace)
                    {
                        case 11:
                            CalculateWingsLegendAttr(itemConfig, out legendIdlist, out legendValuelist);
                            break;
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 12:
                            CalculateEquipLegendAttr(itemConfig, out legendIdlist, out legendValuelist);
                            break;
                    }
                    var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
                    switch (packType)
                    {
                        case PackType.JadeDynastyItem:
                            CalculateJadeDynastyLegendAttr(itemConfig, out legendIdlist, out legendValuelist);
                            break;
                    }
                    if (legendIdlist.Count == legendValuelist.Count)
                    {
                        SetLegendData(legendIdlist, legendValuelist);
                    }
                    properties[id] += value;
                }
                else
                {
                    if (useDataDic != null)
                    {
                        if (useDataDic.ContainsKey((int)ItemUseDataKey.legendAttrID))
                        {
                            SetLegendData(useDataDic[(int)ItemUseDataKey.legendAttrID], useDataDic[(int)ItemUseDataKey.legendAttrValue]);
                        }
                        if (useDataDic.ContainsKey((int)ItemUseDataKey.outOfPrintAttrID))
                        {
                            SetExhaustedData(useDataDic[(int)ItemUseDataKey.outOfPrintAttrID], useDataDic[(int)ItemUseDataKey.outOfPrintAttrValue]);
                        }
                    }
                    properties[id] = value;
                }
            }
            return GetEquipScore(type, id, specAttrDic);
            public void AddRange(List<int> ids, List<int> values)
            {
                if (ids == null || values == null)
                {
                    return;
                }
                var count = Mathf.Min(ids.Count, values.Count);
                for (int i = 0; i < count; i++)
                {
                    Add(ids[i], values[i]);
                }
            }
            public void AddRange(int[] ids, int[] values)
            {
                if (ids == null || values == null)
                {
                    return;
                }
                var length = Mathf.Min(ids.Length, values.Length);
                for (int i = 0; i < length; i++)
                {
                    Add(ids[i], values[i]);
                }
            }
            public void AddBaseProperties(int itemId, List<int> reference)
            {
                var config = ItemConfig.Get(itemId);
                if (config.Effect1 != 0 && reference.Contains(config.Effect1))
                {
                    properties.Add(config.Effect1, config.EffectValueA1);
                }
                if (config.Effect2 != 0 && reference.Contains(config.Effect2))
                {
                    properties.Add(config.Effect2, config.EffectValueA2);
                }
                if (config.Effect3 != 0 && reference.Contains(config.Effect3))
                {
                    properties.Add(config.Effect3, config.EffectValueA3);
                }
                if (config.Effect4 != 0 && reference.Contains(config.Effect4))
                {
                    properties.Add(config.Effect4, config.EffectValueA4);
                }
                if (config.Effect5 != 0 && reference.Contains(config.Effect5))
                {
                    properties.Add(config.Effect5, config.EffectValueA5);
                }
            }
            public void AddCustomProperties(int itemId)
            {
                if (AppointItemConfig.Has(itemId))
                {
                    return;
                }
                var config = AppointItemConfig.Get(itemId);
                AddRange(config.LegendAttrID, config.LegendAttrValue);
                AddRange(config.OutOfPrintAttr, config.OutOfPrintAttrValue);
            }
        }
        private void CalculateEquipLegendAttr(ItemConfig itemConfig, out List<int> legendIdlist, out List<int> legendValuelist)
        public int GetEquipScore(PackType type, int itemId, Dictionary<int, List<int>> useDataDic = null, bool isPreview = false)
        {
            specAttrDic.Clear();
            var config = ItemConfig.Get(itemId);
            var properties = new EquipSorceProperties();
            if (IsCustomItem(itemId))
            {
                properties.AddBaseProperties(config.EffectValueA1, equipBaseProperties);
                properties.AddCustomProperties(itemId);
                return CalculateEquipScore(type, config.EffectValueA1, properties);
            }
            properties.AddBaseProperties(itemId, equipBaseProperties);
            if (isPreview)
            {
                List<int> legendIdlist = new List<int>();
                List<int> legendValuelist = new List<int>();
                switch (config.EquipPlace)
                {
                    case 11:
                        CalculateWingsLegendAttr(itemId, out legendIdlist, out legendValuelist);
                        break;
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 12:
                        CalculateEquipLegendAttr(itemId, out legendIdlist, out legendValuelist);
                        break;
                }
                var packType = GeneralDefine.GetPackTypeByItemType(config.Type);
                switch (packType)
                {
                    case PackType.JadeDynastyItem:
                        CalculateJadeDynastyLegendAttr(config, out legendIdlist, out legendValuelist);
                        break;
                }
                properties.AddRange(legendIdlist, legendValuelist);
                return CalculateEquipScore(type, itemId, properties);
            }
            if (useDataDic != null)
            {
                if (useDataDic.ContainsKey((int)ItemUseDataKey.legendAttrID))
                {
                    properties.AddRange(useDataDic[(int)ItemUseDataKey.legendAttrID], useDataDic[(int)ItemUseDataKey.legendAttrValue]);
                }
                if (useDataDic.ContainsKey((int)ItemUseDataKey.outOfPrintAttrID))
                {
                    properties.AddRange(useDataDic[(int)ItemUseDataKey.outOfPrintAttrID], useDataDic[(int)ItemUseDataKey.outOfPrintAttrValue]);
                }
            }
            return CalculateEquipScore(type, itemId, properties);
        }
        private void CalculateEquipLegendAttr(int itemId, out List<int> legendIdlist, out List<int> legendValuelist)
        {
            var config = ItemConfig.Get(itemId);
            legendIdlist = new List<int>();
            legendValuelist = new List<int>();
            string attrCntKey = StringUtility.Contact(itemConfig.ItemColor, itemConfig.StarLevel);
            string attrCntKey = StringUtility.Contact(config.ItemColor, config.StarLevel);
            var attrIDDict = itemTipsModel.legendAttrIDPreviewDict;
            var attrCntDict = itemTipsModel.legendAttrCntPreviewDict;
            if (attrIDDict.ContainsKey(itemConfig.EquipPlace))
            if (attrIDDict.ContainsKey(config.EquipPlace))
            {
                var attrTypeDict = itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace];
                var attrTypeDict = itemTipsModel.legendAttrIDPreviewDict[config.EquipPlace];
                foreach (var attrType in attrTypeDict.Keys)
                {
@@ -214,35 +281,38 @@
            {
                if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
                {
                    if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor))
                    if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(config.ItemColor))
                    {
                        legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]);
                        legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][config.ItemColor]);
                    }
                }
                else if (itemTipsModel.legendAttrLvValuePreviewDict.ContainsKey(legendIdlist[i]))
                {
                    if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.LV))
                    if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(config.LV))
                    {
                        legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][itemConfig.LV]);
                        legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][config.LV]);
                    }
                }
            }
        }
        private void CalculateWingsLegendAttr(ItemConfig itemConfig, out List<int> legendIdlist, out List<int> legendValuelist)
        private void CalculateWingsLegendAttr(int itemId, out List<int> legendIdlist, out List<int> legendValuelist)
        {
            var config = ItemConfig.Get(itemId);
            legendIdlist = new List<int>();
            legendValuelist = new List<int>();
            var attrCntDict = itemTipsModel.wingsLegendAttrCntPreviewDict;
            var attrValueDict = itemTipsModel.wingsLegendAttrValuePreviewDict;
            int attrCnt = 0;
            if (attrCntDict.ContainsKey(itemConfig.LV))
            if (attrCntDict.ContainsKey(config.LV))
            {
                attrCnt = attrCntDict[itemConfig.LV];
                attrCnt = attrCntDict[config.LV];
            }
            if (attrValueDict.ContainsKey(itemConfig.LV))
            if (attrValueDict.ContainsKey(config.LV))
            {
                var attrIdDict = attrValueDict[itemConfig.LV];
                var attrIdDict = attrValueDict[config.LV];
                foreach (var attrId in attrIdDict.Keys)
                {
                    if (legendIdlist.Count < attrCnt)
@@ -251,8 +321,8 @@
                        legendValuelist.Add(attrIdDict[attrId][0]);
                    }
                }
            }
        }
        private void CalculateJadeDynastyLegendAttr(ItemConfig itemConfig, out List<int> legendIdlist, out List<int> legendValuelist)
@@ -263,98 +333,14 @@
            legendValuelist = attrDict.Values.ToList();
        }
        #region 预览定制属性逻辑处理
        public bool CheckIsCustomItem(ItemConfig itemConfig)
        bool IsCustomItem(int itemId)
        {
            if (itemConfig == null) return false;
            if (itemConfig.Effect1 == 220)
            if (!ItemConfig.Has(itemId))
            {
                return true;
            }
            return false;
        }
        /// <summary>
        /// 设置定制属性的数据
        /// </summary>
        private void SetCustomAttrData(AppointItemConfig appointItemConfig)
        {
            if (appointItemConfig == null)
                return;
            List<int> legendIdlist = null;
            List<int> legendValuelist = null;
            List<int> exhaustedIdlist = null;
            List<int> exhaustedValuelist = null;
            int i = 0;
            if (appointItemConfig.LegendAttrID.Length > 0)
            {
                legendIdlist = new List<int>();
                legendValuelist = new List<int>();
                for (i = 0; i < appointItemConfig.LegendAttrID.Length; i++)
                {
                    legendIdlist.Add(appointItemConfig.LegendAttrID[i]);
                    legendValuelist.Add(appointItemConfig.LegendAttrValue[i]);
                }
                return false;
            }
            if (appointItemConfig.OutOfPrintAttr.Length > 0)
            {
                exhaustedIdlist = new List<int>();
                exhaustedValuelist = new List<int>();
                for (i = 0; i < appointItemConfig.OutOfPrintAttr.Length; i++)
                {
                    exhaustedIdlist.Add(appointItemConfig.OutOfPrintAttr[i]);
                    exhaustedValuelist.Add(appointItemConfig.OutOfPrintAttrValue[i]);
                }
            }
            SetLegendData(legendIdlist, legendValuelist);
            SetExhaustedData(exhaustedIdlist, exhaustedValuelist);
        }
        #endregion
        /// <summary>
        /// 设置传奇属性数据
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="values"></param>
        private void SetLegendData(List<int> ids, List<int> values)
        {
            if (ids == null || ids.Count < 1) return;
            int i = 0;
            for (i = 0; i < ids.Count; i++)
            {
                SetSpecAttrlist(ids[i], values[i]);
            }
        }
        /// <summary>
        /// 设置绝版属性数据
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="values"></param>
        private void SetExhaustedData(List<int> ids, List<int> values)
        {
            if (ids == null || ids.Count < 1) return;
            int i = 0;
            for (i = 0; i < ids.Count; i++)
            {
                SetSpecAttrlist(ids[i], values[i]);
            }
        }
        private void SetSpecAttrlist(int attrId, int attrValue)
        {
            AttrEnum attrEnum = (AttrEnum)attrId;
            if (!specAttrDic.ContainsKey(attrEnum))
            {
                specAttrDic.Add(attrEnum, attrValue);
            }
            else
            {
                specAttrDic[attrEnum] = attrValue;
            }
            return ItemConfig.Get(itemId).Effect1 == 220;
        }
        /// <summary>
@@ -362,142 +348,78 @@
        /// </summary>
        /// <param name="itemId"></param>
        /// <returns></returns>
        private Dictionary<int, int> itemEffectDict = new Dictionary<int, int>();
        private Dictionary<AttrEnum, float> curEquipAttrDict = new Dictionary<AttrEnum, float>(); //存储当前装备属性对应的数值 key 属性 value 属性值
        private Dictionary<AttrEnum, int> _tagGsProValueDict;
        private Dictionary<string, string> _equipGSFormulaDict = new Dictionary<string, string>(); //key 公式参数 value 参数数值
        private float curProValue = 0;
        private int GetEquipScore(PackType type, int itemId, Dictionary<AttrEnum, int> specAttrDict)
        private int CalculateEquipScore(PackType type, int itemId, EquipSorceProperties properties)
        {
            tagChinModel = ItemConfig.Get(itemId);
            if (tagChinModel == null || !GeneralDefine.CompareEquipPlaces.Contains(tagChinModel.EquipPlace)) return 0;
            var config = ItemConfig.Get(itemId);
            if (config == null || !GeneralDefine.CompareEquipPlaces.Contains(config.EquipPlace))
            {
                return 0;
            }
            Equation.Instance.Clear();
            _tagGsProValueDict = EquipGSParamConfig.GetTagGsProValueDict(tagChinModel.LV, tagChinModel.ItemColor, tagChinModel.StarLevel);
            curEquipAttrDict.Clear();
            itemEffectDict.Clear();
            _equipGSFormulaDict.Clear();
            try
            var GSProValueDict = EquipGSParamConfig.GetTagGsProValueDict(config.LV, config.ItemColor, config.StarLevel);
            foreach (var key in properties.Keys)
            {
                if (tagChinModel.Effect1 != 0)
                {
                    ConvertAttrId(tagChinModel.Effect1, tagChinModel.EffectValueA1, itemEffectDict);
                }
                if (tagChinModel.Effect2 != 0)
                {
                    ConvertAttrId(tagChinModel.Effect2, tagChinModel.EffectValueA2, itemEffectDict);
                }
                if (tagChinModel.Effect3 != 0)
                {
                    ConvertAttrId(tagChinModel.Effect3, tagChinModel.EffectValueA3, itemEffectDict);
                }
                if (tagChinModel.Effect4 != 0)
                {
                    ConvertAttrId(tagChinModel.Effect4, tagChinModel.EffectValueA4, itemEffectDict);
                }
                if (tagChinModel.Effect5 != 0)
                {
                    ConvertAttrId(tagChinModel.Effect5, tagChinModel.EffectValueA5, itemEffectDict);
                }
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex.ToString());
            }
            foreach (var key in itemEffectDict.Keys)
            {
                if (equipBaseAttrlist.Contains(key))
                {
                    switch ((AttrEnum)key)
                    {
                        case AttrEnum.ATKSPEED:
                        case AttrEnum.OnlyFinalHurt:
                        case AttrEnum.PVPAtkBackHP:
                            curEquipAttrDict.Add((AttrEnum)key, itemEffectDict[key]);
                            break;
                        default:
                            if (_tagGsProValueDict != null && _tagGsProValueDict.ContainsKey((AttrEnum)key))
                            {
                                curProValue = itemEffectDict[key] * _tagGsProValueDict[(AttrEnum)key];
                                curEquipAttrDict.Add((AttrEnum)key, curProValue);
                            }
                            else
                            {
                                curEquipAttrDict.Add((AttrEnum)key, itemEffectDict[key]);
                            }
                            break;
                    }
                }
            }
            foreach (AttrEnum attrType in specAttrDict.Keys)
            {
                var attrType = (AttrEnum)key;
                switch (attrType)
                {
                    case AttrEnum.ATKSPEED:
                    case AttrEnum.OnlyFinalHurt:
                    case AttrEnum.PVPAtkBackHP:
                        curEquipAttrDict.Add(attrType, specAttrDict[attrType]);
                        curEquipAttrDict.Add(attrType, properties[key]);
                        break;
                    default:
                        if (_tagGsProValueDict != null && _tagGsProValueDict.ContainsKey(attrType))
                        if (GSProValueDict != null && GSProValueDict.ContainsKey(attrType))
                        {
                            curProValue = specAttrDict[attrType] * _tagGsProValueDict[attrType];
                            var curProValue = properties[key] * GSProValueDict[attrType];
                            curEquipAttrDict.Add(attrType, curProValue);
                        }
                        else
                        {
                            curEquipAttrDict.Add(attrType, specAttrDict[attrType]);
                            curEquipAttrDict.Add(attrType, properties[key]);
                        }
                        break;
                }
            }
            if (_equipGSFormula != null)
            foreach (var key in curEquipAttrDict.Keys)
            {
                foreach (var key in curEquipAttrDict.Keys)
                var propertyConfig = PlayerPropertyConfig.Get((int)key);
                if (propertyConfig != null)
                {
                    PlayerPropertyConfig propertyConfig = PlayerPropertyConfig.Get((int)key);
                    if (propertyConfig != null)
                    {
                        Equation.Instance.AddKeyValue(propertyConfig.Parameter, curEquipAttrDict[key]);
                    }
                }
                EquipGSParamConfig gSParamModel = EquipGSParamConfig.GetTagGSModel(tagChinModel.LV, tagChinModel.ItemColor, tagChinModel.StarLevel);
                if (gSParamModel != null)
                {
                    Equation.Instance.AddKeyValue("AtkSpeedC", gSParamModel.AtkSpeedC);
                }
                else
                {
                    Equation.Instance.AddKeyValue("AtkSpeedC", 0);
                }
                DebugEx.Log("评分:" + Equation.Instance.Eval<double>(_equipGSFormula.Numerical1));
                if (type == PackType.Deleted)
                {
                    type = GeneralDefine.GetPackTypeByItemType(tagChinModel.Type);
                }
                switch (type)
                {
                    case PackType.DogzEquip:
                    case PackType.DogzItem:
                        return Equation.Instance.Eval<int>(_equipGSFormula.Numerical3);
                    case PackType.JadeDynastyItem:
                    case PackType.JadeDynastyEquip:
                        return Equation.Instance.Eval<int>(_equipGSFormula.Numerical4);
                    default:
                        return Equation.Instance.Eval<int>(_equipGSFormula.Numerical1);
                    Equation.Instance.AddKeyValue(propertyConfig.Parameter, curEquipAttrDict[key]);
                }
            }
            return 0;
            var gSParamModel = EquipGSParamConfig.GetGSModel(config.LV, config.ItemColor, config.StarLevel);
            if (gSParamModel != null)
            {
                Equation.Instance.AddKeyValue("AtkSpeedC", gSParamModel.AtkSpeedC);
            }
            else
            {
                Equation.Instance.AddKeyValue("AtkSpeedC", 0);
            }
            if (type == PackType.Deleted)
            {
                type = GeneralDefine.GetPackTypeByItemType(config.Type);
            }
            switch (type)
            {
                case PackType.DogzEquip:
                case PackType.DogzItem:
                    return Equation.Instance.Eval<int>(dogzGSFormula);
                case PackType.JadeDynastyItem:
                case PackType.JadeDynastyEquip:
                    return Equation.Instance.Eval<int>(jadeDynastyGSFormula);
                default:
                    return Equation.Instance.Eval<int>(normalGSFormula);
            }
        }
        private void ConvertAttrId(int attrId, int attrValue, Dictionary<int, int> keyValues)
@@ -826,7 +748,7 @@
            SinglePack singlePack = playerPack.GetSinglePack(PackType.Item);
            if (singlePack == null) return false;
            int startLockIndex = singlePack.unlockedGridCount - playerPack.InitBagGridCnt;
            int startLockIndex = singlePack.unlockedGridCount - GeneralDefine.initBagGridCount;
            FuncConfigConfig _tagFuncModel = FuncConfigConfig.Get("OpenBagItem");
            int haveCount = playerPack.GetItemCountByID(PackType.Item, itemId);
            Equation.Instance.Clear();
@@ -1045,10 +967,10 @@
            switch (type)
            {
                case PackType.Item:
                    index = chooseGridCount - playerPack.InitBagGridCnt;
                    index = chooseGridCount - GeneralDefine.initBagGridCount;
                    break;
                case PackType.Warehouse:
                    index = chooseGridCount - playerPack.InitDepotGridCnt;
                    index = chooseGridCount - GeneralDefine.initDepotGridCount;
                    break;
            }
            itemTipsModel.SetExtendGirdModel(openCount, index, type);
System/KnapSack/Logic/PlayerPackModels.cs
@@ -1,9 +1,7 @@
using Snxxz.UI;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using LitJson;
namespace Snxxz.UI
@@ -19,12 +17,8 @@
        public List<AttrFruitConfig> makeDruglist { get; private set; }
        Dictionary<int, Dictionary<int, int>> decomposeAttrDict = new Dictionary<int, Dictionary<int, int>>();
        string RoleEquipLocalSave = "";
        public int MaxBagGridCnt { get; private set; }
        public int InitBagGridCnt { get; private set; }
        public int MaxDepotGridCnt { get; private set; }
        public int InitDepotGridCnt { get; private set; }
        List<int> LocalSavePlaceArray { get; set; }
        Dictionary<int, List<int>> ShareUseCntItemDict { get; set; }
        Dictionary<int, List<int>> sharedUseCountItemDict { get; set; }
        bool isUpdatePlayerLv = false;
        BlastFurnaceModel FurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
@@ -48,7 +42,6 @@
                        {
                            DrugToDungeonDict.Add(drugIdlist[j], dungeonlist[i].DataMapID);
                        }
                    }
                }
            }
@@ -84,7 +77,7 @@
            defaultUnSelectlist = ConfigParse.GetMultipleStr<int>(equipDecompose.Numerical2);
            FuncConfigConfig ShareUseCntItem = FuncConfigConfig.Get("ShareUseCntItem");
            ShareUseCntItemDict = new Dictionary<int, List<int>>();
            sharedUseCountItemDict = new Dictionary<int, List<int>>();
            JsonData shareUseJson = JsonMapper.ToObject(ShareUseCntItem.Numerical1);
            if (shareUseJson.IsArray)
            {
@@ -92,7 +85,7 @@
                {
                    var idListJson = shareUseJson[i];
                    var idlist = new List<int>();
                    ShareUseCntItemDict.Add(i, idlist);
                    sharedUseCountItemDict.Add(i, idlist);
                    foreach (var id in idListJson)
                    {
                        idlist.Add(int.Parse(id.ToString()));
@@ -100,10 +93,6 @@
                }
            }
            InitDepotGridCnt = int.Parse(FuncConfigConfig.Get("InitDepotCellCount").Numerical1);
            InitBagGridCnt = int.Parse(FuncConfigConfig.Get("InitBagCellCount").Numerical1);
            MaxBagGridCnt = int.Parse(FuncConfigConfig.Get("MaxBagCellCount").Numerical1);
            MaxDepotGridCnt = int.Parse(FuncConfigConfig.Get("MaxDepotCellCount").Numerical1);
            SetRoleEquipRedpoint();
        }
@@ -911,7 +900,7 @@
        public bool TryGetShareNumItem(int itemId, out List<int> idlist)
        {
            idlist = new List<int>();
            foreach (var list in ShareUseCntItemDict.Values)
            foreach (var list in sharedUseCountItemDict.Values)
            {
                if (list.Contains(itemId))
                {
System/KnapSack/New/CommonItemBaisc.cs
@@ -353,7 +353,7 @@
                this.itemId = itemConfig.EffectValueA1;
                this.itemConfig = ItemConfig.Get(this.itemId);
            }
            this.score = modelInterface.SetEquipScore(type,itemId,useDataDic,isPreview);
            this.score = modelInterface.GetEquipScore(type,itemId,useDataDic,isPreview);
        }
        public bool CheckIsCustomItem()