mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-04-23 04:29:38 +08:00
添加MatchRoom框架
This commit is contained in:
parent
77f9422e77
commit
1b4f3ec912
@ -75,5 +75,10 @@ namespace Milimoe.FunGame.Server.Controllers
|
||||
// 添加人机验证或频繁验证等
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Check2FA(string username, string code, out string msg)
|
||||
{
|
||||
return Login2FA.Authenticate(username, code, out msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,25 @@ namespace Milimoe.FunGame.Server.Controller
|
||||
ResultData.Add("result", result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 匹配房间
|
||||
/// </summary>
|
||||
/// <param name="RequestData"></param>
|
||||
/// <param name="ResultData"></param>
|
||||
private void MatchRoom(Hashtable RequestData, Hashtable ResultData)
|
||||
{
|
||||
bool result = false;
|
||||
string roomid = "-1";
|
||||
if (RequestData.Count >= 1)
|
||||
{
|
||||
ServerHelper.WriteLine("[" + ServerSocket.GetTypeString(SocketMessageType.DataRequest) + "] " + Server.GetClientName() + " -> MatchRoom");
|
||||
string roomtype_string = DataRequest.GetHashtableJsonObject<string>(RequestData, "roomtype") ?? GameMode.All;
|
||||
User user = DataRequest.GetHashtableJsonObject<User>(RequestData, "master") ?? Factory.GetUser();
|
||||
}
|
||||
ResultData.Add("result", result);
|
||||
ResultData.Add("roomid", roomid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送聊天消息
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user