Esempio n. 1
0
        /// <summary>
        /// 通过[ID]二分快速查表
        /// </summary>
        /// <param name="dwID">ID</param>
        /// <returns></returns>
        public static DailyTestDataBase Query(this List <DailyTestDataBase> sorted, uint dwID)
        {
            var key = new DailyTestDataBase()
            {
                dwID = dwID
            };
            var comparer = new Comparer1();
            var index    = sorted.BinarySearch(key, comparer);

            return(index >= 0 ? sorted[index] : default(DailyTestDataBase));
        }
Esempio n. 2
0
    void GoToWindow(uint id)
    {
        string des = string.Format("建议组队前往");

        DailyTestDataBase dailyTestDb = GameTableManager.Instance.GetTableItem <DailyTestDataBase>(id);

        if (dailyTestDb == null)
        {
            return;
        }

        Action YES = delegate
        {
            GoToMapAlone(dailyTestDb.JumpId);
        };

        Action NO = delegate
        {
            GoToMapWithTeam(dailyTestDb.TeamTargetId);
        };

        TipsManager.Instance.ShowTipWindow(Client.TipWindowType.YesNO, des, YES, NO, okstr: "单人前往", cancleStr: "组队前往");
    }