6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
32 lines
716 B
C#
32 lines
716 B
C#
using System;
|
|
using System.ComponentModel;
|
|
using Server.Core;
|
|
|
|
namespace NetWorkMessage
|
|
{
|
|
|
|
public abstract class ProtoObject : ISupportInitialize,ICloneable
|
|
{
|
|
public object Clone()
|
|
{
|
|
byte[] bytes = MessagePackHelper.Serialize(this);
|
|
return MessagePackHelper.Deserialize(this.GetType(), bytes);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 序列化之前的初始化
|
|
/// </summary>
|
|
public virtual void BeginInit()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 反序列化之前的初始化
|
|
/// </summary>
|
|
public virtual void EndInit()
|
|
{
|
|
|
|
}
|
|
}
|
|
} |