| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Wednesday, May 15, 2019
|
| | | // [ Date ]: Wednesday, June 26, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public readonly int EquipClass;
|
| | | public readonly int EquipColor;
|
| | | public readonly int IsSuit;
|
| | | public readonly int Star;
|
| | | public readonly int BaseEquipMaxHPAddPerC;
|
| | | public readonly int BaseEquipAtkAddPerC;
|
| | | public readonly int SuperHitC;
|
| | |
| | |
|
| | | int.TryParse(tables[3],out IsSuit);
|
| | |
|
| | | int.TryParse(tables[4],out BaseEquipMaxHPAddPerC); |
| | | int.TryParse(tables[4],out Star); |
| | |
|
| | | int.TryParse(tables[5],out BaseEquipAtkAddPerC); |
| | | int.TryParse(tables[5],out BaseEquipMaxHPAddPerC); |
| | |
|
| | | int.TryParse(tables[6],out SuperHitC); |
| | | int.TryParse(tables[6],out BaseEquipAtkAddPerC); |
| | |
|
| | | int.TryParse(tables[7],out SuperHitPerC); |
| | | int.TryParse(tables[7],out SuperHitC); |
| | |
|
| | | int.TryParse(tables[8],out LuckyHitRateC); |
| | | int.TryParse(tables[8],out SuperHitPerC); |
| | |
|
| | | int.TryParse(tables[9],out LuckyHitRateReduceC); |
| | | int.TryParse(tables[9],out LuckyHitRateC); |
| | |
|
| | | int.TryParse(tables[10],out LuckPerC); |
| | | int.TryParse(tables[10],out LuckyHitRateReduceC); |
| | |
|
| | | int.TryParse(tables[11],out PerLVAtkC); |
| | | int.TryParse(tables[11],out LuckPerC); |
| | |
|
| | | int.TryParse(tables[12],out PerLVMaxHPC); |
| | | int.TryParse(tables[12],out PerLVAtkC); |
| | |
|
| | | int.TryParse(tables[13],out DropMoneyPerC); |
| | | int.TryParse(tables[13],out PerLVMaxHPC); |
| | |
|
| | | int.TryParse(tables[14],out SuperHitReduceC); |
| | | int.TryParse(tables[14],out DropMoneyPerC); |
| | |
|
| | | int.TryParse(tables[15],out HitC); |
| | | int.TryParse(tables[15],out SuperHitReduceC); |
| | |
|
| | | int.TryParse(tables[16],out MissC); |
| | | int.TryParse(tables[16],out HitC); |
| | |
|
| | | int.TryParse(tables[17],out MissC); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: b14139202185e114e8c1b11ee6917430 |
| | | timeCreated: 1557892128 |
| | | timeCreated: 1561530128 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | string key = StringUtility.Contact(EquipClass, EquipColor, IsSuit);
|
| | | string key = StringUtility.Contact(EquipClass, EquipColor, IsSuit ,Star);
|
| | | s_tagGSModelDict.Add(key, this);
|
| | | }
|
| | |
|
| | | public static EquipGSParamConfig GetGSModel(int lv, int color, int isSuit)
|
| | | public static EquipGSParamConfig GetGSModel(int lv, int color, int isSuit, int star)
|
| | | {
|
| | | string key = StringUtility.Contact(lv, color, isSuit);
|
| | | string key = StringUtility.Contact(lv, color, isSuit, star);
|
| | | EquipGSParamConfig gsModel = null;
|
| | | s_tagGSModelDict.TryGetValue(key, out gsModel);
|
| | | return gsModel;
|
| | | }
|
| | |
|
| | | public static Dictionary<PropertyType, int> GetTagGsProValueDict(int lv, int color, int isSuit)
|
| | | public static Dictionary<PropertyType, int> GetTagGsProValueDict(int lv, int color, int isSuit, int star)
|
| | | {
|
| | | _tagGsProValueDict.Clear();
|
| | | EquipGSParamConfig gsModel = GetGSModel(lv, color, isSuit);
|
| | | EquipGSParamConfig gsModel = GetGSModel(lv, color, isSuit , star);
|
| | | if (gsModel == null)
|
| | | return null;
|
| | |
|
| | |
| | | int _color = LuaAPI.xlua_tointeger(L, 2); |
| | | int _isSuit = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | EquipGSParamConfig gen_ret = EquipGSParamConfig.GetGSModel( _lv, _color, _isSuit ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | |
| | | int _lv = LuaAPI.xlua_tointeger(L, 1); |
| | | int _color = LuaAPI.xlua_tointeger(L, 2); |
| | | int _isSuit = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | System.Collections.Generic.Dictionary<PropertyType, int> gen_ret = EquipGSParamConfig.GetTagGsProValueDict( _lv, _color, _isSuit ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | |
| | | Equation.Instance.Clear(); |
| | | curEquipAttrDict.Clear(); |
| | | |
| | | var GSProValueDict = EquipGSParamConfig.GetTagGsProValueDict(config.LV, config.ItemColor, config.SuiteiD > 0 ? 1 : 0); |
| | | var GSProValueDict = EquipGSParamConfig.GetTagGsProValueDict(config.LV, config.ItemColor, config.SuiteiD > 0 ? 1 : 0 ,config.StarLevel); |
| | | foreach (var key in properties.Keys) |
| | | { |
| | | var attrType = (PropertyType)key; |