lcy
3 天以前 0bafb22817eadd51d0cf54d34e320e833a0fcd97
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
 
 
using System.Collections.Generic;
 
public partial class FamilyEmblemConfig : ConfigBase<int, FamilyEmblemConfig>
{
    private static List<int> defaultEmblemList = new List<int>();
    protected override void OnConfigParseCompleted()
    {
        if (UnlockFamilyLV == 1)
        {
            if (defaultEmblemList.Contains(EmblemID))
                return;
            defaultEmblemList.Add(EmblemID);
        }
    }
 
    public static int GetRandomEmblem()
    {
        if (defaultEmblemList.Count == 0)
            return -1; // 
        System.Random random = new System.Random();
        return defaultEmblemList[random.Next(defaultEmblemList.Count)];
    }
 
 
}