mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-04-21 19:49:36 +08:00
升级更新的Core.dll
This commit is contained in:
parent
2af64cec96
commit
eee6377dc4
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="FunGame.Core">
|
<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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ApplicationIcon>Images\logo.ico</ApplicationIcon>
|
<ApplicationIcon>logo.ico</ApplicationIcon>
|
||||||
<PackageIcon>logo.ico</PackageIcon>
|
<PackageIcon>logo.ico</PackageIcon>
|
||||||
<BaseOutputPath>C:\milimoe\FunGame\bin\Server</BaseOutputPath>
|
<BaseOutputPath>C:\milimoe\FunGame\bin\Server</BaseOutputPath>
|
||||||
<Title>FunGameServer</Title>
|
<Title>FunGameServer</Title>
|
||||||
@ -26,12 +26,12 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Images\logo.ico" />
|
<Content Include="logo.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="FunGame.Core">
|
<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>
|
||||||
<Reference Include="MySql.Data">
|
<Reference Include="MySql.Data">
|
||||||
<HintPath>..\..\FunGame\bin\Server\Debug\net6.0\MySql.Data.dll</HintPath>
|
<HintPath>..\..\FunGame\bin\Server\Debug\net6.0\MySql.Data.dll</HintPath>
|
||||||
|
@ -6,12 +6,12 @@ using System;
|
|||||||
using System.Net.WebSockets;
|
using System.Net.WebSockets;
|
||||||
using Milimoe.FunGame.Server.Others;
|
using Milimoe.FunGame.Server.Others;
|
||||||
using Milimoe.FunGame.Server.Utility;
|
using Milimoe.FunGame.Server.Utility;
|
||||||
using Milimoe.FunGame.Core.Entity.Enum;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
using Milimoe.FunGame.Core.Api.Utility;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
using FunGame.Server.Model;
|
using FunGame.Server.Model;
|
||||||
|
|
||||||
Console.Title = Config.SERVER_NAME;
|
Console.Title = Config.SERVER_NAME;
|
||||||
Console.WriteLine(FunGameEnums.GetInfo(Config.FunGameType));
|
Console.WriteLine(FunGameEnum.GetInfo(Config.FunGameType));
|
||||||
|
|
||||||
bool Running = true;
|
bool Running = true;
|
||||||
Socket? ServerSocket = null;
|
Socket? ServerSocket = null;
|
||||||
@ -184,7 +184,7 @@ bool Send(Socket socket, string name)
|
|||||||
// 发送消息给客户端
|
// 发送消息给客户端
|
||||||
string msg = Config.SERVER_NAME + ";" + Config.SERVER_NOTICE;
|
string msg = Config.SERVER_NAME + ";" + Config.SERVER_NOTICE;
|
||||||
byte[] buffer = new byte[2048];
|
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)
|
if (socket.Send(buffer) > 0)
|
||||||
{
|
{
|
||||||
ServerHelper.WriteLine(SocketHelper.MakeClientName(name) + " <- " + "已确认连接");
|
ServerHelper.WriteLine(SocketHelper.MakeClientName(name) + " <- " + "已确认连接");
|
||||||
|
@ -10,10 +10,10 @@ using System.Reflection.Metadata;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using MySqlX.XDevAPI.Common;
|
using MySqlX.XDevAPI.Common;
|
||||||
using Milimoe.FunGame.Server.Utility;
|
using Milimoe.FunGame.Server.Utility;
|
||||||
using Milimoe.FunGame.Core.Entity.General;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
using Milimoe.FunGame.Core.Entity.Enum;
|
|
||||||
using Milimoe.FunGame.Core.Api.Utility;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
using Milimoe.FunGame.Server.Others;
|
using Milimoe.FunGame.Server.Others;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
|
||||||
namespace FunGame.Server.Model
|
namespace FunGame.Server.Model
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ namespace FunGame.Server.Model
|
|||||||
break;
|
break;
|
||||||
case (int)SocketMessageType.CheckLogin:
|
case (int)SocketMessageType.CheckLogin:
|
||||||
// 添加至玩家列表
|
// 添加至玩家列表
|
||||||
User = new User(msg);
|
User = (User)Factory.New<User>(msg);
|
||||||
msg = " >> 欢迎回来, " + msg + " 。";
|
msg = " >> 欢迎回来, " + msg + " 。";
|
||||||
AddUser();
|
AddUser();
|
||||||
ServerHelper.WriteLine("目前在线玩家数量: " + Config.OnlinePlayers.Count);
|
ServerHelper.WriteLine("目前在线玩家数量: " + Config.OnlinePlayers.Count);
|
||||||
|
@ -7,7 +7,7 @@ using System.Net.Sockets;
|
|||||||
using System.Reflection.Metadata;
|
using System.Reflection.Metadata;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Milimoe.FunGame.Core.Entity.Enum;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
using Milimoe.FunGame.Core.Api.Utility;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Server.Others
|
namespace Milimoe.FunGame.Server.Others
|
||||||
@ -26,10 +26,9 @@ namespace Milimoe.FunGame.Server.Others
|
|||||||
public static int ONLINE_PLAYERS = 0; // 已连接的玩家数量
|
public static int ONLINE_PLAYERS = 0; // 已连接的玩家数量
|
||||||
public static int CONNECTING_PLAYERS = 0; // 正在连接的玩家数量
|
public static int CONNECTING_PLAYERS = 0; // 正在连接的玩家数量
|
||||||
public static Encoding DEFAULT_ENCODING = Encoding.UTF8; // 默认传输字符集
|
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 Hashtable OrderList = new();
|
||||||
public static ReflectionHelper ReflectionHelper = new();
|
|
||||||
|
|
||||||
public static Hashtable OnlineClients = new Hashtable();
|
public static Hashtable OnlineClients = new Hashtable();
|
||||||
|
|
||||||
|
@ -6,18 +6,12 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
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.Core.Api.Utility;
|
||||||
using Milimoe.FunGame.Server.Others;
|
using Milimoe.FunGame.Server.Others;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Server.Utility
|
namespace Milimoe.FunGame.Server.Utility
|
||||||
{
|
{
|
||||||
public class Utility : FunGame.Core.Api.Utility.Utility
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DataHelper
|
public class DataHelper
|
||||||
{
|
{
|
||||||
private static MySqlConnection? msc = null;
|
private static MySqlConnection? msc = null;
|
||||||
|
BIN
FunGame.Server/logo.ico
Normal file
BIN
FunGame.Server/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Loading…
x
Reference in New Issue
Block a user