|
|
@@ -15,8 +15,8 @@ public class DBManager : Singleton<DBManager>
|
|
|
/// 自定义打点
|
|
|
/// </summary>
|
|
|
/// <param name="key"></param>
|
|
|
- /// <param name="lable"></param>
|
|
|
- public void CustomEvent(string key, Dictionary<string, object> lable)
|
|
|
+ /// <param name="properties"></param>
|
|
|
+ public void CustomEvent(string key, Dictionary<string, object> properties)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
@@ -29,15 +29,43 @@ public class DBManager : Singleton<DBManager>
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void GetItems(string source, List<ItemInfo> items)
|
|
|
+ /// <summary>
|
|
|
+ /// 记录道具获取
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="source">来源</param>
|
|
|
+ /// <param name="items">道具</param>
|
|
|
+ public void RecordGetItems(string source, List<ItemInfo> items)
|
|
|
{
|
|
|
- Dictionary<string, object> properties = null;
|
|
|
+ Dictionary<string, object> properties = new Dictionary<string, object>();
|
|
|
+ foreach (ItemInfo itemInfo in items)
|
|
|
+ {
|
|
|
+ int id = itemInfo.config.ID;
|
|
|
+ long count = itemInfo.count.Value;
|
|
|
+ properties.Add(id.ToString(), count);
|
|
|
+ }
|
|
|
+
|
|
|
+ properties.Add("#source", source);
|
|
|
+
|
|
|
CustomEvent("#get_items", properties);
|
|
|
}
|
|
|
|
|
|
- public void CostItems(string source, List<ItemInfo> items)
|
|
|
+ /// <summary>
|
|
|
+ /// 记录道具消耗
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="source"></param>
|
|
|
+ /// <param name="items"></param>
|
|
|
+ public void RecordCostItems(string source, List<ItemInfo> items)
|
|
|
{
|
|
|
- Dictionary<string, object> properties = null;
|
|
|
+ Dictionary<string, object> properties = new Dictionary<string, object>();
|
|
|
+ properties.Add("#source", source);
|
|
|
+
|
|
|
+ foreach (ItemInfo itemInfo in items)
|
|
|
+ {
|
|
|
+ int id = itemInfo.config.ID;
|
|
|
+ long count = itemInfo.count.Value;
|
|
|
+ properties.Add(id.ToString(), count);
|
|
|
+ }
|
|
|
+
|
|
|
CustomEvent("#cost_items", properties);
|
|
|
|
|
|
}
|