diff --git a/FunGame.Core/Library/SQLScript/Entity/User.cs b/FunGame.Core/Library/SQLScript/Entity/User.cs index c1c0207..94615a2 100644 --- a/FunGame.Core/Library/SQLScript/Entity/User.cs +++ b/FunGame.Core/Library/SQLScript/Entity/User.cs @@ -41,19 +41,24 @@ return $"{Select_Users} {Constant.Command_Where} {Where}'"; } + public static string Select_CheckAutoKey(string Username, string AutoKey) + { + return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_AutoKey} = '{AutoKey}'"; + } + public static string Update_CheckLogin(string Username, string IP) { return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_LastTime} = '{DateTime.Now}', {Column_LastIP} = '{IP}' {Constant.Command_Where} {Column_Username} = '{Username}'"; } + + public static string Update_GameTime(string Username, int GameTimeMinutes) + { + return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_GameTime} = {Column_GameTime} + {GameTimeMinutes} {Constant.Command_Where} {Column_Username} = '{Username}'"; + } public static string Insert_Register(string Username, string Password, string Email) { return $"{Constant.Command_Insert} {Constant.Command_Into} {TableName} ({Column_Username}, {Column_Password}, {Column_Email}, {Column_RegTime}) {Constant.Command_Values} ('{Username}', '{Password}', '{Email}', '{DateTime.Now}')"; } - - public static string Select_CheckAutoKey(string Username, string AutoKey) - { - return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_AutoKey} = '{AutoKey}'"; - } } } diff --git a/FunGame.Desktop/UI/Main/Main.cs b/FunGame.Desktop/UI/Main/Main.cs index 9143f7f..31d4486 100644 --- a/FunGame.Desktop/UI/Main/Main.cs +++ b/FunGame.Desktop/UI/Main/Main.cs @@ -675,7 +675,7 @@ namespace Milimoe.FunGame.Desktop.UI WritelnGameInfo(msg); if (Usercfg.LoginUser != null && !SwitchTalkMessage(text)) { - MainController?.Chat(msg); + MainController?.Chat(" [ " + Usercfg.LoginUserName + " ] 说: " + text); } TalkText.Text = ""; if (isLeave) TalkText_Leave(); // 回车不离开焦点