Exemplo n.º 1
0
        protected static List <ushort> GetDailyActiveInfoArray(GameClient client)
        {
            List <ulong>  lsLong   = Global.GetRoleParamsUlongListFromDB(client, "DailyActiveFlag");
            int           curIndex = 0;
            List <ushort> lsUshort = new List <ushort>();

            for (int i = 0; i < lsLong.Count; i++)
            {
                ulong uValue = lsLong[i];
                for (int subIndex = 0; subIndex < 64; subIndex += 2)
                {
                    ulong  flag          = 3UL << subIndex;
                    ushort realFlag      = (ushort)((uValue & flag) >> subIndex);
                    ushort dailyactiveID = DailyActiveManager.GetDailyActiveIDByIndex(curIndex);
                    ushort preFix        = (ushort)(dailyactiveID << 2);
                    ushort dailyactive   = (ushort)(preFix | realFlag);
                    lsUshort.Add(dailyactive);
                    curIndex += 2;
                }
            }
            return(lsUshort);
        }