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
49
50
51
52
 
 
// 跨服公会
using System;
using System.Collections.Generic;
 
public partial class GuildManager : GameSystemManager<GuildManager>
{
    public int zoneID;
    public List<int> crossServerIDList = new List<int>();
    public event Action OnRefreshCrossServerInfoEvent;
 
    public void OnRefreshCrossServerInfo(HA505_tagSCFamilyCrossInfo vNetData)
    {
        zoneID = vNetData.ZoneID;
        crossServerIDList.Clear();
        for (int i = 0; i < vNetData.ServerCnt; i++)
        {
            crossServerIDList.Add((int)vNetData.ServerIDList[i]);
        }
        crossServerIDList.Sort();
        OnRefreshCrossServerInfoEvent?.Invoke();
    }
 
    // 获取当前时间, 公会跨区前取本服时间,跨服后取跨服时间
    public DateTime GetServerNow()
    {
        if (zoneID == 0)
        {
            return TimeUtility.ServerNow;
        }
        else
        {
            return TimeUtility.CrossServerNow;
        }
    }
 
    public int GetServerTick()
    {
        if (zoneID == 0)
        {
            return TimeUtility.AllSeconds;
        }
        else
        {
            return TimeUtility.AllSecondsCrossServer;
        }
    }
 
 
}