|
|
// 跨服公会
|
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;
|
}
|
}
|
|
|
}
|
|