| | |
| | | public int PackType;//强化类型
|
| | |
|
| | | }
|
| | |
|
| | | public class EquipTypeClass
|
| | | {
|
| | | public int AttType;
|
| | | public int AttValue;
|
| | | public string StrName;
|
| | | }
|
| | | public class EquipStrengthModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public Dictionary<int, EquipStrengthClass> EquipStrengthDic = new Dictionary<int, EquipStrengthClass>();//强化数据
|
| | |
| | | public event Action EquipStrengthUpdate;//强化数据刷新
|
| | | public event Action SelectEquipRefresh;//二级页签刷新
|
| | | public event Action SelectLevelRefresh;//一级页签刷新
|
| | |
|
| | | private bool isChangeBool = true;
|
| | | public bool IsChangeBool
|
| | | {
|
| | | get { return isChangeBool; }
|
| | | set { isChangeBool = value; }
|
| | | }
|
| | | private int selectLevel = 0;
|
| | | public int SelectLevel//装备类别
|
| | | {
|
| | |
| | | }
|
| | | return lv;
|
| | | }
|
| | |
|
| | | public List<EquipTypeClass> GetEquipValueList(int level, int equipPlace,int addlv=0)
|
| | | {
|
| | | List<EquipTypeClass> EquipTypeList = new List<EquipTypeClass>();
|
| | | int type = GetEquipStrengthType(equipPlace);
|
| | | int equiplv = 0;
|
| | | int equipIndex = level * 10 + equipPlace;
|
| | | if (EquipStrengthDic.ContainsKey(equipIndex))
|
| | | {
|
| | | equiplv = EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | | }
|
| | | equiplv += addlv;
|
| | | var itemPlus = ItemPlusConfig.GetTypeAndLevel(type, equiplv);
|
| | | if (itemPlus != null)
|
| | | {
|
| | | int [] attType = itemPlus.attType;
|
| | | int [] attValue = itemPlus.attValue;
|
| | | for (int i = 0; i < attType.Length; i++)
|
| | | {
|
| | | EquipTypeClass equipType = new EquipTypeClass();
|
| | | equipType.AttType = attType[i];
|
| | | equipType.AttValue = attValue[i];
|
| | | var config = PlayerPropertyConfig.Get(attType[i]);
|
| | | if (config != null)
|
| | | {
|
| | | equipType.StrName = config.Name;
|
| | | }
|
| | | EquipTypeList.Add(equipType);
|
| | | }
|
| | |
|
| | | }
|
| | | return EquipTypeList;
|
| | |
|
| | | }
|
| | | public ItemPlusConfig GetEquipConfig(int level, int equipPlace)
|
| | | {
|
| | | ItemPlusConfig itemPlusConfig = new ItemPlusConfig();
|
| | | int type = GetEquipStrengthType(equipPlace);
|
| | | int equiplv = 0;
|
| | | int equipIndex = level * 10 + equipPlace;
|
| | | if (EquipStrengthDic.ContainsKey(equipIndex))
|
| | | {
|
| | | equiplv = EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | | }
|
| | | var itemPlus = ItemPlusConfig.GetTypeAndLevel(type, equiplv);
|
| | | return itemPlusConfig;
|
| | | }
|
| | | } |
| | | |
| | | |