升级更新的Core.dll

This commit is contained in:
Mili 2022-11-20 01:29:56 +08:00
parent 2af64cec96
commit eee6377dc4
7 changed files with 13 additions and 20 deletions

View File

@ -24,7 +24,7 @@
<ItemGroup>
<Reference Include="FunGame.Core">
<HintPath>..\..\FunGame\bin\Server\Debug\net6.0\FunGame.Core.dll</HintPath>
<HintPath>..\..\FunGame\bin\Server\Debug\net7.0\FunGame.Core.dll</HintPath>
</Reference>
</ItemGroup>

View File

@ -5,7 +5,7 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ApplicationIcon>Images\logo.ico</ApplicationIcon>
<ApplicationIcon>logo.ico</ApplicationIcon>
<PackageIcon>logo.ico</PackageIcon>
<BaseOutputPath>C:\milimoe\FunGame\bin\Server</BaseOutputPath>
<Title>FunGameServer</Title>
@ -26,12 +26,12 @@
</PropertyGroup>
<ItemGroup>
<Content Include="Images\logo.ico" />
<Content Include="logo.ico" />
</ItemGroup>
<ItemGroup>
<Reference Include="FunGame.Core">
<HintPath>..\..\FunGame\bin\Server\Debug\net6.0\FunGame.Core.dll</HintPath>
<HintPath>..\..\FunGame\bin\Server\Debug\net7.0\FunGame.Core.dll</HintPath>
</Reference>
<Reference Include="MySql.Data">
<HintPath>..\..\FunGame\bin\Server\Debug\net6.0\MySql.Data.dll</HintPath>

View File

@ -6,12 +6,12 @@ using System;
using System.Net.WebSockets;
using Milimoe.FunGame.Server.Others;
using Milimoe.FunGame.Server.Utility;
using Milimoe.FunGame.Core.Entity.Enum;
using Milimoe.FunGame.Core.Library.Constant;
using Milimoe.FunGame.Core.Api.Utility;
using FunGame.Server.Model;
Console.Title = Config.SERVER_NAME;
Console.WriteLine(FunGameEnums.GetInfo(Config.FunGameType));
Console.WriteLine(FunGameEnum.GetInfo(Config.FunGameType));
bool Running = true;
Socket? ServerSocket = null;
@ -184,7 +184,7 @@ bool Send(Socket socket, string name)
// 发送消息给客户端
string msg = Config.SERVER_NAME + ";" + Config.SERVER_NOTICE;
byte[] buffer = new byte[2048];
buffer = Config.DEFAULT_ENCODING.GetBytes(SocketHelper.MakeMessage((int)SocketMessageType.GetNotice, msg));
buffer = Config.DEFAULT_ENCODING.GetBytes($"1;{msg}");
if (socket.Send(buffer) > 0)
{
ServerHelper.WriteLine(SocketHelper.MakeClientName(name) + " <- " + "已确认连接");

View File

@ -10,10 +10,10 @@ using System.Reflection.Metadata;
using System.Net;
using MySqlX.XDevAPI.Common;
using Milimoe.FunGame.Server.Utility;
using Milimoe.FunGame.Core.Entity.General;
using Milimoe.FunGame.Core.Entity.Enum;
using Milimoe.FunGame.Core.Library.Constant;
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Server.Others;
using Milimoe.FunGame.Core.Entity;
namespace FunGame.Server.Model
{
@ -63,7 +63,7 @@ namespace FunGame.Server.Model
break;
case (int)SocketMessageType.CheckLogin:
// 添加至玩家列表
User = new User(msg);
User = (User)Factory.New<User>(msg);
msg = " >> 欢迎回来, " + msg + " 。";
AddUser();
ServerHelper.WriteLine("目前在线玩家数量: " + Config.OnlinePlayers.Count);

View File

@ -7,7 +7,7 @@ using System.Net.Sockets;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using Milimoe.FunGame.Core.Entity.Enum;
using Milimoe.FunGame.Core.Library.Constant;
using Milimoe.FunGame.Core.Api.Utility;
namespace Milimoe.FunGame.Server.Others
@ -26,10 +26,9 @@ namespace Milimoe.FunGame.Server.Others
public static int ONLINE_PLAYERS = 0; // 已连接的玩家数量
public static int CONNECTING_PLAYERS = 0; // 正在连接的玩家数量
public static Encoding DEFAULT_ENCODING = Encoding.UTF8; // 默认传输字符集
public static FunGameEnums.FunGame FunGameType = FunGameEnums.FunGame.FunGame_Server;
public static FunGameEnum.FunGame FunGameType = FunGameEnum.FunGame.FunGame_Server;
public static Hashtable OrderList = new();
public static ReflectionHelper ReflectionHelper = new();
public static Hashtable OnlineClients = new Hashtable();

View File

@ -6,18 +6,12 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Milimoe.FunGame.Core.Entity.General;
using Milimoe.FunGame.Core.Entity.Enum;
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Server.Others;
using Milimoe.FunGame.Core.Entity;
namespace Milimoe.FunGame.Server.Utility
{
public class Utility : FunGame.Core.Api.Utility.Utility
{
}
public class DataHelper
{
private static MySqlConnection? msc = null;

BIN
FunGame.Server/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB