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
| using System.Collections.Generic;
|
| public partial class HeroInfo
| {
| //继承百分比对应三围,对应属性条目表里的ID
| private Dictionary<int, int> _inheritPer;
|
| Dictionary<int, int> inheritPer
| {
| get
| {
| if (_inheritPer == null)
| {
| _inheritPer = new Dictionary<int, int>() {
| { 6, heroConfig.AtkInheritPer },
| { 7, heroConfig.DefInheritPer },
| { 8, heroConfig.HPInheritPer },
| };
| }
| return _inheritPer;
| }
| }
|
| public int GetInheritAttrPer(int attrType)
| {
| return inheritPer.TryGetValue(attrType, out int value) ? value : 0;
| }
| }
|
|