mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-23 20:39:36 +08:00
更新测试项目引用;更新匿名服务器的逻辑
This commit is contained in:
parent
09ecda02be
commit
85c0651056
@ -113,10 +113,15 @@ namespace Oshima.FunGame.OshimaServers
|
|||||||
Dictionary<string, object> result = [];
|
Dictionary<string, object> result = [];
|
||||||
Controller.WriteLine("接收匿名服务器消息", LogLevel.Debug);
|
Controller.WriteLine("接收匿名服务器消息", LogLevel.Debug);
|
||||||
|
|
||||||
// 根据服务器和客户端的数据传输约定,自行处理 data,并返回。
|
long groupid = NetworkUtility.JsonDeserializeFromDictionary<long>(data, "groupid");
|
||||||
|
if (groupid > 0)
|
||||||
|
{
|
||||||
|
result["groupid"] = groupid;
|
||||||
|
}
|
||||||
string msg = "";
|
string msg = "";
|
||||||
if (data.Count > 0)
|
if (data.Count > 0)
|
||||||
{
|
{
|
||||||
|
// 根据服务器和客户端的数据传输约定,自行处理 data,并返回。
|
||||||
string command = NetworkUtility.JsonDeserializeFromDictionary<string>(data, "command") ?? "";
|
string command = NetworkUtility.JsonDeserializeFromDictionary<string>(data, "command") ?? "";
|
||||||
switch (command.Trim().ToLower())
|
switch (command.Trim().ToLower())
|
||||||
{
|
{
|
||||||
@ -136,7 +141,7 @@ namespace Oshima.FunGame.OshimaServers
|
|||||||
}
|
}
|
||||||
if (msg.Trim() != "")
|
if (msg.Trim() != "")
|
||||||
{
|
{
|
||||||
result.Add("msg", msg);
|
result["msg"] = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -198,7 +203,7 @@ namespace Oshima.FunGame.OshimaServers
|
|||||||
|
|
||||||
public string SCList()
|
public string SCList()
|
||||||
{
|
{
|
||||||
string result = "☆--- OSMTV 圣人排行榜 TOP10 ---☆\r\n统计时间:" + DateTime.Now.ToString(General.GeneralDateTimeFormatChinese);
|
string result = $"☆--- OSMTV 圣人排行榜 TOP10 ---☆\r\n统计时间:{DateTime.Now.ToString(General.GeneralDateTimeFormatChinese)}\r\n";
|
||||||
|
|
||||||
SQLHelper? sql = Controller.SQLHelper;
|
SQLHelper? sql = Controller.SQLHelper;
|
||||||
if (sql != null)
|
if (sql != null)
|
||||||
@ -214,7 +219,8 @@ namespace Oshima.FunGame.OshimaServers
|
|||||||
if (count > 10) break;
|
if (count > 10) break;
|
||||||
long qq = Convert.ToInt64(dr["qq"]);
|
long qq = Convert.ToInt64(dr["qq"]);
|
||||||
double sc = Convert.ToDouble(dr["sc"]);
|
double sc = Convert.ToDouble(dr["sc"]);
|
||||||
result += $"{count}. 用户:{qq},圣人点数:{sc} 分\r\n";
|
string remark = Convert.ToString(dr["remark"]) ?? "";
|
||||||
|
result += $"{count}. 用户:{qq},圣人点数:{sc} 分{(remark.Trim() != "" ? $" ({remark})" : "")}\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user