Beispiel #1
0
 public static XElement CreateUsersRecord(UsersRecordInfo info)
 {
     return(new XElement("Users_Record", new object[]
     {
         new XAttribute("UserID", info.UserID),
         new XAttribute("RecordID", info.RecordID),
         new XAttribute("Total", info.Total)
     }));
 }
Beispiel #2
0
        public void InitUserRecord()
        {
            Hashtable ht = AchievementMgr.ItemRecordType;
            List <UsersRecordInfo> userRecord;

            Monitor.Enter(userRecord = this.m_userRecord);
            try
            {
                if (this.m_userRecord.Count < ht.Count)
                {
                    IDictionaryEnumerator enumerator = ht.GetEnumerator();
                    try
                    {
                        DictionaryEntry de;
                        while (enumerator.MoveNext())
                        {
                            de = (DictionaryEntry)enumerator.Current;
                            UsersRecordInfo temp = new UsersRecordInfo();
                            temp.UserID = this.m_player.PlayerId;
                            UsersRecordInfo arg_95_0 = temp;
                            DictionaryEntry de3      = de;
                            arg_95_0.RecordID = int.Parse(de3.Key.ToString());
                            temp.Total        = 0;
                            temp.IsDirty      = true;
                            IEnumerable <UsersRecordInfo> info = this.m_userRecord.Where(delegate(UsersRecordInfo s)
                            {
                                int arg_1E_0        = s.RecordID;
                                DictionaryEntry de2 = de;
                                return(arg_1E_0 == int.Parse(de2.Key.ToString()));
                            });
                            if (info.ToList <UsersRecordInfo>().Count <= 0)
                            {
                                this.m_userRecord.Add(temp);
                            }
                        }
                    }
                    finally
                    {
                        IDisposable disposable = enumerator as IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                }
            }
            finally
            {
                Monitor.Exit(userRecord);
            }
        }
 public GSPacketIn SendUpdateAchievements(UsersRecordInfo info)
 {
     throw new NotImplementedException();
 }