| | |
| | |
|
| | | public static string GetRealmName(int realmLv, bool bright = false)
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<RealmConfig>(realmLv);
|
| | | var config = Config.Instance.Get<RealmConfig>(realmLv);
|
| | | if (config == null)
|
| | | {
|
| | | return string.Empty;
|
| | |
| | | public static int GetItemColor(int _id, Dictionary<int, List<int>> _dict = null)
|
| | | {
|
| | | int _itemColor = 0;
|
| | | var _itemCfg = ConfigManager.Instance.GetTemplate<ItemConfig>(_id);
|
| | | var _itemCfg = Config.Instance.Get<ItemConfig>(_id);
|
| | | if (_itemCfg != null)
|
| | | {
|
| | | _itemColor = _itemCfg.ItemColor;
|
| | |
| | | if (paraArray == null || paraArray.Length < 2 || paraArray.Length % 2 != 0) return 0;
|
| | | for (int i = 0; i < paraArray.Length; i += 2)
|
| | | {
|
| | | PlayerPropertyConfig cfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(paraArray[i]);
|
| | | PlayerPropertyConfig cfg = Config.Instance.Get<PlayerPropertyConfig>(paraArray[i]);
|
| | | if (cfg != null)
|
| | | {
|
| | | if (paraArray[i] == 7)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | FuncConfigConfig funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>(FightPowerFormula);
|
| | | FuncConfigConfig funcCfg = Config.Instance.Get<FuncConfigConfig>(FightPowerFormula);
|
| | | return Equation.Instance.Eval<uint>(funcCfg.Numerical1);
|
| | | }
|
| | | public static int GetFightPower(Dictionary<int, int> _propertyDict)
|
| | |
| | |
|
| | | foreach (var _key in _propertyDict.Keys)
|
| | | {
|
| | | PlayerPropertyConfig cfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
|
| | | PlayerPropertyConfig cfg = Config.Instance.Get<PlayerPropertyConfig>(_key);
|
| | | if (cfg != null)
|
| | | {
|
| | | if (_key == 7)
|
| | |
| | | if(_key == 11)
|
| | | {
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | FightPowerParamConfig paramConfig = ConfigManager.Instance.GetTemplate<FightPowerParamConfig>(playerLv);
|
| | | FightPowerParamConfig paramConfig = Config.Instance.Get<FightPowerParamConfig>(playerLv);
|
| | | Equation.Instance.AddKeyValue("AtkSpeedParameter", paramConfig.AtkSpeedParameter);
|
| | | }
|
| | | else if(_key == 15)
|
| | | {
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | FightPowerParamConfig paramConfig = ConfigManager.Instance.GetTemplate<FightPowerParamConfig>(playerLv);
|
| | | FightPowerParamConfig paramConfig = Config.Instance.Get<FightPowerParamConfig>(playerLv);
|
| | | Equation.Instance.AddKeyValue("LuckyHitParameter",paramConfig.LuckyHitParameter);
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | FuncConfigConfig funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>(FightPowerFormula);
|
| | | FuncConfigConfig funcCfg = Config.Instance.Get<FuncConfigConfig>(FightPowerFormula);
|
| | | return Equation.Instance.Eval<int>(funcCfg.Numerical1);
|
| | | }
|
| | |
|
| | | public static int GetFightPowerParmByAttrId(int attrId)
|
| | | {
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | FightPowerParamConfig paramConfig = ConfigManager.Instance.GetTemplate<FightPowerParamConfig>(playerLv);
|
| | | PlayerPropertyConfig cfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(attrId);
|
| | | FightPowerParamConfig paramConfig = Config.Instance.Get<FightPowerParamConfig>(playerLv);
|
| | | PlayerPropertyConfig cfg = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | if (paramConfig == null || cfg == null) return 0;
|
| | |
|
| | | switch(cfg.Parameter)
|