diff --git a/lck_cl_data_solution/GameDataViewer/Form1.Designer.cs b/lck_cl_data_solution/GameDataViewer/Form1.Designer.cs
new file mode 100644
index 0000000..a52d5f1
--- /dev/null
+++ b/lck_cl_data_solution/GameDataViewer/Form1.Designer.cs
@@ -0,0 +1,81 @@
+锘縩amespace GameDataViewer
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.treeView1 = new System.Windows.Forms.TreeView();
+ this.button1 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // treeView1
+ //
+ this.treeView1.Location = new System.Drawing.Point(304, 136);
+ this.treeView1.Name = "treeView1";
+ this.treeView1.Size = new System.Drawing.Size(563, 658);
+ this.treeView1.TabIndex = 0;
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(12, 687);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(286, 107);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(12, 658);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(286, 23);
+ this.textBox1.TabIndex = 2;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(925, 864);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.treeView1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private TreeView treeView1;
+ private Button button1;
+ private TextBox textBox1;
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/GameDataViewer/Form1.cs b/lck_cl_data_solution/GameDataViewer/Form1.cs
new file mode 100644
index 0000000..9c440a8
--- /dev/null
+++ b/lck_cl_data_solution/GameDataViewer/Form1.cs
@@ -0,0 +1,107 @@
+using System.Diagnostics;
+using System.IO;
+using System;
+using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
+using MongoDB.Driver;
+using MongoDB.Bson;
+
+namespace GameDataViewer
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+
+ //public static string MONGODB林家 = "mongodb://root:veryhardpassword123@211.53.30.8:50003";
+ public static string MONGODB林家 = "mongodb://root:veryhardpassword123@211.42.188.8:50003";
+
+ private void DisplayTreeView(JToken root, string rootName)
+ {
+ treeView1.BeginUpdate();
+ try
+ {
+ treeView1.Nodes.Clear();
+ var tNode = treeView1.Nodes[treeView1.Nodes.Add(new TreeNode(rootName))];
+ tNode.Tag = root;
+
+
+ AddNode(root, tNode);
+
+ treeView1.ExpandAll();
+ }
+ finally
+ {
+ treeView1.EndUpdate();
+ }
+ }
+
+ private bool AddNode(JToken token, TreeNode inTreeNode)
+ {
+ if (token == null)
+ return false;
+ if (token is JValue)
+ {
+ var childNode = inTreeNode.Nodes[inTreeNode.Nodes.Add(new TreeNode(token.ToString()))];
+ childNode.Tag = token;
+ }
+ else if (token is JObject)
+ {
+ var obj = (JObject)token;
+ foreach (var property in obj.Properties())
+ {
+ var childNode = inTreeNode.Nodes[inTreeNode.Nodes.Add(new TreeNode(property.Name))];
+ childNode.Tag = property;
+ AddNode(property.Value, childNode);
+ }
+ }
+ else if (token is JArray)
+ {
+ var array = (JArray)token;
+ for (int i = 0; i < array.Count; i++)
+ {
+ var childNode = inTreeNode.Nodes[inTreeNode.Nodes.Add(new TreeNode(i.ToString()))];
+ childNode.Tag = array[i];
+ AddNode(array[i], childNode);
+ }
+ }
+ else
+ {
+ Debug.WriteLine(string.Format("{0} not implemented", token.Type)); // JConstructor, JRaw
+ }
+
+ return true;
+ }
+
+
+ internal MongoClient mDBClient = null;
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ mDBClient = new MongoClient(MONGODB林家);
+
+ var database = mDBClient.GetDatabase("datalol");
+
+ var filter = Builders.Filter.Eq("RequestGameID", textBox1.Text);
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = database.GetCollection("stats_update")
+ .Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .Limit(1)
+ .ToList();
+
+
+ JToken root = (JToken)documents[0]["eventDocument"].ToString();
+ DisplayTreeView(root, "root");
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/GameDataViewer/Form1.resx b/lck_cl_data_solution/GameDataViewer/Form1.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/lck_cl_data_solution/GameDataViewer/Form1.resx
@@ -0,0 +1,60 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/GameDataViewer/GameDataViewer.csproj b/lck_cl_data_solution/GameDataViewer/GameDataViewer.csproj
new file mode 100644
index 0000000..ee55dcc
--- /dev/null
+++ b/lck_cl_data_solution/GameDataViewer/GameDataViewer.csproj
@@ -0,0 +1,16 @@
+锘
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+ enable
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/GameDataViewer/Program.cs b/lck_cl_data_solution/GameDataViewer/Program.cs
new file mode 100644
index 0000000..ef42638
--- /dev/null
+++ b/lck_cl_data_solution/GameDataViewer/Program.cs
@@ -0,0 +1,17 @@
+namespace GameDataViewer
+{
+ internal static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
+ Application.Run(new Form1());
+ }
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDBSetup/docker-compose.yml b/lck_cl_data_solution/LolDBSetup/docker-compose.yml
new file mode 100644
index 0000000..f988783
--- /dev/null
+++ b/lck_cl_data_solution/LolDBSetup/docker-compose.yml
@@ -0,0 +1,29 @@
+version: '3'
+services:
+ data-shard-1:
+ container_name: 'data-shard-1'
+ image: mongo:latest
+ ports:
+ - '60001:3306'
+ cpus : "2"
+
+ data-shard-2:
+ container_name: 'data-shard-2'
+ image: mongo:latest
+ ports:
+ - '60002:3306'
+ cpus : "2"
+
+ data-shard-3:
+ container_name: 'data-shard-3'
+ image: mongo:latest
+ ports:
+ - '60003:3306'
+ cpus : "2"
+
+ data-config-1:
+ container_name: 'data-config-1'
+ image: mongo:latest
+ ports:
+ - '60004:3306'
+ cpus : "2"
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDataRequestLib/Class1.cs b/lck_cl_data_solution/LolDataRequestLib/Class1.cs
new file mode 100644
index 0000000..1612d81
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/Class1.cs
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ public class DataRequestManager
+ {
+
+
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Snappy/lib/win/snappy32.dll b/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Snappy/lib/win/snappy32.dll
new file mode 100644
index 0000000..afc82ca
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Snappy/lib/win/snappy32.dll differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Snappy/lib/win/snappy64.dll b/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Snappy/lib/win/snappy64.dll
new file mode 100644
index 0000000..36cd5fe
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Snappy/lib/win/snappy64.dll differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Zstandard/lib/win/libzstd.dll b/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Zstandard/lib/win/libzstd.dll
new file mode 100644
index 0000000..e669123
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/Core/Compression/Zstandard/lib/win/libzstd.dll differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/DataManager.cs b/lck_cl_data_solution/LolDataRequestLib/DataManager.cs
new file mode 100644
index 0000000..c2c7cb4
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/DataManager.cs
@@ -0,0 +1,1718 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ ///
+ /// 雿办澊韯半ゼ 甏毽晿旮办渼頃 毵る媹鞝臧濎泊.
+ ///
+ /// 雿办澊韯 瓿奠湢鞚 韼胳潣靹膘潉 鞙勴暣 Singleton鞚 靷毄.
+ ///
+ /// 氇摖 雿办澊韯半ゼ 鞖旍箔頃橁碃 甏毽暅雼.
+ ///
+ public class DataManager
+ {
+
+ #region 鞁标竴韯&靸濎劚鞛
+
+ private static DataManager mInstance = null;
+
+ private static object mSingletonLocker = new object();
+
+ internal MongoClient mDBClient = null;
+
+ public bool isNewBanPick = false;
+
+ public static DataManager getInstance()
+ {
+
+ lock (mSingletonLocker)
+ {
+ if (mInstance == null)
+ {
+ mInstance = new DataManager();
+ }
+ }
+
+ return mInstance;
+
+ }
+
+
+ private DataManager()
+ {
+
+ init();
+
+ }
+
+ #endregion
+
+ #region 霛检澊敫岆嵃鞚错劙氤靾
+
+ ///
+ /// 鞁れ嫓臧 鞐呺嵃鞚错姼 雿办澊韯 韥Μ韹办滑靹胳厴 甏毽毄 霛届护.
+ ///
+ private object mDataAccessObjectLocker = new object();
+
+ ///
+ /// 氩ろ斀鞐 甏霠悳 雿办澊韯
+ ///
+ private BsonValue m氚错斀雿办澊韯 = null;
+
+ ///
+ /// 氩ろ斀鞐 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 氚错斀雿办澊韯
+ {
+ get
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ return m氚错斀雿办澊韯;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m氚错斀雿办澊韯 = value;
+ }
+
+ }
+ }
+
+
+ ///
+ /// 瓴疥赴雿办澊韯办棎 甏霠悳 雿办澊韯
+ ///
+ private BsonValue m瓴疥赴雿办澊韯 = null;
+
+ ///
+ /// 瓴疥赴雿办澊韯(status_update)鞐 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 瓴疥赴雿办澊韯
+ {
+ get
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ return m瓴疥赴雿办澊韯;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m瓴疥赴雿办澊韯 = value;
+ }
+
+ }
+ }
+
+ ///
+ /// 氇摖 鞓る笇鞝濏姼鞐 甏霠悳 雿办澊韯
+ ///
+ private BsonValue m鞓る笇鞝濏姼雿办澊韯 = null;
+
+ ///
+ /// 鞓る笇鞝濏姼雿办澊韯办棎 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 鞓る笇鞝濏姼雿办澊韯
+ {
+ get
+ {
+ lock (mDataAccessObjectLocker)
+ {
+ return m鞓る笇鞝濏姼雿办澊韯;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m鞓る笇鞝濏姼雿办澊韯 = value;
+ }
+
+ }
+ }
+
+ ///
+ /// 霌滊灅瓿るΜ鞀ろ彴鞐 甏霠悳 雿办澊韯
+ ///
+ private BsonValue m霌滊灅瓿るΜ鞀ろ彴 = null;
+
+
+ ///
+ /// 霌滊灅瓿るΜ鞀ろ彴鞐 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 霌滊灅瓿るΜ鞀ろ彴
+ {
+ get
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ return m霌滊灅瓿るΜ鞀ろ彴;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m霌滊灅瓿るΜ鞀ろ彴 = value;
+ }
+
+ }
+ }
+ /*
+ private BsonValue m鞎勴儉旃鸽Μ鞀ろ彴 = null;
+
+
+ ///
+ /// 霌滊灅瓿るΜ鞀ろ彴鞐 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 鞎勴儉旃鸽Μ鞀ろ彴
+ {
+ get
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ return m鞎勴儉旃鸽Μ鞀ろ彴;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m鞎勴儉旃鸽Μ鞀ろ彴= value;
+ }
+
+ }
+ }
+ */
+ ///
+ /// 瓯措韺岅创鞐 甏霠悳 雿办澊韯
+ ///
+ private BsonValue m瓯措雿办澊韯 = null;
+
+ ///
+ /// 瓯措韺岅创鞐 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 瓯措雿办澊韯
+ {
+ get
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ return m瓯措雿办澊韯;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m瓯措雿办澊韯 = value;
+ }
+
+ }
+ }
+ ///
+ /// 瓯措韺岅创鞐 甏霠悳 瓿摐 雿办澊韯
+ ///
+ private BsonValue m韮鞗岅敞霌滊嵃鞚错劙 = null;
+
+ ///
+ /// 瓯措韺岅创鞐 甏霠悳 雿办澊韯 瓴岉劙&靹疙劙
+ ///
+ internal BsonValue 韮鞗岅敞霌滊嵃鞚错劙
+ {
+ get
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ return m韮鞗岅敞霌滊嵃鞚错劙;
+ }
+
+ }
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ m韮鞗岅敞霌滊嵃鞚错劙 = value;
+ }
+
+ }
+ }
+
+
+ #endregion
+
+ ///
+ /// 霛检澊敫岆嵃鞚错劙毳 鞐呺嵃鞚错姼頃橂姅 鞚胳姢韯挫姢 毽姢韸
+ ///
+ List mRequestDataList = null;
+
+ ///
+ /// 毵る媹鞝 齑堦赴頇.
+ /// 頃勳殧頃 Request霌れ潉 靸濎劚頃橁碃 RequestWorker毳 鞁ろ枆頃滊嫟..
+ ///
+ private void init()
+ {
+ //霛检澊敫岇泴旎 欷牍
+ IsupdateWorkersWork = true;
+
+ mRequestDataList = new List();
+
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.BAN_AND_PICK));
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.GAME_STATUS));
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.OBJECT_EVENT));
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.STRUCT_EVENT));
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.STRUCT_GOLD_EVENT));
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.DRAGON_RESPAWN));
+ mRequestDataList.Add(ARequestData.createRequestFactory(DBDefine.RequestDataType.ATAKHAN_RESPAWN));
+
+ //旮办磮雿办澊韯(氚挫垳靹, 毂旐敿鞏鸽Г頃, 耄Г頃) 毵岆摛旮.
+ mDBClient = new MongoClient(DBDefine.MONGODB欤检唽);
+ 氚措嵃鞚错劙毵岆摛旮(false);
+ setChampionDataMapping();
+ setRuneDataMapping();
+
+
+ }
+
+ ///
+ /// DB欤检唽毳 氤瓴巾晿瓿 MongodbClient毳 齑堦赴頇
+ ///
+ ///
+ public void resetDBAddress(string 臧鞝胳槰霐旊箘欤检唽)
+ {
+ DBDefine.霐旊箘氤瓴(臧鞝胳槰霐旊箘欤检唽);
+
+ lock (mDataAccessObjectLocker)
+ {
+ mDBClient = new MongoClient(DBDefine.MONGODB欤检唽);
+
+ foreach (ARequestData item in mRequestDataList)
+ {
+
+ item.resetDBAddress();
+ }
+ }
+
+ 氚错斀雿办澊韯 = null;
+ 鞓る笇鞝濏姼雿办澊韯 = null;
+ 霌滊灅瓿るΜ鞀ろ彴 = null;
+ //鞎勴儉旃鸽Μ鞀ろ彴 = null;
+ 瓴疥赴雿办澊韯 = null;
+ 瓯措雿办澊韯 = null;
+ 韮鞗岅敞霌滊嵃鞚错劙 = null;
+ }
+
+ ///
+ /// 毂旐敿鞏窱D-毂旐敿鞏胳澊毽 鞓侂 毵ろ晳
+ ///
+ //public Dictionary mChampionTable = null;
+ public Dictionary mChampionTable = null;
+
+ public class ChampionInfoVO
+ {
+ public int ID;
+ public string champNameKOR;
+ public string champNameENG;
+
+ }
+
+
+ ///
+ /// 毂旐敿鞏鸽Г頃戨嵃鞚错劙毳 臧鞝胳檧靹 靹疙寘頃滊嫟.
+ ///
+ void setChampionDataMapping()
+ {
+
+
+ //IMongoDatabase eventDataBase = mDBClient.GetDatabase("basic_data_lol");
+
+ //var filter = Builders.Filter.Eq("type", "champion");
+
+ //var projection = Builders.Projection
+ // .Exclude("_id");
+
+ //List documents = eventDataBase.GetCollection("campion_raw")
+ // .Find(filter)
+ // .Project(projection)
+ // .ToList();
+
+
+ BsonDocument documents = null;
+
+ if (!BsonDocument.TryParse((File.ReadAllText(DBDefine.毂旐敿鞏鸽嵃鞚错劙韺岇澕瓴诫)), out documents))
+ {
+ throw new Exception("毂旐敿鞏 雿办澊韯 韺岇澕鞐愳劀 雿办澊韯半ゼ 臧鞝胳槵 靾 鞐嗢姷雼堧嫟.");
+ }
+
+ BsonDocument bufChampionDataArray = documents["data"].AsBsonDocument;
+
+ /*
+ * 20230106 毂旐敿鞏 鞝曤炒 鞐呺嵃鞚错姼 靾橃爼
+ mChampionTable = new Dictionary();
+
+
+ foreach (BsonElement item in bufChampionDataArray)
+ {
+ mChampionTable.Add(Convert.ToInt32(item.Value["key"].AsString), item.Name.Replace(" ", ""));
+ }
+ */
+
+ mChampionTable = new Dictionary();
+
+
+ foreach (BsonElement item in bufChampionDataArray)
+ {
+
+ ChampionInfoVO bufChampionInfo = new ChampionInfoVO();
+
+
+ try
+ {
+ bufChampionInfo.ID = Convert.ToInt32(item.Value["key"].AsString);
+ bufChampionInfo.champNameENG = item.Value["id"].AsString.Replace(" ", "");
+ bufChampionInfo.champNameKOR = item.Value["name"].AsString.Replace(" ", "");
+
+ }
+ catch(Exception ex)
+ {
+ }
+ finally
+ {
+ mChampionTable.Add(Convert.ToInt32(item.Value["key"].AsString), bufChampionInfo);
+ }
+
+
+ }
+
+ }
+
+
+
+ public Dictionary mRuneTable = null;
+
+
+ void setRuneDataMapping()
+ {
+
+
+ BsonArray documents = null;
+
+ //JObject ddd = JObject.Parse(File.ReadAllText(DBDefine.耄嵃鞚错劙韺岇澕瓴诫));
+
+
+ try
+ {
+ documents = MongoDB.Bson.Serialization.BsonSerializer.Deserialize(File.ReadAllText(DBDefine.耄嵃鞚错劙韺岇澕瓴诫));
+ }
+ catch (Exception)
+ {
+
+ throw new Exception("耄嵃鞚错劙毳 臧鞝胳槫電旊嵃 鞓る臧 氚滌儩頄堨姷雼堧嫟");
+ }
+
+ //documents = BsonArray.Parse();
+
+
+
+ mRuneTable = new Dictionary();
+
+ foreach (BsonDocument item in documents)
+ {
+
+ mRuneTable.Add(item["id"].ToInt32(), item["name"].AsString);
+
+ BsonArray innerRunes = item["slots"].AsBsonArray;
+
+ foreach (BsonValue innerItem in innerRunes)
+ {
+
+ BsonArray innerSubRunes = innerItem["runes"].AsBsonArray;
+
+ foreach (BsonValue innerSubItem in innerSubRunes)
+ {
+ mRuneTable.Add(innerSubItem["id"].ToInt32(), innerSubItem["name"].AsString.Replace(" ", ""));
+ }
+
+ }
+
+ }
+
+ }
+
+ internal Dictionary 氚错斀靾滌劀韰岇澊敫 = new Dictionary();
+
+
+ public void 氚措嵃鞚错劙毵岆摛旮(bool isRedBan)
+ {
+
+ 氚错斀靾滌劀韰岇澊敫 = new Dictionary();
+
+ if (!isRedBan)
+ {
+ 氚错斀靾滌劀韰岇澊敫.Add(101, 1);
+ 氚错斀靾滌劀韰岇澊敫.Add(202, 2);
+ 氚错斀靾滌劀韰岇澊敫.Add(103, 3);
+ 氚错斀靾滌劀韰岇澊敫.Add(204, 4);
+ 氚错斀靾滌劀韰岇澊敫.Add(105, 5);
+ 氚错斀靾滌劀韰岇澊敫.Add(206, 6);
+ 氚错斀靾滌劀韰岇澊敫.Add(201, 7);
+ 氚错斀靾滌劀韰岇澊敫.Add(102, 8);
+ 氚错斀靾滌劀韰岇澊敫.Add(203, 9);
+ 氚错斀靾滌劀韰岇澊敫.Add(104, 10);
+ }
+ else
+ {
+ 氚错斀靾滌劀韰岇澊敫.Add(201, 1);
+ 氚错斀靾滌劀韰岇澊敫.Add(102, 2);
+ 氚错斀靾滌劀韰岇澊敫.Add(203, 3);
+ 氚错斀靾滌劀韰岇澊敫.Add(104, 4);
+ 氚错斀靾滌劀韰岇澊敫.Add(205, 5);
+ 氚错斀靾滌劀韰岇澊敫.Add(106, 6);
+ 氚错斀靾滌劀韰岇澊敫.Add(101, 7);
+ 氚错斀靾滌劀韰岇澊敫.Add(202, 8);
+ 氚错斀靾滌劀韰岇澊敫.Add(103, 9);
+ 氚错斀靾滌劀韰岇澊敫.Add(204, 10);
+ }
+ }
+
+ public bool IsupdateWorkersWork = false;
+
+ //public string mPlatformGameID = "ESPORTSTMNT06_1720762";
+
+ ///
+ /// DB鞐愳劀 霛检澊敫岆 雿办澊韯半ゼ 臧鞝胳槵 瓴岇瀯鞚 PlatformID
+ ///
+ //public string mPlatformGameID = "ESPORTSTMNT02_1923726";
+ public string platformGameID = "sr fakegod's game";
+ //public string mPlatformGameID = "ESPORTSTMNT06_1721059";
+
+
+
+ public object platformIDLocker = new object();
+ ///
+ /// 瓴疥赴臧 毽矊鞛 霅橃棃鞚勲晫毳 雽牍勴暣 platformID臧 氚旊旉步鞖 靸侅嫓鞐呺嵃鞚错姼鞚鸽嵄鞀るゼ setter鞐愳劀 齑堦赴頇旐暅雼.
+ ///
+ public string mPlatformGameID
+ {
+ get
+ {
+ lock (mDataAccessObjectLocker)
+ {
+ return platformGameID;
+ }
+ }
+
+ set
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ foreach (ARequestData item in mRequestDataList)
+ {
+ item.initIndex();
+ }
+
+ platformGameID = value;
+
+ }
+
+ }
+ }
+
+ public int 毽橃姢韸胳澑韯半矊氚毽磮 = 400;
+
+
+
+
+
+ ///
+ /// 霛检澊敫岆 鞐瓣舶頃挫劀 雮橁皥 雿办澊韯半ゼ 韺岇嫳頃挫劀 毽劥頃滊嫟.
+ ///
+ ///
+ ///
+ public DataSet 霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳 鞖旍箔雿办澊韯绊儉鞛)
+ {
+
+ IResponseData bufInstance = null;
+
+ DataSet rtnValue = new DataSet();
+
+ try
+ {
+
+ switch (鞖旍箔雿办澊韯绊儉鞛)
+ {
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙:
+ bufInstance = new ResponseData.氚措嵃鞚错劙();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.韺熿:
+ bufInstance = new ResponseData.韺熿靹犾垬();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.頂诫嵃鞚错劙:
+ bufInstance = new ResponseData.頂诫嵃鞚错劙();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.順勳灛瓿摐霟夓劆靾:
+ bufInstance = new ResponseData.瓿摐須嶋摑霟夓劆靾();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.順勳灛雿半歆霟夓劆靾:
+ bufInstance = new ResponseData.雸勳爜雿半歆靹犾垬();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.瓴巾棙旃橂爤氩:
+ bufInstance = new ResponseData.瓴巾棙旃橂爤氩劆靾();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.耄嵃鞚错劙:
+ bufInstance = new ResponseData.耄嵃鞚错劙();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨:
+ bufInstance = new ResponseData.鞓る笇鞝濏姼韨爠觳(false);
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.瓿摐彀澊韺:
+ bufInstance = new ResponseData.瓿摐彀澊韺();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岇矤瓯办爠觳:
+ bufInstance = new ResponseData.韮鞗岉寣甏挫爠觳();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岅敞霌滊嵃鞚错劙:
+ bufInstance = new ResponseData.韮鞗岅敞霌滊嵃鞚错劙();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.鞖╇Μ鞀ろ彴:
+ bufInstance = new ResponseData.鞖╇嵃鞚错劙();
+ break;
+ //case DBDefine.鞖旍箔雿办澊韯半秳毳.鞎勴儉旃鸽Μ鞀ろ彴:
+ // bufInstance = new ResponseData.鞎勴儉旃鸽嵃鞚错劙();
+ // break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.韤橃姢韸胳檮耄岇棳攵:
+ bufInstance = new ResponseData.韤橃姢韸胳檮耄岇棳攵();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.韨巸鞏挫嫓:
+ bufInstance = new ResponseData.KDA靹犾垬();
+ break;
+ case DBDefine.鞖旍箔雿办澊韯半秳毳.瓴疥赴膦呺鞝曤炒:
+
+ IResponseData bufGameEndData = new ResponseData.瓴疥赴膦呺鞝曤炒();
+
+ DataTable bufResult = bufGameEndData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌();
+
+ if (bufResult == null || bufResult.Rows.Count == 0)
+ {
+ return rtnValue;
+ }
+ else
+ {
+ rtnValue.Tables.Add(bufResult);
+ }
+
+ IResponseData bufKDAData = new ResponseData.KDA靹犾垬();
+ rtnValue.Tables.Add(bufKDAData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ IResponseData bufTowerData = new ResponseData.韮鞗岉寣甏挫爠觳();
+ rtnValue.Tables.Add(bufTowerData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ IResponseData bufTowerGoldData = new ResponseData.韮鞗岅敞霌滊嵃鞚错劙();
+ rtnValue.Tables.Add(bufTowerGoldData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ IResponseData bufObjectData = new ResponseData.鞓る笇鞝濏姼韨爠觳(true);
+ rtnValue.Tables.Add(bufObjectData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ IResponseData bufBanData = new ResponseData.氚措嵃鞚错劙();
+ rtnValue.Tables.Add(bufBanData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ IResponseData bufDamageData = new ResponseData.雸勳爜雿半歆靹犾垬();
+ rtnValue.Tables.Add(bufDamageData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ IResponseData bufGoldTeamData = new ResponseData.瓿摐彀澊韺();
+ rtnValue.Tables.Add(bufGoldTeamData.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ return rtnValue;
+
+ }
+
+ rtnValue.Tables.Add(bufInstance.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ return rtnValue;
+
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+ DataSet ddd = new DataSet();
+ ddd.Tables.Add(new DataTable("雿办澊韯办梿鞚"));
+ return ddd;
+ }
+
+
+
+ }
+
+ public DataSet 頃滍儉霐滊焿鞖旍箔(int 鞁滌瀾齑, int 膦呺齑)
+ {
+ if (鞁滌瀾齑 == 0)
+ {
+ return null;
+ }
+
+ IResponseData bufInstance = new ResponseData.頃滍儉霐滊焿氩旍渼(鞁滌瀾齑, 膦呺齑);
+
+ DataSet rtnValue = new DataSet();
+
+ rtnValue.Tables.Add(bufInstance.霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌());
+
+ return rtnValue;
+
+ }
+
+ #region 靹滊矂鞕鞚橅喌鞁犽秬攵
+
+ public void requestServerForUpdateRemoveAll(string serverIP)
+ {
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(
+ "http://" + serverIP + ":60003/"
+ + "RemoveAll");
+ request.Method = "GET";
+ request.Timeout = 30 * 1000;
+ try
+ {
+
+ using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse())
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ foreach (ARequestData item in mRequestDataList)
+ {
+ item.initIndex();
+ }
+ }
+ HttpStatusCode status = resp.StatusCode;
+
+ Stream respStream = resp.GetResponseStream();
+ using (StreamReader sr = new StreamReader(respStream))
+ {
+ }
+
+ }
+
+ }
+ catch (Exception)
+ {
+ }
+ }
+
+ public string requestServerForGameInfo(string serverIP)
+ {
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(
+ "http://" + serverIP + ":60003/GameInfoGet");
+ request.Method = "GET";
+ request.Timeout = 30 * 1000;
+
+ string responseText = "";
+ try
+ {
+
+ using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse())
+ {
+
+ HttpStatusCode status = resp.StatusCode;
+
+ //Console.WriteLine(status); // 鞝曥儊鞚措┐ "OK"
+
+
+ Stream respStream = resp.GetResponseStream();
+ using (StreamReader sr = new StreamReader(respStream))
+ {
+ responseText = sr.ReadToEnd();
+ }
+
+ }
+
+ if (responseText.Contains(Environment.NewLine))
+ {
+ return responseText;
+ }
+
+ }
+ catch (Exception)
+ {
+ }
+
+ return "";
+ }
+
+ public DBDefine.靹滊矂鞚橂嫷氤 requestServerForUpdateGameKey(string serverIP, string gameKey, bool isTest)
+ {
+
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(
+ "http://" + serverIP + ":60003/"
+ + (isTest ? "TEST" : "REAL")
+ + ("/ConnectionGameKey")
+ + ":" + gameKey);
+ request.Method = "GET";
+ request.Timeout = 30 * 1000;
+
+ string responseText = "";
+ try
+ {
+
+ using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse())
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ foreach (ARequestData item in mRequestDataList)
+ {
+ item.initIndex();
+ }
+ }
+
+
+ HttpStatusCode status = resp.StatusCode;
+
+ //Console.WriteLine(status); // 鞝曥儊鞚措┐ "OK"
+
+
+ Stream respStream = resp.GetResponseStream();
+ using (StreamReader sr = new StreamReader(respStream))
+ {
+ responseText = sr.ReadToEnd();
+ }
+
+ }
+
+ string[] responseServerData = responseText.Split('_');
+
+ string statusServer = responseServerData[0];
+ if (statusServer == "1")
+ {
+
+ mPlatformGameID = responseServerData[1] + "_" + responseServerData[2];
+ return DBDefine.靹滊矂鞚橂嫷氤.氚╈潉彀眷晿瓿犾梾雿办澊韸鸽ゼ鞁滌瀾頃;
+
+ }
+ else if (statusServer == "2")
+ {
+ mPlatformGameID = responseServerData[1] + "_" + responseServerData[2];
+ return DBDefine.靹滊矂鞚橂嫷氤.鞚措氚╈潉鞐呺嵃鞚错姼欷戩瀯;
+ }
+ else if (statusServer == "3")
+ {
+ return DBDefine.靹滊矂鞚橂嫷氤.氚╈潉氇混熬鞎勳劀鞐呺嵃鞚错姼毳茧頃;
+ }
+ else if (statusServer == "4")
+ {
+ return DBDefine.靹滊矂鞚橂嫷氤.氇呺牴鞚错媭毽;
+ }
+
+ return DBDefine.靹滊矂鞚橂嫷氤.靹滊矂鞕鞚橃棸瓴办澊鞚挫儊頃;
+
+ }
+ catch (Exception)
+ {
+
+ return DBDefine.靹滊矂鞚橂嫷氤.靹滊矂鞕鞚橃棸瓴办澊鞚挫儊頃;
+ }
+
+ }
+
+
+ public DBDefine.靹滊矂鞚橂嫷氤 requestServerForUpdate(string serverIP, string gameName, bool isTest)
+ {
+
+
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(
+ "http://" + serverIP + ":60003/"
+ + (isTest ? "TEST" : "REAL")
+ + ":" + gameName);
+ request.Method = "GET";
+ request.Timeout = 30 * 1000;
+
+ string responseText = "";
+ try
+ {
+
+ using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse())
+ {
+
+ lock (mDataAccessObjectLocker)
+ {
+ foreach (ARequestData item in mRequestDataList)
+ {
+ item.initIndex();
+ }
+ }
+
+
+ HttpStatusCode status = resp.StatusCode;
+
+ //Console.WriteLine(status); // 鞝曥儊鞚措┐ "OK"
+
+
+ Stream respStream = resp.GetResponseStream();
+ using (StreamReader sr = new StreamReader(respStream))
+ {
+ responseText = sr.ReadToEnd();
+ }
+
+ }
+
+ string[] responseServerData = responseText.Split('_');
+
+ string statusServer = responseServerData[0];
+ if (statusServer == "1")
+ {
+
+ mPlatformGameID = responseServerData[1] + "_" + responseServerData[2];
+ return DBDefine.靹滊矂鞚橂嫷氤.氚╈潉彀眷晿瓿犾梾雿办澊韸鸽ゼ鞁滌瀾頃;
+
+ }
+ else if (statusServer == "2")
+ {
+ mPlatformGameID = responseServerData[1] + "_" + responseServerData[2];
+ return DBDefine.靹滊矂鞚橂嫷氤.鞚措氚╈潉鞐呺嵃鞚错姼欷戩瀯;
+ }
+ else if (statusServer == "3")
+ {
+ return DBDefine.靹滊矂鞚橂嫷氤.氚╈潉氇混熬鞎勳劀鞐呺嵃鞚错姼毳茧頃;
+ }
+ else if (statusServer == "4")
+ {
+ return DBDefine.靹滊矂鞚橂嫷氤.氇呺牴鞚错媭毽;
+ }
+
+ return DBDefine.靹滊矂鞚橂嫷氤.靹滊矂鞕鞚橃棸瓴办澊鞚挫儊頃;
+
+ }
+ catch (Exception)
+ {
+
+ return DBDefine.靹滊矂鞚橂嫷氤.靹滊矂鞕鞚橃棸瓴办澊鞚挫儊頃;
+ }
+
+ }
+
+ #endregion
+
+ #region 瓴岇瀯韮鞚措ǜ甏霠
+
+ /*0603 霛检澊敫岅矊鞛 韮鞚措ǜ 臧滊皽
+ *
+ * Form Timer搿 歆勴枆鞁滌棎 UI鞀る爤霌滌棎靹 氚毽姅 順勳儊鞚 氚滌儩頃犽晫 雽毂呾澊 鞐嗠嫟.
+ *
+ *
+ * 霐半澕靹 霐半 SystemTimer毳 靷毄頃挫劀 齑堦皜 氚旊旉步鞖办棎 Data毳 Interface搿 霌滊…頃橂姅 氚╈嫕鞚 靷毄頃滊嫟.
+ *
+ */
+
+ ///
+ /// 瓴疥赴鞁滉皠鞚 鞀る爤霌滊 氤错樃頃橁赴鞙勴暅 Locker
+ ///
+ private static object gameTimeLocker = new object();
+
+ ///
+ /// 瓴疥赴鞁滉皠(齑)
+ ///
+ internal int mGameTime = 0;
+
+
+ ///
+ /// 瓴疥赴鞁滉皠(齑) 瓴岉劙靹疙劙
+ ///
+ internal int 瓴疥赴鞁滉皠
+ {
+ get
+ {
+
+ lock (gameTimeLocker)
+ {
+ return mGameTime;
+ }
+
+ }
+ set
+ {
+
+ lock (gameTimeLocker)
+ {
+ mGameTime = value;
+ }
+
+ }
+ }
+
+ System.Timers.Timer m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ = new System.Timers.Timer();
+
+ ///
+ /// 鞁滉皠 鞚措菠韸 旖滊氨
+ ///
+ IGameTimeEventDrop mCallback = null;
+
+ public void setCallback(IGameTimeEventDrop recvCallback)
+ {
+ this.mCallback = recvCallback;
+ }
+
+ DateTime lastUpdateTime = new DateTime();
+
+ public void timerStart()
+ {
+
+ if (m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Enabled)
+ {
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Stop();
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Elapsed -= timerTick;
+ }
+
+ lastUpdateTime = DateTime.Now;
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ = new System.Timers.Timer();
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Interval = 300;
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Elapsed += timerTick;
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Start();
+ }
+
+ public void timerStop()
+ {
+ if (m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Enabled)
+ {
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Stop();
+ m霛检澊敫岇嫓臧勱硠靷办毄韮鞚措ǜ.Elapsed -= timerTick;
+ }
+ }
+
+ public void setGameTime(int 齑)
+ {
+ 瓴疥赴鞁滉皠 = 齑;
+ }
+
+ void timerTick(object sender, System.Timers.ElapsedEventArgs e)
+ {
+ if (lastUpdateTime.AddSeconds(1) < DateTime.Now)
+ {
+ lastUpdateTime = lastUpdateTime.AddSeconds(1);
+ 瓴疥赴鞁滉皠 += 1;
+ eventTimerWork();
+ if (mCallback != null)
+ {
+ mCallback.順勳灛瓴岇瀯鞁滉皠(瓴疥赴鞁滉皠);
+ }
+ }
+
+ }
+
+ void eventTimerWork()
+ {
+ try
+ {
+ ThreadPool.QueueUserWorkItem(o => 鞓る笇鞝濏姼觳错伂());
+ ThreadPool.QueueUserWorkItem(o => 霌滊灅瓿れ泊韥());
+ //ThreadPool.QueueUserWorkItem(o => 鞎勴儉旃胳泊韥());
+ ThreadPool.QueueUserWorkItem(o => 鞏奠牅旮办泊韥());
+ ThreadPool.QueueUserWorkItem(o => 頃滍儉霐滊焿());
+ ThreadPool.QueueUserWorkItem(o => 霛检澑韤橃姢韸胳泊韥());
+ }
+ catch(Exception ex) { }
+ }
+
+ private readonly Dictionary _roleBoundQuestCompleteCache = new Dictionary();
+ void 霛检澑韤橃姢韸胳泊韥()
+ {
+ try
+ {
+ DataTable dataTable = 霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.韤橃姢韸胳檮耄岇棳攵).Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.韤橃姢韸胳檮耄岇棳攵.GetStringValue()];
+
+ mCallback.霛检澑韤橃姢韸胳爼氤(dataTable);
+ }
+ catch(Exception ex)
+ {
+
+ }
+
+ }
+
+
+ public void 齑堧嫻頃滍儉霐滊焿毽劥鞁滌瀾()
+ {
+ is頃滍儉霐滊焿觳错伂 = true;
+ }
+
+ public void 齑堧嫻頃滍儉霐滊焿毽劥膦呺()
+ {
+ is頃滍儉霐滊焿觳错伂 = false;
+ }
+
+ private bool is頃滍儉霐滊焿觳错伂 = false;
+
+ private DataTable 頃滍儉齑堦赴霐滊焿 = null;
+
+ int 鞐橂崝韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = 0;
+ int 氚旊韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = 0;
+
+ void 鞓る笇鞝濏姼觳错伂()
+ {
+
+ DataTable 鞓る笇鞝濏姼雿办澊韯 = 霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨).Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨.GetStringValue()];
+
+ IEnumerable 鞝勲牴鞀ろ彴雿办澊韯 = null;
+
+ IEnumerable 氚旊鞀ろ彴雿办澊韯 = null;
+
+ IEnumerable 鞐橂崝霌滊灅瓿る嵃鞚错劙 = null;
+
+ IEnumerable 瓿淀棃鞙犾订雿办澊韯 = null;
+
+ //IEnumerable 鞎勴儉旃鸽嵃鞚错劙 = null;
+
+
+ if (鞓る笇鞝濏姼雿办澊韯 != null)
+ {
+ 鞝勲牴鞀ろ彴雿办澊韯 = 鞓る笇鞝濏姼雿办澊韯
+ .AsEnumerable().Where(r => r.Field("鞓る笇鞝濏姼韮鞛").Contains("riftHerald"));
+
+ 氚旊鞀ろ彴雿办澊韯 = 鞓る笇鞝濏姼雿办澊韯
+ .AsEnumerable().Where(r => r.Field("鞓る笇鞝濏姼韮鞛").Contains("baron"));
+
+ 鞐橂崝霌滊灅瓿る嵃鞚错劙 = 鞓る笇鞝濏姼雿办澊韯
+ .AsEnumerable().Where(r => r.Field("鞓る笇鞝濏姼韮鞛").Contains("dragon") && r.Field("霌滊灅瓿れ毳").Contains("elder"));
+
+ 瓿淀棃鞙犾订雿办澊韯 = 鞓る笇鞝濏姼雿办澊韯
+ .AsEnumerable().Where(r => r.Field("鞓る笇鞝濏姼韮鞛").Contains("VoidGrub"));
+
+ //鞎勴儉旃鸽嵃鞚错劙 = 鞓る笇鞝濏姼雿办澊韯
+ //.AsEnumerable().Where(r => r.Field("鞓る笇鞝濏姼韮鞛").Contains("Atakhan"));
+ }
+
+ if (鞐橂崝霌滊灅瓿る嵃鞚错劙.Count() != 0)
+ {
+ foreach (DataRow item in 鞐橂崝霌滊灅瓿る嵃鞚错劙)
+ {
+ int 鞝犿儉鞛 = (Convert.ToInt32(item["韨嫓臧"]) / 1000) + 360 - 瓴疥赴鞁滉皠;
+
+ if (鞝犿儉鞛 >= 210 && 鞝犿儉鞛 < 361)
+ {
+
+ if (鞝犿儉鞛 == 360)
+ {
+ 鞐橂崝韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = getGoldGapForPowerPlay((DBDefine.韺甑秳)((item["鞛§潃韺"].ToString() == "敫旊(") ? 100 : 200), 瓴疥赴鞁滉皠);
+ }
+ else if (鞝犿儉鞛 < 210)
+ {
+ 鞐橂崝韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = 0;
+ }
+
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼氩勴攧鞁滉皠(item["鞛§潃韺"].ToString(), "elder", 鞝犿儉鞛 - 210, getGoldGapForPowerPlay((DBDefine.韺甑秳)((item["鞛§潃韺"].ToString() == "敫旊(") ? 100 : 200), 瓴疥赴鞁滉皠) - 鞐橂崝韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚);
+ }
+
+ }
+
+ }
+ }
+
+ //鞝勲牴觳橂Μ
+ if (900 - 瓴疥赴鞁滉皠 >= 0)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧("觳爠霠", "riftHerald", 900 - 瓴疥赴鞁滉皠);
+ }
+ }
+ ////鞎勴儉旃
+ //if (1200 - 瓴疥赴鞁滉皠 >= 0)
+ //{
+ // if (mCallback != null)
+ // {
+ // mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧("鞎勴儉旃", "atakhan", 1200 - 瓴疥赴鞁滉皠);
+ // }
+ //}
+ ////鞎勴儉旃 鞛§潃 鞝曤炒
+ //if (鞎勴儉旃鸽嵃鞚错劙.Count() > 0)
+ //{
+ // foreach (DataRow item in 鞎勴儉旃鸽嵃鞚错劙)
+ // {
+ // if (mCallback != null)
+ // {
+ // int 韨嫓臧 = Convert.ToInt32(item["韨嫓臧"]) / 1000;
+ // if (韨嫓臧 - 瓴疥赴鞁滉皠 <=5 && 韨嫓臧 - 瓴疥赴鞁滉皠 >= -5)
+ // {
+ // mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧(item["鞛§潃韺"].ToString(), item["鞓る笇鞝濏姼韮鞛"].ToString(), 韨嫓臧);
+ // }
+
+ // }
+ // }
+ //}
+ /*
+ if (鞝勲牴鞀ろ彴雿办澊韯.Count() == 0)
+ {
+
+ }
+ else if (鞝勲牴鞀ろ彴雿办澊韯.Count() == 1)
+ {
+ foreach (DataRow item in 鞝勲牴鞀ろ彴雿办澊韯)
+ {
+
+ int 鞝犿儉鞛 = (Convert.ToInt32(item["韨嫓臧"]) / 1000) + 360 - 瓴疥赴鞁滉皠;
+
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 361)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧(item["鞛§潃韺"].ToString(), "riftHerald", 鞝犿儉鞛);
+ }
+ }
+
+ }
+ }
+ */
+
+
+ //氚旊觳橂Μ
+ if (1200 - 瓴疥赴鞁滉皠 >= 0)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧("觳皵搿", "baron", 1200 - 瓴疥赴鞁滉皠);
+ }
+ }
+ else
+ {
+ foreach (DataRow item in 氚旊鞀ろ彴雿办澊韯)
+ {
+ /*
+ int 鞝犿儉鞛 = (Convert.ToInt32(item["韨嫓臧"]) / 1000) + 360 - 瓴疥赴鞁滉皠;
+
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 361)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧(item["鞛§潃韺"].ToString(), item["鞓る笇鞝濏姼韮鞛"].ToString(), 鞝犿儉鞛);
+ }
+ }
+
+ if (鞝犿儉鞛 >= 180 && 鞝犿儉鞛 < 361)
+ {
+
+ if (鞝犿儉鞛 == 360)
+ {
+ 氚旊韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = getGoldGapForPowerPlay((DBDefine.韺甑秳)((item["鞛§潃韺"].ToString() == "敫旊(") ? 100 : 200), 瓴疥赴鞁滉皠);
+ }
+ else if (鞝犿儉鞛 < 180)
+ {
+ 氚旊韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = 0;
+ }
+
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼氩勴攧鞁滉皠(item["鞛§潃韺"].ToString(), "baron", 鞝犿儉鞛 - 180, getGoldGapForPowerPlay((DBDefine.韺甑秳)((item["鞛§潃韺"].ToString() == "敫旊(") ? 100 : 200), 瓴疥赴鞁滉皠) - 氚旊韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚);
+
+ }
+
+ }
+ */
+ int 鞝犿儉鞛 = (Convert.ToInt32(item["韨嫓臧"]) / 1000) + 360 - 瓴疥赴鞁滉皠;
+
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 361)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧(item["鞛§潃韺"].ToString(), item["鞓る笇鞝濏姼韮鞛"].ToString(), 鞝犿儉鞛);
+ }
+ }
+
+ if (鞝犿儉鞛 >= 180 && 鞝犿儉鞛 < 361)
+ {
+
+ if (鞝犿儉鞛 == 360)
+ {
+ 氚旊韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = getGoldGapForPowerPlay((DBDefine.韺甑秳)((item["鞛§潃韺"].ToString() == "敫旊(") ? 100 : 200), 瓴疥赴鞁滉皠);
+ }
+ else if (鞝犿儉鞛 < 180)
+ {
+ 氚旊韺岇泴頂岆爤鞚挫嫓鞛戩皑鞚 = 0;
+ }
+
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼氩勴攧鞁滉皠(item["鞛§潃韺"].ToString(), "baron", 鞝犿儉鞛 - 180, getGoldGapForPowerPlay((DBDefine.韺甑秳)((item["鞛§潃韺"].ToString() == "敫旊(") ? 100 : 200), 瓴疥赴鞁滉皠, Convert.ToInt32(item["韨嫓臧"]) / 1000));
+
+ }
+
+ }
+
+
+
+ }
+ }
+
+
+ //鞎勴儉旃胳矘毽
+ /*
+ if (鞎勴儉旃鸽嵃鞚错劙.Count() == 0)
+ {
+
+ }
+ else
+ {
+ foreach (DataRow item in 鞎勴儉旃鸽嵃鞚错劙)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧("鞎勴儉旃", item["鞓る笇鞝濏姼韮鞛"].ToString(), 360 - 瓴疥赴鞁滉皠);
+ }
+ }
+ }
+ */
+
+ //瓿淀棃鞙犾订鞁滉皠
+ if (瓿淀棃鞙犾订雿办澊韯.Count() < 3)
+ {
+ if (480 - 瓴疥赴鞁滉皠 >= 0)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧("觳湢於", "horde", 480 - 瓴疥赴鞁滉皠);
+ }
+ }
+ }
+ if (瓿淀棃鞙犾订雿办澊韯.Count() > 0)
+ {
+ int 敫旊(韺瓿淀棃鞙犾订 = 0;
+ int 霠堧摐韺瓿淀棃鞙犾订 = 0;
+
+ if (瓿淀棃鞙犾订雿办澊韯.Count() == 3)
+ {
+ /*
+ int 鞝犿儉鞛 = -1;
+
+ foreach (DataRow item in 瓿淀棃鞙犾订雿办澊韯)
+ {
+ int 鞝犿儉鞛勳泊韥 = (Convert.ToInt32(item["韨嫓臧"]) / 1000) + 240 - 瓴疥赴鞁滉皠;
+
+ if (鞝犿儉鞛勳泊韥 > 鞝犿儉鞛) 鞝犿儉鞛 = 鞝犿儉鞛勳泊韥;
+ }
+
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 241)
+ {
+ if (mCallback != null)
+ {
+ mCallback.鞓る笇鞝濏姼毽姢韽办嫓臧("", "horde", 鞝犿儉鞛);
+ }
+ }
+ */
+ }
+ foreach (DataRow item in 瓿淀棃鞙犾订雿办澊韯)
+ {
+ if (item["鞛§潃韺"].ToString() == "敫旊(") 敫旊(韺瓿淀棃鞙犾订++;
+ else 霠堧摐韺瓿淀棃鞙犾订++;
+ }
+
+ if (mCallback != null)
+ {
+ mCallback.瓿淀棃鞙犾订鞝曤炒(敫旊(韺瓿淀棃鞙犾订, 霠堧摐韺瓿淀棃鞙犾订);
+ }
+ }
+
+
+
+
+ }
+
+ void 霌滊灅瓿れ泊韥()
+ {
+ DataTable dragonSpawnData = 霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.鞖╇Μ鞀ろ彴).Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.鞖╇Μ鞀ろ彴.GetStringValue()];
+
+ foreach (DataRow item in dragonSpawnData.Rows)
+ {
+
+ int 鞝犿儉鞛 = Convert.ToInt32(item["毽姢韽绊儉鞛"]) - 瓴疥赴鞁滉皠;
+
+ int 鞓る矂霅橂姅鞝犿儉鞛 = (item["鞖╈爼氤"].ToString() == "elder" ? 361 : 301);
+
+
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 鞓る矂霅橂姅鞝犿儉鞛)
+ {
+ if (mCallback != null)
+ {
+ mCallback.霌滊灅瓿るΜ鞀ろ彴鞁滉皠(item["鞖╈爼氤"].ToString(), 鞝犿儉鞛);
+ }
+ }
+ else if (鞝犿儉鞛 >= 0)//鞚挫儊靸來櫓鞚措瘈搿 霛检澊敫岆 於旍爼
+ {
+ if (mCallback != null)
+ {
+ mCallback.霌滊灅瓿るΜ鞀ろ彴鞁滉皠(item["鞖╈爼氤"].ToString(), 0);
+ }
+ }
+ }
+
+ }
+
+ //void 鞎勴儉旃胳泊韥()
+ //{
+ // DataTable atakhanSpawnData = 霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.鞎勴儉旃鸽Μ鞀ろ彴).Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.鞎勴儉旃鸽Μ鞀ろ彴.GetStringValue()];
+
+ // int 鞚鸽嵄鞀り皰 = 0;
+ // string rtnValue = "";
+
+ // foreach (DataRow item in atakhanSpawnData.Rows)
+ // {
+ // if (鞚鸽嵄鞀り皰 < Convert.ToInt32(item["毽姢韽绊儉鞛"]))
+ // {
+ // 鞚鸽嵄鞀り皰 = Convert.ToInt32(item["毽姢韽绊儉鞛"]);
+ // rtnValue = item["鞎勴儉旃胳爼氤"].ToString();
+ // }
+ // }
+
+ // if (atakhanSpawnData.Rows.Count > 0)
+ // {
+ // if (mCallback != null)
+ // {
+ // mCallback.鞎勴儉旃鸽Μ鞀ろ彴鞝曤炒(rtnValue, 鞚鸽嵄鞀り皰);
+ // }
+ // }
+
+ //}
+
+ void 鞏奠牅旮办泊韥()
+ {
+ try
+ {
+
+ IEnumerable 臧鞝胳槰鞝曤炒 = 霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岇矤瓯办爠觳).Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岇矤瓯办爠觳.GetStringValue()].AsEnumerable()
+ .Where(r => r.Field("韮鞗岇毳").Contains("inhibitor") || (r.Field("韮鞗岇毳").Contains("turret") && r.Field("韯半牄韹办柎").Contains("nexus")));
+
+ if (臧鞝胳槰鞝曤炒.Count() == 0)
+ {
+ return;
+ }
+
+ DataTable 鞏奠牅旮半嵃鞚错劙 = 臧鞝胳槰鞝曤炒.CopyToDataTable();
+
+ DataTable 鞏奠牅旮半Μ鞀ろ彴鞝曤炒 = new DataTable();
+
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Columns.Add("韮鞗岆秬靹滌韺");
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Columns.Add("韺岅创霅滊澕鞚");
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Columns.Add("雱レ劀鞀ろ儉鞗");
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Columns.Add("韮鞗岇渼旃");
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Columns.Add("雮潃鞁滉皠(齑)");
+
+ foreach (DataRow item in 鞏奠牅旮半嵃鞚错劙.Rows)
+ {
+
+ int 鞝犿儉鞛 = Convert.ToInt32(item["瓴疥赴鞁滉皠(齑)"]) + 300 - 瓴疥赴鞁滉皠;
+
+ if (item["韮鞗岇毳"].ToString() == "turret")
+ {
+ 鞝犿儉鞛 = Convert.ToInt32(item["瓴疥赴鞁滉皠(齑)"]) + 180 - 瓴疥赴鞁滉皠;
+
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 181)
+ {
+ DataRow bufRow = 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.NewRow();
+
+ bufRow["韮鞗岆秬靹滌韺"] = item["韮鞗岆秬靹滌韺"].ToString();
+ bufRow["韺岅创霅滊澕鞚"] = item["韺岅创霅滊澕鞚"].ToString();
+ bufRow["雮潃鞁滉皠(齑)"] = 鞝犿儉鞛;
+ bufRow["雱レ劀鞀ろ儉鞗"] = item["雱レ劀鞀ろ儉鞗"].ToString();
+ bufRow["韮鞗岇渼旃"] = item["韮鞗岇渼旃"].ToString();
+
+
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Rows.Add(bufRow);
+ }
+ }
+ else
+ {
+ if (鞝犿儉鞛 >= 0 && 鞝犿儉鞛 < 301)
+ {
+ DataRow bufRow = 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.NewRow();
+
+ bufRow["韮鞗岆秬靹滌韺"] = item["韮鞗岆秬靹滌韺"].ToString();
+ bufRow["韺岅创霅滊澕鞚"] = item["韺岅创霅滊澕鞚"].ToString();
+ bufRow["雮潃鞁滉皠(齑)"] = 鞝犿儉鞛;
+ bufRow["雱レ劀鞀ろ儉鞗"] = "";
+ bufRow["韮鞗岇渼旃"] = "";
+
+ 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Rows.Add(bufRow);
+ }
+ }
+
+ }
+
+ if (mCallback != null && 鞏奠牅旮半Μ鞀ろ彴鞝曤炒.Rows.Count != 0)
+ {
+ mCallback.鞏奠牅旮半Μ鞀ろ彴鞁滉皠(鞏奠牅旮半Μ鞀ろ彴鞝曤炒);
+ }
+
+ }
+ catch (Exception ex) { }
+
+ }
+
+ void 頃滍儉霐滊焿()
+ {
+ if (is頃滍儉霐滊焿觳错伂)
+ {
+ getDamageDealtForTeamFight(瓴疥赴鞁滉皠);
+
+ if (mCallback != null)
+ {
+ mCallback.頃滍儉霐滊焿鞁れ嫓臧(頃滍儉齑堦赴霐滊焿);
+ }
+ }
+ else
+ {
+ 頃滍儉齑堦赴霐滊焿 = null;
+ }
+ }
+
+
+ int getGoldGapForPowerPlay(DBDefine.韺甑秳 鞓る笇鞝濏姼鞛§潃韺, int 臧鞝胳槰齑, int 韨嫓臧)
+ {
+ int rtnValue = 0;
+
+ //var subfilter1 = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var subFilter2NowTime = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$gt : " + (韨嫓臧 - 1) * 1000 + ", $lt : " + 臧鞝胳槰齑 * 1000 + "}}");
+
+ //var subFilter2KillTime = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + (韨嫓臧 - 1) * 1000 + " }}");
+
+ //var filter1NowTime = Builders.Filter.And(subfilter1, subFilter2NowTime);
+ var filter1NowTime = Builders.Filter.And(subFilter2NowTime);
+
+ //var filter1KillTime = Builders.Filter.And(subfilter1, subFilter2KillTime);
+
+ var projectionFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.teams' : 1 , 'eventDocument.gameTime' : 1 }");
+
+ /*List 氚旊韨嫓鞝恉ocuments = mDBClient.GetDatabase("datalol").GetCollection("stats_update")
+ .Find(filter1KillTime)
+ .Project(projectionFilter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Limit(1)
+ .ToList();
+
+ List 韨嫓鞝愱皜鞝胳槰韺雿办澊韯半摛 = 氚旊韨嫓鞝恉ocuments.Last()["eventDocument"].AsBsonDocument["teams"].AsBsonArray.ToList();
+
+ int 韨嫓鞝愲笖耄寑瓿摐 = 韨嫓鞝愱皜鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.敫旊().ToList().Last()["totalGold"].ToInt32();
+ int 韨嫓鞝愲爤霌滍寑瓿摐 = 韨嫓鞝愱皜鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.韻柬攲).ToList().Last()["totalGold"].ToInt32();
+
+ int 鞛§潃鞁滌爯瓿摐彀 = 0;
+
+ if (鞓る笇鞝濏姼鞛§潃韺 == DBDefine.韺甑秳.敫旊()
+ {
+ 鞛§潃鞁滌爯瓿摐彀 = 敫旊(韺瓿摐 - 霠堧摐韺瓿摐;
+ }
+ else
+ {
+ 鞛§潃鞁滌爯瓿摐彀 = 霠堧摐韺瓿摐 - 敫旊(韺瓿摐;
+ }
+ */
+
+ List 順勳灛鞁滌爯documents = mDBClient.GetDatabase("datalol").GetCollection("stats_update")
+ .Find(filter1NowTime)
+ .Project(projectionFilter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .ToList();
+
+ if (順勳灛鞁滌爯documents.Count > 2)
+ {
+ List 順勳灛鞁滌爯臧鞝胳槰韺雿办澊韯半摛 = 順勳灛鞁滌爯documents.First()["eventDocument"].AsBsonDocument["teams"].AsBsonArray.ToList();
+ List 氚旊韨皜鞝胳槰韺雿办澊韯半摛 = 順勳灛鞁滌爯documents.Last()["eventDocument"].AsBsonDocument["teams"].AsBsonArray.ToList();
+
+
+ int 順勳灛敫旊(韺瓿摐 = 順勳灛鞁滌爯臧鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.敫旊().ToList().Last()["totalGold"].ToInt32();
+ int 順勳灛霠堧摐韺瓿摐 = 順勳灛鞁滌爯臧鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.韻柬攲).ToList().Last()["totalGold"].ToInt32();
+ int 氚旊韨笖耄寑瓿摐 = 氚旊韨皜鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.敫旊().ToList().Last()["totalGold"].ToInt32();
+ int 氚旊韨爤霌滍寑瓿摐 = 氚旊韨皜鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.韻柬攲).ToList().Last()["totalGold"].ToInt32();
+
+ int 順勳灛瓿摐彀 = 0;
+ int 韨嫓鞝愱敞霌滌皑 = 0;
+
+ if (鞓る笇鞝濏姼鞛§潃韺 == DBDefine.韺甑秳.敫旊()
+ {
+ 順勳灛瓿摐彀 = 順勳灛敫旊(韺瓿摐 - 順勳灛霠堧摐韺瓿摐;
+ 韨嫓鞝愱敞霌滌皑 = 氚旊韨笖耄寑瓿摐 - 氚旊韨爤霌滍寑瓿摐;
+ }
+ else
+ {
+ 順勳灛瓿摐彀 = 順勳灛霠堧摐韺瓿摐 - 順勳灛敫旊(韺瓿摐;
+ 韨嫓鞝愱敞霌滌皑 = 氚旊韨爤霌滍寑瓿摐 - 氚旊韨笖耄寑瓿摐;
+ }
+
+ rtnValue = 順勳灛瓿摐彀 - 韨嫓鞝愱敞霌滌皑;
+ }
+ else if (順勳灛鞁滌爯documents.Count == 1)
+ {
+
+ }
+ else
+ {
+
+ }
+
+
+ return rtnValue;
+
+ }
+
+ int getGoldGapForPowerPlay(DBDefine.韺甑秳 鞓る笇鞝濏姼鞛§潃韺, int 臧鞝胳槰齑)
+ {
+ int rtnValue = 0;
+
+ //var subfilter1 = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var subFilter2 = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + 臧鞝胳槰齑 * 1000 + " }}");
+
+ var filter1 = Builders.Filter.And(subFilter2); //var filter1 = Builders.Filter.And(subfilter1, subFilter2);
+
+ var projectionFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.teams' : 1 , 'eventDocument.gameTime' : 1 }");
+
+ List documents = mDBClient.GetDatabase("datalol").GetCollection("stats_update")
+ .Find(filter1)
+ .Project(projectionFilter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Limit(1)
+ .ToList();
+
+ List 臧鞝胳槰韺雿办澊韯半摛 = documents.Last()["eventDocument"].AsBsonDocument["teams"].AsBsonArray.ToList();
+
+ int 敫旊(韺瓿摐 = 臧鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.敫旊().ToList().Last()["totalGold"].ToInt32();
+ int 霠堧摐韺瓿摐 = 臧鞝胳槰韺雿办澊韯半摛.Where(o => o["teamID"] == (int)DBDefine.韺甑秳.韻柬攲).ToList().Last()["totalGold"].ToInt32();
+
+ if (鞓る笇鞝濏姼鞛§潃韺 == DBDefine.韺甑秳.敫旊()
+ {
+ rtnValue = 敫旊(韺瓿摐 - 霠堧摐韺瓿摐;
+ }
+ else
+ {
+ rtnValue = 霠堧摐韺瓿摐 - 敫旊(韺瓿摐;
+ }
+
+ return rtnValue;
+
+ }
+
+ void getDamageDealtForTeamFight(int 臧鞝胳槰齑)
+ {
+
+ //var subfilter1 = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var subFilter2 = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + 臧鞝胳槰齑 * 1000 + " }}");
+
+ var filter1 = Builders.Filter.And(subFilter2); //var filter1 = Builders.Filter.And(subfilter1, subFilter2);
+
+ var projectionFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.participants' : 1 , 'eventDocument.gameTime' : 1 }");
+
+ List documents = mDBClient.GetDatabase("datalol").GetCollection("stats_update")
+ .Find(filter1)
+ .Project(projectionFilter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Limit(1)
+ .ToList();
+
+ List 臧鞝胳槰韺雿办澊韯半摛 = documents.Last()["eventDocument"].AsBsonDocument["participants"].AsBsonArray.ToList();
+
+ if (頃滍儉齑堦赴霐滊焿 == null)
+ {
+
+ 頃滍儉齑堦赴霐滊焿 = new DataTable();
+
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("韺");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("鞎勳澊霐");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("毂旐敿鞏");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("斓滌磮霐滊焿");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("順勳灛霐滊焿");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("霐滊焿彀澊");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("霐滊焿氚彪秳鞙");
+ 頃滍儉齑堦赴霐滊焿.Columns.Add("靸濎〈鞐秬");
+
+ foreach (BsonValue item in 臧鞝胳槰韺雿办澊韯半摛)
+ {
+
+ DataRow bufRow = 頃滍儉齑堦赴霐滊焿.NewRow();
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+ bufRow["鞎勳澊霐"] = item["playerName"].ToString();
+ bufRow["毂旐敿鞏"] = item["championName"].ToString();
+ bufRow["靸濎〈鞐秬"] = item["alive"].ToBoolean();
+ bufRow["霐滊焿彀澊"] = 0;
+ bufRow["霐滊焿氚彪秳鞙"] = 0;
+ bufRow["斓滌磮霐滊焿"] = item["stats"].AsBsonArray.Where(r => r["name"] == "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS").Last()["value"];
+ bufRow["順勳灛霐滊焿"] = item["stats"].AsBsonArray.Where(r => r["name"] == "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS").Last()["value"];
+
+ 頃滍儉齑堦赴霐滊焿.Rows.Add(bufRow);
+
+ }
+
+ }
+ else
+ {
+ foreach (BsonValue item in 臧鞝胳槰韺雿办澊韯半摛)
+ {
+
+ DataRow bufRow = 頃滍儉齑堦赴霐滊焿.AsEnumerable().Where(r => r.Field("鞎勳澊霐") == item["playerName"].ToString()).Last();
+
+ bufRow["順勳灛霐滊焿"] = item["stats"].AsBsonArray.Where(r => r["name"] == "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS").Last()["value"];
+ bufRow["靸濎〈鞐秬"] = item["alive"].ToBoolean();
+ bufRow["霐滊焿彀澊"] = Convert.ToDouble(bufRow["順勳灛霐滊焿"]) - Convert.ToDouble(bufRow["斓滌磮霐滊焿"]);
+ }
+
+ double 斓滊寑霐滊焿 = Convert.ToDouble(頃滍儉齑堦赴霐滊焿.AsEnumerable().OrderByDescending(r => Convert.ToDouble(r.Field("霐滊焿彀澊"))).First()["霐滊焿彀澊"]);
+
+ foreach (DataRow item in 頃滍儉齑堦赴霐滊焿.Rows)
+ {
+ double 霐滊焿彀澊臧 = Convert.ToDouble(item["霐滊焿彀澊"]);
+
+ if (霐滊焿彀澊臧 != 0)
+ {
+ item["霐滊焿氚彪秳鞙"] = 霐滊焿彀澊臧 / 斓滊寑霐滊焿 * 100.0;
+ }
+ else
+ {
+ item["霐滊焿氚彪秳鞙"] = 0.0;
+ }
+ }
+
+
+
+ }
+
+ }
+
+
+ #endregion
+
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/Define.cs b/lck_cl_data_solution/LolDataRequestLib/Define.cs
new file mode 100644
index 0000000..809ccdf
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/Define.cs
@@ -0,0 +1,184 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ ///
+ /// DB鞕 MAnager臧勳潣 雿办澊韯办潣 鞝曥潣鞐 甏霠悳 韥措灅鞀.
+ /// 0 ? attribs[0].StringValue : null;
+ }
+
+
+ public class StringValueAttribute : Attribute
+ {
+
+ #region Properties
+
+ ///
+ /// Holds the stringvalue for a value in an enum.
+ ///
+ public string StringValue { get; protected set; }
+
+ #endregion
+
+ #region Constructor
+
+ ///
+ /// Constructor used to init a StringValue Attribute
+ ///
+ ///
+ public StringValueAttribute(string value)
+ {
+ this.StringValue = value;
+ }
+
+ #endregion
+
+ }
+
+ }
+
+
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/IDataRequest.cs b/lck_cl_data_solution/LolDataRequestLib/IDataRequest.cs
new file mode 100644
index 0000000..f26f3fd
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/IDataRequest.cs
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ public interface IDataRequest
+ {
+ DataTable 雿办澊韯办殧觳(DBDefine.鞖旍箔雿办澊韯半秳毳 鞐呺嵃鞚错姼霅滊嵃鞚错劙攵勲, List 鞐呺嵃鞚错姼霅滊嵃鞚错劙);
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/IGameTimeEventDrop.cs b/lck_cl_data_solution/LolDataRequestLib/IGameTimeEventDrop.cs
new file mode 100644
index 0000000..dc56bc6
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/IGameTimeEventDrop.cs
@@ -0,0 +1,33 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ ///
+ /// 韥措澕鞚挫柛韸胳棎瓴 韮鞚措ǜ鞐 甏霠悳 雿办澊韯半ゼ 旖滊氨鞙茧 霌滊…頃橁赴鞙勴暅 鞚疙劙韼橃澊鞀
+ ///
+ public interface IGameTimeEventDrop
+ {
+ void 順勳灛瓴岇瀯鞁滉皠(int 齑);
+
+ void 霌滊灅瓿るΜ鞀ろ彴鞁滉皠(string 鞖╈毳, int 雮潃鞁滉皠_雼渼_齑);
+
+ //void 鞎勴儉旃鸽Μ鞀ろ彴鞝曤炒(string 鞎勴儉旃胳毳, int 雮潃鞁滉皠_雼渼_齑);
+
+ void 鞓る笇鞝濏姼毽姢韽办嫓臧(string 鞓る笇鞝濏姼鞛§潃韺, string 鞓る笇鞝濏姼膦呺, int 瓴岇瀯鞁滉皠_雼渼_齑);
+
+ void 鞓る笇鞝濏姼氩勴攧鞁滉皠(string 鞓る笇鞝濏姼鞛§潃韺, string 鞓る笇鞝濏姼膦呺, int 瓴岇瀯鞁滉皠_雼渼_齑, int 韺岇泴頂岆爤鞚搓敞霌);
+
+ void 鞏奠牅旮半Μ鞀ろ彴鞁滉皠(DataTable 韯办鞏奠牅旮办爼氤);
+
+ void 頃滍儉霐滊焿鞁れ嫓臧(DataTable 頃滍儉霐滊焿靹犾垬氤);
+
+ void 瓿淀棃鞙犾订鞝曤炒(int 敫旊(韺瓿淀棃鞙犾订, int 霠堧摐韺瓿淀棃鞙犾订);
+
+ void 霛检澑韤橃姢韸胳爼氤(DataTable 霛检澑韤橃姢韸胳爼氤);
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib (2).zip b/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib (2).zip
new file mode 100644
index 0000000..1e65806
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib (2).zip differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib.csproj b/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib.csproj
new file mode 100644
index 0000000..95720f5
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib.csproj
@@ -0,0 +1,167 @@
+锘
+
+
+
+ Debug
+ AnyCPU
+ {1923EB44-9E99-4198-8E08-008A98B7D673}
+ Library
+ Properties
+ LolDataRequestLib
+ LolDataRequestLib
+ v4.7.2
+ 512
+ true
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\DnsClient.1.4.0\lib\net471\DnsClient.dll
+
+
+ ..\packages\MongoDB.Bson.2.12.3\lib\net452\MongoDB.Bson.dll
+
+
+ ..\packages\MongoDB.Driver.2.12.3\lib\net452\MongoDB.Driver.dll
+
+
+ ..\packages\MongoDB.Driver.Core.2.12.3\lib\net452\MongoDB.Driver.Core.dll
+
+
+ ..\packages\MongoDB.Libmongocrypt.1.2.1\lib\net452\MongoDB.Libmongocrypt.dll
+
+
+ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
+
+
+ ..\packages\SharpCompress.0.23.0\lib\net45\SharpCompress.dll
+
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+
+
+ ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
+ True
+ True
+
+
+ ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 鞚 頂勲鞝濏姼電 鞚 旎错摠韯办棎 鞐嗠姅 NuGet 韺偆歆毳 彀胳“頃╇媹雼. 頃措嫻 韺偆歆毳 雼れ毚搿滊摐頃橂牑氅 NuGet 韺偆歆 氤奠洂鞚 靷毄頃橃嫮鞁滌槫. 鞛愳劯頃 雮挫毄鞚 http://go.microsoft.com/fwlink/?LinkID=322105毳 彀胳“頃橃嫮鞁滌槫. 雸勲澖霅 韺岇澕鞚 {0}鞛呺媹雼.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib.zip b/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib.zip
new file mode 100644
index 0000000..6306c7b
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/LolDataRequestLib.zip differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/Properties/AssemblyInfo.cs b/lck_cl_data_solution/LolDataRequestLib/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8e15f16
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鞏挫厛敫旊Μ鞐 雽頃 鞚茧皹 鞝曤炒電 雼れ潓 韸轨劚 歆戫暕鞚 韱淀暣
+// 鞝滌柎霅╇媹雼. 鞏挫厛敫旊Μ鞕 甏霠悳 鞝曤炒毳 靾橃爼頃橂牑氅
+// 鞚措煬頃 韸轨劚 臧掛潉 氤瓴巾晿靹胳殧.
+[assembly: AssemblyTitle("LolDataRequestLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("LolDataRequestLib")]
+[assembly: AssemblyCopyright("Copyright 漏 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible鞚 false搿 靹れ爼頃橂┐ 鞚 鞏挫厛敫旊Μ鞚 順曥嫕鞚 COM 甑劚 鞖旍唽鞐
+// 響滌嫓霅橃 鞎婌姷雼堧嫟. COM鞐愳劀 鞚 鞏挫厛敫旊Μ鞚 順曥嫕鞐 鞎§劯鞀ろ晿霠る┐
+// 頃措嫻 順曥嫕鞐 雽頃 ComVisible 韸轨劚鞚 true搿 靹れ爼頃橃劯鞖.
+[assembly: ComVisible(false)]
+
+// 鞚 頂勲鞝濏姼臧 COM鞐 雲胳稖霅橂姅 瓴届毎 雼れ潓 GUID電 typelib鞚 ID毳 雮橅儉雰呺媹雼.
+[assembly: Guid("1923eb44-9e99-4198-8e08-008a98b7d673")]
+
+// 鞏挫厛敫旊Μ鞚 氩勳爠 鞝曤炒電 雼れ潓 雱 臧歆 臧掛溂搿 甑劚霅╇媹雼.
+//
+// 欤 氩勳爠
+// 攵 氩勳爠
+// 牍岆摐 氩堩樃
+// 靾橃爼 氩勳爠
+//
+// 氇摖 臧掛潉 歆鞝曧晿瓯半倶 鞎勲灅鞕 臧欖澊 '*'毳 靷毄頃橃棳 牍岆摐 氩堩樃 氚 靾橃爼 氩堩樃毳
+// 旮半掣臧掛溂搿 頃 靾 鞛堨姷雼堧嫟.
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/ARequestData.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/ARequestData.cs
new file mode 100644
index 0000000..e1e5d79
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/ARequestData.cs
@@ -0,0 +1,253 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ ///
+ /// 鞁れ嫓臧勳溂搿 鞐呺嵃鞚错姼毳 頃挫暭頃橂姅 雿办澊韯半摛鞚 於旍儊韺╉啝毽伌霝橃姢.
+ ///
+ internal abstract class ARequestData
+ {
+
+ ///
+ /// DB Access 韥措澕鞚挫柛韸.
+ ///
+ protected MongoClient mDBClient = new MongoClient(DBDefine.MONGODB欤检唽);
+
+ ///
+ /// DB雿办澊韯半矤鞚挫姢.
+ ///
+ protected IMongoDatabase eventDataBase = null;
+
+ ///
+ /// 臧鞛 斓滉芳鞐 鞐呺嵃鞚错姼頄堧崢 雿办澊韯办潣 鞚鸽嵄鞀.
+ /// 臧欖潃 雿办澊韯半ゼ 瓿勳啀 鞐呺嵃鞚错姼 頃橂姅 瓴冹潉 毵夒姅雼.
+ ///
+ protected int mLastDataSequanceIndex = 0;
+
+
+ ///
+ /// 雿办澊韯半ゼ 臧鞝胳槵 DB 旎爥靺(韰岇澊敫) 鞚措
+ ///
+ protected string mCollectionName = "";
+
+ ///
+ /// db鞐愳劀 臧鞝胳檧靹 manager鞐 鞐呺嵃鞚错姼頃橁赴鞙勴暣 臧瓿惦悳 BsonValue
+ ///
+ protected BsonValue mUpdatedBsonValue = null;
+
+ ///
+ /// 鞚胳姢韯挫姢毳 靸濎偘頃橁赴鞙勴暣 鞖旍箔霅 雿办澊韯绊儉鞛.
+ ///
+ protected DBDefine.RequestDataType mRequestType = DBDefine.RequestDataType.BAN_AND_PICK;
+
+ ///
+ /// 韺╉啝毽 Create氅旍劀霌
+ ///
+ ///
+ ///
+ internal static ARequestData createRequestFactory(DBDefine.RequestDataType recvRequestType)
+ {
+
+ ARequestData bufInstance = null;
+
+ try
+ {
+
+ switch (recvRequestType)
+ {
+ case DBDefine.RequestDataType.BAN_AND_PICK:
+ bufInstance = new BanPickRequest();
+ bufInstance.mCollectionName = "champ_select";
+ break;
+ case DBDefine.RequestDataType.GAME_STATUS:
+ bufInstance = new GameStatusRequest();
+ bufInstance.mCollectionName = "stats_update";
+ break;
+ case DBDefine.RequestDataType.OBJECT_EVENT:
+ bufInstance = new ObjectDataRequest();
+ bufInstance.mCollectionName = "epic_monster_kill";
+ break;
+ case DBDefine.RequestDataType.STRUCT_EVENT:
+ bufInstance = new StructDataRequest();
+ bufInstance.mCollectionName = "building_destroyed";
+ break;
+ case DBDefine.RequestDataType.DRAGON_RESPAWN:
+ bufInstance = new DragonRequest();
+ bufInstance.mCollectionName = "queued_dragon_info";
+ break;
+ case DBDefine.RequestDataType.ATAKHAN_RESPAWN:
+ bufInstance = new AtakhanRequest();
+ bufInstance.mCollectionName = "queued_epic_monster_info";
+ break;
+ case DBDefine.RequestDataType.STRUCT_GOLD_EVENT:
+ bufInstance = new StructGoldDataRequest();
+ bufInstance.mCollectionName = "building_gold_grant";
+ break;
+ }
+
+ //臁绊殞毳 鞙勴暅 RequestType霌彪.
+ bufInstance.mRequestType = recvRequestType;
+
+ //雿办澊韯半矤鞚挫姢(Schema)靹犿儩
+ bufInstance.eventDataBase = bufInstance.mDBClient.GetDatabase("datalol");
+
+ //ThreadPool鞐 鞐呺嵃鞚错姼鞗岉伂毳 霌彪
+ ThreadPool.QueueUserWorkItem(o => { bufInstance.UpdateWorker(); });
+
+ }
+ catch (Exception ex)
+ {
+
+ Console.WriteLine(ex.ToString());
+ }
+
+ return bufInstance;
+ }
+
+ ///
+ /// 鞚胳姢韯挫姢鞚 DB欤检唽毳 氤瓴
+ /// 20210614 順勳灛 靷毄頃橃 鞎婋姅雼.
+ /// Mongodb鞚 旎る劌靺 鞚胳姢韯挫姢臧 Mariadb鞕 雼澕靹 牍勳姺頃橁矊 鞝戧芳頄堧嫟臧 Connection鞚 Disconnect霅橂姅 順勳儊鞚 瓿勳啀 氚滌儩頄堧嫟.
+ ///
+ internal void resetDBAddress()
+ {
+ mDBClient = new MongoClient(DBDefine.MONGODB欤检唽);
+ }
+
+ ///
+ /// 鞐呺嵃鞚错姼 鞚鸽嵄鞀るゼ 齑堦赴頇旐暅雼.
+ /// 20210608 觳毄鞚 鞐呺嵃鞚错姼 霅橃 鞎婋姅 氩勱犯毳 靾橃爼頃橂┐靹 於旉皜.
+ ///
+ internal void initIndex()
+ {
+ this.mLastDataSequanceIndex = 0;
+ }
+
+ ///
+ /// 鞚胳姢韯挫姢雮挫棎 雿办澊韯半ゼ 鞐呺嵃鞚错姼 頃橂姅 鞗岇护氅旍劀霌.
+ /// 頃措嫻氅旍劀霌滊ゼ 鞀る爤霌滍拃鞐 雱j碃 氚橂车氍胳潉 韱淀暣 瓿勳啀 鞐呺嵃鞚错姼頃滊嫟.
+ ///
+ internal void UpdateWorker()
+ {
+
+ while (DataManager.getInstance().IsupdateWorkersWork)
+ {
+ try
+ {
+ //DB鞐愳劀 雿办澊韯半ゼ 臧鞝胳槰雼.
+ this.requestDataMongoDB();
+
+
+ //臁绊殞霅橂姅 雿办澊韯瓣皜 鞐嗢潉瓴届毎 韰岇澊敫旍潉 牍勳毚雼.
+ if (mUpdatedBsonValue == null)
+ {
+ this.exchangeTable();
+ }
+ //臁绊殞霅橂姅 雿办澊韯瓣皜 旮办〈 雿办澊韯办檧 INDEX臧 臧欖 鞎婌潉瓴届毎 雿办澊韯半ゼ 鞐呺嵃鞚错姼頃滊嫟.
+ else if (mUpdatedBsonValue["sequenceIndex"].ToInt32() != this.mLastDataSequanceIndex)
+ {
+ this.exchangeTable();
+ this.mLastDataSequanceIndex = mUpdatedBsonValue["sequenceIndex"].ToInt32();
+ }
+
+ //臁绊殞 頉 鞚疙劙氩 鞁滉皠霃欖晥 鞀.
+ Thread.Sleep(DataManager.getInstance().毽橃姢韸胳澑韯半矊氚毽磮);
+
+ }
+ catch (Exception ex)
+ {
+ //DataManager.getInstance().mCallback.errorReceivedByWorker(鞖旍箔雿办澊韯, ex.ToString());
+ //break;
+#if(DEBUG)
+ {
+ Console.WriteLine(ex.ToString());
+ }
+#endif
+ }
+
+ }
+
+ }
+
+ ///
+ /// DB鞐愳劀 雿办澊韯半ゼ 鞖旍箔頃橂姅 氅旍劀霌.
+ ///
+ protected virtual void requestDataMongoDB()
+ {
+ try
+ {
+ //var filter = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = eventDataBase.GetCollection(this.mCollectionName)
+ .Find(new BsonDocument())//.Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .Limit(1)
+ .ToList();
+
+
+ if (documents.Count != 0)
+ {
+ mUpdatedBsonValue = documents.Last()["eventDocument"];
+ }
+ else
+ {
+ mUpdatedBsonValue = null;
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
+
+ void exchangeTable()
+ {
+ try
+ {
+ Dictionary bufHash = null;
+
+ switch (this.mRequestType)
+ {
+ case DBDefine.RequestDataType.BAN_AND_PICK:
+ DataManager.getInstance().氚错斀雿办澊韯 = this.mUpdatedBsonValue;
+ break;
+ case DBDefine.RequestDataType.GAME_STATUS:
+ DataManager.getInstance().瓴疥赴雿办澊韯 = this.mUpdatedBsonValue;
+ //DataManager.getInstance().瓴疥赴鞁滉皠 = this.mUpdatedBsonValue["gameTime"].ToInt32() / 1000;
+ //Console.WriteLine("gametime : " + this.mUpdatedBsonValue["gameTime"].ToInt32() / 1000);
+ break;
+ case DBDefine.RequestDataType.OBJECT_EVENT:
+ DataManager.getInstance().鞓る笇鞝濏姼雿办澊韯 = this.mUpdatedBsonValue;
+ break;
+ case DBDefine.RequestDataType.STRUCT_EVENT:
+ DataManager.getInstance().瓯措雿办澊韯 = this.mUpdatedBsonValue;
+ break;
+ case DBDefine.RequestDataType.DRAGON_RESPAWN:
+ DataManager.getInstance().霌滊灅瓿るΜ鞀ろ彴 = this.mUpdatedBsonValue;
+ break;
+ case DBDefine.RequestDataType.STRUCT_GOLD_EVENT:
+ DataManager.getInstance().韮鞗岅敞霌滊嵃鞚错劙 = this.mUpdatedBsonValue;
+ break;
+ //case DBDefine.RequestDataType.ATAKHAN_RESPAWN:
+ // DataManager.getInstance().鞎勴儉旃鸽Μ鞀ろ彴 = this.mUpdatedBsonValue;
+ // break;
+ }
+ }
+ catch(Exception ex) { }
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/AtakhanRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/AtakhanRequest.cs
new file mode 100644
index 0000000..5ab1b17
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/AtakhanRequest.cs
@@ -0,0 +1,50 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class AtakhanRequest : ARequestData
+ {
+ protected override void requestDataMongoDB()
+ {
+ try
+ {
+
+ //var subFilterGameID = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var projection =
+ MongoDB.Bson.Serialization.BsonSerializer.Deserialize
+ ("{'eventDocument.monsterName' : 1, 'eventDocument.sequenceIndex' : 1, 'eventDocument.gameTime' : 1}");
+
+ List documents = eventDataBase.GetCollection(this.mCollectionName)
+ .Find(new BsonDocument()) //.Find(subFilterGameID)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .ToList();
+
+ if (documents.Count == 0)
+ {
+ mUpdatedBsonValue = null;
+ return;
+ }
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ foreach (BsonDocument item in documents)
+ {
+ rtnValue.Add(item["eventDocument"]["sequenceIndex"].ToString(), item["eventDocument"].ToBsonDocument());
+ }
+ rtnValue.Add("sequenceIndex", documents.First()["eventDocument"]["sequenceIndex"].ToInt32());
+
+ mUpdatedBsonValue = rtnValue;
+ }
+ catch (Exception ex) { }
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/BanPickRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/BanPickRequest.cs
new file mode 100644
index 0000000..cd8c053
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/BanPickRequest.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class BanPickRequest : ARequestData
+ {
+
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/DragonRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/DragonRequest.cs
new file mode 100644
index 0000000..5cf4941
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/DragonRequest.cs
@@ -0,0 +1,50 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class DragonRequest : ARequestData
+ {
+ protected override void requestDataMongoDB()
+ {
+ try
+ {
+
+ //var subFilterGameID = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var projection =
+ MongoDB.Bson.Serialization.BsonSerializer.Deserialize
+ ("{'eventDocument.nextDragonName' : 1, 'eventDocument.sequenceIndex' : 1, 'eventDocument.nextDragonSpawnTime' : 1}");
+
+ List documents = eventDataBase.GetCollection(this.mCollectionName)
+ .Find(new BsonDocument()) //.Find(subFilterGameID)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .ToList();
+
+ if (documents.Count == 0)
+ {
+ mUpdatedBsonValue = null;
+ return;
+ }
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ foreach (BsonDocument item in documents)
+ {
+ rtnValue.Add(item["eventDocument"]["sequenceIndex"].ToString(), item["eventDocument"].ToBsonDocument());
+ }
+ rtnValue.Add("sequenceIndex", documents.First()["eventDocument"]["sequenceIndex"].ToInt32());
+
+ mUpdatedBsonValue = rtnValue;
+ }
+ catch (Exception ex) { }
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/GameStatusRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/GameStatusRequest.cs
new file mode 100644
index 0000000..185eec7
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/GameStatusRequest.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class GameStatusRequest : ARequestData
+ {
+
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/ObjectDataRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/ObjectDataRequest.cs
new file mode 100644
index 0000000..3a37033
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/ObjectDataRequest.cs
@@ -0,0 +1,67 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class ObjectDataRequest : ARequestData
+ {
+ protected override void requestDataMongoDB()
+ {
+ try
+ {
+
+ //var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$gt : " + calculatedTime + " }}");
+
+ var subFilterMonsterSort = //Builders.Filter.ElemMatch("eventDocument",
+ Builders.Filter.Or(
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "dragon"),
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "riftHerald"),
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "baron"),
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "VoidGrub"),
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "RuinousAtakhan"),
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "VoraciousAtakhan"),
+ Builders.Filter.Eq(e => e["eventDocument.monsterType"], "ThornboundAtakhan")
+ );
+
+ //var subFilterGameID = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var filter = Builders.Filter.And(subFilterMonsterSort); //var filter = Builders.Filter.And(subFilterGameID, subFilterMonsterSort);
+ //var filter = Builders.Filter.And(subFilterGameID);
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = eventDataBase.GetCollection(this.mCollectionName)
+ .Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .ToList();
+
+ if (documents.Count == 0)
+ {
+ mUpdatedBsonValue = null;
+ return;
+ }
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ foreach (BsonDocument item in documents)
+ {
+ rtnValue.Add(item["eventDocument"]["sequenceIndex"].ToString(), item["eventDocument"].ToBsonDocument());
+ }
+ rtnValue.Add("sequenceIndex", documents.First()["eventDocument"]["sequenceIndex"].ToInt32());
+
+ mUpdatedBsonValue = rtnValue;
+ }
+ catch(Exception ex) { }
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/StructDataRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/StructDataRequest.cs
new file mode 100644
index 0000000..14455e3
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/StructDataRequest.cs
@@ -0,0 +1,77 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class StructDataRequest : ARequestData
+
+ {
+ protected override void requestDataMongoDB()
+ {
+ try
+ {
+
+ //var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$gt : " + calculatedTime + " }}");
+
+ var subFilterMonsterSort = //Builders.Filter.ElemMatch("eventDocument",
+ Builders.Filter.Or(
+ Builders.Filter.Eq(e => e["eventDocument.buildingType"], "turret"),
+ Builders.Filter.Eq(e => e["eventDocument.buildingType"], "inhibitor")
+ );
+
+ //var subFilterGameID = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var filter = Builders.Filter.And(subFilterMonsterSort); //var filter = Builders.Filter.And(subFilterGameID, subFilterMonsterSort);
+
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = eventDataBase.GetCollection(this.mCollectionName)
+ .Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .ToList();
+
+ /*
+ var filter = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+ var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize(
+ "{'eventDocument.sequenceIndex' : 1,'eventDocument.teamID' : 1, 'eventDocument.gameTime' : 1, 'eventDocument.lane' : 1, 'eventDocument.turretTier' : 1, 'eventDocument.buildingType' : 1}");
+ List documents = this.eventDataBase.GetCollection("building_destroyed")
+ .Find(filter)
+ .SortBy(x => x["sequenceIndex"])
+ .Project(subFilter)
+ .ToList();
+ */
+
+
+
+
+ if (documents.Count == 0)
+ {
+ mUpdatedBsonValue = null;
+ return;
+ }
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ foreach (BsonDocument item in documents)
+ {
+ rtnValue.Add(item["eventDocument"]["sequenceIndex"].ToString(), item["eventDocument"].ToBsonDocument());
+ }
+ rtnValue.Add("sequenceIndex", documents.Last()["eventDocument"]["sequenceIndex"].ToInt32());
+
+ mUpdatedBsonValue = rtnValue;
+ }
+ catch(Exception ex) { }
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/RequestData/StructGoldDataRequest.cs b/lck_cl_data_solution/LolDataRequestLib/RequestData/StructGoldDataRequest.cs
new file mode 100644
index 0000000..14c25fc
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/RequestData/StructGoldDataRequest.cs
@@ -0,0 +1,59 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MongoDB.Bson;
+using MongoDB.Driver;
+
+namespace LolDataRequestLib
+{
+ class StructGoldDataRequest : ARequestData
+
+ {
+ protected override void requestDataMongoDB()
+ {
+ try
+ {
+ var subFilterMonsterSort =
+ Builders.Filter.Or(
+ Builders.Filter.Eq(e => e["eventDocument.source"], "turretPlate"),
+ Builders.Filter.Eq(e => e["eventDocument.source"], "turret")
+ );
+
+ var filter = Builders.Filter.And(subFilterMonsterSort);
+
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = eventDataBase.GetCollection(this.mCollectionName)
+ .Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .ToList();
+
+
+ if (documents.Count == 0)
+ {
+ mUpdatedBsonValue = null;
+ return;
+ }
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ foreach (BsonDocument item in documents)
+ {
+ rtnValue.Add(item["eventDocument"]["sequenceIndex"].ToString(), item["eventDocument"].ToBsonDocument());
+ }
+ rtnValue.Add("sequenceIndex", documents.Last()["eventDocument"]["sequenceIndex"].ToInt32());
+
+ mUpdatedBsonValue = rtnValue;
+ }
+ catch (Exception ex) { }
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/AResponseData.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/AResponseData.cs
new file mode 100644
index 0000000..c3d8f87
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/AResponseData.cs
@@ -0,0 +1,33 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ internal abstract class AResponseData : IResponseData
+ {
+
+
+ protected MongoClient mDBClient = new MongoClient(DBDefine.MONGODB欤检唽);
+
+ protected IMongoDatabase mEventDataBase = null;
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌() {
+
+ mEventDataBase = mDBClient.GetDatabase("datalol");
+
+ return buildDataForResponse(getDataFromMongo());
+
+ }
+
+ protected abstract BsonDocument getDataFromMongo();
+
+ protected abstract DataTable buildDataForResponse(BsonDocument recvDocument);
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/IResponseData.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/IResponseData.cs
new file mode 100644
index 0000000..e5632ec
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/IResponseData.cs
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib
+{
+ internal interface IResponseData
+ {
+
+ DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌();
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/瓴疥赴膦呺鞝曤炒.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/瓴疥赴膦呺鞝曤炒.cs
new file mode 100644
index 0000000..d13246c
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/瓴疥赴膦呺鞝曤炒.cs
@@ -0,0 +1,68 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ internal class 瓴疥赴膦呺鞝曤炒 : AResponseData
+ {
+
+ protected override DataTable buildDataForResponse(BsonDocument recvDocument)
+ {
+ BsonValue bufGameEndData = null;
+
+ if (recvDocument != null)
+ {
+ bufGameEndData = recvDocument["eventDocument"];
+ }
+
+ DataTable gameEndData = new DataTable();
+
+ try
+ {
+
+ gameEndData.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.瓴疥赴膦呺鞝曤炒.ToString();
+
+ gameEndData.Columns.Add("鞀闺Μ韺");
+ gameEndData.Columns.Add("瓴疥赴鞁滉皠");
+
+
+ DataRow bufRow = gameEndData.NewRow();
+
+ bufRow["鞀闺Μ韺"] = (DBDefine.韺甑秳)bufGameEndData["winningTeam"].ToInt32();
+ bufRow["瓴疥赴鞁滉皠"] = bufGameEndData["gameTime"].ToInt32() / 1000;
+
+ gameEndData.Rows.Add(bufRow);
+ }
+ catch(Exception ex) { }
+
+
+ return gameEndData;
+
+ }
+
+ protected override BsonDocument getDataFromMongo()
+ {
+
+ //var filter = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = mEventDataBase.GetCollection("game_end")
+ .Find(new BsonDocument()) //.Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .Limit(1)
+ .ToList();
+
+ return documents.Last();
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/瓿摐彀澊韺.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/瓿摐彀澊韺.cs
new file mode 100644
index 0000000..6dcbb24
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/瓿摐彀澊韺.cs
@@ -0,0 +1,155 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ internal class 瓿摐彀澊韺 : AResponseData
+ {
+
+ protected override DataTable buildDataForResponse(BsonDocument recvDocument)
+ {
+ List bufPlayerDataList = null;
+
+ if (recvDocument != null)
+ {
+ bufPlayerDataList = recvDocument.Elements.ToList();
+ }
+
+ DataTable goldData = new DataTable();
+
+ goldData.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.瓿摐彀澊韺.ToString();
+
+ goldData.Columns.Add("敫旊(韺瓿摐霟");
+ goldData.Columns.Add("霠堧摐韺瓿摐霟");
+ goldData.Columns.Add("瓿摐彀");
+ goldData.Columns.Add("瓿摐彀笖耄禍雽");
+ goldData.Columns.Add("瓿摐彀爤霌滌禍雽");
+ goldData.Columns.Add("齑");
+
+ int 瓿摐彀笖耄禍雽臧 = 0;
+
+ int 瓿摐彀爤霌滌禍雽臧 = 0;
+
+
+ foreach (BsonElement item in bufPlayerDataList)
+ {
+ DataRow bufRow = goldData.NewRow();
+
+ BsonArray itemValue = item.Value.ToBsonDocument()["teams"].AsBsonArray;
+
+ int 敫旊(韺瓿摐 = 0;
+ int 霠堧摐韺瓿摐 = 0;
+
+ foreach (BsonValue itemTeam in itemValue)
+ {
+
+ if (itemTeam["teamID"].ToInt32() == (int)DBDefine.韺甑秳.敫旊()
+ {
+ 敫旊(韺瓿摐 = itemTeam["totalGold"].ToInt32();
+ }
+ else
+ {
+ 霠堧摐韺瓿摐 = itemTeam["totalGold"].ToInt32();
+ }
+
+ }
+
+ bufRow["敫旊(韺瓿摐霟"] = 敫旊(韺瓿摐;
+ bufRow["霠堧摐韺瓿摐霟"] = 霠堧摐韺瓿摐;
+ bufRow["瓿摐彀"] = 敫旊(韺瓿摐 - 霠堧摐韺瓿摐;
+
+ if (瓿摐彀笖耄禍雽臧 < (敫旊(韺瓿摐 - 霠堧摐韺瓿摐))
+ {
+ 瓿摐彀笖耄禍雽臧 = (敫旊(韺瓿摐 - 霠堧摐韺瓿摐);
+ }
+
+ if (瓿摐彀爤霌滌禍雽臧 < (霠堧摐韺瓿摐 - 敫旊(韺瓿摐))
+ {
+ 瓿摐彀爤霌滌禍雽臧 = (霠堧摐韺瓿摐 - 敫旊(韺瓿摐);
+ }
+
+ bufRow["瓿摐彀笖耄禍雽"] = 瓿摐彀笖耄禍雽臧;
+ bufRow["瓿摐彀爤霌滌禍雽"] = 瓿摐彀爤霌滌禍雽臧 * -1;
+
+ bufRow["齑"] = item.Value["gameTime"].ToInt32() / 1000;
+ goldData.Rows.Add(bufRow);
+
+ }
+
+ return goldData;
+
+ }
+
+ protected override BsonDocument getDataFromMongo()
+ {
+ // 頃勳殧頃 頃勲摐毵 韽暔頃橂姅 頃勴劙 氍胳劀毳 靸濎劚頃╇媹雼.
+ var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.playbackID' : 1, 'eventDocument.teams.totalGold' : 1, 'eventDocument.teams.teamID' : 1, 'eventDocument.sequenceIndex' : 1, " +
+ "'eventDocument.gameTime' : 1, 'eventDocument.parentGameID': 1, 'eventDocument.repeater_timestamp': 1}");
+
+ //var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.playbackID' : 1, 'eventDocument.teams.totalGold' : 1, 'eventDocument.teams.teamID' : 1,'eventDocument.sequenceIndex' : 1, 'eventDocument.gameTime' : 1}");
+
+ // MongoDB 旎爥靺 "stats_update"鞐愳劀 鞝勳泊 氍胳劀毳 臧鞝胳槫瓿 頃勳殧頃 頃勲摐毵 Projection頃╇媹雼.
+ List documents = mEventDataBase.GetCollection("stats_update")
+ .Find(new BsonDocument())
+ .Project(subFilter)
+ .ToList();
+
+ //documents = documents.OrderBy(r => r["eventDocument"]["sequenceIndex"].ToInt32()).ToList();
+ documents = documents.OrderBy(r => DateTime.Parse(r["eventDocument"]["repeater_timestamp"].AsString)).ToList();
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ // 鞚挫爠 鞚措菠韸胳潣 RequestGameID毳 鞝鞛ロ暊 氤靾橃瀰雼堧嫟.
+ string previousRequestGameID = null;
+
+ foreach (BsonDocument item in documents)
+ {
+ try
+ {
+ // 順勳灛 鞚措菠韸胳潣 RequestGameID 臧掛潉 於旍稖頃╇媹雼.
+ string currentRequestGameID = item["eventDocument"]["parentGameID"].ToString();
+
+ // 搿る氨 靸來櫓 臧愳:
+ // 鞚挫爠 鞚措菠韸胳潣 RequestGameID臧 臁挫灛頃橁碃, 順勳灛 鞚措菠韸胳潣 臧掙臣 雼るゴ雼る┐
+ // 鞚措姅 搿る氨 頉 靸堧鞖 瓴岇瀯 雿办澊韯瓣皜 霌れ柎鞕旍潓鞚 鞚橂頃╇媹雼.
+ if (previousRequestGameID != null && !currentRequestGameID.Equals(previousRequestGameID))
+ {
+ // 順勳灛 鞚措菠韸胳潣 gameTime鞚 搿る氨 旮办鞙茧 靹れ爼頃╇媹雼.
+ int rollbackThreshold = item["eventDocument"]["gameTime"].ToInt32();
+ // 歆旮堦箤歆 氇晞霊 雿办澊韯(rtnValue) 欷 gameTime鞚 rollbackThreshold 氙鸽鞚 鞚措菠韸鸽 鞙犾頃╇媹雼.
+ List filteredElements = rtnValue.ToList()
+ .Where(d => d.Value["gameTime"].ToInt32() < rollbackThreshold)
+ .ToList();
+ rtnValue = new BsonDocument(filteredElements);
+ }
+
+ // 順勳灛 鞚措菠韸 鞝曤炒毳 靸 BsonDocument搿 欷牍勴暕雼堧嫟.
+ BsonDocument bufDocument = new BsonDocument();
+ bufDocument.Add("gameTime", item["eventDocument"]["gameTime"].ToInt32());
+ bufDocument.Add("teams", item["eventDocument"]["teams"].AsBsonArray);
+ bufDocument.Add("playback", item["eventDocument"]["playbackID"].ToString());
+
+ bufDocument.Add("parentGameID", item["eventDocument"]["parentGameID"]);
+
+ // sequenceIndex 臧掛潉 Key搿 頃橃棳 頃措嫻 鞚措菠韸鸽ゼ rtnValue鞐 於旉皜頃╇媹雼.
+ rtnValue.Add(item["eventDocument"]["sequenceIndex"].ToString(), bufDocument);
+
+ // 雼れ潓 氚橂车鞚 鞙勴暣 鞚挫爠 RequestGameID毳 鞐呺嵃鞚错姼頃╇媹雼.
+ previousRequestGameID = currentRequestGameID;
+ }
+ catch(Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
+
+ return rtnValue;
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/耄嵃鞚错劙.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/耄嵃鞚错劙.cs
new file mode 100644
index 0000000..539f40b
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/耄嵃鞚错劙.cs
@@ -0,0 +1,133 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ internal class 耄嵃鞚错劙 : AResponseData
+ {
+
+ protected override DataTable buildDataForResponse(BsonDocument recvDocument)
+ {
+ BsonArray bufPlayerDataList = null;
+
+
+ DataTable 耄嵃鞚错劙韰岇澊敫 = new DataTable();
+
+ 耄嵃鞚错劙韰岇澊敫.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.耄嵃鞚错劙.ToString();
+
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("韺");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("靹犾垬鞚措");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("毂旐敿鞏胳澊毽");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("氅旍澑耄姢韮鞚");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("氅旍澑耄澊毽");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("靹滊笇耄姢韮鞚");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("靹滊笇耄澊毽");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄1");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄2");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄3");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄4");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄5");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄6");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄7");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄8");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄9");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄10");
+ 耄嵃鞚错劙韰岇澊敫.Columns.Add("耄鞍鞐");
+
+
+ if (recvDocument == null)
+ {
+ return 耄嵃鞚错劙韰岇澊敫;
+ }
+
+ bufPlayerDataList = recvDocument["eventDocument"]["participants"].AsBsonArray;
+
+
+ foreach (BsonValue item in bufPlayerDataList)
+ {
+ DataRow bufRow = 耄嵃鞚错劙韰岇澊敫.NewRow();
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+ bufRow["靹犾垬鞚措"] = item["summonerName"].ToString();
+ bufRow["毂旐敿鞏胳澊毽"] = item["championName"].ToString();
+
+ if (!item.AsBsonDocument.Contains("perks"))
+ {
+ continue;
+ }
+
+ int 氅旍澑耄 = item["perks"][0]["perkStyle"].ToInt32();
+
+ bufRow["氅旍澑耄姢韮鞚"] = 氅旍澑耄;
+
+ if (DataManager.getInstance().mRuneTable.ContainsKey(氅旍澑耄))
+ {
+ bufRow["氅旍澑耄澊毽"] = DataManager.getInstance().mRuneTable[氅旍澑耄琞;
+ }
+
+ int 靹滊笇耄 = item["perks"][0]["perkSubStyle"].ToInt32();
+
+ bufRow["靹滊笇耄姢韮鞚"] = 靹滊笇耄;
+
+ if (DataManager.getInstance().mRuneTable.ContainsKey(靹滊笇耄))
+ {
+ bufRow["靹滊笇耄澊毽"] = DataManager.getInstance().mRuneTable[靹滊笇耄琞;
+ }
+
+ bufRow["耄鞍鞐"] = item["perks"][0]["perkIds"].ToString();
+
+ BsonArray runeArray = item["perks"][0]["perkIds"].AsBsonArray;
+ if (runeArray.Count != 0)
+ {
+ for (int i = 1; i < runeArray.Count + 1; i++)
+ {
+ int runeID = runeArray[i - 1].ToInt32();
+
+ if (DataManager.getInstance().mRuneTable.ContainsKey(runeID))
+ {
+ bufRow["耄" + i] = DataManager.getInstance().mRuneTable[runeID];
+ }
+
+
+ }
+ }
+
+ 耄嵃鞚错劙韰岇澊敫.Rows.Add(bufRow);
+
+ }
+
+ return 耄嵃鞚错劙韰岇澊敫;
+
+ }
+
+ protected override BsonDocument getDataFromMongo()
+ {
+
+ //var filter = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("eventDocument");
+
+ List documents = mEventDataBase.GetCollection("game_info")
+ .Find(new BsonDocument()) //.Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .Limit(1)
+ .ToList();
+
+ if (documents.Count == 0)
+ {
+ return null;
+ }
+
+ return documents.Last();
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/韺熿靹犾垬.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/韺熿靹犾垬.cs
new file mode 100644
index 0000000..142ce19
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/韺熿靹犾垬.cs
@@ -0,0 +1,400 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ internal class 韺熿靹犾垬 : AResponseData
+ {
+
+ private int nullToZero(string value)
+ {
+ try
+ {
+ return Convert.ToInt32(value);
+ }
+ catch(Exception e)
+ {
+ return 0;
+ }
+ }
+ private double nullToZeroD(string value)
+ {
+ try
+ {
+ return Convert.ToDouble(value);
+ }
+ catch (Exception e)
+ {
+ return 0;
+ }
+ }
+
+ protected override DataTable buildDataForResponse(BsonDocument recvDocument)
+ {
+
+ DataTable 韺熿雿办澊韯绊厡鞚措笖 = new DataTable();
+
+ 韺熿雿办澊韯绊厡鞚措笖.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.韺熿.ToString();
+
+ //靹犾垬甏霠
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("瓴岇瀯鞁滉皠");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("雸勳爜霅滊秳");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韺甑秳");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("靹犾垬鞎勳澊霐");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("毂旐敿鞏");
+
+ //KDA
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韨");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("雿办姢");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("鞏挫嫓鞀ろ姼");
+
+ //雿半歆甏霠
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("臧頃滊嵃氙胳");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("氚涭潃雿半歆");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韺鞗愳棎瓴岇頌愲焿");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韺鞗愳潣雿半歆毳茧鞎勲偢鞁る摐霟");
+
+ //攵勲嫻雿半歆甏霠
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵勲嫻臧頃滊嵃氙胳");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵勲嫻氚涭潃雿半歆");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵勲嫻韺鞗愳棎瓴岇頌愲焿");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵勲嫻韺鞗愳潣雿半歆毳茧鞎勲偢鞁る摐霟");
+
+ ///鞀れ綌鞏搓磤霠
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韥鞀れ綌鞏");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("瓴巾棙旃");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵勲嫻韥鞀れ綌鞏");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("牍勳爠鞀れ綌鞏");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("靹れ箻頃滌檧霌滌垬");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵靾滌檧霌滌垬");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("瓿摐須嶋摑霟");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("攵勲嫻瓿摐須嶋摑霟");
+
+ //CC
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("甑办鞝滌柎鞝愳垬");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("雼るジ毂旐敿鞏胳棎CC旮半ゼ瓯挫嫓臧");
+
+ //於旉皜
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韨磤鞐湪");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("瓿摐雼闺嵃氙胳");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("韺雮措嵃氙胳牍勳");
+
+ //2022 雿办澊韯 於旉皜 欷戨韥鞀れ綌鞏
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("霛检澑韥鞀れ綌鞏");
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("鞝曣竴韥鞀れ綌鞏");
+
+ //2022 雿办澊韯 於旉皜 順勳儊旮
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Add("順勳灛順勳儊旮");
+
+
+ if (m韺熿雿办澊韯半摛.Count == 0 || m韺雿办澊韯半摛.Count == 0)
+ {
+ return 韺熿雿办澊韯绊厡鞚措笖;
+ }
+
+ Dictionary 敫旊(韺_韨琠靾 = new Dictionary();
+ Dictionary 韻柬攲韺_韨琠靾 = new Dictionary();
+
+
+ foreach (BsonDocument item in m韺雿办澊韯半摛)
+ {
+
+ BsonArray bufTeamArray = item.Values.Last().AsBsonArray;
+
+ foreach (BsonValue itemTeam in bufTeamArray)
+ {
+ if (itemTeam["teamID"].ToInt32() == (int)DBDefine.韺甑秳.敫旊()
+ {
+ 敫旊(韺_韨琠靾.Add(Convert.ToInt32(item.Names.Last()), nullToZero(itemTeam["championsKills"].ToString()));
+ }
+ else
+ {
+ 韻柬攲韺_韨琠靾.Add(Convert.ToInt32(item.Names.Last()), nullToZero(itemTeam["championsKills"].ToString()));
+ }
+ }
+
+
+ }
+
+
+ Dictionary 敫旊(韺_雿半歆_頃 = new Dictionary();
+ Dictionary 韻柬攲韺_雿半歆_頃 = new Dictionary();
+
+
+
+ foreach (BsonDocument item in m韺熿雿办澊韯半摛)
+ {
+ int gameTime = Convert.ToInt32(item.Names.Last());
+
+ double gameTimeMin = Convert.ToDouble(gameTime) / 60.0;
+
+ BsonArray bufPlayersData = item.Values.Last().AsBsonArray;
+
+ foreach (var itemPlayer in bufPlayersData)
+ {
+ DataRow bufRow = 韺熿雿办澊韯绊厡鞚措笖.NewRow();
+
+ bufRow["瓴岇瀯鞁滉皠"] = gameTime;
+ bufRow["雸勳爜霅滊秳"] = gameTimeMin;
+ bufRow["韺甑秳"] = (DBDefine.韺甑秳)itemPlayer["teamID"].ToInt32();
+ bufRow["靹犾垬鞎勳澊霐"] = itemPlayer["playerName"].ToString();
+ bufRow["毂旐敿鞏"] = itemPlayer["championName"].ToString();
+
+ //鞀ろ厽鞚 鞎勲媽 靹犾垬鞝曤炒鞐 鞛堧姅 瓴冸摛
+ bufRow["瓴巾棙旃"] = itemPlayer["XP"].ToInt32();
+ bufRow["瓿摐須嶋摑霟"] = itemPlayer["totalGold"].ToInt32();
+ bufRow["攵勲嫻瓿摐須嶋摑霟"] = itemPlayer["totalGold"].ToDouble() / (gameTimeMin);
+ bufRow["順勳灛順勳儊旮"] = itemPlayer["shutdownValue"].ToInt32();
+
+
+ BsonArray bufStats = itemPlayer["stats"].AsBsonArray;
+
+ foreach (BsonValue itemStats in bufStats)
+ {
+
+ switch (itemStats["name"].ToString())
+ {
+
+ case "CHAMPIONS_KILLED":
+ try { bufRow["韨"] = itemStats["value"].ToString(); }
+ catch (Exception ex) { bufRow["韨"] = "0"; }
+
+ break;
+
+ case "NUM_DEATHS":
+ try { bufRow["雿办姢"] = itemStats["value"].ToString(); }
+ catch (Exception ex) { bufRow["雿办姢"] = "0"; }
+ break;
+
+ case "ASSISTS":
+ try { bufRow["鞏挫嫓鞀ろ姼"] = itemStats["value"].ToString(); }
+ catch (Exception ex) { bufRow["鞏挫嫓鞀ろ姼"] = "0"; }
+ break;
+
+ //雿半歆甏霠
+ case "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS":
+ bufRow["臧頃滊嵃氙胳"] = itemStats["value"].ToInt32();
+ bufRow["攵勲嫻臧頃滊嵃氙胳"] = itemStats["value"].ToDouble() / (gameTimeMin);
+ bufRow["瓿摐雼闺嵃氙胳"] = itemStats["value"].ToDouble() / itemPlayer["totalGold"].ToDouble();
+
+ if ((DBDefine.韺甑秳)itemPlayer["teamID"].ToInt32() == DBDefine.韺甑秳.敫旊()
+ {
+ if (!敫旊(韺_雿半歆_頃.ContainsKey(Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])))
+ {
+ 敫旊(韺_雿半歆_頃.Add(Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"]), itemStats["value"].ToInt32());
+ }
+ else
+ {
+ 敫旊(韺_雿半歆_頃Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])] += itemStats["value"].ToInt32();
+ }
+
+ }
+ else
+ {
+ if (!韻柬攲韺_雿半歆_頃.ContainsKey(Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])))
+ {
+ 韻柬攲韺_雿半歆_頃.Add(Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"]), itemStats["value"].ToInt32());
+ }
+ else
+ {
+ 韻柬攲韺_雿半歆_頃Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])] += itemStats["value"].ToInt32();
+ }
+ }
+
+ break;
+
+ case "TOTAL_DAMAGE_TAKEN":
+ bufRow["氚涭潃雿半歆"] = itemStats["value"].ToInt32();
+ bufRow["攵勲嫻氚涭潃雿半歆"] = itemStats["value"].ToDouble() / (gameTimeMin);
+ break;
+
+ case "TOTAL_HEAL_ON_TEAMMATES":
+ bufRow["韺鞗愳棎瓴岇頌愲焿"] = itemStats["value"].ToInt32();
+ bufRow["攵勲嫻韺鞗愳棎瓴岇頌愲焿"] = itemStats["value"].ToDouble() / (gameTimeMin);
+ break;
+
+ case "TOTAL_DAMAGE_SHIELDED_ON_TEAMMATES":
+ bufRow["韺鞗愳潣雿半歆毳茧鞎勲偢鞁る摐霟"] = itemStats["value"].ToInt32();
+ bufRow["攵勲嫻韺鞗愳潣雿半歆毳茧鞎勲偢鞁る摐霟"] = itemStats["value"].ToDouble() / (gameTimeMin);
+ break;
+
+ ///鞀れ綌鞏搓磤霠
+ case "MINIONS_KILLED":
+ bufRow["霛检澑韥鞀れ綌鞏"] = nullToZero(itemStats["value"].ToString());
+ //bufRow["攵勲嫻韥鞀れ綌鞏挫垬旮夒焿"] = itemStats["value"].ToDouble()/(gameTimeMin);
+ break;
+
+ case "NEUTRAL_MINIONS_KILLED":
+ bufRow["鞝曣竴韥鞀れ綌鞏"] = itemStats["value"].ToInt32();
+ break;
+
+
+ case "VISION_SCORE":
+ bufRow["牍勳爠鞀れ綌鞏"] = itemStats["value"].ToInt32();
+ break;
+ case "WARD_PLACED":
+ bufRow["靹れ箻頃滌檧霌滌垬"] = itemStats["value"].ToString();
+ break;
+
+ case "WARD_KILLED":
+ bufRow["攵靾滌檧霌滌垬"] = itemStats["value"].ToString();
+ break;
+
+ case "TOTAL_TIME_CROWD_CONTROL_DEALT":
+ bufRow["甑办鞝滌柎鞝愳垬"] = itemStats["value"].ToString();
+ break;
+
+ case "TIME_CCING_OTHERS":
+ bufRow["雼るジ毂旐敿鞏胳棎CC旮半ゼ瓯挫嫓臧"] = itemStats["value"].ToString();
+ break;
+ }
+
+ }
+
+ //bufRow["韥鞀れ綌鞏"] = Convert.ToInt32(bufRow["霛检澑韥鞀れ綌鞏"]) + Convert.ToInt32(bufRow["鞝曣竴韥鞀れ綌鞏"]);
+ //bufRow["攵勲嫻韥鞀れ綌鞏"] = Convert.ToDouble(bufRow["韥鞀れ綌鞏"]) / (gameTimeMin);
+
+ bufRow["韥鞀れ綌鞏"] = nullToZero(bufRow["霛检澑韥鞀れ綌鞏"].ToString()) + nullToZero(bufRow["鞝曣竴韥鞀れ綌鞏"].ToString());
+ bufRow["攵勲嫻韥鞀れ綌鞏"] = nullToZeroD(bufRow["韥鞀れ綌鞏"].ToString()) / (gameTimeMin);
+
+ 韺熿雿办澊韯绊厡鞚措笖.Rows.Add(bufRow);
+
+ }
+
+ }
+
+ foreach (DataRow bufRow in 韺熿雿办澊韯绊厡鞚措笖.Rows)
+ {
+ if (bufRow["韺甑秳"].ToString() == "敫旊(")
+ {
+ try
+ {
+ bufRow["韺雮措嵃氙胳牍勳"] = Convert.ToDouble(bufRow["臧頃滊嵃氙胳"]) / 敫旊(韺_雿半歆_頃Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])] * 100.0;
+ }
+ catch(Exception ex)
+ {
+ bufRow["韺雮措嵃氙胳牍勳"] = "Err";
+ }
+
+ try
+ {
+
+ bufRow["韨磤鞐湪"] = (nullToZeroD(bufRow["韨"].ToString()) + nullToZeroD(bufRow["鞏挫嫓鞀ろ姼"].ToString())) / 敫旊(韺_韨琠靾榌Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])] * 100.0;
+ }
+ catch(Exception ex)
+ {
+ bufRow["韨磤鞐湪"] = "Err";
+ }
+ }
+ else
+ {
+ try
+ {
+ bufRow["韺雮措嵃氙胳牍勳"] = Convert.ToDouble(bufRow["臧頃滊嵃氙胳"]) / 韻柬攲韺_雿半歆_頃Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])] * 100.0;
+ }
+ catch(Exception ex)
+ {
+ bufRow["韺雮措嵃氙胳牍勳"] = "Err";
+ }
+
+ try
+ {
+ bufRow["韨磤鞐湪"] = (nullToZeroD(bufRow["韨"].ToString()) + nullToZeroD(bufRow["鞏挫嫓鞀ろ姼"].ToString())) / 韻柬攲韺_韨琠靾榌Convert.ToInt32(bufRow["瓴岇瀯鞁滉皠"])] * 100.0;
+ }
+ catch(Exception ex)
+ {
+ bufRow["韨磤鞐湪"] = "Err";
+ }
+ }
+ }
+
+
+ 韺熿雿办澊韯绊厡鞚措笖.Columns.Remove("瓴岇瀯鞁滉皠");
+
+ return 韺熿雿办澊韯绊厡鞚措笖;
+
+ }
+
+ List m韺熿雿办澊韯半摛 = new List();
+
+ List m韺雿办澊韯半摛 = new List();
+
+ protected override BsonDocument getDataFromMongo()
+ {
+ //韺熿雿办澊韯半姅 5攵勲嫧鞙勲 雸勳爜.
+ //ex ~5 ~10 ~15 ~20 ~25 ~30... 毵堨毵夒嵃鞚错劙電 0
+ //毵 觳橃潓 鞝勳泊雿办澊韯半 瓴疥赴鞁滉皠鞚 甑暅雼れ潓 鞁滉皠鞙茧 雮橂垐雼?
+
+ if (DataManager.getInstance().瓴疥赴雿办澊韯 == null)
+ {
+ return null;
+ }
+ int 瓴疥赴鞁滉皠 = DataManager.getInstance().瓴疥赴雿办澊韯癧"gameTime"].ToInt32() / 1000;
+
+ int 鞎烄棎靹滊秬韯办磮 = 0;
+
+ m韺熿雿办澊韯半摛 = new List();
+
+ m韺雿办澊韯半摛 = new List();
+
+ while (瓴疥赴鞁滉皠 - 鞎烄棎靹滊秬韯办磮 > 0)
+ {
+
+ 鞎烄棎靹滊秬韯办磮 += 5 * 60;
+
+ BsonDocument rtnValue = new BsonDocument();
+
+ //var subfilter1 = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var subFilter2 = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + 鞎烄棎靹滊秬韯办磮 * 1000 + " }}");
+
+ var filter1 = Builders.Filter.And(subFilter2); //var filter1 = Builders.Filter.And(subfilter1, subFilter2);
+
+ var projectionFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.participants' : 1, 'eventDocument.teams' : 1}");
+
+ List documents = mEventDataBase.GetCollection("stats_update")
+ .Find(filter1)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Limit(1)
+ .ToList();
+
+ ///瓴疥赴鞚 毵堨毵夓爼氤措姅 瓴疥赴鞁滉皠鞙茧 毽劥.
+ if (鞎烄棎靹滊秬韯办磮 > 瓴疥赴鞁滉皠)
+ {
+ rtnValue.Add(瓴疥赴鞁滉皠.ToString(), documents.Last()["eventDocument"]["participants"].AsBsonArray);
+ }
+ else
+ {
+ rtnValue.Add(鞎烄棎靹滊秬韯办磮.ToString(), documents.Last()["eventDocument"]["participants"].AsBsonArray);
+ }
+
+
+ m韺熿雿办澊韯半摛.Add(rtnValue);
+
+
+ rtnValue = new BsonDocument();
+
+ if (鞎烄棎靹滊秬韯办磮 > 瓴疥赴鞁滉皠)
+ {
+ rtnValue.Add(瓴疥赴鞁滉皠.ToString(), documents.Last()["eventDocument"]["teams"].AsBsonArray);
+ }
+ else
+ {
+ rtnValue.Add(鞎烄棎靹滊秬韯办磮.ToString(), documents.Last()["eventDocument"]["teams"].AsBsonArray);
+ }
+
+ m韺雿办澊韯半摛.Add(rtnValue);
+
+ }
+
+ //甑“毳 鞙勴暣 毽劥鞚 頃橃毵 鞚 靸侅啀韥措灅鞀る姅 BsonDocument毳 氅る矂氤靾 kv韼橃柎搿 甏毽暅雼.
+ return new BsonDocument();
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/頃滍儉霐滊焿氩旍渼.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/頃滍儉霐滊焿氩旍渼.cs
new file mode 100644
index 0000000..aaf0773
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞐嗠姅雿办澊韯/頃滍儉霐滊焿氩旍渼.cs
@@ -0,0 +1,145 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ internal class 頃滍儉霐滊焿氩旍渼 : AResponseData
+ {
+
+ int 鞁滌瀾齑 = 0;
+
+ int 膦呺齑 = 0;
+
+ internal 頃滍儉霐滊焿氩旍渼(int 氚涭晞鞓嫓鞛戩磮, int 氚涭晞鞓耄岇磮)
+ {
+ 鞁滌瀾齑 = 氚涭晞鞓嫓鞛戩磮;
+ 膦呺齑 = 氚涭晞鞓耄岇磮;
+ }
+
+ protected override DataTable buildDataForResponse(BsonDocument recvDocument)
+ {
+
+
+
+ DataTable 頃滍儉霐滊焿氩旍渼 = new DataTable();
+
+ 頃滍儉霐滊焿氩旍渼.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.頃滍儉霐滊焿氩旍渼.ToString();
+
+ //靹犾垬甏霠
+
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("韺甑秳");
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("靹犾垬鞎勳澊霐");
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("毂旐敿鞏");
+
+
+ //雿半歆甏霠
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("雿半歆彀澊");
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("鞁滌瀾雿半歆霟");
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("膦呺雿半歆霟");
+ 頃滍儉霐滊焿氩旍渼.Columns.Add("霐滊焿氚彪秳鞙");
+
+
+
+ if (m鞁滌瀾雿办澊韯.Count() == 0 || m膦呺雿办澊韯.Count() == 0)
+ {
+ return 頃滍儉霐滊焿氩旍渼;
+ }
+
+ BsonArray 鞁滌瀾雿办澊韯办劆靾橂Μ鞀ろ姼 = m鞁滌瀾雿办澊韯癧"participants"].AsBsonArray;
+
+ foreach (BsonDocument itemPlayer in 鞁滌瀾雿办澊韯办劆靾橂Μ鞀ろ姼)
+ {
+
+ DataRow bufRow = 頃滍儉霐滊焿氩旍渼.NewRow();
+
+
+ bufRow["韺甑秳"] = (DBDefine.韺甑秳)itemPlayer["teamID"].ToInt32();
+ bufRow["靹犾垬鞎勳澊霐"] = itemPlayer["playerName"].ToString();
+ bufRow["毂旐敿鞏"] = itemPlayer["championName"].ToString();
+ bufRow["鞁滌瀾雿半歆霟"] = itemPlayer["stats"].AsBsonArray.ToList().Where(v => v["name"] == "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS").ToList()[0]["value"];
+
+ 頃滍儉霐滊焿氩旍渼.Rows.Add(bufRow);
+
+ }
+
+ BsonArray 膦呺雿办澊韯办劆靾橂Μ鞀ろ姼 = m膦呺雿办澊韯癧"participants"].AsBsonArray;
+
+ foreach (BsonDocument itemPlayer in 膦呺雿办澊韯办劆靾橂Μ鞀ろ姼)
+ {
+ DataRow bufPlayerRow = 頃滍儉霐滊焿氩旍渼.AsEnumerable().Where(r => r.Field("靹犾垬鞎勳澊霐") == itemPlayer["playerName"].ToString()).Last();
+
+ bufPlayerRow["膦呺雿半歆霟"] = itemPlayer["stats"].AsBsonArray.ToList().Where(v => v["name"] == "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS").ToList()[0]["value"];
+ bufPlayerRow["雿半歆彀澊"] = Convert.ToDouble(bufPlayerRow["膦呺雿半歆霟"]) - Convert.ToDouble(bufPlayerRow["鞁滌瀾雿半歆霟"]);
+ }
+
+
+
+ double 斓滊寑霐滊焿 = Convert.ToDouble(頃滍儉霐滊焿氩旍渼.AsEnumerable().OrderByDescending(r => Convert.ToDouble(r.Field("雿半歆彀澊"))).First()["雿半歆彀澊"]);
+
+ foreach (DataRow item in 頃滍儉霐滊焿氩旍渼.Rows)
+ {
+ double 霐滊焿彀澊臧 = Convert.ToDouble(item["雿半歆彀澊"]);
+
+ if (霐滊焿彀澊臧 != 0)
+ {
+ item["霐滊焿氚彪秳鞙"] = 霐滊焿彀澊臧 / 斓滊寑霐滊焿 * 100.0;
+ }
+ else
+ {
+ item["霐滊焿氚彪秳鞙"] = 0.0;
+ }
+ }
+
+ return 頃滍儉霐滊焿氩旍渼;
+
+ }
+
+ BsonDocument m鞁滌瀾雿办澊韯 = new BsonDocument();
+
+ BsonDocument m膦呺雿办澊韯 = new BsonDocument();
+
+ protected override BsonDocument getDataFromMongo()
+ {
+
+ //var subfilter1 = Builders.Filter.Eq("RequestGameID", DataManager.getInstance().mPlatformGameID);
+
+ var subFilter2 = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + 鞁滌瀾齑 * 1000 + " }}");
+
+ var filter1 = Builders.Filter.And(subFilter2); //var filter1 = Builders.Filter.And(subfilter1, subFilter2);
+
+ var projectionFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.participants' : 1 , 'eventDocument.gameTime' : 1 }");
+
+ List documents = mEventDataBase.GetCollection("stats_update")
+ .Find(filter1)
+ .Project(projectionFilter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Limit(1)
+ .ToList();
+
+ m鞁滌瀾雿办澊韯 = documents.Last()["eventDocument"].AsBsonDocument;
+
+ subFilter2 = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + 膦呺齑 * 1000 + " }}");
+
+ filter1 = Builders.Filter.And(subFilter2); //filter1 = Builders.Filter.And(subfilter1, subFilter2);
+
+ List documents2 = mEventDataBase.GetCollection("stats_update")
+ .Find(filter1)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projectionFilter)
+ .Limit(1)
+ .ToList();
+
+ m膦呺雿办澊韯 = documents2.Last()["eventDocument"].AsBsonDocument;
+
+ //甑“毳 鞙勴暣 毽劥鞚 頃橃毵 鞚 靸侅啀韥措灅鞀る姅 BsonDocument毳 氅る矂氤靾 kv韼橃柎搿 甏毽暅雼.
+ return new BsonDocument();
+
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/KDA靹犾垬.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/KDA靹犾垬.cs
new file mode 100644
index 0000000..04fa84f
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/KDA靹犾垬.cs
@@ -0,0 +1,83 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class KDA靹犾垬 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 韨巸鞏挫嫓韰岇澊敫 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.韨巸鞏挫嫓.ToString());
+
+ try
+ {
+ List 靹犾垬雿办澊韯半摛 = DataManager.getInstance().瓴疥赴雿办澊韯癧"participants"].AsBsonArray.ToList();
+
+ 韨巸鞏挫嫓韰岇澊敫.Columns.Add("韺");
+ //頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("韽靺");
+ 韨巸鞏挫嫓韰岇澊敫.Columns.Add("靹犾垬雼夒劋鞛");
+ 韨巸鞏挫嫓韰岇澊敫.Columns.Add("毂旐敿鞏胳澊毽");
+ 韨巸鞏挫嫓韰岇澊敫.Columns.Add("韨");
+ 韨巸鞏挫嫓韰岇澊敫.Columns.Add("雿办姢");
+ 韨巸鞏挫嫓韰岇澊敫.Columns.Add("鞏挫嫓鞀ろ姼");
+
+
+ for (int i = 0; i < 靹犾垬雿办澊韯半摛.Count(); i++)
+ {
+ BsonValue item = 靹犾垬雿办澊韯半摛[i];
+
+ DataRow bufRow = 韨巸鞏挫嫓韰岇澊敫.NewRow();
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+
+ //bufRow["韽靺"] = (DBDefine.霛检澑甑秳)item["participantID"].AsInt32 + 1;
+ bufRow["靹犾垬雼夒劋鞛"] = item["playerName"];
+ bufRow["毂旐敿鞏胳澊毽"] = item["championName"];
+
+ try
+ {
+ bufRow["韨"] = item["stats"].AsBsonArray.Where(v => v["name"] == "CHAMPIONS_KILLED").ToList()[0]["value"];
+ }
+ catch(Exception ex)
+ {
+ bufRow["韨"] = "0";
+ }
+ try {
+ bufRow["雿办姢"] = item["stats"].AsBsonArray.Where(v => v["name"] == "NUM_DEATHS").ToList()[0]["value"];
+ }
+ catch(Exception ex)
+ {
+ bufRow["雿办姢"] = "0";
+ }
+ try
+ {
+ bufRow["鞏挫嫓鞀ろ姼"] = item["stats"].AsBsonArray.Where(v => v["name"] == "ASSISTS").ToList()[0]["value"];
+ }
+ catch (Exception ex)
+ {
+ bufRow["鞏挫嫓鞀ろ姼"] = "0";
+ }
+
+ 韨巸鞏挫嫓韰岇澊敫.Rows.Add(bufRow);
+ }
+ }
+ catch(Exception ex) {
+ Console.WriteLine(ex.ToString());
+ }
+
+
+
+ return 韨巸鞏挫嫓韰岇澊敫;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/瓴巾棙旃橂爤氩劆靾.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/瓴巾棙旃橂爤氩劆靾.cs
new file mode 100644
index 0000000..7187d05
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/瓴巾棙旃橂爤氩劆靾.cs
@@ -0,0 +1,69 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 瓴巾棙旃橂爤氩劆靾 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.瓴巾棙旃橂爤氩.ToString());
+
+ try
+ {
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("韺");
+ //頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("韽靺");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("靹犾垬雼夒劋鞛");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("毂旐敿鞏胳澊毽");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("霠堧波");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("瓴巾棙旃");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("瓴巾棙旃橂寑牍");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("霠堧波雽牍");
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Columns.Add("韤橃姢韸胳棳攵");
+
+ if (DataManager.getInstance().瓴疥赴雿办澊韯 == null)
+ {
+ return 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖;
+ }
+
+ List 靹犾垬雿办澊韯半摛 = DataManager.getInstance().瓴疥赴雿办澊韯癧"participants"].AsBsonArray.OrderByDescending(p => p["XP"].ToInt32()).ToList();
+
+
+ double maxXP = (double)靹犾垬雿办澊韯半摛[0]["XP"].ToInt32();
+ for (int i = 0; i < 靹犾垬雿办澊韯半摛.Count(); i++)
+ {
+ BsonValue item = 靹犾垬雿办澊韯半摛[i];
+
+ DataRow bufRow = 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.NewRow();
+
+
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+
+ //bufRow["韽靺"] = (DBDefine.霛检澑甑秳)item["participantID"].AsInt32 + 1;
+ bufRow["靹犾垬雼夒劋鞛"] = item["playerName"];
+ bufRow["毂旐敿鞏胳澊毽"] = item["championName"];
+ bufRow["霠堧波"] = item["level"].ToInt32();
+ bufRow["瓴巾棙旃"] = item["XP"];
+ bufRow["瓴巾棙旃橂寑牍"] = (item["XP"].ToInt32() / maxXP) * 100;
+ //bufRow["霠堧波雽牍"] = (item["XP"].ToInt32() - 180 - (item["level"].ToInt32() * 180) / 180 + ((item["level"].ToInt32() + 1) * 180)) * 100;
+
+ 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖.Rows.Add(bufRow);
+ }
+ }
+ catch(Exception ex) { }
+
+ return 瓴巾棙旃橂爤氩劆靾橅厡鞚措笖;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/瓿摐須嶋摑霟夓劆靾.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/瓿摐須嶋摑霟夓劆靾.cs
new file mode 100644
index 0000000..ce277f1
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/瓿摐須嶋摑霟夓劆靾.cs
@@ -0,0 +1,67 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 瓿摐須嶋摑霟夓劆靾 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.順勳灛瓿摐霟夓劆靾.ToString());
+
+ try
+ {
+
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("韺");
+ //頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("韽靺");
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("靹犾垬雼夒劋鞛");
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("毂旐敿鞏胳澊毽");
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("齑濌敞霌滍殟霌濍焿");
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("氤挫湢瓿摐霟");
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("雽牍勳礉瓿摐韻检劶韸");
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Columns.Add("雽牍勲炒鞙犼敞霌滍嵓靹柬姼");
+
+ if (DataManager.getInstance().瓴疥赴雿办澊韯 == null)
+ {
+ return 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖;
+ }
+
+ List 靹犾垬雿办澊韯半摛 = DataManager.getInstance().瓴疥赴雿办澊韯癧"participants"].AsBsonArray.OrderByDescending(p => p["totalGold"].ToInt32()).ToList();
+
+
+ double maxGold = (double)靹犾垬雿办澊韯半摛[0]["totalGold"].ToInt32();
+ for (int i = 0; i < 靹犾垬雿办澊韯半摛.Count(); i++)
+ {
+ BsonValue item = 靹犾垬雿办澊韯半摛[i];
+
+ DataRow bufRow = 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.NewRow();
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+ //bufRow["韽靺"] = (DBDefine.霛检澑甑秳)item["participantID"].AsInt32 + 1;
+ bufRow["靹犾垬雼夒劋鞛"] = item["playerName"];
+ bufRow["毂旐敿鞏胳澊毽"] = item["championName"];
+ bufRow["齑濌敞霌滍殟霌濍焿"] = item["totalGold"].ToInt32();
+ bufRow["氤挫湢瓿摐霟"] = item["currentGold"];
+ bufRow["雽牍勳礉瓿摐韻检劶韸"] = (item["totalGold"].ToInt32() / maxGold) * 100;
+ bufRow["雽牍勲炒鞙犼敞霌滍嵓靹柬姼"] = (item["currentGold"].ToInt32() / maxGold) * 100;
+
+ 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖.Rows.Add(bufRow);
+ }
+ }
+ catch (Exception ex) { }
+
+
+ return 瓿摐須嶋摑霟夓劆靾橅厡鞚措笖;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/雸勳爜雿半歆靹犾垬.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/雸勳爜雿半歆靹犾垬.cs
new file mode 100644
index 0000000..0faeb6c
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/雸勳爜雿半歆靹犾垬.cs
@@ -0,0 +1,74 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 雸勳爜雿半歆靹犾垬 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 雿半歆毽姢韸疙厡鞚措笖 = new DataTable("雸勳爜雿半歆");
+
+ 雿半歆毽姢韸疙厡鞚措笖.Columns.Add("韺");
+ 雿半歆毽姢韸疙厡鞚措笖.Columns.Add("靹犾垬雼夒劋鞛");
+ 雿半歆毽姢韸疙厡鞚措笖.Columns.Add("毂旐敿鞏胳澊毽");
+ 雿半歆毽姢韸疙厡鞚措笖.Columns.Add("齑濌皜頃滊嵃氙胳");
+ 雿半歆毽姢韸疙厡鞚措笖.Columns.Add("雽牍勳礉雿半歆韻检劶韸");
+
+
+ if (DataManager.getInstance().瓴疥赴雿办澊韯 == null)
+ {
+ return 雿半歆毽姢韸疙厡鞚措笖;
+ }
+
+ List 靹犾垬雿办澊韯半摛 = DataManager.getInstance().瓴疥赴雿办澊韯癧"participants"].AsBsonArray.ToList();
+
+
+ for (int i = 0; i < 靹犾垬雿办澊韯半摛.Count(); i++)
+ {
+ BsonValue item = 靹犾垬雿办澊韯半摛[i];
+
+ DataRow bufRow = 雿半歆毽姢韸疙厡鞚措笖.NewRow();
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+
+ //bufRow["韽靺"] = (DBDefine.霛检澑甑秳)item["participantID"].AsInt32 + 1;
+ bufRow["靹犾垬雼夒劋鞛"] = item["playerName"];
+ bufRow["毂旐敿鞏胳澊毽"] = item["championName"];
+
+ bufRow["齑濌皜頃滊嵃氙胳"] = item["stats"].AsBsonArray.Where(v => v["name"] == "TOTAL_DAMAGE_DEALT_TO_CHAMPIONS").ToList()[0]["value"];
+
+
+ 雿半歆毽姢韸疙厡鞚措笖.Rows.Add(bufRow);
+ }
+
+ if (雿半歆毽姢韸疙厡鞚措笖.Rows.Count > 0)
+ {
+
+ 雿半歆毽姢韸疙厡鞚措笖 = 雿半歆毽姢韸疙厡鞚措笖.AsEnumerable().OrderByDescending(r => Convert.ToDouble(r.Field("齑濌皜頃滊嵃氙胳"))).CopyToDataTable();
+
+ double maxDamageToChamps = Convert.ToDouble(雿半歆毽姢韸疙厡鞚措笖.Rows[0]["齑濌皜頃滊嵃氙胳"].ToString());
+
+ foreach (DataRow item in 雿半歆毽姢韸疙厡鞚措笖.Rows)
+ {
+ item["雽牍勳礉雿半歆韻检劶韸"] = Convert.ToDouble(item["齑濌皜頃滊嵃氙胳"]) / maxDamageToChamps * 100;
+ }
+
+ }
+
+ 雿半歆毽姢韸疙厡鞚措笖.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.順勳灛雿半歆霟夓劆靾.ToString();
+
+ return 雿半歆毽姢韸疙厡鞚措笖;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/氚措嵃鞚错劙.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/氚措嵃鞚错劙.cs
new file mode 100644
index 0000000..dfd6632
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/氚措嵃鞚错劙.cs
@@ -0,0 +1,170 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 氚措嵃鞚错劙 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+ List rtnValue = new List();
+
+ DataTable 氚措Μ鞀ろ姼韰岇澊敫 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙.ToString());
+ rtnValue.Add(氚措Μ鞀ろ姼韰岇澊敫);
+
+ //於旉皜 鞁滌瀾
+ // 1) 靾滊矆 旎熂鞚 int搿 (鞝曤牞/牍勱祼 鞎堨爼頇)
+ 氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("靾滊矆", typeof(int));
+ 氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("毂旐敿鞏窱D");
+ 氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("毂旐敿鞏胳澊毽");
+ 氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("韺");
+
+ // 鞐赴攵韯 靸堧 雱j赴
+ var dm = DataManager.getInstance();
+
+ if (dm.氚错斀雿办澊韯 == null || dm.氚错斀雿办澊韯.IsBsonNull || !dm.氚错斀雿办澊韯.IsBsonDocument)
+ {
+ 氚措Μ鞀ろ姼韰岇澊敫.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙.ToString();
+ return 氚措Μ鞀ろ姼韰岇澊敫;
+ }
+
+ var doc = dm.氚错斀雿办澊韯.AsBsonDocument;
+
+ if (!doc.TryGetValue("bannedChampions", out var banned) || banned == null || banned.IsBsonNull || !banned.IsBsonArray)
+ {
+ 氚措Μ鞀ろ姼韰岇澊敫.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙.ToString();
+ return 氚措Μ鞀ろ姼韰岇澊敫;
+ }
+
+ //List 氚措嵃鞚错劙 = banned.AsBsonArray.ToList();
+
+
+ List 氚措嵃鞚错劙 = dm.氚错斀雿办澊韯癧"bannedChampions"].AsBsonArray.ToList();
+ var turns = 氚措嵃鞚错劙.Select(x => x["pickTurn"].ToInt32()).ToList();
+
+ bool isGlobalTurnFormat = turns.Any(t => t >= 13); // 1~6 + 13~16
+ bool isDirectSlotFormat = turns.Distinct().Count() == turns.Count // 1~10 臧欖潃 歆侅爲 鞀’
+ && turns.All(t => t >= 1 && t <= 10);
+
+ foreach (BsonValue item in 氚措嵃鞚错劙)
+ {
+ DataRow bufRow = 氚措Μ鞀ろ姼韰岇澊敫.NewRow();
+
+ int pickTurn = item["pickTurn"].ToInt32();
+ int teamId = item["teamID"].ToInt32();
+ int slot = 0;
+
+ /*
+ if (isDirectSlotFormat)
+ {
+ slot = pickTurn;
+ }
+ else if (isGlobalTurnFormat)
+ {
+ if (pickTurn >= 1 && pickTurn <= 6) slot = pickTurn;
+ else if (pickTurn >= 13 && pickTurn <= 16) slot = pickTurn - 6; // 13~16 => 7~10
+ else slot = 0;
+ }
+ else
+ {
+ int key = pickTurn + teamId;
+ if (!dm.氚错斀靾滌劀韰岇澊敫.TryGetValue(key, out slot))
+ slot = 0;
+ }
+ */
+
+ //if (slot == 0) slot = 氚措Μ鞀ろ姼韰岇澊敫.Rows.Count + 1;
+ //bufRow["靾滊矆"] = slot;
+ bufRow["靾滊矆"] = pickTurn;
+ int selectedChamp = item["championID"].ToInt32();
+ bufRow["毂旐敿鞏窱D"] = selectedChamp;
+
+ bufRow["韺"] = item["teamID"].ToInt32();
+
+ if (selectedChamp > 0)
+ bufRow["毂旐敿鞏胳澊毽"] = dm.mChampionTable[selectedChamp].champNameKOR;
+ else if (selectedChamp == -1)
+ bufRow["毂旐敿鞏胳澊毽"] = "靹犿儩鞐嗢潓";
+
+ 氚措Μ鞀ろ姼韰岇澊敫.Rows.Add(bufRow);
+ }
+ // 鞐赴旯岇 靸堧 雱j赴
+
+
+ // 5) 鞝曤牞霃 int 旮办鞙茧
+ if (氚措Μ鞀ろ姼韰岇澊敫.Rows.Count > 0)
+ {
+ 氚措Μ鞀ろ姼韰岇澊敫 = 氚措Μ鞀ろ姼韰岇澊敫.AsEnumerable()
+ .OrderBy(r => r.Field("靾滊矆"))
+ .CopyToDataTable();
+ }
+
+ ////於旉皜 雭
+
+
+ //氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("靾滊矆");
+ //氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("毂旐敿鞏窱D");
+ //氚措Μ鞀ろ姼韰岇澊敫.Columns.Add("毂旐敿鞏胳澊毽");
+
+ //if (DataManager.getInstance().氚错斀雿办澊韯 == null)
+ //{
+ // return 氚措Μ鞀ろ姼韰岇澊敫;
+ //}
+
+ //List 氚措嵃鞚错劙 = DataManager.getInstance().氚错斀雿办澊韯癧"bannedChampions"].AsBsonArray.ToList();
+
+
+ //foreach (BsonValue item in 氚措嵃鞚错劙)
+ //{
+ // DataRow bufRow = 氚措Μ鞀ろ姼韰岇澊敫.NewRow();
+
+ // //Console.WriteLine(item["pickTurn"].ToInt32() + item["teamID"].ToInt32());
+
+ // if (DataManager.getInstance().isNewBanPick)
+ // {
+ // bufRow["靾滊矆"] = item["pickTurn"].ToInt32();
+ // }
+ // else
+ // {
+ // bufRow["靾滊矆"] = DataManager.getInstance().氚错斀靾滌劀韰岇澊敫擺item["pickTurn"].ToInt32() + item["teamID"].ToInt32()];
+ // }
+
+
+ // int selectedChamp = item["championID"].ToInt32();
+ // if (selectedChamp > 0 )
+ // {
+ // bufRow["毂旐敿鞏胳澊毽"] = DataManager.getInstance().mChampionTable[selectedChamp];
+ // }
+ // if (selectedChamp == -1)
+ // {
+ // bufRow["毂旐敿鞏胳澊毽"] = "靹犿儩鞐嗢潓";
+ // }
+ // bufRow["毂旐敿鞏窱D"] = selectedChamp;
+
+
+
+
+ // 氚措Μ鞀ろ姼韰岇澊敫.Rows.Add(bufRow);
+ //}
+
+
+ //if (氚措Μ鞀ろ姼韰岇澊敫.Rows.Count > 0)
+ //{
+ // 氚措Μ鞀ろ姼韰岇澊敫 = 氚措Μ鞀ろ姼韰岇澊敫.AsEnumerable().OrderBy(r => Convert.ToInt32(r.Field("靾滊矆"))).CopyToDataTable();
+ //}
+
+
+
+ 氚措Μ鞀ろ姼韰岇澊敫.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙.ToString();
+ return 氚措Μ鞀ろ姼韰岇澊敫;
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞎勴儉旃鸽嵃鞚错劙.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞎勴儉旃鸽嵃鞚错劙.cs
new file mode 100644
index 0000000..c6786b7
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞎勴儉旃鸽嵃鞚错劙.cs
@@ -0,0 +1,53 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 鞎勴儉旃鸽嵃鞚错劙 //: IResponseData
+ {
+
+
+ //public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ //{
+
+ // DataTable 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.鞎勴儉旃鸽Μ鞀ろ彴.ToString());
+
+
+ // 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫.Columns.Add("鞎勴儉旃胳爼氤");
+ // 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫.Columns.Add("毽姢韽绊儉鞛");
+
+
+ // if (DataManager.getInstance().鞎勴儉旃鸽Μ鞀ろ彴== null)
+ // {
+ // return 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫;
+ // }
+
+ // BsonDocument dd = DataManager.getInstance().鞎勴儉旃鸽Μ鞀ろ彴.DeepClone().AsBsonDocument;
+
+ // dd.Remove("sequenceIndex");
+
+ // List bufStructDataList = dd.ToList();
+
+ // foreach (BsonElement item in bufStructDataList)
+ // {
+ // DataRow bufRow = 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫.NewRow();
+ // BsonDocument bufValue = item.Value.AsBsonDocument;
+
+ // bufRow["鞎勴儉旃胳爼氤"] = bufValue["monsterName"].ToString();
+ // int 鞎勴儉旃鸽Μ鞀ろ彴韮鞛 = bufValue["sequenceIndex"].ToInt32();
+ // bufRow["毽姢韽绊儉鞛"] = 鞎勴儉旃鸽Μ鞀ろ彴韮鞛;
+
+ // if (bufValue["monsterName"].ToString().Contains("Atakhan")) 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫.Rows.Add(bufRow);
+ // }
+
+ // return 鞎勴儉旃鸽Μ鞀ろ彴韰岇澊敫;
+
+ //}
+
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞓る笇鞝濏姼韨爠觳.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞓る笇鞝濏姼韨爠觳.cs
new file mode 100644
index 0000000..8a1f86f
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞓る笇鞝濏姼韨爠觳.cs
@@ -0,0 +1,144 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 鞓る笇鞝濏姼韨爠觳 : IResponseData
+ {
+
+ internal 鞓る笇鞝濏姼韨爠觳(bool recvIsPostGameData)
+ {
+ this.isPostGame = recvIsPostGameData;
+ }
+
+ bool isPostGame = false;
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 鞓る笇鞝濏姼韰岇澊敫 = new DataTable("鞓る笇鞝濏姼毽姢韸");
+
+
+ 鞓る笇鞝濏姼韰岇澊敫.Columns.Add("鞓る笇鞝濏姼韮鞛");
+ 鞓る笇鞝濏姼韰岇澊敫.Columns.Add("霌滊灅瓿れ毳");
+ 鞓る笇鞝濏姼韰岇澊敫.Columns.Add("鞛§潃韺");
+ 鞓る笇鞝濏姼韰岇澊敫.Columns.Add("韨嫓臧");
+ 鞓る笇鞝濏姼韰岇澊敫.Columns.Add("韨秳");
+ 鞓る笇鞝濏姼韰岇澊敫.Columns.Add("韨磮");
+ //鞓る笇鞝濏姼韰岇澊敫.Columns.Add("毽牋攵");
+ //鞓る笇鞝濏姼韰岇澊敫.Columns.Add("毽牋齑");
+
+
+ if (DataManager.getInstance().鞓る笇鞝濏姼雿办澊韯 != null)
+ {
+
+ BsonDocument dd = DataManager.getInstance().鞓る笇鞝濏姼雿办澊韯.DeepClone().AsBsonDocument;
+
+ dd.Remove("sequenceIndex");
+
+ List 鞓る笇鞝濏姼雿办澊韯半摛 = dd.ToList().OrderBy(e => e.Value.AsBsonDocument["gameTime"].ToInt32()).ToList();
+
+
+ bool is韥雲 = false;
+ int Index韥雲 = 0;
+ int nowSequenceIndex = 0;
+ //韥雲鸽笇霠堨澊韥ゼ 雽牍勴暣鞎 sequenceIndex 臧 鞐硛頃橂姅 靾滉皠鞚 臁挫灛頃橂姅歆 頇曥澑頃橂姅 鞝堨皑
+ for (int i = 0; i < 鞓る笇鞝濏姼雿办澊韯半摛.Count(); i++)
+ {
+ BsonValue item = 鞓る笇鞝濏姼雿办澊韯半摛[i].ToBsonDocument().AsBsonValue;
+ int sequenceIndex = item["Value"]["sequenceIndex"].ToInt32();
+
+ if (sequenceIndex > nowSequenceIndex) nowSequenceIndex = sequenceIndex;
+ else
+ {
+ is韥雲 = true;
+ nowSequenceIndex = sequenceIndex;
+ Index韥雲 = i;
+ break;
+ }
+ }
+
+ for (int i = 0; i < 鞓る笇鞝濏姼雿办澊韯半摛.Count(); i++)
+ {
+
+ BsonValue item = 鞓る笇鞝濏姼雿办澊韯半摛[i].ToBsonDocument().AsBsonValue;
+ int sequenceIndex = item["Value"]["sequenceIndex"].ToInt32();
+ DataRow bufRow = 鞓る笇鞝濏姼韰岇澊敫.NewRow();
+
+
+ if (is韥雲)
+ {
+ if (sequenceIndex >= nowSequenceIndex)
+ {
+ if (i < Index韥雲)
+ {
+ continue;
+ }
+ }
+ }
+
+
+
+
+ if (item["Value"]["killerTeamID"].ToInt32() == 300)
+ {
+ continue;
+ }
+ bufRow["鞛§潃韺"] = (DBDefine.韺甑秳)item["Value"]["killerTeamID"].ToInt32();
+
+ bufRow["鞓る笇鞝濏姼韮鞛"] = item["Value"]["monsterType"].ToString();
+
+ int 韨嫓臧勲矤鞚挫 = item["Value"]["gameTime"].ToInt32();
+
+
+
+ int 攵 = 韨嫓臧勲矤鞚挫 / 1000 / 60;
+ int 齑 = 韨嫓臧勲矤鞚挫 / 1000 - (攵 * 60);
+
+ bufRow["韨嫓臧"] = 韨嫓臧勲矤鞚挫;
+ bufRow["韨秳"] = 攵;
+ bufRow["韨磮"] = 齑;
+
+ if (item["Value"]["monsterType"].AsString == "dragon")
+ {
+
+ //20210615 鞖╈澊 靸侂嫧鞐 霐滊爤鞚措炒雼 氙鸽Μ 霌れ柎臧電 順勳儊鞚 氤挫棳靹 觳橂Μ
+ if (韨嫓臧勲矤鞚挫 > DataManager.getInstance().瓴疥赴鞁滉皠 * 1000 && !isPostGame)
+ {
+ continue;
+ }
+
+ bufRow["霌滊灅瓿れ毳"] = item["Value"]["dragonType"];
+
+ }
+
+ 鞓る笇鞝濏姼韰岇澊敫.Rows.Add(bufRow);
+ }
+
+ }
+
+ if (鞓る笇鞝濏姼韰岇澊敫.Rows.Count > 0)
+ {
+ DataTable 鞓る笇鞝濏姼韨舶瓿柬厡鞚措笖 = 鞓る笇鞝濏姼韰岇澊敫.AsEnumerable().OrderBy(r => Convert.ToInt32(r.Field("韨嫓臧"))).CopyToDataTable();
+
+ 鞓る笇鞝濏姼韨舶瓿柬厡鞚措笖.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨.ToString();
+
+ return 鞓る笇鞝濏姼韨舶瓿柬厡鞚措笖;
+
+ }
+ else
+ {
+ 鞓る笇鞝濏姼韰岇澊敫.TableName = DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨.ToString();
+ return 鞓る笇鞝濏姼韰岇澊敫;
+ }
+
+
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞖╇嵃鞚错劙.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞖╇嵃鞚错劙.cs
new file mode 100644
index 0000000..a1700cf
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/鞖╇嵃鞚错劙.cs
@@ -0,0 +1,55 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 鞖╇嵃鞚错劙 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 鞖╇Μ鞀ろ彴韰岇澊敫 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.鞖╇Μ鞀ろ彴.ToString());
+
+
+ 鞖╇Μ鞀ろ彴韰岇澊敫.Columns.Add("鞖╈爼氤");
+ 鞖╇Μ鞀ろ彴韰岇澊敫.Columns.Add("毽姢韽绊儉鞛");
+
+
+ if (DataManager.getInstance().霌滊灅瓿るΜ鞀ろ彴 == null)
+ {
+ return 鞖╇Μ鞀ろ彴韰岇澊敫;
+ }
+
+ BsonDocument dd = DataManager.getInstance().霌滊灅瓿るΜ鞀ろ彴.DeepClone().AsBsonDocument;
+
+ dd.Remove("sequenceIndex");
+
+ List bufStructDataList = dd.ToList();
+
+ foreach (BsonElement item in bufStructDataList)
+ {
+ DataRow bufRow = 鞖╇Μ鞀ろ彴韰岇澊敫.NewRow();
+
+ BsonDocument bufValue = item.Value.AsBsonDocument;
+
+ bufRow["鞖╈爼氤"] = bufValue["nextDragonName"].ToString();
+
+ int 鞖╇Μ鞀ろ彴韮鞛 = bufValue["nextDragonSpawnTime"].ToInt32();
+ bufRow["毽姢韽绊儉鞛"] = 鞖╇Μ鞀ろ彴韮鞛;
+
+ 鞖╇Μ鞀ろ彴韰岇澊敫.Rows.Add(bufRow);
+ }
+
+ return 鞖╇Μ鞀ろ彴韰岇澊敫;
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韤橃姢韸胳檮耄岇棳攵.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韤橃姢韸胳檮耄岇棳攵.cs
new file mode 100644
index 0000000..6e6906f
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韤橃姢韸胳檮耄岇棳攵.cs
@@ -0,0 +1,56 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 韤橃姢韸胳檮耄岇棳攵 : IResponseData
+ {
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 韤橃姢韸胳檮耄岇棳攵韰岇澊敫 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.韤橃姢韸胳檮耄岇棳攵.ToString());
+
+ try
+ {
+
+ 韤橃姢韸胳檮耄岇棳攵韰岇澊敫.Columns.Add("韺");
+ //頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("韽靺");
+ 韤橃姢韸胳檮耄岇棳攵韰岇澊敫.Columns.Add("靹犾垬雼夒劋鞛");
+ 韤橃姢韸胳檮耄岇棳攵韰岇澊敫.Columns.Add("毂旐敿鞏胳澊毽");
+ 韤橃姢韸胳檮耄岇棳攵韰岇澊敫.Columns.Add("韤橃姢韸胳檮耄岇棳攵");
+
+ if (DataManager.getInstance().瓴疥赴雿办澊韯 == null)
+ {
+ return 韤橃姢韸胳檮耄岇棳攵韰岇澊敫;
+ }
+
+ List 靹犾垬雿办澊韯半摛 = DataManager.getInstance().瓴疥赴雿办澊韯癧"participants"].AsBsonArray.OrderByDescending(p => p["roleBoundQuestComplete"].ToBoolean()).ToList();
+
+ for (int i = 0; i < 靹犾垬雿办澊韯半摛.Count(); i++)
+ {
+ BsonValue item = 靹犾垬雿办澊韯半摛[i];
+
+ DataRow bufRow = 韤橃姢韸胳檮耄岇棳攵韰岇澊敫.NewRow();
+
+ bufRow["韺"] = (DBDefine.韺甑秳)item["teamID"].ToInt32();
+ bufRow["靹犾垬雼夒劋鞛"] = item["playerName"];
+ bufRow["毂旐敿鞏胳澊毽"] = item["championName"];
+ bufRow["韤橃姢韸胳檮耄岇棳攵"] = item["roleBoundQuestComplete"].ToBoolean();
+
+
+ 韤橃姢韸胳檮耄岇棳攵韰岇澊敫.Rows.Add(bufRow);
+ }
+ }
+ catch (Exception ex) { }
+
+
+ return 韤橃姢韸胳檮耄岇棳攵韰岇澊敫;
+
+ }
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韮鞗岅敞霌滊嵃鞚错劙.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韮鞗岅敞霌滊嵃鞚错劙.cs
new file mode 100644
index 0000000..15c2ecd
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韮鞗岅敞霌滊嵃鞚错劙.cs
@@ -0,0 +1,77 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 韮鞗岅敞霌滊嵃鞚错劙 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 韮鞗岅敞霌滍厡鞚措笖 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岅敞霌滊嵃鞚错劙.ToString());
+
+
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("歆旮夓洂鞚");
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("韺");
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("靹犾垬");
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("歆旮夑敞霌");
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("韮鞗岇渼旃");
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("韮鞗岉嫲鞏");
+ 韮鞗岅敞霌滍厡鞚措笖.Columns.Add("瓴岇瀯鞁滉皠");
+
+ if (DataManager.getInstance().韮鞗岅敞霌滊嵃鞚错劙 == null)
+ {
+ return 韮鞗岅敞霌滍厡鞚措笖;
+ }
+
+ BsonDocument dd = DataManager.getInstance().韮鞗岅敞霌滊嵃鞚错劙.DeepClone().AsBsonDocument;
+
+ dd.Remove("sequenceIndex");
+
+ List bufStructDataList = dd.ToList();
+
+
+ //Console.WriteLine("韮鞗岉寣甏挫爠觳.cs : 鞁滌瀾");
+
+ foreach (BsonElement item in bufStructDataList)
+ {
+
+ DataRow bufRow = 韮鞗岅敞霌滍厡鞚措笖.NewRow();
+ BsonDocument bufValue = item.Value.AsBsonDocument;
+
+ //Console.WriteLine("韮鞗岉寣甏挫爠觳.cs 鞝曤炒 : " + bufValue.ToString());
+
+
+ try
+ {
+ {
+ bufRow["歆旮夓洂鞚"] = bufValue["source"].ToString();
+ bufRow["韺"] = bufValue["teamID"].ToString();
+ bufRow["靹犾垬"] = bufValue["recipientId"].ToString();
+ bufRow["歆旮夑敞霌"] = bufValue["amount"].ToString();
+ bufRow["韮鞗岇渼旃"] = bufValue["lane"].ToString();
+ bufRow["韮鞗岉嫲鞏"] = bufValue["turretTier"].ToString();
+ bufRow["瓴岇瀯鞁滉皠"] = bufValue["gameTime"].ToString();
+
+ 韮鞗岅敞霌滍厡鞚措笖.Rows.Add(bufRow);
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+ }
+
+ return 韮鞗岅敞霌滍厡鞚措笖;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韮鞗岉寣甏挫爠觳.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韮鞗岉寣甏挫爠觳.cs
new file mode 100644
index 0000000..667c050
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/韮鞗岉寣甏挫爠觳.cs
@@ -0,0 +1,89 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 韮鞗岉寣甏挫爠觳 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 韮鞗岇矤瓯绊厡鞚措笖 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岇矤瓯办爠觳.ToString());
+
+
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("韮鞗岆秬靹滌韺");
+
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("瓴疥赴鞁滉皠(齑)");
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("韺岅创霅滊澕鞚");
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("韯半牄韹办柎");
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("韮鞗岇毳");
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("韮鞗岇渼旃");
+ 韮鞗岇矤瓯绊厡鞚措笖.Columns.Add("雱レ劀鞀ろ儉鞗");
+
+ if (DataManager.getInstance().瓯措雿办澊韯 == null)
+ {
+ return 韮鞗岇矤瓯绊厡鞚措笖;
+ }
+
+ BsonDocument dd = DataManager.getInstance().瓯措雿办澊韯.DeepClone().AsBsonDocument;
+
+ dd.Remove("sequenceIndex");
+
+ List bufStructDataList = dd.ToList();
+
+
+ //Console.WriteLine("韮鞗岉寣甏挫爠觳.cs : 鞁滌瀾");
+
+ foreach (BsonElement item in bufStructDataList)
+ {
+
+ DataRow bufRow = 韮鞗岇矤瓯绊厡鞚措笖.NewRow();
+ BsonDocument bufValue = item.Value.AsBsonDocument;
+
+ //Console.WriteLine("韮鞗岉寣甏挫爠觳.cs 鞝曤炒 : " + bufValue.ToString());
+
+ //turretTier
+ try
+ {
+ bufRow["韮鞗岆秬靹滌韺"] = (DBDefine.韺甑秳)(bufValue["teamID"].ToInt32());
+ bufRow["瓴疥赴鞁滉皠(齑)"] = (bufValue["gameTime"].ToInt32()) / 1000;
+
+ if (bufValue.AsBsonDocument.Contains("lane"))
+ {
+ bufRow["韺岅创霅滊澕鞚"] = bufValue["lane"].ToString();
+ if (bufValue.AsBsonDocument.Contains("turretTier"))
+ {
+ bufRow["韯半牄韹办柎"] = bufValue["turretTier"].ToString();
+ }
+
+ if (bufValue.AsBsonDocument.Contains("nexusTurretName"))
+ {
+ bufRow["雱レ劀鞀ろ儉鞗"] = bufValue["nexusTurretName"].ToString();
+ bufRow["韮鞗岇渼旃"] = bufValue["position"].ToString();
+ }
+
+ bufRow["韮鞗岇毳"] = bufValue["buildingType"].ToString();
+
+
+ 韮鞗岇矤瓯绊厡鞚措笖.Rows.Add(bufRow);
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+ }
+
+ return 韮鞗岇矤瓯绊厡鞚措笖;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/頂诫嵃鞚错劙.cs b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/頂诫嵃鞚错劙.cs
new file mode 100644
index 0000000..9b2cbd1
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/ResponseData/鞛堧姅雿办澊韯/頂诫嵃鞚错劙.cs
@@ -0,0 +1,101 @@
+锘縰sing MongoDB.Bson;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LolDataRequestLib.ResponseData
+{
+ class 頂诫嵃鞚错劙 : IResponseData
+ {
+
+
+ public DataTable 霐旊箘雿办澊韯半ゼ雿办澊韯绊厡鞚措笖搿滊霌()
+ {
+
+ DataTable 頂诫Μ鞀ろ姼韰岇澊敫 = new DataTable(DBDefine.鞖旍箔雿办澊韯半秳毳.頂诫嵃鞚错劙.ToString());
+
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("韺");
+ //頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("韽靺");
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("靹犾垬雼夒劋鞛");
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("毂旐敿鞏窱D");
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("毂旐敿鞏胳澊毽");
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("頂届儊韮");
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("靹犿儩鞀ろ偍ID");
+ 頂诫Μ鞀ろ姼韰岇澊敫.Columns.Add("靾滊矆", typeof(int));
+
+ if (DataManager.getInstance().氚错斀雿办澊韯 == null)
+ {
+ return 頂诫Μ鞀ろ姼韰岇澊敫;
+ }
+
+ List 敫旊(頂诫嵃鞚错劙 = DataManager.getInstance().氚错斀雿办澊韯癧"teamOne"].AsBsonArray.ToList();
+
+ foreach (BsonValue item in 敫旊(頂诫嵃鞚错劙)
+ {
+ DataRow bufRow = 頂诫Μ鞀ろ姼韰岇澊敫.NewRow();
+ bufRow["韺"] = DBDefine.韺甑秳.敫旊(;
+ //bufRow["韽靺"] = (DBDefine.霛检澑甑秳)item["participantID"].AsInt32 + 1;
+ bufRow["靹犾垬雼夒劋鞛"] = item["summonerName"];
+
+ int selectedChamp = item["championID"].ToInt32();
+
+ if (selectedChamp != 0)
+ {
+ bufRow["毂旐敿鞏胳澊毽"] = DataManager.getInstance().mChampionTable[selectedChamp].champNameKOR;
+ }
+ bufRow["毂旐敿鞏窱D"] = selectedChamp;
+
+ bufRow["頂届儊韮"] = (DBDefine.頂届儊韮滉惮攵)item["pickMode"].ToInt32();
+ bufRow["靹犿儩鞀ろ偍ID"] = item["championID"];
+ bufRow["靾滊矆"] = item["pickTurn"].ToInt32();
+
+ 頂诫Μ鞀ろ姼韰岇澊敫.Rows.Add(bufRow);
+ }
+
+ List 韻柬攲頂诫嵃鞚错劙 = DataManager.getInstance().氚错斀雿办澊韯癧"teamTwo"].AsBsonArray.ToList();
+
+ foreach (BsonValue item in 韻柬攲頂诫嵃鞚错劙)
+ {
+ DataRow bufRow = 頂诫Μ鞀ろ姼韰岇澊敫.NewRow();
+ bufRow["韺"] = DBDefine.韺甑秳.韻柬攲;
+ //bufRow["韽靺"] = (DBDefine.霛检澑甑秳)item["participantID"].AsInt32 - 4;
+ bufRow["靹犾垬雼夒劋鞛"] = item["summonerName"];
+
+ int selectedChamp = item["championID"].ToInt32();
+
+ if (selectedChamp != 0)
+ {
+ bufRow["毂旐敿鞏胳澊毽"] = DataManager.getInstance().mChampionTable[selectedChamp].champNameKOR;
+ }
+ bufRow["毂旐敿鞏窱D"] = selectedChamp;
+
+
+ bufRow["頂届儊韮"] = (DBDefine.頂届儊韮滉惮攵)item["pickMode"].ToInt32();
+ bufRow["靹犿儩鞀ろ偍ID"] = item["championID"];
+ bufRow["靾滊矆"] = item["pickTurn"].ToInt32();
+
+ 頂诫Μ鞀ろ姼韰岇澊敫.Rows.Add(bufRow);
+ }
+
+
+ if (DataManager.getInstance().isNewBanPick)
+ {
+ if (頂诫Μ鞀ろ姼韰岇澊敫.Rows.Count > 0)
+ {
+ 頂诫Μ鞀ろ姼韰岇澊敫 = 頂诫Μ鞀ろ姼韰岇澊敫.AsEnumerable()
+ .OrderBy(r => r.Field("韺") == DBDefine.韺甑秳.敫旊(.ToString() ? 0 : 1) // 敫旊( 韺 鞖办劆
+ .ThenBy(r => r.Field("靾滊矆")) // 臧欖潃 韺 雮挫棎靹滊姅 靾滊矆 鞓る彀垳
+ .CopyToDataTable();
+ }
+ }
+
+
+ return 頂诫Μ鞀ろ姼韰岇澊敫;
+
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/LolDataRequestLib/libmongocrypt.dylib b/lck_cl_data_solution/LolDataRequestLib/libmongocrypt.dylib
new file mode 100644
index 0000000..91418d4
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/libmongocrypt.dylib differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/libmongocrypt.so b/lck_cl_data_solution/LolDataRequestLib/libmongocrypt.so
new file mode 100644
index 0000000..2e6bae0
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/libmongocrypt.so differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/mongocrypt.dll b/lck_cl_data_solution/LolDataRequestLib/mongocrypt.dll
new file mode 100644
index 0000000..39d7e01
Binary files /dev/null and b/lck_cl_data_solution/LolDataRequestLib/mongocrypt.dll differ
diff --git a/lck_cl_data_solution/LolDataRequestLib/packages.config b/lck_cl_data_solution/LolDataRequestLib/packages.config
new file mode 100644
index 0000000..00fd121
--- /dev/null
+++ b/lck_cl_data_solution/LolDataRequestLib/packages.config
@@ -0,0 +1,20 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/LolDataSolution.sln b/lck_cl_data_solution/LolDataSolution.sln
new file mode 100644
index 0000000..8440aa8
--- /dev/null
+++ b/lck_cl_data_solution/LolDataSolution.sln
@@ -0,0 +1,55 @@
+锘
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33110.190
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "updateServer", "updateServer\updateServer.csproj", "{A0EBC173-C85F-41D6-BD9A-088EFA361113}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LolDataRequestLib", "LolDataRequestLib\LolDataRequestLib.csproj", "{1923EB44-9E99-4198-8E08-008A98B7D673}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "requestTestForm", "requestTestForm\requestTestForm.csproj", "{0E32DA7E-5B02-40C7-8F86-883271051CFF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lolDataSimulation", "lolDataSimulation\lolDataSimulation.csproj", "{4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RiotKeyChecker", "RiotKeyChecker\RiotKeyChecker.csproj", "{9F357491-14FD-46B6-B824-14300E297954}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameDataViewer", "GameDataViewer\GameDataViewer.csproj", "{F8DFAC61-94B0-49B2-835E-F8C7D67BBECB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A0EBC173-C85F-41D6-BD9A-088EFA361113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A0EBC173-C85F-41D6-BD9A-088EFA361113}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A0EBC173-C85F-41D6-BD9A-088EFA361113}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A0EBC173-C85F-41D6-BD9A-088EFA361113}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1923EB44-9E99-4198-8E08-008A98B7D673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1923EB44-9E99-4198-8E08-008A98B7D673}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1923EB44-9E99-4198-8E08-008A98B7D673}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1923EB44-9E99-4198-8E08-008A98B7D673}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0E32DA7E-5B02-40C7-8F86-883271051CFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0E32DA7E-5B02-40C7-8F86-883271051CFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0E32DA7E-5B02-40C7-8F86-883271051CFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0E32DA7E-5B02-40C7-8F86-883271051CFF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9F357491-14FD-46B6-B824-14300E297954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9F357491-14FD-46B6-B824-14300E297954}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9F357491-14FD-46B6-B824-14300E297954}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9F357491-14FD-46B6-B824-14300E297954}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F8DFAC61-94B0-49B2-835E-F8C7D67BBECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F8DFAC61-94B0-49B2-835E-F8C7D67BBECB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F8DFAC61-94B0-49B2-835E-F8C7D67BBECB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F8DFAC61-94B0-49B2-835E-F8C7D67BBECB}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {96FC4E3B-3E74-4127-864B-9702FDA2938E}
+ EndGlobalSection
+EndGlobal
diff --git a/lck_cl_data_solution/RiotKeyChecker/Form1.Designer.cs b/lck_cl_data_solution/RiotKeyChecker/Form1.Designer.cs
new file mode 100644
index 0000000..6d5fd02
--- /dev/null
+++ b/lck_cl_data_solution/RiotKeyChecker/Form1.Designer.cs
@@ -0,0 +1,95 @@
+锘縩amespace RiotKeyChecker
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(482, 41);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(212, 91);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "雿办澊韯 鞖旍箔";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(104, 12);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(590, 23);
+ this.textBox1.TabIndex = 1;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(11, 15);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(87, 15);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "霛检澊鞐 韨 鞛呺牓";
+ //
+ // listBox1
+ //
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.ItemHeight = 15;
+ this.listBox1.Location = new System.Drawing.Point(12, 141);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(682, 289);
+ this.listBox1.TabIndex = 3;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(707, 450);
+ this.Controls.Add(this.listBox1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Riot Key Checker";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private Button button1;
+ private TextBox textBox1;
+ private Label label1;
+ private ListBox listBox1;
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/RiotKeyChecker/Form1.cs b/lck_cl_data_solution/RiotKeyChecker/Form1.cs
new file mode 100644
index 0000000..dd6265f
--- /dev/null
+++ b/lck_cl_data_solution/RiotKeyChecker/Form1.cs
@@ -0,0 +1,139 @@
+using System.Text.Json.Nodes;
+using System.Text.Json;
+using System.Net;
+using MongoDB.Bson;
+using MongoDB.Bson.Serialization;
+
+namespace RiotKeyChecker
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ listBox1.Items.Clear();
+ GameListUpdateWorker(true);
+ }
+
+
+ internal const string 扼捞均_霸烙府胶飘_REQUEST_URL = "https://raw-stats-api.ewp.gg/livestatsRaw/v1/";
+
+ internal Dictionary GameListUpdateWorker(bool isTest)
+ {
+
+ //string bufRequestURL = DEFINE.扼捞均_霸烙府胶飘_REQUEST_URL + (isTest ? "platformGames" : "esportsGames") + "?state=in_progress";;
+ string bufRequestURL = 扼捞均_霸烙府胶飘_REQUEST_URL + (isTest ? "platformGames" : "esportsGames") + "?state=in_progress"; ;
+ //string bufRequestURL = DEFINE.扼捞均_霸烙府胶飘_REQUEST_URL + "esportsGames" + "?state=finished"; ;
+ string result = null;
+
+ ///20210809 SSL立加巩力肺 牢秦 辑滚牢刘扁瓷阑 馋 何盒阑 眠啊茄促 捞芭 捞贰档 登唱?
+ //ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
+
+ ///啊廉柯 URL俊 嘎苗 府涅胶飘甫 父电促.
+ HttpWebRequest req = (HttpWebRequest)WebRequest.Create(bufRequestURL);
+ req.Method = "GET";
+ WebHeaderCollection hd = new WebHeaderCollection();
+
+ hd.Add("x-api-key:" + textBox1.Text);
+
+ req.Headers = hd;
+ WebResponse rsp = null;
+
+ try
+ {
+
+ rsp = req.GetResponse();
+
+
+ ///啊廉柯 单捞磐甫 巩磊凯拳 窍绊, Bson屈怕肺 颇教秦辑 府畔茄促.
+ using (var reader = new StreamReader(rsp.GetResponseStream()))
+ {
+ result = reader.ReadToEnd();
+ }
+
+
+
+ }
+ catch (WebException ex)
+ {
+ MessageBox.Show(ex.ToString());
+ return null;
+ }
+
+
+ IEnumerable bufGameList = null;
+
+ List updateRoomList = new List();
+
+ Dictionary rtnValue = new Dictionary();
+
+ ///啊廉柯 单捞磐啊 null捞 酒聪扼搁 单捞磐甫 Game窜困(Document)肺 漏扼辑 Enumarable拳 窍绊, 酒聪搁 后 搬苞甫 府畔茄促.
+ if (result != null)
+ {
+ bufGameList = BsonSerializer.Deserialize(result).Select(p => p.AsBsonDocument);
+ }
+ else
+ {
+
+ }
+
+
+ //啊廉柯 单捞磐俊辑 规力客 敲阀汽霸烙ID甫 颇教秦辑 KV其绢肺 父电促.
+ foreach (BsonValue item in bufGameList)
+ {
+ string bufString = "";
+
+ ///20210615抛胶飘且何盒 规阑 货肺父电何盒捞 乐阑版快 Document 鉴辑俊辑 唱吝俊 甸绢坷骨肺 苞芭俊 甸绢吭带 单捞磐甫 滚赴促.
+ ///趣矫 葛福聪 救滚赴促.
+ //if (rtnValue.ContainsValue(item["gameName"].ToString()))
+ //{
+ // rtnValue.Remove(rtnValue.FirstOrDefault(x => x.Value == item["gameName"].ToString()).Key);
+ //}
+
+ if (isTest)
+ {
+ rtnValue.Add(item["platformGameId"].ToString(), item["gameName"].ToString());
+
+ bufString = item["platformGameId"].ToString() + "_" + item["gameName"].ToString();
+
+ updateRoomList.Add(bufString);
+ }
+ else
+ {
+
+ BsonDocument itemDocument = item.AsBsonDocument["platformGames"].AsBsonArray.Last().ToBsonDocument();
+
+ rtnValue.Add(itemDocument["platformGameId"].ToString(), itemDocument["gameName"].ToString());
+
+ bufString = itemDocument["platformGameId"].ToString() + "_" + itemDocument["gameName"].ToString();
+
+ updateRoomList.Add(bufString);
+ }
+
+#if (DEBUG)
+ {
+ Console.WriteLine(bufString);
+ }
+#endif
+ }
+ ///肯己等 规 沥焊甫 UI俊 诀单捞飘茄促.
+ ///
+ this.Invoke(new MethodInvoker(() => {
+
+ foreach (string item in updateRoomList)
+ {
+ listBox1.Items.Add(item);
+ }
+
+ }));
+
+ return rtnValue;
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/RiotKeyChecker/Form1.resx b/lck_cl_data_solution/RiotKeyChecker/Form1.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/lck_cl_data_solution/RiotKeyChecker/Form1.resx
@@ -0,0 +1,60 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/RiotKeyChecker/Program.cs b/lck_cl_data_solution/RiotKeyChecker/Program.cs
new file mode 100644
index 0000000..7fa9d6f
--- /dev/null
+++ b/lck_cl_data_solution/RiotKeyChecker/Program.cs
@@ -0,0 +1,17 @@
+namespace RiotKeyChecker
+{
+ internal static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
+ Application.Run(new Form1());
+ }
+ }
+}
\ No newline at end of file
diff --git a/lck_cl_data_solution/RiotKeyChecker/RiotKeyChecker.csproj b/lck_cl_data_solution/RiotKeyChecker/RiotKeyChecker.csproj
new file mode 100644
index 0000000..37c5b99
--- /dev/null
+++ b/lck_cl_data_solution/RiotKeyChecker/RiotKeyChecker.csproj
@@ -0,0 +1,15 @@
+锘
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+ enable
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/lck_cl_mongo.yml b/lck_cl_data_solution/lck_cl_mongo.yml
new file mode 100644
index 0000000..185215c
--- /dev/null
+++ b/lck_cl_data_solution/lck_cl_mongo.yml
@@ -0,0 +1,12 @@
+version: '3.4'
+
+services:
+ mongodb:
+ image: mongo:latest
+ restart: always
+ container_name: mongodb-lck-cl
+ ports:
+ - "50003:27017"
+ environment:
+ MONGO_INITDB_ROOT_USERNAME: root
+ MONGO_INITDB_ROOT_PASSWORD: veryhardpassword123
diff --git a/lck_cl_data_solution/lolDataSimulation/App.config b/lck_cl_data_solution/lolDataSimulation/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/App.config
@@ -0,0 +1,6 @@
+锘
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/lolDataSimulation/Core/Compression/Snappy/lib/win/snappy32.dll b/lck_cl_data_solution/lolDataSimulation/Core/Compression/Snappy/lib/win/snappy32.dll
new file mode 100644
index 0000000..afc82ca
Binary files /dev/null and b/lck_cl_data_solution/lolDataSimulation/Core/Compression/Snappy/lib/win/snappy32.dll differ
diff --git a/lck_cl_data_solution/lolDataSimulation/Core/Compression/Snappy/lib/win/snappy64.dll b/lck_cl_data_solution/lolDataSimulation/Core/Compression/Snappy/lib/win/snappy64.dll
new file mode 100644
index 0000000..36cd5fe
Binary files /dev/null and b/lck_cl_data_solution/lolDataSimulation/Core/Compression/Snappy/lib/win/snappy64.dll differ
diff --git a/lck_cl_data_solution/lolDataSimulation/Core/Compression/Zstandard/lib/win/libzstd.dll b/lck_cl_data_solution/lolDataSimulation/Core/Compression/Zstandard/lib/win/libzstd.dll
new file mode 100644
index 0000000..e669123
Binary files /dev/null and b/lck_cl_data_solution/lolDataSimulation/Core/Compression/Zstandard/lib/win/libzstd.dll differ
diff --git a/lck_cl_data_solution/lolDataSimulation/Program.cs b/lck_cl_data_solution/lolDataSimulation/Program.cs
new file mode 100644
index 0000000..ae0085b
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/Program.cs
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace lolDataSimulation
+{
+ static class Program
+ {
+ ///
+ /// 頃措嫻 鞚戩毄 頂勲攴鸽灗鞚 欤 歆勳瀰鞝愳瀰雼堧嫟.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new SimulationForm());
+ }
+ }
+}
diff --git a/lck_cl_data_solution/lolDataSimulation/Properties/AssemblyInfo.cs b/lck_cl_data_solution/lolDataSimulation/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8885145
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鞏挫厛敫旊Μ鞐 雽頃 鞚茧皹 鞝曤炒電 雼れ潓 韸轨劚 歆戫暕鞚 韱淀暣
+// 鞝滌柎霅╇媹雼. 鞏挫厛敫旊Μ鞕 甏霠悳 鞝曤炒毳 靾橃爼頃橂牑氅
+// 鞚措煬頃 韸轨劚 臧掛潉 氤瓴巾晿靹胳殧.
+[assembly: AssemblyTitle("lolDataSimulation")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("lolDataSimulation")]
+[assembly: AssemblyCopyright("Copyright 漏 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible鞚 false搿 靹れ爼頃橂┐ 鞚 鞏挫厛敫旊Μ鞚 順曥嫕鞚 COM 甑劚 鞖旍唽鞐
+// 響滌嫓霅橃 鞎婌姷雼堧嫟. COM鞐愳劀 鞚 鞏挫厛敫旊Μ鞚 順曥嫕鞐 鞎§劯鞀ろ晿霠る┐
+// 頃措嫻 順曥嫕鞐 雽頃 ComVisible 韸轨劚鞚 true搿 靹れ爼頃橃劯鞖.
+[assembly: ComVisible(false)]
+
+// 鞚 頂勲鞝濏姼臧 COM鞐 雲胳稖霅橂姅 瓴届毎 雼れ潓 GUID電 typelib鞚 ID毳 雮橅儉雰呺媹雼.
+[assembly: Guid("4485ca9d-7fc7-4258-a90d-1eff38d73b3e")]
+
+// 鞏挫厛敫旊Μ鞚 氩勳爠 鞝曤炒電 雼れ潓 雱 臧歆 臧掛溂搿 甑劚霅╇媹雼.
+//
+// 欤 氩勳爠
+// 攵 氩勳爠
+// 牍岆摐 氩堩樃
+// 靾橃爼 氩勳爠
+//
+// 氇摖 臧掛潉 歆鞝曧晿瓯半倶 鞎勲灅鞕 臧欖澊 '*'毳 靷毄頃橃棳 牍岆摐 氩堩樃 氚 靾橃爼 氩堩樃臧 鞛愲彊鞙茧
+// 歆鞝曤悩霃勲 頃 靾 鞛堨姷雼堧嫟.
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/lck_cl_data_solution/lolDataSimulation/Properties/Resources.Designer.cs b/lck_cl_data_solution/lolDataSimulation/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..8801f80
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+锘//------------------------------------------------------------------------------
+//
+// 鞚 旖旊摐電 霃勱惮毳 靷毄頃橃棳 靸濎劚霅橃棃鞀惦媹雼.
+// 霟绊儉鞛 氩勳爠:4.0.30319.42000
+//
+// 韺岇澕 雮挫毄鞚 氤瓴巾晿氅 鞛橂霅 霃欖瀾鞚 氚滌儩頃 靾 鞛堨溂氅, 旖旊摐毳 雼れ嫓 靸濎劚頃橂┐
+// 鞚措煬頃 氤瓴 雮挫毄鞚 靻愳嫟霅╇媹雼.
+//
+//------------------------------------------------------------------------------
+
+namespace lolDataSimulation.Properties
+{
+
+
+ ///
+ /// 歆鞐檾霅 氍胳瀽鞐 霌膘潉 彀娟赴 鞙勴暅 臧曤牓頃 順曥嫕鞚 毽唽鞀 韥措灅鞀れ瀰雼堧嫟.
+ ///
+ // 鞚 韥措灅鞀る姅 ResGen 霕愲姅 Visual Studio鞕 臧欖潃 霃勱惮毳 韱淀暣 StronglyTypedResourceBuilder
+ // 韥措灅鞀れ棎靹 鞛愲彊鞙茧 靸濎劚霅橃棃鞀惦媹雼.
+ // 氅る矂毳 於旉皜頃橁卑雮 鞝滉卑頃橂牑氅 .ResX 韺岇澕鞚 韼胳頃 雼れ潓 /str 鞓奠厴鞚 靷毄頃橃棳
+ // ResGen鞚 雼れ嫓 鞁ろ枆頃橁卑雮 VS 頂勲鞝濏姼毳 雼れ嫓 牍岆摐頃橃嫮鞁滌槫.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 鞚 韥措灅鞀れ棎靹 靷毄頃橂姅 旌愳嫓霅 ResourceManager 鞚胳姢韯挫姢毳 氚橅櫂頃╇媹雼.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("lolDataSimulation.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 鞚 臧曤牓頃 順曥嫕鞚 毽唽鞀 韥措灅鞀るゼ 靷毄頃橃棳 氇摖 毽唽鞀 臁绊殞鞐 雽頃 順勳灛 鞀る爤霌滌潣 CurrentUICulture 靻嶌劚鞚
+ /// 鞛爼鞚橅暕雼堧嫟.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/lck_cl_data_solution/lolDataSimulation/Properties/Resources.resx b/lck_cl_data_solution/lolDataSimulation/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/Properties/Resources.resx
@@ -0,0 +1,117 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/lolDataSimulation/Properties/Settings.Designer.cs b/lck_cl_data_solution/lolDataSimulation/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..f3cca1f
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+锘//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace lolDataSimulation.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/lck_cl_data_solution/lolDataSimulation/Properties/Settings.settings b/lck_cl_data_solution/lolDataSimulation/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/Properties/Settings.settings
@@ -0,0 +1,7 @@
+锘
+
+
+
+
+
+
diff --git a/lck_cl_data_solution/lolDataSimulation/SimulationForm.Designer.cs b/lck_cl_data_solution/lolDataSimulation/SimulationForm.Designer.cs
new file mode 100644
index 0000000..8a9504b
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/SimulationForm.Designer.cs
@@ -0,0 +1,181 @@
+锘縩amespace lolDataSimulation
+{
+ partial class SimulationForm
+ {
+ ///
+ /// 頃勳垬 霐旍瀽鞚措剤 氤靾橃瀰雼堧嫟.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 靷毄 欷戩澑 氇摖 毽唽鞀るゼ 鞝曤Μ頃╇媹雼.
+ ///
+ /// 甏毽悩電 毽唽鞀るゼ 靷牅頃挫暭 頃橂┐ true鞚搓碃, 攴鸽爣歆 鞎婌溂氅 false鞛呺媹雼.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form 霐旍瀽鞚措剤鞐愳劀 靸濎劚頃 旖旊摐
+
+ ///
+ /// 霐旍瀽鞚措剤 歆鞗愳棎 頃勳殧頃 氅旍劀霌滌瀰雼堧嫟.
+ /// 鞚 氅旍劀霌滌潣 雮挫毄鞚 旖旊摐 韼胳旮半 靾橃爼頃橃 毵堨劯鞖.
+ ///
+ private void InitializeComponent()
+ {
+ this.btnBanPickNect = new System.Windows.Forms.Button();
+ this.btnClear = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
+ this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
+ this.btnClearGameData = new System.Windows.Forms.Button();
+ this.btnSyncGameData = new System.Windows.Forms.Button();
+ this.btnAutoplayStart = new System.Windows.Forms.Button();
+ this.btnAutoplayEnd = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
+ this.SuspendLayout();
+ //
+ // btnBanPickNect
+ //
+ this.btnBanPickNect.Location = new System.Drawing.Point(321, 57);
+ this.btnBanPickNect.Name = "btnBanPickNect";
+ this.btnBanPickNect.Size = new System.Drawing.Size(223, 133);
+ this.btnBanPickNect.TabIndex = 0;
+ this.btnBanPickNect.Text = "氚错斀雼れ潓雼硠";
+ this.btnBanPickNect.UseVisualStyleBackColor = true;
+ this.btnBanPickNect.Click += new System.EventHandler(this.btnBanPickNect_Click);
+ //
+ // btnClear
+ //
+ this.btnClear.Location = new System.Drawing.Point(12, 57);
+ this.btnClear.Name = "btnClear";
+ this.btnClear.Size = new System.Drawing.Size(303, 135);
+ this.btnClear.TabIndex = 1;
+ this.btnClear.Text = "氚错斀齑堦赴頇";
+ this.btnClear.UseVisualStyleBackColor = true;
+ this.btnClear.Click += new System.EventHandler(this.button2_Click);
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(12, 30);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(303, 21);
+ this.textBox1.TabIndex = 2;
+ this.textBox1.Text = "LOLTMNT03_219847";
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(321, 30);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(223, 21);
+ this.textBox2.TabIndex = 3;
+ this.textBox2.Text = "-1000";
+ //
+ // numericUpDown1
+ //
+ this.numericUpDown1.Font = new System.Drawing.Font("甑措", 30F);
+ this.numericUpDown1.Location = new System.Drawing.Point(12, 235);
+ this.numericUpDown1.Name = "numericUpDown1";
+ this.numericUpDown1.Size = new System.Drawing.Size(120, 53);
+ this.numericUpDown1.TabIndex = 4;
+ //
+ // numericUpDown2
+ //
+ this.numericUpDown2.Font = new System.Drawing.Font("甑措", 30F);
+ this.numericUpDown2.Location = new System.Drawing.Point(138, 235);
+ this.numericUpDown2.Maximum = new decimal(new int[] {
+ 59,
+ 0,
+ 0,
+ 0});
+ this.numericUpDown2.Name = "numericUpDown2";
+ this.numericUpDown2.Size = new System.Drawing.Size(120, 53);
+ this.numericUpDown2.TabIndex = 4;
+ this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged);
+ //
+ // btnClearGameData
+ //
+ this.btnClearGameData.Location = new System.Drawing.Point(12, 294);
+ this.btnClearGameData.Name = "btnClearGameData";
+ this.btnClearGameData.Size = new System.Drawing.Size(165, 82);
+ this.btnClearGameData.TabIndex = 5;
+ this.btnClearGameData.Text = "齑堦赴頇";
+ this.btnClearGameData.UseVisualStyleBackColor = true;
+ this.btnClearGameData.Click += new System.EventHandler(this.btnClearGameData_Click);
+ //
+ // btnSyncGameData
+ //
+ this.btnSyncGameData.Location = new System.Drawing.Point(183, 294);
+ this.btnSyncGameData.Name = "btnSyncGameData";
+ this.btnSyncGameData.Size = new System.Drawing.Size(165, 82);
+ this.btnSyncGameData.TabIndex = 5;
+ this.btnSyncGameData.Text = "霃欔赴頇";
+ this.btnSyncGameData.UseVisualStyleBackColor = true;
+ this.btnSyncGameData.Click += new System.EventHandler(this.btnSyncGameData_Click);
+ //
+ // btnAutoplayStart
+ //
+ this.btnAutoplayStart.Location = new System.Drawing.Point(354, 294);
+ this.btnAutoplayStart.Name = "btnAutoplayStart";
+ this.btnAutoplayStart.Size = new System.Drawing.Size(165, 82);
+ this.btnAutoplayStart.TabIndex = 5;
+ this.btnAutoplayStart.Text = "鞓ろ啝頂岆爤鞚挫嫓鞛";
+ this.btnAutoplayStart.UseVisualStyleBackColor = true;
+ this.btnAutoplayStart.Click += new System.EventHandler(this.button3_Click);
+ //
+ // btnAutoplayEnd
+ //
+ this.btnAutoplayEnd.Location = new System.Drawing.Point(525, 294);
+ this.btnAutoplayEnd.Name = "btnAutoplayEnd";
+ this.btnAutoplayEnd.Size = new System.Drawing.Size(165, 82);
+ this.btnAutoplayEnd.TabIndex = 5;
+ this.btnAutoplayEnd.Text = "鞓ろ啝頂岆爤鞚措仢";
+ this.btnAutoplayEnd.UseVisualStyleBackColor = true;
+ this.btnAutoplayEnd.Click += new System.EventHandler(this.btnAutoplayEnd_Click);
+ //
+ // SimulationForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.btnAutoplayEnd);
+ this.Controls.Add(this.btnAutoplayStart);
+ this.Controls.Add(this.btnSyncGameData);
+ this.Controls.Add(this.btnClearGameData);
+ this.Controls.Add(this.numericUpDown2);
+ this.Controls.Add(this.numericUpDown1);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.btnClear);
+ this.Controls.Add(this.btnBanPickNect);
+ this.Name = "SimulationForm";
+ this.Text = "Form1";
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button btnBanPickNect;
+ private System.Windows.Forms.Button btnClear;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.NumericUpDown numericUpDown1;
+ private System.Windows.Forms.NumericUpDown numericUpDown2;
+ private System.Windows.Forms.Button btnClearGameData;
+ private System.Windows.Forms.Button btnSyncGameData;
+ private System.Windows.Forms.Button btnAutoplayStart;
+ private System.Windows.Forms.Button btnAutoplayEnd;
+ }
+}
+
diff --git a/lck_cl_data_solution/lolDataSimulation/SimulationForm.cs b/lck_cl_data_solution/lolDataSimulation/SimulationForm.cs
new file mode 100644
index 0000000..aadfe1e
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/SimulationForm.cs
@@ -0,0 +1,324 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace lolDataSimulation
+{
+ ///
+ /// 鞁滊霠堨澊靺橃溂搿 瓴岇瀯雿办澊韯半ゼ 毵岆摛旮办渼頃 頂勲攴鸽灗
+ ///
+ /// 膦 鞊半嫟 氩勲Υ欷勳晫瓿 氚滊歆半嫟. 鞚措爣瓴 毵庫澊 鞊胳 鞎岇晿鞙茧┐ 鞐赴鞐 氇╈埁鞚 瓯胳柎鞎柬枅電旊嵃..
+ ///
+ ///
+ public partial class SimulationForm : Form
+ {
+ public SimulationForm()
+ {
+ InitializeComponent();
+
+ updateTimer.Tick += timeup;
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
+
+ mEventDataBaseTarget.GetCollection("champ_select").DeleteMany("{ RequestGameID : '" + textBox1.Text + "' }");
+
+ textBox2.Text = (-1000).ToString();
+
+ }
+
+ private void btnBanPickNect_Click(object sender, EventArgs e)
+ {
+ banPickNext();
+ }
+
+
+ //MongoClient mDBClient = new MongoClient("mongodb://root:veryhardpassword123@203.251.148.27:50002");
+ MongoClient mDBClient = new MongoClient("mongodb://root:veryhardpassword123@211.42.188.8:50003");
+ //MongoClient mDBClient = new MongoClient("mongodb://root:veryhardpassword123@localhost:60001");
+
+ void banPickNext()
+ {
+
+
+
+ var mEventDataBaseSeed = mDBClient.GetDatabase("data_lol_test_seed");
+
+ var filter = Builders.Filter.And(
+ Builders.Filter.Eq("RequestGameID", textBox1.Text),
+ Builders.Filter.Eq("sequenceIndex", Convert.ToInt32(textBox2.Text))
+ );
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("RequestGameID")
+ .Include("sequenceIndex")
+ .Include("eventDocument");
+
+ List documents = mEventDataBaseSeed.GetCollection("champ_select")
+ .Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .Limit(1)
+ .ToList();
+
+ if (documents.Count == 0)
+ {
+ MessageBox.Show("鞐呺嵃鞚错姼頃 雿办澊韯瓣皜 鞐嗢姷雼堧嫟.");
+ return;
+ }
+
+ var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
+
+ mEventDataBaseTarget.GetCollection("champ_select").InsertOne(documents.Last());
+
+ textBox2.Text = (Convert.ToInt32(textBox2.Text) + 1).ToString();
+
+ }
+
+
+ Timer updateTimer = new Timer();
+ private void button3_Click(object sender, EventArgs e)
+ {
+ updateTimer.Interval = 1000;
+
+ updateTimer.Start();
+
+ }
+
+ void timeup(object o, EventArgs e)
+ {
+ if (Convert.ToInt32(numericUpDown2.Value) == 59)
+ {
+ numericUpDown1.Value += 1;
+ numericUpDown2.Value = 0;
+ }
+ else
+ {
+ numericUpDown2.Value += 1;
+ }
+ }
+ string[] bufUpdateCollectionsName = { "stats_update", "epic_monster_kill", "building_destroyed", "turret_plate_destroyed", "queued_dragon_info" };
+
+ void liveDataUpdateWork()
+ {
+ var mEventDataBaseSeed = mDBClient.GetDatabase("data_lol_test_seed");
+
+ var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
+
+ int calculatedTime = 0;
+
+ calculatedTime += Convert.ToInt32(numericUpDown1.Value) * 60 * 1000;
+
+ calculatedTime += Convert.ToInt32(numericUpDown2.Value) * 1000;
+
+ Dictionary>> bufDataTable = new Dictionary>>();
+
+
+ var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + calculatedTime + " }}");
+
+ var filter = Builders.Filter.And(
+ Builders.Filter.Eq("RequestGameID", textBox1.Text),
+ subFilter
+ );
+
+ foreach (string item in bufUpdateCollectionsName)
+ {
+
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("RequestGameID")
+ .Include("sequenceIndex")
+ .Include("eventDocument");
+
+ List documents = mEventDataBaseSeed.GetCollection(item)
+ .Find(filter)
+ .SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .Limit(1)
+ .ToList();
+
+
+ if (documents.Count == 0)
+ {
+ continue;
+ }
+
+ BsonDocument bufUpdateValue = documents[0].AsBsonDocument;
+
+ string bufStatus = bufUpdateValue["eventDocument"]["rfc461Schema"].ToString();
+
+
+
+ var gameFilter = Builders.Filter.Eq(x => x["RequestGameID"], textBox1.Text);
+
+ var sequanceFilter = Builders.Filter.Eq(x => x["sequenceIndex"], documents[0]["sequenceIndex"]);
+
+ var Parentfilter = Builders.Filter.And(gameFilter, sequanceFilter);
+
+
+ UpdateOneModel updateRaw = new UpdateOneModel(
+ Parentfilter,
+ Builders.Update.Set(x => x["eventDocument"], bufUpdateValue["eventDocument"])
+ )
+ { IsUpsert = true };
+
+ if (!bufDataTable.ContainsKey(bufStatus))
+ {
+ bufDataTable.Add(bufStatus, new List>());
+ }
+
+
+ if (item == "stats_update")
+ {
+
+ Console.WriteLine(bufUpdateValue["eventDocument"]["gameTime"].ToString());
+
+
+ }
+
+ bufDataTable[bufStatus].Add(updateRaw);
+
+ }
+
+
+ foreach (var item in bufDataTable)
+ {
+
+
+ mEventDataBaseTarget.GetCollection(item.Key)
+ .BulkWriteAsync(item.Value);
+ }
+
+ }
+
+ private void numericUpDown2_ValueChanged(object sender, EventArgs e)
+ {
+ liveDataUpdateWork();
+ }
+
+ private void btnClearGameData_Click(object sender, EventArgs e)
+ {
+
+ var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
+ foreach (string item in bufUpdateCollectionsName)
+ {
+ mEventDataBaseTarget.GetCollection(item)
+ .DeleteMany(x => true);
+ }
+
+ }
+
+ private void btnAutoplayEnd_Click(object sender, EventArgs e)
+ {
+ updateTimer.Stop();
+ }
+
+ private void btnSyncGameData_Click(object sender, EventArgs e)
+ {
+ var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
+
+
+ var mEventDataBaseSeed = mDBClient.GetDatabase("data_lol_test_seed");
+
+
+ int calculatedTime = 0;
+
+ calculatedTime += Convert.ToInt32(numericUpDown1.Value) * 60 * 1000;
+
+ calculatedTime += Convert.ToInt32(numericUpDown2.Value) * 1000;
+
+ Dictionary>> bufDataTable = new Dictionary>>();
+
+
+ var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize("{'eventDocument.gameTime' : {$lt : " + calculatedTime + " }}");
+
+ var filter = Builders.Filter.And(
+ Builders.Filter.Eq("RequestGameID", textBox1.Text),
+ subFilter
+ );
+
+ foreach (string item in bufUpdateCollectionsName)
+ {
+
+
+ var projection = Builders.Projection
+ .Exclude("_id")
+ .Include("RequestGameID")
+ .Include("sequenceIndex")
+ .Include("eventDocument");
+
+ List documents = mEventDataBaseSeed.GetCollection(item)
+ .Find(filter)
+ //.SortByDescending(x => x["sequenceIndex"])
+ .Project(projection)
+ .ToList();
+
+
+ if (documents.Count == 0)
+ {
+ continue;
+ }
+
+ //BsonDocument bufUpdateValue = documents[0].AsBsonDocument;
+
+
+ foreach (BsonDocument itemd in documents)
+ {
+
+ string bufStatus = itemd["eventDocument"]["rfc461Schema"].ToString();
+
+ var gameFilter = Builders.Filter.Eq(x => x["RequestGameID"], textBox1.Text);
+
+ var sequanceFilter = Builders.Filter.Eq(x => x["sequenceIndex"], itemd["sequenceIndex"]);
+
+ var Parentfilter = Builders.Filter.And(gameFilter, sequanceFilter);
+
+
+ UpdateOneModel updateRaw = new UpdateOneModel(
+ Parentfilter,
+ Builders.Update.Set(x => x["eventDocument"], itemd["eventDocument"])
+ )
+ { IsUpsert = true };
+
+ if (!bufDataTable.ContainsKey(bufStatus))
+ {
+ bufDataTable.Add(bufStatus, new List>());
+ }
+
+ if (item == "stats_update")
+ {
+ Console.WriteLine(itemd["eventDocument"]["gameTime"].ToString());
+ }
+
+ bufDataTable[bufStatus].Add(updateRaw);
+
+ }
+ }
+
+
+ foreach (var item in bufDataTable)
+ {
+
+
+ mEventDataBaseTarget.GetCollection(item.Key)
+ .BulkWriteAsync(item.Value);
+ }
+
+
+
+
+ }
+ }
+}
diff --git a/lck_cl_data_solution/lolDataSimulation/SimulationForm.resx b/lck_cl_data_solution/lolDataSimulation/SimulationForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/SimulationForm.resx
@@ -0,0 +1,120 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/lolDataSimulation/libmongocrypt.dylib b/lck_cl_data_solution/lolDataSimulation/libmongocrypt.dylib
new file mode 100644
index 0000000..91418d4
Binary files /dev/null and b/lck_cl_data_solution/lolDataSimulation/libmongocrypt.dylib differ
diff --git a/lck_cl_data_solution/lolDataSimulation/libmongocrypt.so b/lck_cl_data_solution/lolDataSimulation/libmongocrypt.so
new file mode 100644
index 0000000..2e6bae0
Binary files /dev/null and b/lck_cl_data_solution/lolDataSimulation/libmongocrypt.so differ
diff --git a/lck_cl_data_solution/lolDataSimulation/lolDataSimulation.csproj b/lck_cl_data_solution/lolDataSimulation/lolDataSimulation.csproj
new file mode 100644
index 0000000..3a5e910
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/lolDataSimulation.csproj
@@ -0,0 +1,167 @@
+锘
+
+
+
+ Debug
+ AnyCPU
+ {4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}
+ WinExe
+ lolDataSimulation
+ lolDataSimulation
+ v4.7.2
+ 512
+ true
+ true
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\DnsClient.1.4.0\lib\net471\DnsClient.dll
+
+
+ ..\packages\MongoDB.Bson.2.12.3\lib\net452\MongoDB.Bson.dll
+
+
+ ..\packages\MongoDB.Driver.2.12.3\lib\net452\MongoDB.Driver.dll
+
+
+ ..\packages\MongoDB.Driver.Core.2.12.3\lib\net452\MongoDB.Driver.Core.dll
+
+
+ ..\packages\MongoDB.Libmongocrypt.1.2.1\lib\net452\MongoDB.Libmongocrypt.dll
+
+
+ ..\packages\SharpCompress.0.23.0\lib\net45\SharpCompress.dll
+
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+
+
+ ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
+ True
+ True
+
+
+ ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ SimulationForm.cs
+
+
+
+
+ SimulationForm.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 鞚 頂勲鞝濏姼電 鞚 旎错摠韯办棎 鞐嗠姅 NuGet 韺偆歆毳 彀胳“頃╇媹雼. 頃措嫻 韺偆歆毳 雼れ毚搿滊摐頃橂牑氅 NuGet 韺偆歆 氤奠洂鞚 靷毄頃橃嫮鞁滌槫. 鞛愳劯頃 雮挫毄鞚 http://go.microsoft.com/fwlink/?LinkID=322105毳 彀胳“頃橃嫮鞁滌槫. 雸勲澖霅 韺岇澕鞚 {0}鞛呺媹雼.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/lolDataSimulation/mongocrypt.dll b/lck_cl_data_solution/lolDataSimulation/mongocrypt.dll
new file mode 100644
index 0000000..39d7e01
Binary files /dev/null and b/lck_cl_data_solution/lolDataSimulation/mongocrypt.dll differ
diff --git a/lck_cl_data_solution/lolDataSimulation/packages.config b/lck_cl_data_solution/lolDataSimulation/packages.config
new file mode 100644
index 0000000..f9cdad4
--- /dev/null
+++ b/lck_cl_data_solution/lolDataSimulation/packages.config
@@ -0,0 +1,19 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/requestTestForm/App.config b/lck_cl_data_solution/requestTestForm/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/App.config
@@ -0,0 +1,6 @@
+锘
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/requestTestForm/Core/Compression/Snappy/lib/win/snappy32.dll b/lck_cl_data_solution/requestTestForm/Core/Compression/Snappy/lib/win/snappy32.dll
new file mode 100644
index 0000000..afc82ca
Binary files /dev/null and b/lck_cl_data_solution/requestTestForm/Core/Compression/Snappy/lib/win/snappy32.dll differ
diff --git a/lck_cl_data_solution/requestTestForm/Core/Compression/Snappy/lib/win/snappy64.dll b/lck_cl_data_solution/requestTestForm/Core/Compression/Snappy/lib/win/snappy64.dll
new file mode 100644
index 0000000..36cd5fe
Binary files /dev/null and b/lck_cl_data_solution/requestTestForm/Core/Compression/Snappy/lib/win/snappy64.dll differ
diff --git a/lck_cl_data_solution/requestTestForm/Core/Compression/Zstandard/lib/win/libzstd.dll b/lck_cl_data_solution/requestTestForm/Core/Compression/Zstandard/lib/win/libzstd.dll
new file mode 100644
index 0000000..e669123
Binary files /dev/null and b/lck_cl_data_solution/requestTestForm/Core/Compression/Zstandard/lib/win/libzstd.dll differ
diff --git a/lck_cl_data_solution/requestTestForm/DataObserver.cs b/lck_cl_data_solution/requestTestForm/DataObserver.cs
new file mode 100644
index 0000000..f676f94
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/DataObserver.cs
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace requestTestForm
+{
+ class RequestManager
+ {
+
+
+
+ }
+}
diff --git a/lck_cl_data_solution/requestTestForm/Form1.Designer.cs b/lck_cl_data_solution/requestTestForm/Form1.Designer.cs
new file mode 100644
index 0000000..6e9ecd7
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Form1.Designer.cs
@@ -0,0 +1,520 @@
+锘縩amespace requestTestForm
+{
+ partial class Form1
+ {
+ ///
+ /// 頃勳垬 霐旍瀽鞚措剤 氤靾橃瀰雼堧嫟.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 靷毄 欷戩澑 氇摖 毽唽鞀るゼ 鞝曤Μ頃╇媹雼.
+ ///
+ /// 甏毽悩電 毽唽鞀るゼ 靷牅頃挫暭 頃橂┐ true鞚搓碃, 攴鸽爣歆 鞎婌溂氅 false鞛呺媹雼.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form 霐旍瀽鞚措剤鞐愳劀 靸濎劚頃 旖旊摐
+
+ ///
+ /// 霐旍瀽鞚措剤 歆鞗愳棎 頃勳殧頃 氅旍劀霌滌瀰雼堧嫟.
+ /// 鞚 氅旍劀霌滌潣 雮挫毄鞚 旖旊摐 韼胳旮半 靾橃爼頃橃 毵堨劯鞖.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.dataGridView1 = new System.Windows.Forms.DataGridView();
+ this.dataGridView2 = new System.Windows.Forms.DataGridView();
+ this.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.tabPage3 = new System.Windows.Forms.TabPage();
+ this.grid耄 = new System.Windows.Forms.DataGridView();
+ this.tabPage4 = new System.Windows.Forms.TabPage();
+ this.grid鞓る笇鞝濏姼韨 = new System.Windows.Forms.DataGridView();
+ this.tabPage5 = new System.Windows.Forms.TabPage();
+ this.grid瓿摐須嶋摑靹犾垬 = new System.Windows.Forms.DataGridView();
+ this.tabPage6 = new System.Windows.Forms.TabPage();
+ this.grid瓴巾棙旃橂爤氩 = new System.Windows.Forms.DataGridView();
+ this.tabPage7 = new System.Windows.Forms.TabPage();
+ this.grid雸勳爜雿半歆 = new System.Windows.Forms.DataGridView();
+ this.tabPage8 = new System.Windows.Forms.TabPage();
+ this.grid瓿摐彀 = new System.Windows.Forms.DataGridView();
+ this.tabPage9 = new System.Windows.Forms.TabPage();
+ this.grid韮鞗 = new System.Windows.Forms.DataGridView();
+ this.tabPage10 = new System.Windows.Forms.TabPage();
+ this.grid鞖 = new System.Windows.Forms.DataGridView();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.button2 = new System.Windows.Forms.Button();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.textBox4 = new System.Windows.Forms.TextBox();
+ this.textBox5 = new System.Windows.Forms.TextBox();
+ this.textBox6 = new System.Windows.Forms.TextBox();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.button5 = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ this.btn頃滍儉霐滊焿鞁滌瀾 = new System.Windows.Forms.Button();
+ this.btn頃滍儉霐滊焿膦呺 = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
+ this.tabControl1.SuspendLayout();
+ this.tabPage1.SuspendLayout();
+ this.tabPage2.SuspendLayout();
+ this.tabPage3.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid耄)).BeginInit();
+ this.tabPage4.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid鞓る笇鞝濏姼韨)).BeginInit();
+ this.tabPage5.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid瓿摐須嶋摑靹犾垬)).BeginInit();
+ this.tabPage6.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid瓴巾棙旃橂爤氩)).BeginInit();
+ this.tabPage7.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid雸勳爜雿半歆)).BeginInit();
+ this.tabPage8.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid瓿摐彀)).BeginInit();
+ this.tabPage9.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid韮鞗)).BeginInit();
+ this.tabPage10.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.grid鞖)).BeginInit();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(1067, 531);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(191, 73);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // dataGridView1
+ //
+ this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView1.Location = new System.Drawing.Point(6, 6);
+ this.dataGridView1.Name = "dataGridView1";
+ this.dataGridView1.RowTemplate.Height = 23;
+ this.dataGridView1.Size = new System.Drawing.Size(966, 554);
+ this.dataGridView1.TabIndex = 1;
+ //
+ // dataGridView2
+ //
+ this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView2.Location = new System.Drawing.Point(6, 6);
+ this.dataGridView2.Name = "dataGridView2";
+ this.dataGridView2.RowTemplate.Height = 23;
+ this.dataGridView2.Size = new System.Drawing.Size(966, 554);
+ this.dataGridView2.TabIndex = 1;
+ //
+ // tabControl1
+ //
+ this.tabControl1.Controls.Add(this.tabPage1);
+ this.tabControl1.Controls.Add(this.tabPage2);
+ this.tabControl1.Controls.Add(this.tabPage3);
+ this.tabControl1.Controls.Add(this.tabPage4);
+ this.tabControl1.Controls.Add(this.tabPage5);
+ this.tabControl1.Controls.Add(this.tabPage6);
+ this.tabControl1.Controls.Add(this.tabPage7);
+ this.tabControl1.Controls.Add(this.tabPage8);
+ this.tabControl1.Controls.Add(this.tabPage9);
+ this.tabControl1.Controls.Add(this.tabPage10);
+ this.tabControl1.Location = new System.Drawing.Point(12, 12);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(986, 592);
+ this.tabControl1.TabIndex = 2;
+ //
+ // tabPage1
+ //
+ this.tabPage1.Controls.Add(this.dataGridView1);
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage1.Size = new System.Drawing.Size(978, 566);
+ this.tabPage1.TabIndex = 0;
+ this.tabPage1.Text = "氚 雿办澊韯";
+ this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // tabPage2
+ //
+ this.tabPage2.Controls.Add(this.dataGridView2);
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(978, 566);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "頂 雿办澊韯";
+ this.tabPage2.UseVisualStyleBackColor = true;
+ //
+ // tabPage3
+ //
+ this.tabPage3.Controls.Add(this.grid耄);
+ this.tabPage3.Location = new System.Drawing.Point(4, 22);
+ this.tabPage3.Name = "tabPage3";
+ this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage3.Size = new System.Drawing.Size(978, 566);
+ this.tabPage3.TabIndex = 2;
+ this.tabPage3.Text = "耄 雿办澊韯";
+ this.tabPage3.UseVisualStyleBackColor = true;
+ //
+ // grid耄
+ //
+ this.grid耄.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid耄.Location = new System.Drawing.Point(6, 6);
+ this.grid耄.Name = "grid耄";
+ this.grid耄.RowTemplate.Height = 23;
+ this.grid耄.Size = new System.Drawing.Size(966, 554);
+ this.grid耄.TabIndex = 2;
+ //
+ // tabPage4
+ //
+ this.tabPage4.Controls.Add(this.grid鞓る笇鞝濏姼韨);
+ this.tabPage4.Location = new System.Drawing.Point(4, 22);
+ this.tabPage4.Name = "tabPage4";
+ this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage4.Size = new System.Drawing.Size(978, 566);
+ this.tabPage4.TabIndex = 3;
+ this.tabPage4.Text = "毵 鞓る笇鞝濏姼 雸勳爜";
+ this.tabPage4.UseVisualStyleBackColor = true;
+ //
+ // grid鞓る笇鞝濏姼韨
+ //
+ this.grid鞓る笇鞝濏姼韨.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid鞓る笇鞝濏姼韨.Location = new System.Drawing.Point(14, 16);
+ this.grid鞓る笇鞝濏姼韨.Name = "grid鞓る笇鞝濏姼韨";
+ this.grid鞓る笇鞝濏姼韨.RowTemplate.Height = 23;
+ this.grid鞓る笇鞝濏姼韨.Size = new System.Drawing.Size(951, 534);
+ this.grid鞓る笇鞝濏姼韨.TabIndex = 5;
+ //
+ // tabPage5
+ //
+ this.tabPage5.Controls.Add(this.grid瓿摐須嶋摑靹犾垬);
+ this.tabPage5.Location = new System.Drawing.Point(4, 22);
+ this.tabPage5.Name = "tabPage5";
+ this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage5.Size = new System.Drawing.Size(978, 566);
+ this.tabPage5.TabIndex = 4;
+ this.tabPage5.Text = "雸勳爜瓿摐";
+ this.tabPage5.UseVisualStyleBackColor = true;
+ //
+ // grid瓿摐須嶋摑靹犾垬
+ //
+ this.grid瓿摐須嶋摑靹犾垬.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid瓿摐須嶋摑靹犾垬.Location = new System.Drawing.Point(18, 31);
+ this.grid瓿摐須嶋摑靹犾垬.Name = "grid瓿摐須嶋摑靹犾垬";
+ this.grid瓿摐須嶋摑靹犾垬.RowTemplate.Height = 23;
+ this.grid瓿摐須嶋摑靹犾垬.Size = new System.Drawing.Size(938, 529);
+ this.grid瓿摐須嶋摑靹犾垬.TabIndex = 0;
+ //
+ // tabPage6
+ //
+ this.tabPage6.Controls.Add(this.grid瓴巾棙旃橂爤氩);
+ this.tabPage6.Location = new System.Drawing.Point(4, 22);
+ this.tabPage6.Name = "tabPage6";
+ this.tabPage6.Size = new System.Drawing.Size(978, 566);
+ this.tabPage6.TabIndex = 5;
+ this.tabPage6.Text = "瓴巾棙旃橂焿";
+ this.tabPage6.UseVisualStyleBackColor = true;
+ //
+ // grid瓴巾棙旃橂爤氩
+ //
+ this.grid瓴巾棙旃橂爤氩.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid瓴巾棙旃橂爤氩.Location = new System.Drawing.Point(13, 14);
+ this.grid瓴巾棙旃橂爤氩.Name = "grid瓴巾棙旃橂爤氩";
+ this.grid瓴巾棙旃橂爤氩.RowTemplate.Height = 23;
+ this.grid瓴巾棙旃橂爤氩.Size = new System.Drawing.Size(951, 534);
+ this.grid瓴巾棙旃橂爤氩.TabIndex = 4;
+ //
+ // tabPage7
+ //
+ this.tabPage7.Controls.Add(this.grid雸勳爜雿半歆);
+ this.tabPage7.Location = new System.Drawing.Point(4, 22);
+ this.tabPage7.Name = "tabPage7";
+ this.tabPage7.Size = new System.Drawing.Size(978, 566);
+ this.tabPage7.TabIndex = 6;
+ this.tabPage7.Text = "雸勳爜雿半歆";
+ this.tabPage7.UseVisualStyleBackColor = true;
+ //
+ // grid雸勳爜雿半歆
+ //
+ this.grid雸勳爜雿半歆.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid雸勳爜雿半歆.Location = new System.Drawing.Point(3, 3);
+ this.grid雸勳爜雿半歆.Name = "grid雸勳爜雿半歆";
+ this.grid雸勳爜雿半歆.RowTemplate.Height = 23;
+ this.grid雸勳爜雿半歆.Size = new System.Drawing.Size(951, 534);
+ this.grid雸勳爜雿半歆.TabIndex = 3;
+ //
+ // tabPage8
+ //
+ this.tabPage8.Controls.Add(this.grid瓿摐彀);
+ this.tabPage8.Location = new System.Drawing.Point(4, 22);
+ this.tabPage8.Name = "tabPage8";
+ this.tabPage8.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage8.Size = new System.Drawing.Size(978, 566);
+ this.tabPage8.TabIndex = 7;
+ this.tabPage8.Text = "瓿摐彀犯霝橅攧鞖";
+ this.tabPage8.UseVisualStyleBackColor = true;
+ //
+ // grid瓿摐彀
+ //
+ this.grid瓿摐彀.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid瓿摐彀.Location = new System.Drawing.Point(14, 16);
+ this.grid瓿摐彀.Name = "grid瓿摐彀";
+ this.grid瓿摐彀.RowTemplate.Height = 23;
+ this.grid瓿摐彀.Size = new System.Drawing.Size(951, 534);
+ this.grid瓿摐彀.TabIndex = 4;
+ //
+ // tabPage9
+ //
+ this.tabPage9.Controls.Add(this.grid韮鞗);
+ this.tabPage9.Location = new System.Drawing.Point(4, 22);
+ this.tabPage9.Name = "tabPage9";
+ this.tabPage9.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage9.Size = new System.Drawing.Size(978, 566);
+ this.tabPage9.TabIndex = 8;
+ this.tabPage9.Text = "韮鞗岇矤瓯办爼氤";
+ this.tabPage9.UseVisualStyleBackColor = true;
+ //
+ // grid韮鞗
+ //
+ this.grid韮鞗.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid韮鞗.Location = new System.Drawing.Point(14, 16);
+ this.grid韮鞗.Name = "grid韮鞗";
+ this.grid韮鞗.RowTemplate.Height = 23;
+ this.grid韮鞗.Size = new System.Drawing.Size(951, 534);
+ this.grid韮鞗.TabIndex = 5;
+ //
+ // tabPage10
+ //
+ this.tabPage10.Controls.Add(this.grid鞖);
+ this.tabPage10.Location = new System.Drawing.Point(4, 22);
+ this.tabPage10.Name = "tabPage10";
+ this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage10.Size = new System.Drawing.Size(978, 566);
+ this.tabPage10.TabIndex = 9;
+ this.tabPage10.Text = "鞖╇Μ鞀ろ彴";
+ this.tabPage10.UseVisualStyleBackColor = true;
+ //
+ // grid鞖
+ //
+ this.grid鞖.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.grid鞖.Location = new System.Drawing.Point(14, 16);
+ this.grid鞖.Name = "grid鞖";
+ this.grid鞖.RowTemplate.Height = 23;
+ this.grid鞖.Size = new System.Drawing.Size(951, 534);
+ this.grid鞖.TabIndex = 6;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(1004, 414);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(254, 21);
+ this.textBox1.TabIndex = 3;
+ this.textBox1.Text = "ESPORTSTMNT06_1721053";
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(1004, 283);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(243, 40);
+ this.button2.TabIndex = 4;
+ this.button2.Text = "靹滊矂鞐瓣舶";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(1000, 256);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(254, 21);
+ this.textBox2.TabIndex = 3;
+ this.textBox2.Text = "127.0.0.1";
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(1000, 229);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(254, 21);
+ this.textBox3.TabIndex = 3;
+ this.textBox3.Text = "106032946468743415|game1";
+ //
+ // textBox4
+ //
+ this.textBox4.Location = new System.Drawing.Point(1000, 202);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.Size = new System.Drawing.Size(254, 21);
+ this.textBox4.TabIndex = 3;
+ this.textBox4.Text = "靹滊矂鞚橂嫷氤";
+ //
+ // textBox5
+ //
+ this.textBox5.Location = new System.Drawing.Point(1000, 175);
+ this.textBox5.Name = "textBox5";
+ this.textBox5.Size = new System.Drawing.Size(254, 21);
+ this.textBox5.TabIndex = 3;
+ this.textBox5.Text = "臧鞝胳槰氚╈牅";
+ //
+ // textBox6
+ //
+ this.textBox6.Location = new System.Drawing.Point(1004, 34);
+ this.textBox6.Name = "textBox6";
+ this.textBox6.Size = new System.Drawing.Size(254, 21);
+ this.textBox6.TabIndex = 3;
+ this.textBox6.Text = "0";
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(1004, 61);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(115, 56);
+ this.button3.TabIndex = 5;
+ this.button3.Text = "鞁滉硠鞁滌瀾";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(1143, 61);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(115, 55);
+ this.button4.TabIndex = 5;
+ this.button4.Text = "鞁滉硠氅堨钉";
+ this.button4.UseVisualStyleBackColor = true;
+ this.button4.Click += new System.EventHandler(this.button4_Click);
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(1067, 122);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(115, 46);
+ this.button5.TabIndex = 5;
+ this.button5.Text = "鞁滉硠鞁滉皠氤瓴";
+ this.button5.UseVisualStyleBackColor = true;
+ this.button5.Click += new System.EventHandler(this.button5_Click);
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(1005, 344);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(241, 43);
+ this.button6.TabIndex = 6;
+ this.button6.Text = "霐旊箘氤瓴";
+ this.button6.UseVisualStyleBackColor = true;
+ this.button6.Click += new System.EventHandler(this.button6_Click);
+ //
+ // btn頃滍儉霐滊焿鞁滌瀾
+ //
+ this.btn頃滍儉霐滊焿鞁滌瀾.Location = new System.Drawing.Point(1006, 444);
+ this.btn頃滍儉霐滊焿鞁滌瀾.Name = "btn頃滍儉霐滊焿鞁滌瀾";
+ this.btn頃滍儉霐滊焿鞁滌瀾.Size = new System.Drawing.Size(122, 61);
+ this.btn頃滍儉霐滊焿鞁滌瀾.TabIndex = 7;
+ this.btn頃滍儉霐滊焿鞁滌瀾.Text = "頃滍儉霐滊焿鞁滌瀾";
+ this.btn頃滍儉霐滊焿鞁滌瀾.UseVisualStyleBackColor = true;
+ this.btn頃滍儉霐滊焿鞁滌瀾.Click += new System.EventHandler(this.btn頃滍儉霐滊焿鞁滌瀾_Click);
+ //
+ // btn頃滍儉霐滊焿膦呺
+ //
+ this.btn頃滍儉霐滊焿膦呺.Location = new System.Drawing.Point(1136, 444);
+ this.btn頃滍儉霐滊焿膦呺.Name = "btn頃滍儉霐滊焿膦呺";
+ this.btn頃滍儉霐滊焿膦呺.Size = new System.Drawing.Size(122, 61);
+ this.btn頃滍儉霐滊焿膦呺.TabIndex = 7;
+ this.btn頃滍儉霐滊焿膦呺.Text = "頃滍儉霐滊焿膦呺";
+ this.btn頃滍儉霐滊焿膦呺.UseVisualStyleBackColor = true;
+ this.btn頃滍儉霐滊焿膦呺.Click += new System.EventHandler(this.btn頃滍儉霐滊焿膦呺_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1270, 616);
+ this.Controls.Add(this.btn頃滍儉霐滊焿膦呺);
+ this.Controls.Add(this.btn頃滍儉霐滊焿鞁滌瀾);
+ this.Controls.Add(this.button6);
+ this.Controls.Add(this.button5);
+ this.Controls.Add(this.button4);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.textBox3);
+ this.Controls.Add(this.textBox5);
+ this.Controls.Add(this.textBox4);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.textBox6);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.tabControl1);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
+ this.tabControl1.ResumeLayout(false);
+ this.tabPage1.ResumeLayout(false);
+ this.tabPage2.ResumeLayout(false);
+ this.tabPage3.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid耄)).EndInit();
+ this.tabPage4.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid鞓る笇鞝濏姼韨)).EndInit();
+ this.tabPage5.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid瓿摐須嶋摑靹犾垬)).EndInit();
+ this.tabPage6.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid瓴巾棙旃橂爤氩)).EndInit();
+ this.tabPage7.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid雸勳爜雿半歆)).EndInit();
+ this.tabPage8.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid瓿摐彀)).EndInit();
+ this.tabPage9.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid韮鞗)).EndInit();
+ this.tabPage10.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.grid鞖)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.DataGridView dataGridView1;
+ private System.Windows.Forms.DataGridView dataGridView2;
+ private System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.TabPage tabPage3;
+ private System.Windows.Forms.TabPage tabPage4;
+ private System.Windows.Forms.TabPage tabPage5;
+ private System.Windows.Forms.TabPage tabPage6;
+ private System.Windows.Forms.DataGridView grid瓿摐須嶋摑靹犾垬;
+ private System.Windows.Forms.TabPage tabPage7;
+ private System.Windows.Forms.DataGridView grid雸勳爜雿半歆;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.DataGridView grid瓴巾棙旃橂爤氩;
+ private System.Windows.Forms.DataGridView grid鞓る笇鞝濏姼韨;
+ private System.Windows.Forms.DataGridView grid耄;
+ private System.Windows.Forms.TabPage tabPage8;
+ private System.Windows.Forms.DataGridView grid瓿摐彀;
+ private System.Windows.Forms.TabPage tabPage9;
+ private System.Windows.Forms.DataGridView grid韮鞗;
+ private System.Windows.Forms.TabPage tabPage10;
+ private System.Windows.Forms.DataGridView grid鞖;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.TextBox textBox4;
+ private System.Windows.Forms.TextBox textBox5;
+ private System.Windows.Forms.TextBox textBox6;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.Button button6;
+ private System.Windows.Forms.Button btn頃滍儉霐滊焿鞁滌瀾;
+ private System.Windows.Forms.Button btn頃滍儉霐滊焿膦呺;
+ }
+}
+
diff --git a/lck_cl_data_solution/requestTestForm/Form1.cs b/lck_cl_data_solution/requestTestForm/Form1.cs
new file mode 100644
index 0000000..f34d014
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Form1.cs
@@ -0,0 +1,171 @@
+锘縰sing LolDataRequestLib;
+using MongoDB.Bson;
+using MongoDB.Bson.IO;
+using MongoDB.Bson.Serialization;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace requestTestForm
+{
+ public partial class Form1 : Form, IGameTimeEventDrop
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ public void errorReceivedByWorker(DBDefine.鞖旍箔雿办澊韯半秳毳 鞚奠厜靺橂倶鞓嵃鞚错劙攵勲, string 鞚奠厜靺橂偞鞖)
+ {
+ throw new NotImplementedException();
+ }
+
+
+ Timer mTimer = new Timer();
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+
+ DataManager.getInstance().setCallback(this);
+
+ DataManager.getInstance().IsupdateWorkersWork = true; ;
+
+ DataManager.getInstance().mPlatformGameID = textBox1.Text;
+
+ mTimer.Interval = 1000;
+
+ mTimer.Tick += dataTick;
+
+ mTimer.Start();
+
+
+ }
+
+ void dataTick(object d, EventArgs e)
+ {
+ dataGridView1.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙).Tables[0];
+
+ //20210531鞚措爣瓴 頃 靾橂弰 鞛堨姷雼堧嫟.
+ //dataGridView1.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙).Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙.GetStringValue()];
+
+ dataGridView2.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.頂诫嵃鞚错劙).Tables[0];
+ grid瓿摐須嶋摑靹犾垬.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.順勳灛瓿摐霟夓劆靾).Tables[0];
+ grid雸勳爜雿半歆.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.順勳灛雿半歆霟夓劆靾).Tables[0];
+ grid瓴巾棙旃橂爤氩.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.瓴巾棙旃橂爤氩).Tables[0];
+ grid耄.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.耄嵃鞚错劙).Tables[0];
+
+ ////氙胳檮靹
+ grid鞓る笇鞝濏姼韨.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨).Tables[0];
+ grid瓿摐彀.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.瓿摐彀澊韺).Tables[0];
+ //grid韮鞗.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岇矤瓯办爠觳).Tables[0];
+ ////grid鞖.DataSource = DataManager.getInstance().頃滍儉霐滊焿鞖旍箔(1, 200).Tables[0];
+ //grid鞖.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.鞖╇Μ鞀ろ彴).Tables[0];
+
+ ////20210611 頂岆爤鞚挫柎鞓る笇雿旉矊鞛勲秬攵
+ grid鞖.DataSource = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.鞖╇Μ鞀ろ彴).Tables[0];
+
+ ////20210611 頃滍儉霐滊焿 鞁滉皠氩旍渼 攵攵
+ /// 鞁滌瀾齑堦皜 0鞙茧 鞓る┐ null鞚 毽劥
+ //grid鞖.DataSource = DataManager.getInstance().頃滍儉霐滊焿鞖旍箔(1, 200).Tables[0];
+
+
+
+ ///20210531 瓴疥赴膦呺雿办澊韯半姅 鞚措爣瓴 頃橂倶鞌 霐办嫓氅 霅╇媹雼.
+ ///韨巸鞏挫嫓, 韮鞗岇矤瓯办爠觳, 鞓る笇鞝濏姼韨
+
+ DataSet 臧鞝胳槰雿办澊韯办厠 = DataManager.getInstance().霛检澊敫岆嵃鞚错劙鞖旍箔(DBDefine.鞖旍箔雿办澊韯半秳毳.瓴疥赴膦呺鞝曤炒);
+ //grid韮鞗.DataSource = 臧鞝胳槰雿办澊韯办厠.Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.瓴疥赴膦呺鞝曤炒.GetStringValue()];
+ //grid韮鞗.DataSource = 臧鞝胳槰雿办澊韯办厠.Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.韨巸鞏挫嫓.GetStringValue()];
+ //grid韮鞗.DataSource = 臧鞝胳槰雿办澊韯办厠.Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.韮鞗岇矤瓯办爠觳.GetStringValue()];
+ //grid鞖.DataSource = 臧鞝胳槰雿办澊韯办厠.Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.鞓る笇鞝濏姼韨.GetStringValue()];
+ //grid韮鞗.DataSource = 臧鞝胳槰雿办澊韯办厠.Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.氚措嵃鞚错劙.GetStringValue()];
+ //grid韮鞗.DataSource = 臧鞝胳槰雿办澊韯办厠.Tables[DBDefine.鞖旍箔雿办澊韯半秳毳.瓿摐彀澊韺.GetStringValue()];
+
+
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ //Console.WriteLine(DataManager.getInstance().requestServerForUpdate(textBox2.Text, textBox3.Text).ToString());
+
+ textBox4.Text = DataManager.getInstance().requestServerForUpdate(textBox2.Text, textBox3.Text, true).ToString();
+ textBox5.Text = DataManager.getInstance().mPlatformGameID;
+ }
+
+ public void 霌滊灅瓿るΜ鞀ろ彴鞁滉皠(string 鞖╈毳, int 雮潃鞁滉皠_雼渼_齑)
+ {
+ Console.WriteLine(鞖╈毳 + "----" + 雮潃鞁滉皠_雼渼_齑);
+ }
+
+ public void 鞓る笇鞝濏姼毽姢韽办嫓臧(string 鞓る笇鞝濏姼鞛§潃韺, string 鞓る笇鞝濏姼膦呺, int 瓴岇瀯鞁滉皠_雼渼_齑)
+ {
+ Console.WriteLine(鞓る笇鞝濏姼鞛§潃韺 + "++++" + 鞓る笇鞝濏姼膦呺 + "++++" + 瓴岇瀯鞁滉皠_雼渼_齑);
+ }
+
+ public void 鞏奠牅旮半Μ鞀ろ彴鞁滉皠(DataTable 韯办鞏奠牅旮办爼氤)
+ {
+ Console.WriteLine("鞏奠牅旮绊劙歆" + 韯办鞏奠牅旮办爼氤.Rows.Count);
+ }
+
+ public void 順勳灛瓴岇瀯鞁滉皠(int 齑)
+ {
+ this.Invoke(new MethodInvoker(() => { textBox6.Text = (齑 / 60).ToString() + " : " + (齑 % 60); }));
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+
+
+ DataManager.getInstance().setCallback(this);
+ DataManager.getInstance().timerStart();
+ }
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ DataManager.getInstance().timerStop();
+ }
+
+ private void button5_Click(object sender, EventArgs e)
+ {
+ DataManager.getInstance().setGameTime(Convert.ToInt32(textBox6.Text));
+ }
+
+ public void 鞓る笇鞝濏姼氩勴攧鞁滉皠(string 鞓る笇鞝濏姼鞛§潃韺, string 鞓る笇鞝濏姼膦呺, int 瓴岇瀯鞁滉皠_雼渼_齑, int 韺岇泴頂岆爤鞚)
+ {
+ ////20210611 韺岇泴頂岆爤鞚措秬攵
+ Console.WriteLine(鞓る笇鞝濏姼鞛§潃韺 + "_" + 鞓る笇鞝濏姼膦呺 + "_" + 瓴岇瀯鞁滉皠_雼渼_齑 + "_" + 韺岇泴頂岆爤鞚);
+ }
+
+ private void button6_Click(object sender, EventArgs e)
+ {
+ DataManager.getInstance().resetDBAddress(textBox6.Text);
+ }
+
+ public void 頃滍儉霐滊焿鞁れ嫓臧(DataTable 頃滍儉霐滊焿靹犾垬氤)
+ {
+
+ ////20210611 頃滍儉霐滊焿攵攵
+ Console.WriteLine("頃滍儉霐滊焿" + 頃滍儉霐滊焿靹犾垬氤.Rows.Count);
+ this.Invoke(new MethodInvoker(() => { grid鞖.DataSource = 頃滍儉霐滊焿靹犾垬氤; }));
+ }
+
+ private void btn頃滍儉霐滊焿鞁滌瀾_Click(object sender, EventArgs e)
+ {
+ DataManager.getInstance().齑堧嫻頃滍儉霐滊焿毽劥鞁滌瀾();
+ }
+
+ private void btn頃滍儉霐滊焿膦呺_Click(object sender, EventArgs e)
+ {
+ DataManager.getInstance().齑堧嫻頃滍儉霐滊焿毽劥膦呺();
+ }
+
+ }
+}
diff --git a/lck_cl_data_solution/requestTestForm/Form1.resx b/lck_cl_data_solution/requestTestForm/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Form1.resx
@@ -0,0 +1,120 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/requestTestForm/Program.cs b/lck_cl_data_solution/requestTestForm/Program.cs
new file mode 100644
index 0000000..cf12349
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Program.cs
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace requestTestForm
+{
+ static class Program
+ {
+ ///
+ /// 頃措嫻 鞚戩毄 頂勲攴鸽灗鞚 欤 歆勳瀰鞝愳瀰雼堧嫟.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/lck_cl_data_solution/requestTestForm/Properties/AssemblyInfo.cs b/lck_cl_data_solution/requestTestForm/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e8f237d
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鞏挫厛敫旊Μ鞐 雽頃 鞚茧皹 鞝曤炒電 雼れ潓 韸轨劚 歆戫暕鞚 韱淀暣
+// 鞝滌柎霅╇媹雼. 鞏挫厛敫旊Μ鞕 甏霠悳 鞝曤炒毳 靾橃爼頃橂牑氅
+// 鞚措煬頃 韸轨劚 臧掛潉 氤瓴巾晿靹胳殧.
+[assembly: AssemblyTitle("requestTestForm")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("requestTestForm")]
+[assembly: AssemblyCopyright("Copyright 漏 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible鞚 false搿 靹れ爼頃橂┐ 鞚 鞏挫厛敫旊Μ鞚 順曥嫕鞚 COM 甑劚 鞖旍唽鞐
+// 響滌嫓霅橃 鞎婌姷雼堧嫟. COM鞐愳劀 鞚 鞏挫厛敫旊Μ鞚 順曥嫕鞐 鞎§劯鞀ろ晿霠る┐
+// 頃措嫻 順曥嫕鞐 雽頃 ComVisible 韸轨劚鞚 true搿 靹れ爼頃橃劯鞖.
+[assembly: ComVisible(false)]
+
+// 鞚 頂勲鞝濏姼臧 COM鞐 雲胳稖霅橂姅 瓴届毎 雼れ潓 GUID電 typelib鞚 ID毳 雮橅儉雰呺媹雼.
+[assembly: Guid("0e32da7e-5b02-40c7-8f86-883271051cff")]
+
+// 鞏挫厛敫旊Μ鞚 氩勳爠 鞝曤炒電 雼れ潓 雱 臧歆 臧掛溂搿 甑劚霅╇媹雼.
+//
+// 欤 氩勳爠
+// 攵 氩勳爠
+// 牍岆摐 氩堩樃
+// 靾橃爼 氩勳爠
+//
+// 氇摖 臧掛潉 歆鞝曧晿瓯半倶 鞎勲灅鞕 臧欖澊 '*'毳 靷毄頃橃棳 牍岆摐 氩堩樃 氚 靾橃爼 氩堩樃臧 鞛愲彊鞙茧
+// 歆鞝曤悩霃勲 頃 靾 鞛堨姷雼堧嫟.
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/lck_cl_data_solution/requestTestForm/Properties/Resources.Designer.cs b/lck_cl_data_solution/requestTestForm/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..c37d8c5
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+锘//------------------------------------------------------------------------------
+//
+// 鞚 旖旊摐電 霃勱惮毳 靷毄頃橃棳 靸濎劚霅橃棃鞀惦媹雼.
+// 霟绊儉鞛 氩勳爠:4.0.30319.42000
+//
+// 韺岇澕 雮挫毄鞚 氤瓴巾晿氅 鞛橂霅 霃欖瀾鞚 氚滌儩頃 靾 鞛堨溂氅, 旖旊摐毳 雼れ嫓 靸濎劚頃橂┐
+// 鞚措煬頃 氤瓴 雮挫毄鞚 靻愳嫟霅╇媹雼.
+//
+//------------------------------------------------------------------------------
+
+namespace requestTestForm.Properties
+{
+
+
+ ///
+ /// 歆鞐檾霅 氍胳瀽鞐 霌膘潉 彀娟赴 鞙勴暅 臧曤牓頃 順曥嫕鞚 毽唽鞀 韥措灅鞀れ瀰雼堧嫟.
+ ///
+ // 鞚 韥措灅鞀る姅 ResGen 霕愲姅 Visual Studio鞕 臧欖潃 霃勱惮毳 韱淀暣 StronglyTypedResourceBuilder
+ // 韥措灅鞀れ棎靹 鞛愲彊鞙茧 靸濎劚霅橃棃鞀惦媹雼.
+ // 氅る矂毳 於旉皜頃橁卑雮 鞝滉卑頃橂牑氅 .ResX 韺岇澕鞚 韼胳頃 雼れ潓 /str 鞓奠厴鞚 靷毄頃橃棳
+ // ResGen鞚 雼れ嫓 鞁ろ枆頃橁卑雮 VS 頂勲鞝濏姼毳 雼れ嫓 牍岆摐頃橃嫮鞁滌槫.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 鞚 韥措灅鞀れ棎靹 靷毄頃橂姅 旌愳嫓霅 ResourceManager 鞚胳姢韯挫姢毳 氚橅櫂頃╇媹雼.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("requestTestForm.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 鞚 臧曤牓頃 順曥嫕鞚 毽唽鞀 韥措灅鞀るゼ 靷毄頃橃棳 氇摖 毽唽鞀 臁绊殞鞐 雽頃 順勳灛 鞀る爤霌滌潣 CurrentUICulture 靻嶌劚鞚
+ /// 鞛爼鞚橅暕雼堧嫟.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/lck_cl_data_solution/requestTestForm/Properties/Resources.resx b/lck_cl_data_solution/requestTestForm/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Properties/Resources.resx
@@ -0,0 +1,117 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/requestTestForm/Properties/Settings.Designer.cs b/lck_cl_data_solution/requestTestForm/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..c234d7e
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+锘//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace requestTestForm.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/lck_cl_data_solution/requestTestForm/Properties/Settings.settings b/lck_cl_data_solution/requestTestForm/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/Properties/Settings.settings
@@ -0,0 +1,7 @@
+锘
+
+
+
+
+
+
diff --git a/lck_cl_data_solution/requestTestForm/libmongocrypt.dylib b/lck_cl_data_solution/requestTestForm/libmongocrypt.dylib
new file mode 100644
index 0000000..91418d4
Binary files /dev/null and b/lck_cl_data_solution/requestTestForm/libmongocrypt.dylib differ
diff --git a/lck_cl_data_solution/requestTestForm/libmongocrypt.so b/lck_cl_data_solution/requestTestForm/libmongocrypt.so
new file mode 100644
index 0000000..2e6bae0
Binary files /dev/null and b/lck_cl_data_solution/requestTestForm/libmongocrypt.so differ
diff --git a/lck_cl_data_solution/requestTestForm/mongocrypt.dll b/lck_cl_data_solution/requestTestForm/mongocrypt.dll
new file mode 100644
index 0000000..39d7e01
Binary files /dev/null and b/lck_cl_data_solution/requestTestForm/mongocrypt.dll differ
diff --git a/lck_cl_data_solution/requestTestForm/packages.config b/lck_cl_data_solution/requestTestForm/packages.config
new file mode 100644
index 0000000..f9cdad4
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/packages.config
@@ -0,0 +1,19 @@
+锘
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/requestTestForm/requestTestForm.csproj b/lck_cl_data_solution/requestTestForm/requestTestForm.csproj
new file mode 100644
index 0000000..e83cc80
--- /dev/null
+++ b/lck_cl_data_solution/requestTestForm/requestTestForm.csproj
@@ -0,0 +1,173 @@
+锘
+
+
+
+ Debug
+ AnyCPU
+ {0E32DA7E-5B02-40C7-8F86-883271051CFF}
+ WinExe
+ requestTestForm
+ requestTestForm
+ v4.7.2
+ 512
+ true
+ true
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\DnsClient.1.4.0\lib\net471\DnsClient.dll
+
+
+ ..\packages\MongoDB.Bson.2.12.3\lib\net452\MongoDB.Bson.dll
+
+
+ ..\packages\MongoDB.Driver.2.12.3\lib\net452\MongoDB.Driver.dll
+
+
+ ..\packages\MongoDB.Driver.Core.2.12.3\lib\net452\MongoDB.Driver.Core.dll
+
+
+ ..\packages\MongoDB.Libmongocrypt.1.2.1\lib\net452\MongoDB.Libmongocrypt.dll
+
+
+ ..\packages\SharpCompress.0.23.0\lib\net45\SharpCompress.dll
+
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+
+
+ ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
+ True
+ True
+
+
+ ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {1923eb44-9e99-4198-8e08-008a98b7d673}
+ LolDataRequestLib
+
+
+
+
+
+
+ 鞚 頂勲鞝濏姼電 鞚 旎错摠韯办棎 鞐嗠姅 NuGet 韺偆歆毳 彀胳“頃╇媹雼. 頃措嫻 韺偆歆毳 雼れ毚搿滊摐頃橂牑氅 NuGet 韺偆歆 氤奠洂鞚 靷毄頃橃嫮鞁滌槫. 鞛愳劯頃 雮挫毄鞚 http://go.microsoft.com/fwlink/?LinkID=322105毳 彀胳“頃橃嫮鞁滌槫. 雸勲澖霅 韺岇澕鞚 {0}鞛呺媹雼.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/updateServer/App.config b/lck_cl_data_solution/updateServer/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/lck_cl_data_solution/updateServer/App.config
@@ -0,0 +1,6 @@
+锘
+
+
+
+
+
\ No newline at end of file
diff --git a/lck_cl_data_solution/updateServer/Core/Compression/Snappy/lib/win/snappy32.dll b/lck_cl_data_solution/updateServer/Core/Compression/Snappy/lib/win/snappy32.dll
new file mode 100644
index 0000000..afc82ca
Binary files /dev/null and b/lck_cl_data_solution/updateServer/Core/Compression/Snappy/lib/win/snappy32.dll differ
diff --git a/lck_cl_data_solution/updateServer/Core/Compression/Snappy/lib/win/snappy64.dll b/lck_cl_data_solution/updateServer/Core/Compression/Snappy/lib/win/snappy64.dll
new file mode 100644
index 0000000..36cd5fe
Binary files /dev/null and b/lck_cl_data_solution/updateServer/Core/Compression/Snappy/lib/win/snappy64.dll differ
diff --git a/lck_cl_data_solution/updateServer/Core/Compression/Zstandard/lib/win/libzstd.dll b/lck_cl_data_solution/updateServer/Core/Compression/Zstandard/lib/win/libzstd.dll
new file mode 100644
index 0000000..e669123
Binary files /dev/null and b/lck_cl_data_solution/updateServer/Core/Compression/Zstandard/lib/win/libzstd.dll differ
diff --git a/lck_cl_data_solution/updateServer/DEFINE.cs b/lck_cl_data_solution/updateServer/DEFINE.cs
new file mode 100644
index 0000000..45feaf2
--- /dev/null
+++ b/lck_cl_data_solution/updateServer/DEFINE.cs
@@ -0,0 +1,34 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace updateServer
+{
+ internal class DEFINE
+ {
+
+ //VSPN鞝戧芳韨
+ internal const string RIOT_API_KEY = "x-api-key:N1TFxzzmYk5E5sByoRNsi5ovhf2EjaCw7wx49wh2";
+
+ //WDG鞝戧芳韨
+ //internal const string RIOT_API_KEY = "x-api-key:oYiHmI77ur7tFl3joHh0z8onOVDnfiys3pezolAv";
+ //internal const string RIOT_API_KEY = "x-api-key:cqW7ayuV2o10P0g4F7HlXa9DALZRfAME4Pv1UjcN";
+
+ internal const string 霛检澊鞐嘷鞚措菠韸疙枆雿办澊韯癬REQUEST_URL = "https://raw-stats-api.ewp.gg/livestatsRaw/v1/platformGames/";
+
+ //internal const string 霛检澊鞐嘷瓴岇瀯毽姢韸竉REQUEST_URL = "https://raw-stats-api.ewp.gg/livestatsRaw/v1/platformGames?state=";
+ internal const string 霛检澊鞐嘷瓴岇瀯毽姢韸竉REQUEST_URL = "https://raw-stats-api.ewp.gg/livestatsRaw/v1/";
+
+ //internal const string 氇疥碃DB_鞝戩啀鞝曤炒 = "mongodb://root:veryhardpassword123@211.53.30.8:50003";
+ internal const string 氇疥碃DB_鞝戩啀鞝曤炒 = "mongodb://root:veryhardpassword123@127.0.0.1:50003";
+ //internal const string 氇疥碃DB_鞝戩啀鞝曤炒 = "mongodb://root:veryhardpassword123@211.42.188.8:50003";
+ //internal const string 氇疥碃DB_鞝戩啀鞝曤炒 = "mongodb://root:veryhardpassword123@203.251.148.27:50002";
+
+ internal const int 鞚措菠韸鸽鞖半嵃鞚错劙臧膘嫚欤缄赴ms = 1000;
+
+
+ }
+
+}
diff --git a/lck_cl_data_solution/updateServer/Form1.Designer.cs b/lck_cl_data_solution/updateServer/Form1.Designer.cs
new file mode 100644
index 0000000..48619d6
--- /dev/null
+++ b/lck_cl_data_solution/updateServer/Form1.Designer.cs
@@ -0,0 +1,270 @@
+锘縩amespace updateServer
+{
+ partial class Form1
+ {
+ ///
+ /// 頃勳垬 霐旍瀽鞚措剤 氤靾橃瀰雼堧嫟.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 靷毄 欷戩澑 氇摖 毽唽鞀るゼ 鞝曤Μ頃╇媹雼.
+ ///
+ /// 甏毽悩電 毽唽鞀るゼ 靷牅頃挫暭 頃橂┐ true鞚搓碃, 攴鸽爣歆 鞎婌溂氅 false鞛呺媹雼.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form 霐旍瀽鞚措剤鞐愳劀 靸濎劚頃 旖旊摐
+
+ ///
+ /// 霐旍瀽鞚措剤 歆鞗愳棎 頃勳殧頃 氅旍劀霌滌瀰雼堧嫟.
+ /// 鞚 氅旍劀霌滌潣 雮挫毄鞚 旖旊摐 韼胳旮半 靾橃爼頃橃 毵堨劯鞖.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.label5 = new System.Windows.Forms.Label();
+ this.button2 = new System.Windows.Forms.Button();
+ this.lstBoxUpdateGameList = new System.Windows.Forms.ListBox();
+ this.txbGameID = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.txbPlatformID = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.lbServerStatus = new System.Windows.Forms.Label();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.button5 = new System.Windows.Forms.Button();
+ this.btnExport = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ this.label4 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Font = new System.Drawing.Font("甑措", 20F);
+ this.button1.Location = new System.Drawing.Point(260, 99);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(262, 58);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "靹滊矂 旒滉赴";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Font = new System.Drawing.Font("甑措", 15F);
+ this.label5.Location = new System.Drawing.Point(38, 177);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(206, 20);
+ this.label5.TabIndex = 2;
+ this.label5.Text = "斓滉芳 鞖旍箔氚涭潃 瓴岇瀯 ID";
+ //
+ // button2
+ //
+ this.button2.Font = new System.Drawing.Font("甑措", 20F);
+ this.button2.Location = new System.Drawing.Point(260, 266);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(262, 123);
+ this.button2.TabIndex = 6;
+ this.button2.Text = "頂岆灚韽 鞎勳澊霐 鞐呺嵃鞚错姼 歆勴枆";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // lstBoxUpdateGameList
+ //
+ this.lstBoxUpdateGameList.FormattingEnabled = true;
+ this.lstBoxUpdateGameList.ItemHeight = 12;
+ this.lstBoxUpdateGameList.Location = new System.Drawing.Point(54, 33);
+ this.lstBoxUpdateGameList.Name = "lstBoxUpdateGameList";
+ this.lstBoxUpdateGameList.Size = new System.Drawing.Size(180, 124);
+ this.lstBoxUpdateGameList.TabIndex = 4;
+ //
+ // txbGameID
+ //
+ this.txbGameID.Font = new System.Drawing.Font("甑措", 15F);
+ this.txbGameID.Location = new System.Drawing.Point(250, 174);
+ this.txbGameID.Name = "txbGameID";
+ this.txbGameID.Size = new System.Drawing.Size(272, 30);
+ this.txbGameID.TabIndex = 7;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("甑措", 15F);
+ this.label1.Location = new System.Drawing.Point(25, 217);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(219, 20);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "斓滉芳臧鞝胳槫電 頂岆灚韽 ID";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("甑措", 15F);
+ this.label2.Location = new System.Drawing.Point(12, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(236, 20);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "鞐呺嵃鞚错姼欷戩澑 瓴疥赴毽姢韸";
+ //
+ // txbPlatformID
+ //
+ this.txbPlatformID.Font = new System.Drawing.Font("甑措", 15F);
+ this.txbPlatformID.Location = new System.Drawing.Point(250, 214);
+ this.txbPlatformID.Name = "txbPlatformID";
+ this.txbPlatformID.Size = new System.Drawing.Size(272, 30);
+ this.txbPlatformID.TabIndex = 7;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("甑措", 15F);
+ this.label3.Location = new System.Drawing.Point(330, 9);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(89, 20);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "靹滊矂靸來儨";
+ //
+ // lbServerStatus
+ //
+ this.lbServerStatus.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
+ this.lbServerStatus.Font = new System.Drawing.Font("甑措", 20F);
+ this.lbServerStatus.ForeColor = System.Drawing.SystemColors.ControlLightLight;
+ this.lbServerStatus.Location = new System.Drawing.Point(269, 33);
+ this.lbServerStatus.Name = "lbServerStatus";
+ this.lbServerStatus.Size = new System.Drawing.Size(244, 51);
+ this.lbServerStatus.TabIndex = 8;
+ this.lbServerStatus.Text = "STOP";
+ this.lbServerStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // listBox1
+ //
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.ItemHeight = 12;
+ this.listBox1.Location = new System.Drawing.Point(542, 56);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(428, 316);
+ this.listBox1.TabIndex = 4;
+ this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(756, 12);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(214, 38);
+ this.button3.TabIndex = 9;
+ this.button3.Text = "歆勴枆欷戩澑 瓴疥赴氇╇ 臧鞝胳槫旮";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(542, 12);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(208, 38);
+ this.button4.TabIndex = 9;
+ this.button4.Text = "韰岇姢韸戈步旮 氇╇ 臧鞝胳槫旮";
+ this.button4.UseVisualStyleBackColor = true;
+ this.button4.Click += new System.EventHandler(this.button4_Click);
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(12, 326);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(65, 46);
+ this.button5.TabIndex = 10;
+ this.button5.Text = "瓿缄卑鞛愲氚╇Μ鞀ろ姼鞐呺嵃鞚错姼";
+ this.button5.UseVisualStyleBackColor = true;
+ this.button5.Click += new System.EventHandler(this.button5_Click);
+ //
+ // btnExport
+ //
+ this.btnExport.Location = new System.Drawing.Point(120, 266);
+ this.btnExport.Name = "btnExport";
+ this.btnExport.Size = new System.Drawing.Size(117, 54);
+ this.btnExport.TabIndex = 11;
+ this.btnExport.Text = "雿办澊韯半氨鞐";
+ this.btnExport.UseVisualStyleBackColor = true;
+ this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(85, 326);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(152, 45);
+ this.button6.TabIndex = 12;
+ this.button6.Text = "雿办澊韯办磮旮绊檾";
+ this.button6.UseVisualStyleBackColor = true;
+ this.button6.Click += new System.EventHandler(this.button6_Click);
+ //
+ // label4
+ //
+ this.label4.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
+ this.label4.Font = new System.Drawing.Font("甑措", 20F);
+ this.label4.ForeColor = System.Drawing.SystemColors.ControlLightLight;
+ this.label4.Location = new System.Drawing.Point(12, 266);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(102, 51);
+ this.label4.TabIndex = 8;
+ this.label4.Text = "0/0";
+ this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(982, 401);
+ this.Controls.Add(this.button6);
+ this.Controls.Add(this.btnExport);
+ this.Controls.Add(this.button5);
+ this.Controls.Add(this.button4);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.lbServerStatus);
+ this.Controls.Add(this.txbPlatformID);
+ this.Controls.Add(this.txbGameID);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.listBox1);
+ this.Controls.Add(this.lstBoxUpdateGameList);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "LCK CL 鞐呺嵃鞚错姼靹滊矂 250525 - WDG";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ public System.Windows.Forms.Button button1;
+ public System.Windows.Forms.ListBox lstBoxUpdateGameList;
+ public System.Windows.Forms.TextBox txbGameID;
+ public System.Windows.Forms.TextBox txbPlatformID;
+ public System.Windows.Forms.Label lbServerStatus;
+ public System.Windows.Forms.ListBox listBox1;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.Button btnExport;
+ private System.Windows.Forms.Button button6;
+ public System.Windows.Forms.Label label4;
+ }
+}
+
diff --git a/lck_cl_data_solution/updateServer/Form1.cs b/lck_cl_data_solution/updateServer/Form1.cs
new file mode 100644
index 0000000..eae1b99
--- /dev/null
+++ b/lck_cl_data_solution/updateServer/Form1.cs
@@ -0,0 +1,247 @@
+锘縰sing MongoDB.Bson;
+using MongoDB.Bson.IO;
+using MongoDB.Bson.Serialization;
+using MongoDB.Driver;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace updateServer
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+
+ NetManager manager = new NetManager();
+
+ manager.start();
+
+
+ UpdateManager.getInstance().init();
+ ///ESPORTSTMNT06_1730991韥雲
+ //UpdateManager.getInstance().startUpdateEventRaw("ESPORTSTMNT02_1921265", false);
+
+
+ //UpdateManager.getInstance().GameListUpdateWorker(true);
+
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ UpdateManager.getInstance().startUpdateEventRaw(txbPlatformID.Text, false);
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ UpdateManager.getInstance().GameListUpdateWorker(false);
+ }
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ UpdateManager.getInstance().GameListUpdateWorker(true);
+ //UpdateManager.getInstance().startUpdateEventRaw("ESPORTSTMNT06_1721059", false);
+ //UpdateManager.getInstance().finishGameListUpdateWorker();
+ }
+
+ private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (listBox1.SelectedItems.Count < 1) return;
+
+ string[] selectedItem = listBox1.SelectedItems[0].ToString().Split('_');
+
+ txbGameID.Text = selectedItem.Last();
+ txbPlatformID.Text = selectedItem[0] + "_" + selectedItem[1];
+
+ UpdateManager.getInstance().GameKey = txbGameID.Text;
+ UpdateManager.getInstance().GameName = txbPlatformID.Text;
+ }
+
+ public void removeWorkerList()
+ {
+ /*
+ List items = new List();
+
+ foreach (string s in UpdateManager.getInstance().mUpdateWorkerTable.Keys)
+ items.Add(s);
+
+
+
+ foreach (string s in items)
+ {
+ MessageBox.Show("!!" + s);
+ UpdateManager.getInstance().mUpdateWorkerTable.Remove(s);
+ }
+ */
+ }
+
+ public void updateWorkerList()
+ {
+ this.Invoke(new MethodInvoker(() => {
+ lstBoxUpdateGameList.Items.Clear();
+ foreach (string item in UpdateManager.getInstance().mUpdateWorkerTable.Keys)
+ {
+ lstBoxUpdateGameList.Items.Add(item);
+ }
+ }));
+ }
+
+ public void Msg()
+ {
+ //MessageBox.Show("!!");
+ }
+
+ public void updateGameRoomList(List recvData)
+ {
+ this.Invoke(new MethodInvoker(() => {
+ listBox1.Items.Clear();
+ foreach (string item in recvData)
+ {
+ listBox1.Items.Add(item);
+ }
+
+ }));
+ }
+
+ private void button5_Click(object sender, EventArgs e)
+ {
+ UpdateManager.getInstance().finishGameListUpdateWorker();
+ }
+
+
+
+ async void exportDB()
+ {
+ string basicfileName = DateTime.Now.Date.ToString("yyyyMMdd"); // initialize to the output file
+ MongoClient dd = new MongoClient(DEFINE.氇疥碃DB_鞝戩啀鞝曤炒);
+
+ List collectionNames = dd.GetDatabase("datalol").ListCollectionNames().ToList();
+
+
+ int endedTask = 0;
+
+ this.Invoke(new MethodInvoker(() => label4.Text = endedTask + "/" + collectionNames.Count().ToString()));
+
+ DirectoryInfo di = new DirectoryInfo(@"c:\lol_db_backup\" + basicfileName);
+
+ if (!di.Exists)
+ {
+ di.Create();
+ }
+
+ foreach (string item in collectionNames)
+ {
+ IMongoCollection collection = dd.GetDatabase("datalol").GetCollection(item); // initialize to the collection to read from
+
+ using (var streamWriter = new StreamWriter(@"c:\lol_db_backup\" + basicfileName + @"\" + item + ".json"))
+ {
+ await collection.Find(new BsonDocument())
+ .ForEachAsync(async (document) =>
+ {
+ using (var stringWriter = new StringWriter())
+ using (var jsonWriter = new JsonWriter(stringWriter))
+ {
+ var context = MongoDB.Bson.Serialization.BsonSerializationContext.CreateRoot(jsonWriter);
+ collection.DocumentSerializer.Serialize(context, document);
+ var line = stringWriter.ToString();
+ await streamWriter.WriteLineAsync(line);
+ }
+
+ }
+
+
+ );
+
+
+ endedTask += 1;
+
+ this.Invoke(new MethodInvoker(() => label4.Text = endedTask + "/" + collectionNames.Count().ToString()));
+
+
+ }
+ }
+
+ }
+
+ async void importDB()
+ {
+ //MongoClient dd = new MongoClient(DEFINE.氇疥碃DB_鞝戩啀鞝曤炒);
+ MongoClient dd = new MongoClient("mongodb://root:veryhardpassword123@211.42.188.8:50003");
+ List collectionNames = dd.GetDatabase("datalol").ListCollectionNames().ToList();
+
+ //List collectionNames = new List();
+
+ //collectionNames.Remove("building_destroyed");
+ //collectionNames.Add("game_end");
+ //collectionNames.Add("game_info");
+
+ string basicfileName = DateTime.Now.Date.ToString("yyyyMMdd");
+
+ foreach (var item in collectionNames)
+ {
+
+ //IMongoCollection collection = dd.GetDatabase("data_lol_test_seed").GetCollection(item);
+ IMongoCollection collection = dd.GetDatabase("datalol").GetCollection