Exemplo n.º 1
0
 /// <summary>
 /// 初始化DBSshare
 /// </summary>
 public static void Initialization()
 {
     //InitializeCriticalSection(g_HumDB_CS);
     g_HumDB_CS = new object();
     //InitializeCriticalSection(g_Ranking_CS)
     g_Ranking_CS         = new object();
     g_MainLogMsgList     = new TGStringList();
     g_DenyChrNameList    = new GameFramework.TStringList();
     g_ServerIPList       = new GameFramework.TStringList();
     g_GateIDList         = new Hashtable();
     g_MapList            = new Hashtable();
     g_ClearMakeIndex     = new GameFramework.TStringList();
     g_DenyRankingChrList = new GameFramework.TStringList();
     g_AICharNameList     = new GameFramework.TStringList();
     for (int i = 0; i < g_RouteInfo.Length; i++)
     {
         g_RouteInfo[i] = new TRouteInfo();
     }
     g_HumDataDB  = TFileDB.GetInstance();
     g_HumCharDB  = new TFileHumDB();
     g_ModuleList = new List <TModuleInfo>();
     //DBShare.g_HumRanking = new TSortStringList();
     //DBShare.g_WarriorRanking = new TSortStringList();
     //DBShare.g_WizzardRanking = new TSortStringList();
     //DBShare.g_MonkRanking = new TSortStringList();
     //DBShare.g_HeroRanking = new TSortStringList();
     //DBShare.g_HeroWarriorRanking = new TSortStringList();
     //DBShare.g_HeroWizzardRanking = new TSortStringList();
     //DBShare.g_HeroMonkRanking = new TSortStringList();
     //DBShare.g_MasterRanking = new TSortStringList();
     g_MagicList   = new List <string>();
     g_StdItemList = new List <string>();
 }
Exemplo n.º 2
0
        public static string GateRouteIP_GetRoute(TRouteInfo RouteInfo, ref int nGatePort)
        {
            int nGateIndex;

            nGateIndex = (new System.Random()).Next(RouteInfo.nGateCount);
            string result = RouteInfo.sGameGateIP[nGateIndex];

            nGatePort = RouteInfo.nGameGatePort[nGateIndex];
            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 打开窗体
        /// </summary>
        /// <returns></returns>
        public TRouteInfo Open()
        {
            TRouteInfo result = new TRouteInfo();

            m_EditOK = false;
            RefShowRoute();
            this.ShowDialog();
            if (m_EditOK)
            {
                result = m_RouteInfo;
            }
            else
            {
                result.nGateCount = -1;
            }
            return(result);
        }