예제 #1
0
 public static void LogItemRemove(int itemid, ItemRemoveType type, long count)
 {
     if (!TxtRecord)
     {
         return;
     }
     lock (ItemRemove)
     {
         try
         {
             if (ItemRemove.ContainsKey(itemid))
             {
                 ItemRemove[itemid][type] += count;
             }
             else
             {
                 Dictionary <ItemRemoveType, long> temp = new Dictionary <ItemRemoveType, long>();
                 foreach (object obj in Enum.GetValues(typeof(ItemRemoveType)))
                 {
                     temp.Add((ItemRemoveType)obj, 0);
                 }
                 ItemRemove[itemid] = temp;
                 temp[type]        += count;
             }
         }
         catch (Exception ex)
         {
             log.Error(ex);
         }
     }
 }
예제 #2
0
 public static void LogUse(int userid, string userName, string nickName, ItemRemoveType type, string itemIDs)
 {
     if (!TxtRecord)
     {
         return;
     }
     lock (useLogs)
     {
         try
         {
             useLogs.Add(string.Format("{0},{1},{2},{3},{4},{5},{6}", _headStr, DateTime.Now, userid, userName, nickName, type, itemIDs));
         }
         catch (Exception ex)
         {
             log.Error(ex);
         }
     }
 }
예제 #3
0
 public static void LogErrorPlayer(int userid, string userName, string nickName, ItemRemoveType type, string remark)
 {
     if (!TxtRecord)
         return;
     lock (errorPlayerLogs)
     {
         try
         {
             errorPlayerLogs.Add(string.Format("{0},{1},{2},{3},{4},{5},{6}", _headStr, DateTime.Now, userid, userName, nickName, type, remark));
         }
         catch (Exception ex)
         {
             log.Error(ex);
         }
     }
 }
예제 #4
0
 public static void LogItemRemove(int itemid, ItemRemoveType type, long count)
 {
     if (!TxtRecord)
         return;
     lock (ItemRemove)
     {
         try
         {
             if (ItemRemove.ContainsKey(itemid))
             {
                 ItemRemove[itemid][type] += count;
             }
             else
             {
                 Dictionary<ItemRemoveType, long> temp = new Dictionary<ItemRemoveType, long>();
                 foreach (object obj in Enum.GetValues(typeof(ItemRemoveType)))
                 {
                     temp.Add((ItemRemoveType)obj, 0);
                 }
                 ItemRemove[itemid] = temp;
                 temp[type] += count;
             }
         }
         catch (Exception ex)
         {
             log.Error(ex);
         }
     }
 }