协议提交
This commit is contained in:
@@ -3,24 +3,26 @@ using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace NB.Chat;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 聊天频道实体
|
||||
/// </summary>
|
||||
public class ChatChannel : Entity
|
||||
{
|
||||
[BsonElement("type")] public uint ChannelType;
|
||||
|
||||
/// <summary>
|
||||
/// 频道Id
|
||||
/// 频道类型 0.地图 1.公开 2.私密
|
||||
/// </summary>
|
||||
[BsonElement("cid")] public long ChannelId;
|
||||
[BsonElement("type")] public uint ChannelType;
|
||||
|
||||
/// <summary>
|
||||
/// 频道名称
|
||||
/// </summary>
|
||||
[BsonElement("name")] public string Name = "";
|
||||
|
||||
/// <summary>
|
||||
/// 频道密码
|
||||
/// </summary>
|
||||
[BsonElement("pass")] public string Password = "";
|
||||
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
/// </summary>
|
||||
@@ -32,9 +34,12 @@ public class ChatChannel : Entity
|
||||
[BsonElement("ct")] public long CreateTime;
|
||||
|
||||
/// <summary>
|
||||
/// 频道地区
|
||||
/// 频道地区 0,全球 非0地区 如果是地图频道则表示地图位置
|
||||
/// </summary>
|
||||
[BsonElement("region")] public int Region;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当前频道在线人数
|
||||
/// </summary>
|
||||
[BsonElement("ids")] public readonly HashSet<long> Units = new HashSet<long>();
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Fantasy;
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Chat;
|
||||
@@ -5,16 +6,8 @@ namespace NB.Chat;
|
||||
public sealed class ChatUnit : Entity
|
||||
{
|
||||
public long GateRouteId;
|
||||
|
||||
public long RoleId;
|
||||
|
||||
public string NickName = string.Empty;
|
||||
|
||||
public string Head = string.Empty;
|
||||
|
||||
public string Country = string.Empty;
|
||||
|
||||
public int Level;
|
||||
|
||||
public RoleSimpleInfo Role;
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -23,12 +16,8 @@ public sealed class ChatUnit : Entity
|
||||
return;
|
||||
}
|
||||
|
||||
RoleId = 0;
|
||||
GateRouteId = 0;
|
||||
NickName = string.Empty;
|
||||
Head = string.Empty;
|
||||
Country = string.Empty;
|
||||
Level = 0;
|
||||
Role = null;
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Game\Activity\" />
|
||||
<Folder Include="Club\" />
|
||||
<Folder Include="Map\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
7
Entity/Game/Achievement/Achievement.cs
Normal file
7
Entity/Game/Achievement/Achievement.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
public class Achievement : Entity
|
||||
{
|
||||
}
|
||||
10
Entity/Game/Achievement/AchievementContainer.cs
Normal file
10
Entity/Game/Achievement/AchievementContainer.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
/// <summary>
|
||||
/// 成就容器
|
||||
/// </summary>
|
||||
public class AchievementContainer : Entity
|
||||
{
|
||||
}
|
||||
8
Entity/Game/Activity/Activity.cs
Normal file
8
Entity/Game/Activity/Activity.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
public class Activity : Entity
|
||||
{
|
||||
|
||||
}
|
||||
@@ -36,6 +36,15 @@ public sealed class Player : Entity
|
||||
/// </summary>
|
||||
public FishContainer FishContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 技能
|
||||
/// </summary>
|
||||
public SkillContainer SkillContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 成就
|
||||
/// </summary>
|
||||
public AchievementContainer AchievementContainer;
|
||||
|
||||
[BsonIgnore] public long SessionRunTimeId;
|
||||
|
||||
|
||||
7
Entity/Game/Skill/SkillContainer.cs
Normal file
7
Entity/Game/Skill/SkillContainer.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
public class SkillContainer : Entity
|
||||
{
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace Fantasy
|
||||
Type = default;
|
||||
Source = default;
|
||||
Trigger = default;
|
||||
Content.Clear();
|
||||
Content = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<ChatMessageInfo>(this);
|
||||
#endif
|
||||
@@ -61,6 +61,6 @@ namespace Fantasy
|
||||
[ProtoMember(3)]
|
||||
public ChatUserInfo Trigger { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public List<byte> Content = new List<byte>();
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user