Beispiel #1
0
 public void processEvent(EventObject eventObject)
 {
     if (!GameManager.IsKuaFuServer)
     {
         IpEventBase      e      = eventObject as IpEventBase;
         IPStatisticsData ipData = null;
         if (eventObject.getEventType() == 15)
         {
             PlayerInitGameAsyncEventObject e2 = eventObject as PlayerInitGameAsyncEventObject;
             if (null != e2)
             {
                 GameClient client = e2.getPlayer();
                 this.SetUserIdValue(client.strUserID, (int)client.ClientData.VipExp, Global.GetUnionLevel(client, false));
             }
         }
         lock (IPStatisticsManager.dictIPStatisticsData)
         {
             if (e.getIpAsInt() > 0L)
             {
                 if (!IPStatisticsManager.dictIPStatisticsData.TryGetValue(e.getIpAsInt(), out ipData))
                 {
                     ipData = new IPStatisticsData
                     {
                         ipAsInt = e.getIpAsInt()
                     };
                     IPStatisticsManager.dictIPStatisticsData.Add(e.getIpAsInt(), ipData);
                 }
                 if (null == ipData)
                 {
                     return;
                 }
                 IPInfoType ipInfoType = IPInfoType.Begin;
                 if (IPStatisticsManager.event2IPTypeDict.TryGetValue((EventTypes)eventObject.getEventType(), out ipInfoType))
                 {
                     ipData.IPInfoParams[(int)ipInfoType]++;
                 }
             }
         }
         UserParamType userInfoType = UserParamType.Begin;
         if (IPStatisticsManager.event2UserTypeDict.TryGetValue((EventTypes)eventObject.getEventType(), out userInfoType))
         {
             if (!string.IsNullOrEmpty(e.getUserID()))
             {
                 UserIDState userData = null;
                 lock (this.dictUserStateData)
                 {
                     if (!this.dictUserStateData.TryGetValue(e.getUserID(), out userData))
                     {
                         userData = new UserIDState();
                         this.dictUserStateData.Add(e.getUserID(), userData);
                     }
                     if (null != userData)
                     {
                         userData.Count[(int)userInfoType]++;
                     }
                 }
             }
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="up"></param>
        /// <param name="idata"></param>
        public UserParamObj(UserParamType up, IdentDataObj idata)
            : base(idata)
        {
            _name  = up.name;
            _value = up.value;
            Type   = up.type;

            UnitCvRef = up.unitCvRef;
            //this._unitAccession = up.unitAccession;
            UnitAccession = up.unitAccession;
            //this._unitName = up.unitName;
        }