| | |
| | | if (!PlayerPropertyConfig.HasKey(kvp.Key)) |
| | | continue; |
| | | PlayerPropertyConfig config = PlayerPropertyConfig.Get(kvp.Key); |
| | | if (kvp.Value > 0 && config.showType > 0 && config.showType < 5) |
| | | if (kvp.Value > 0 && config.showType > 0) |
| | | { |
| | | result.Add(kvp.Key, kvp.Value); |
| | | } |
| | |
| | | int showTypeB = configB?.showType ?? 0; |
| | | |
| | | if (showTypeA != showTypeB) |
| | | return showTypeA.CompareTo(showTypeB); |
| | | { |
| | | int priorityA = GetShowTypePriority(showTypeA); |
| | | int priorityB = GetShowTypePriority(showTypeB); |
| | | return priorityA.CompareTo(priorityB); |
| | | } |
| | | |
| | | int showSequenceA = configA?.showSequence ?? 0; |
| | | int showSequenceB = configB?.showSequence ?? 0; |
| | |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取showType的优先权,值越小越靠前 |
| | | /// 优先权顺序:[1,6,2,3,4,5],其他值排在最后 |
| | | /// </summary> |
| | | private int GetShowTypePriority(int showType) |
| | | { |
| | | return showType switch |
| | | { |
| | | 1 => 0, // 最高优先权 |
| | | 6 => 1, |
| | | 2 => 2, |
| | | 3 => 3, |
| | | 4 => 4, |
| | | 5 => 5, |
| | | _ => 999 // 未定义的showType排在最后 |
| | | }; |
| | | } |
| | | } |