using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using ProtoCSStruct; using Sog.IO; namespace World { /// /// 游戏是否需要排队列表 /// public static class LimitGameIdList { private static FileIntIDList m_whiteList = null; public static bool CheckGameIdNeedWait(long uid) { //是否开启了白名单 if (!WorldServerUtils.GetServerConfig().enableWhiteGameIDList) { return true; } if(uid <= 0) { return true; } //初始化 if(m_whiteList == null) { m_whiteList = new FileIntIDList("../cfg/sog/white_gameId.txt"); m_whiteList.ReadFromFile(); } return false == m_whiteList.IDInList(uid); } public static void Clear() { m_whiteList = null; } } }