| | |
| | | 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.GetEquipScore( _type, _itemId, _useDataDic, _isPreview ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | |
| | | 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.GetEquipScore( _type, _itemId, _useDataDic ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | |
| | | { |
| | | PackType _type;translator.Get(L, 2, out _type); |
| | | int _itemId = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetEquipScore( _type, _itemId ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | |
| | | isAuction = false, |
| | | isEquiped = false, |
| | | isPreview = true, |
| | | score = ItemLogicUtility.Instance.GetEquipScore(PackType.Item, itemId, null, true), |
| | | score = ItemLogicUtility.Instance.GetEquipScore(itemId, null, true), |
| | | auctionSurplusTime = 0, |
| | | levelLimit = config.UseLV, |
| | | realmLimit = config.RealmLimit, |
| | |
| | | |
| | | } |
| | | |
| | | public int GetEquipScore(PackType type, int itemId, Dictionary<int, List<int>> useDataDic = null, bool isPreview = false) |
| | | public int GetEquipScore(int itemId, Dictionary<int, List<int>> useDataDic = null, bool isPreview = false) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | if (config.EquipPlace == 0)
|
| | |
| | | { |
| | | properties.AddBaseProperties(config.EffectValueA1, equipBaseProperties); |
| | | properties.AddCustomProperties(itemId); |
| | | return CalculateEquipScore(type, config.EffectValueA1, properties); |
| | | return CalculateEquipScore( config.EffectValueA1, properties); |
| | | } |
| | | |
| | | properties.AddBaseProperties(itemId, equipBaseProperties); |
| | |
| | | break; |
| | | } |
| | | |
| | | return CalculateEquipScore(type, itemId, properties); |
| | | return CalculateEquipScore( itemId, properties); |
| | | } |
| | | |
| | | if (useDataDic != null) |
| | |
| | | } |
| | | } |
| | | |
| | | return CalculateEquipScore(type, itemId, properties); |
| | | return CalculateEquipScore( itemId, properties); |
| | | } |
| | | |
| | | private Dictionary<int, int> GetEquipLegendProperties(int itemId) |
| | |
| | | /// <param name="itemId"></param> |
| | | /// <returns></returns> |
| | | private Dictionary<PropertyType, float> curEquipAttrDict = new Dictionary<PropertyType, float>(); //存储当前装备属性对应的数值 key 属性 value 属性值 |
| | | private int CalculateEquipScore(PackType type, int itemId, EquipSorceProperties properties) |
| | | private int CalculateEquipScore(int itemId, EquipSorceProperties properties) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | if (config == null || !GeneralDefine.CompareEquipPlaces.Contains(config.EquipPlace)) |
| | |
| | | } |
| | | } |
| | | |
| | | if (type == PackType.Deleted) |
| | | { |
| | | type = GeneralDefine.GetPackTypeByItemType(config.Type); |
| | | } |
| | | |
| | | var skillScore = 0; |
| | | if (config.AddSkill1 != 0 && equipSkillScores.ContainsKey(config.AddSkill1)) |
| | | { |
| | |
| | | spiritWeaponScore = SpiritWeaponConfig.Get(itemId).AttrScore;
|
| | | } |
| | | |
| | | switch (type) |
| | | { |
| | | case PackType.DogzEquip: |
| | | case PackType.DogzItem: |
| | | return Equation.Instance.Eval<int>(dogzGSFormula); |
| | | default: |
| | | return spiritWeaponScore + skillScore + Equation.Instance.Eval<int>(normalGSFormula); |
| | | if (IsDogzEquip(itemId))
|
| | | {
|
| | | return Equation.Instance.Eval<int>(dogzGSFormula);
|
| | | }
|
| | | else
|
| | | {
|
| | | return spiritWeaponScore + skillScore + Equation.Instance.Eval<int>(normalGSFormula);
|
| | | } |
| | | } |
| | | |
| | |
| | | }
|
| | | }
|
| | |
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(packType, itemId, useDataDict, isAuction);
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(itemId, useDataDict, isAuction);
|
| | | }
|
| | |
|
| | | public void RefreshCount(int count)
|
| | |
| | | this.useDataDic = useDataDic;
|
| | | this.packType = type;
|
| | |
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(type, itemId, useDataDic, isPreview);
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore( itemId, useDataDic, isPreview);
|
| | | }
|
| | |
|
| | | public ItemCellModel(int itemId)
|
| | |
| | | this.useDataDic = null;
|
| | | this.packType = PackType.Deleted;
|
| | |
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(PackType.Deleted, itemId, null, isPreview);
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore( itemId, null, isPreview);
|
| | | }
|
| | |
|
| | | int AdjustItemId(int itemId)
|
| | |
| | | starLevel = itemplus.Star,
|
| | | gems = gems,
|
| | | legendProperties = legendProperties,
|
| | | score = ItemLogicUtility.Instance.GetEquipScore(PackType.Item, itemId, useDataDict, true),
|
| | | score = ItemLogicUtility.Instance.GetEquipScore(itemId, useDataDict, true),
|
| | | gemHoleActiveStates = gemHoleActiveStates,
|
| | | suitLevels = suitLevels,
|
| | | suitPlaces = suitplaces,
|
| | |
| | | legendValues.Add(property.y); |
| | | } |
| | | |
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(PackType.Item, itemId, userData); |
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(itemId, userData); |
| | | } |
| | | |
| | | } |