少年修仙传客户端代码仓库
client_Wu Xijin
2019-06-27 be5d159c18c1aea1fd9f310bcedb7afa05923e10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System.Collections.Generic;
using System.Text;
 
public partial class EquipGSParamConfig : IConfigPostProcess
{
    private static Dictionary<string, EquipGSParamConfig> s_tagGSModelDict = new Dictionary<string, EquipGSParamConfig>();//用于记录装备评分数据
    private static Dictionary<PropertyType, int> _tagGsProValueDict = new Dictionary<PropertyType, int>();
 
    public void OnConfigParseCompleted()
    {
        string key = StringUtility.Contact(EquipClass, EquipColor, IsSuit ,Star);
        s_tagGSModelDict.Add(key, this);
    }
 
    public static EquipGSParamConfig GetGSModel(int lv, int color, int isSuit, int star)
    {
        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, int star)
    {
        _tagGsProValueDict.Clear();
        EquipGSParamConfig gsModel = GetGSModel(lv, color, isSuit , star);
        if (gsModel == null)
            return null;
 
        _tagGsProValueDict.Add(PropertyType.CritHurtPercent, gsModel.SuperHitPerC);
        _tagGsProValueDict.Add(PropertyType.HeartHit, gsModel.LuckyHitRateC);
        _tagGsProValueDict.Add(PropertyType.EveryLvAddAtk, gsModel.PerLVAtkC);
        _tagGsProValueDict.Add(PropertyType.EveryLvAddHp, gsModel.PerLVMaxHPC);
        _tagGsProValueDict.Add(PropertyType.AddCoinsPrecent, gsModel.DropMoneyPerC);
        _tagGsProValueDict.Add(PropertyType.CritResis, gsModel.SuperHitReduceC);
        _tagGsProValueDict.Add(PropertyType.HIT, gsModel.HitC);
        _tagGsProValueDict.Add(PropertyType.MISS, gsModel.MissC);
        _tagGsProValueDict.Add(PropertyType.LuckPer, gsModel.LuckPerC);
        _tagGsProValueDict.Add(PropertyType.WeaponAtkPer, gsModel.BaseEquipAtkAddPerC);
        _tagGsProValueDict.Add(PropertyType.ArmorMaxHPPer, gsModel.BaseEquipMaxHPAddPerC);
        _tagGsProValueDict.Add(PropertyType.HeartResis, gsModel.LuckyHitRateReduceC);
        _tagGsProValueDict.Add(PropertyType.CritHurt, gsModel.SuperHitC);
        _tagGsProValueDict.Add(PropertyType.PetAddHurt, gsModel.PetDamPerC);
        return _tagGsProValueDict;
    }
}