升级框架

This commit is contained in:
2026-01-18 16:37:46 +08:00
parent 917d82d3e8
commit 58911b2ef4
156 changed files with 6485 additions and 3410 deletions

View File

@@ -1,3 +1,5 @@
using System;
using System.IO;
using System.Runtime.Loader; using System.Runtime.Loader;
using Fantasy.Helper; using Fantasy.Helper;

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Fantasy.Entitas; using Fantasy.Entitas;
namespace NB; namespace NB;

View File

@@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Fantasy-Net" Version="2025.2.0" /> <PackageReference Include="Fantasy-Net" Version="2025.2.1422" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" /> <PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" /> <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
</ItemGroup> </ItemGroup>
@@ -20,6 +20,7 @@
<ItemGroup> <ItemGroup>
<Folder Include="Game\Map\" /> <Folder Include="Game\Map\" />
<Folder Include="Generate\NetworkProtocol\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options; using MongoDB.Bson.Serialization.Options;

View File

@@ -1,4 +1,5 @@
using Fantasy.DataStructure.Collection; using System.Collections.Generic;
using Fantasy.DataStructure.Collection;
using Fantasy.Entitas; using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options; using MongoDB.Bson.Serialization.Options;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Fantasy.Entitas; using Fantasy.Entitas;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options; using MongoDB.Bson.Serialization.Options;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using Fantasy.Network; using Fantasy.Network;
namespace NB.Gate; namespace NB.Gate;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using Fantasy.Network; using Fantasy.Network;
namespace NB.Gate; namespace NB.Gate;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,5 +1,5 @@
using System; using System;
using ProtoBuf; using LightProto;
using Fantasy; using Fantasy;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,385 +0,0 @@
using ProtoBuf;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
/// <summary>
/// 角色基础信息
/// </summary>
[ProtoContract]
public partial class RoleBaseInfo : AMessage
{
public static RoleBaseInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleBaseInfo>();
}
public override void Dispose()
{
NickName = default;
Head = default;
Country = default;
Level = default;
Exp = default;
VipInfo = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
#endif
}
[ProtoMember(1)]
public string NickName { get; set; }
[ProtoMember(2)]
public string Head { get; set; }
[ProtoMember(3)]
public string Country { get; set; }
[ProtoMember(4)]
public int Level { get; set; }
[ProtoMember(5)]
public int Exp { get; set; }
[ProtoMember(6)]
public VipInfo VipInfo { get; set; }
}
[ProtoContract]
public partial class KeyValueInt64 : AMessage
{
public static KeyValueInt64 Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<KeyValueInt64>();
}
public override void Dispose()
{
Key = default;
Value = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<KeyValueInt64>(this);
#endif
}
[ProtoMember(1)]
public int Key { get; set; }
[ProtoMember(2)]
public long Value { get; set; }
}
/// <summary>
/// 角色信息
/// </summary>
[ProtoContract]
public partial class RoleInfo : AMessage
{
public static RoleInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleInfo>();
}
public override void Dispose()
{
BaseInfo = default;
RoleId = default;
Items.Clear();
ItemBinds.Clear();
Fishs.Clear();
Activities.Clear();
Currency.Clear();
Slots.Clear();
Skills.Clear();
MapId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleInfo>(this);
#endif
}
[ProtoMember(1)]
public RoleBaseInfo BaseInfo { get; set; }
[ProtoMember(2)]
public long RoleId { get; set; }
[ProtoMember(3)]
public List<ItemInfo> Items = new List<ItemInfo>();
[ProtoMember(4)]
public List<ItemBindInfo> ItemBinds = new List<ItemBindInfo>();
[ProtoMember(5)]
public List<FishInfo> Fishs = new List<FishInfo>();
[ProtoMember(6)]
public List<ActivityInfo> Activities = new List<ActivityInfo>();
[ProtoMember(7)]
public List<KeyValueInt64> Currency = new List<KeyValueInt64>();
[ProtoMember(8)]
public List<KeyValueInt64> Slots = new List<KeyValueInt64>();
[ProtoMember(9)]
public List<SkillInfo> Skills = new List<SkillInfo>();
[ProtoMember(10)]
public int MapId { get; set; }
}
/// <summary>
/// 角色信息
/// </summary>
[ProtoContract]
public partial class RoleSimpleInfo : AMessage
{
public static RoleSimpleInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleSimpleInfo>();
}
public override void Dispose()
{
RoleId = default;
NickName = default;
Head = default;
Country = default;
Level = default;
Vip = default;
MapId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleSimpleInfo>(this);
#endif
}
[ProtoMember(1)]
public long RoleId { get; set; }
[ProtoMember(2)]
public string NickName { get; set; }
[ProtoMember(3)]
public string Head { get; set; }
[ProtoMember(4)]
public string Country { get; set; }
[ProtoMember(5)]
public int Level { get; set; }
[ProtoMember(6)]
public int Vip { get; set; }
[ProtoMember(7)]
public int MapId { get; set; }
}
/// <summary>
/// VIP信息
/// </summary>
[ProtoContract]
public partial class VipInfo : AMessage
{
public static VipInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<VipInfo>();
}
public override void Dispose()
{
Level = default;
OpenTime = default;
ExpirationTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<VipInfo>(this);
#endif
}
[ProtoMember(1)]
public int Level { get; set; }
[ProtoMember(2)]
public long OpenTime { get; set; }
[ProtoMember(3)]
public long ExpirationTime { get; set; }
}
/// <summary>
/// 奖励信息
/// </summary>
[ProtoContract]
public partial class AwardInfo : AMessage
{
public static AwardInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<AwardInfo>();
}
public override void Dispose()
{
ConfigId = default;
Count = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<AwardInfo>(this);
#endif
}
[ProtoMember(1)]
public long ConfigId { get; set; }
[ProtoMember(2)]
public int Count { get; set; }
}
/// <summary>
/// 玩家当前使用钓组信息
/// </summary>
[ProtoContract]
public partial class ItemBindInfo : AMessage
{
public static ItemBindInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ItemBindInfo>();
}
public override void Dispose()
{
Item = default;
BindItems.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ItemBindInfo>(this);
#endif
}
[ProtoMember(1)]
public long Item { get; set; }
[ProtoMember(2)]
public List<long> BindItems = new List<long>();
}
/// <summary>
/// 物品信息
/// </summary>
[ProtoContract]
public partial class ItemInfo : AMessage
{
public static ItemInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ItemInfo>();
}
public override void Dispose()
{
ConfigId = default;
Id = default;
Count = default;
ExpirationTime = default;
GetTime = default;
Abrasion = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ItemInfo>(this);
#endif
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
[ProtoMember(3)]
public int Count { get; set; }
[ProtoMember(4)]
public long ExpirationTime { get; set; }
[ProtoMember(5)]
public long GetTime { get; set; }
[ProtoMember(6)]
public int Abrasion { get; set; }
}
/// <summary>
/// 商店物品信息
/// </summary>
[ProtoContract]
public partial class ShopItemInfo : AMessage
{
public static ShopItemInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ShopItemInfo>();
}
public override void Dispose()
{
ConfigId = default;
Price = default;
Currency = default;
Sort = default;
Tag = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ShopItemInfo>(this);
#endif
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
[ProtoMember(2)]
public uint Price { get; set; }
[ProtoMember(3)]
public uint Currency { get; set; }
[ProtoMember(4)]
public uint Sort { get; set; }
[ProtoMember(5)]
public uint Tag { get; set; }
}
/// <summary>
/// fish信息
/// </summary>
[ProtoContract]
public partial class FishInfo : AMessage
{
public static FishInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<FishInfo>();
}
public override void Dispose()
{
ConfigId = default;
Id = default;
Weight = default;
GetTime = default;
ExpirationTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<FishInfo>(this);
#endif
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
[ProtoMember(3)]
public int Weight { get; set; }
[ProtoMember(4)]
public long GetTime { get; set; }
[ProtoMember(5)]
public long ExpirationTime { get; set; }
}
[ProtoContract]
public partial class ActivityInfo : AMessage
{
public static ActivityInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ActivityInfo>();
}
public override void Dispose()
{
Id = default;
StartTime = default;
EndTime = default;
Data.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ActivityInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public long StartTime { get; set; }
[ProtoMember(3)]
public long EndTime { get; set; }
[ProtoMember(4)]
public List<KeyValueInt64> Data = new List<KeyValueInt64>();
}
/// <summary>
/// 技能情况
/// </summary>
[ProtoContract]
public partial class SkillInfo : AMessage
{
public static SkillInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<SkillInfo>();
}
public override void Dispose()
{
ConfigId = default;
Level = default;
Exp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<SkillInfo>(this);
#endif
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
[ProtoMember(2)]
public int Level { get; set; }
[ProtoMember(3)]
public int Exp { get; set; }
}
}

View File

@@ -1,568 +0,0 @@
using ProtoBuf;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
/// <summary>
/// /////////// ******** 物品信息 *******/////////////
/// </summary>
/// <summary>
/// 请求背包列表
/// </summary>
[ProtoContract]
public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest
{
public static C2Game_GetItemsRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GetItemsRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GetItemsRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GetItemsResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GetItemsRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
}
/// <summary>
/// 请求背包列表响应
/// </summary>
[ProtoContract]
public partial class Game2C_GetItemsResponse : AMessage, ICustomRouteResponse
{
public static Game2C_GetItemsResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GetItemsResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Items.Clear();
Rigs.Clear();
Slots.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetItemsResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetItemsResponse; }
[ProtoMember(1)]
public List<ItemInfo> Items = new List<ItemInfo>();
[ProtoMember(2)]
public List<ItemBindInfo> Rigs = new List<ItemBindInfo>();
[ProtoMember(3)]
public List<long> Slots = new List<long>();
[ProtoMember(4)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求使用物品
/// </summary>
[ProtoContract]
public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest
{
public static C2Game_UseItemRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_UseItemRequest>();
}
public override void Dispose()
{
ItemId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_UseItemRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_UseItemResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long ItemId { get; set; }
}
/// <summary>
/// 请求使用物品响应
/// </summary>
[ProtoContract]
public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse
{
public static Game2C_UseItemResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_UseItemResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_UseItemResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_UseItemResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 物品变化
/// </summary>
[ProtoContract]
public partial class Game2C_ItemChange : AMessage, ICustomRouteMessage
{
public static Game2C_ItemChange Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_ItemChange>();
}
public override void Dispose()
{
Type = default;
Items.Clear();
Removes.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_ItemChange>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_ItemChange; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int Type { get; set; }
[ProtoMember(2)]
public List<ItemInfo> Items = new List<ItemInfo>();
[ProtoMember(3)]
public List<long> Removes = new List<long>();
}
/// <summary>
/// /////////// ******** 钓组 *******/////////////
/// </summary>
/// <summary>
/// 请求安装或取下配件
/// </summary>
[ProtoContract]
public partial class C2Game_RigChangeRequest : AMessage, ICustomRouteRequest
{
public static C2Game_RigChangeRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_RigChangeRequest>();
}
public override void Dispose()
{
ItemId = default;
RigId = default;
OldRigId = default;
IsAdd = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_RigChangeRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_RigChangeResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_RigChangeRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long ItemId { get; set; }
[ProtoMember(2)]
public long RigId { get; set; }
[ProtoMember(3)]
public long OldRigId { get; set; }
[ProtoMember(4)]
public bool IsAdd { get; set; }
}
/// <summary>
/// 请求安装配件响应
/// </summary>
[ProtoContract]
public partial class Game2C_RigChangeResponse : AMessage, ICustomRouteResponse
{
public static Game2C_RigChangeResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_RigChangeResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Rigs = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_RigChangeResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_RigChangeResponse; }
[ProtoMember(1)]
public ItemBindInfo Rigs { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// /////////// ******** 快速使用插槽 *******/////////////
/// </summary>
/// <summary>
/// 请求设置快速使用
/// </summary>
[ProtoContract]
public partial class C2Game_SetSlotRequest : AMessage, ICustomRouteRequest
{
public static C2Game_SetSlotRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_SetSlotRequest>();
}
public override void Dispose()
{
Index = default;
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_SetSlotRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_SetSlotResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_SetSlotRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int Index { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
}
/// <summary>
/// 请求设置快速使用响应
/// </summary>
[ProtoContract]
public partial class Game2C_SetSlotResponse : AMessage, ICustomRouteResponse
{
public static Game2C_SetSlotResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_SetSlotResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Slots.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_SetSlotResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_SetSlotResponse; }
[ProtoMember(1)]
public List<long> Slots = new List<long>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// /////////// ******** 鱼护 *******/////////////
/// </summary>
/// <summary>
/// 请求鱼护列表
/// </summary>
[ProtoContract]
public partial class C2Game_GetFishsRequest : AMessage, ICustomRouteRequest
{
public static C2Game_GetFishsRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GetFishsRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GetFishsRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GetFishsResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GetFishsRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
}
/// <summary>
/// 请求鱼护列表响应
/// </summary>
[ProtoContract]
public partial class Game2C_GetFishsResponse : AMessage, ICustomRouteResponse
{
public static Game2C_GetFishsResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GetFishsResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Fishs.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetFishsResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetFishsResponse; }
[ProtoMember(1)]
public List<FishInfo> Fishs = new List<FishInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 鱼护变化
/// </summary>
[ProtoContract]
public partial class Game2C_FishChange : AMessage, ICustomRouteMessage
{
public static Game2C_FishChange Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_FishChange>();
}
public override void Dispose()
{
Type = default;
Fishs.Clear();
Removes.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_FishChange>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_FishChange; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int Type { get; set; }
[ProtoMember(2)]
public List<FishInfo> Fishs = new List<FishInfo>();
[ProtoMember(3)]
public List<long> Removes = new List<long>();
}
/// <summary>
/// 请求出售
/// </summary>
[ProtoContract]
public partial class C2Game_SellFishRequest : AMessage, ICustomRouteRequest
{
public static C2Game_SellFishRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_SellFishRequest>();
}
public override void Dispose()
{
Ids.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_SellFishRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_SellFishResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_SellFishRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public List<long> Ids = new List<long>();
}
/// <summary>
/// 请求出售响应
/// </summary>
[ProtoContract]
public partial class Game2C_SellFishResponse : AMessage, ICustomRouteResponse
{
public static Game2C_SellFishResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_SellFishResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Awards.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_SellFishResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_SellFishResponse; }
[ProtoMember(1)]
public List<AwardInfo> Awards = new List<AwardInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// /////////// ******** 商店 *******/////////////
/// </summary>
/// <summary>
/// 请求商店商品列表
/// </summary>
[ProtoContract]
public partial class C2Game_GetShopItemsRequest : AMessage, ICustomRouteRequest
{
public static C2Game_GetShopItemsRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GetShopItemsRequest>();
}
public override void Dispose()
{
Shop = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GetShopItemsRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GetShopItemsResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GetShopItemsRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public uint Shop { get; set; }
}
/// <summary>
/// 请求商店商品列表响应
/// </summary>
[ProtoContract]
public partial class Game2C_GetShopItemsResponse : AMessage, ICustomRouteResponse
{
public static Game2C_GetShopItemsResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GetShopItemsResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Items.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetShopItemsResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetShopItemsResponse; }
[ProtoMember(1)]
public List<ShopItemInfo> Items = new List<ShopItemInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求购买
/// </summary>
[ProtoContract]
public partial class C2Game_BuyRequest : AMessage, ICustomRouteRequest
{
public static C2Game_BuyRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_BuyRequest>();
}
public override void Dispose()
{
BuyId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_BuyRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GetFishsResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_BuyRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public uint BuyId { get; set; }
}
/// <summary>
/// 请求购买响应
/// </summary>
[ProtoContract]
public partial class Game2C_BuyResponse : AMessage, ICustomRouteResponse
{
public static Game2C_BuyResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_BuyResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_BuyResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_BuyResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 活动奖励推送
/// </summary>
[ProtoContract]
public partial class Game2C_RewardNotify : AMessage, ICustomRouteMessage
{
public static Game2C_RewardNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_RewardNotify>();
}
public override void Dispose()
{
Awards.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_RewardNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_RewardNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public List<AwardInfo> Awards = new List<AwardInfo>();
}
/// <summary>
/// /////////// ******** GM *******/////////////
/// </summary>
/// <summary>
/// 请求执行GM
/// </summary>
[ProtoContract]
public partial class C2Game_GMRequest : AMessage, ICustomRouteRequest
{
public static C2Game_GMRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GMRequest>();
}
public override void Dispose()
{
Cmd = default;
Args = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GMRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GMResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GMRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public string Cmd { get; set; }
[ProtoMember(2)]
public string Args { get; set; }
}
/// <summary>
/// 执行GM返回
/// </summary>
[ProtoContract]
public partial class Game2C_GMResponse : AMessage, ICustomRouteResponse
{
public static Game2C_GMResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GMResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GMResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GMResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
}

View File

@@ -1,311 +1,592 @@
using ProtoBuf; using LightProto;
using MemoryPack;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
using Fantasy; using Fantasy;
using Fantasy.Pool;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
using Fantasy.Serialize; using Fantasy.Serialize;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective // ReSharper disable CollectionNeverUpdated.Global
// ReSharper disable RedundantOverriddenMember // ReSharper disable RedundantTypeArgumentsOfMethod
// ReSharper disable PartialTypeWithSinglePart // ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global // ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable PreferConcreteValueOverDefault
// ReSharper disable RedundantNameQualifier
// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace // ReSharper disable CheckNamespace
// ReSharper disable FieldCanBeMadeReadOnly.Global
// ReSharper disable RedundantUsingDirective
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. #pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618 #pragma warning disable CS8618
namespace Fantasy namespace Fantasy
{ {
/// <summary> /// <summary>
/// 通知游戏服角色进入该游戏服 /// 通知游戏服角色进入该游戏服
/// </summary> /// </summary>
[ProtoContract] [Serializable]
public partial class G2Common_EnterRequest : AMessage, IRouteRequest [ProtoContract]
{ public partial class G2Common_EnterRequest : AMessage, IAddressRequest
public static G2Common_EnterRequest Create(Scene scene) {
{ public static G2Common_EnterRequest Create(bool autoReturn = true)
return scene.MessagePoolComponent.Rent<G2Common_EnterRequest>(); {
} var g2Common_EnterRequest = MessageObjectPool<G2Common_EnterRequest>.Rent();
public override void Dispose() g2Common_EnterRequest.AutoReturn = autoReturn;
{
AccountId = default; if (!autoReturn)
GateRouteId = default; {
RouteType = default; g2Common_EnterRequest.SetIsPool(false);
#if FANTASY_NET || FANTASY_UNITY }
GetScene().MessagePoolComponent.Return<G2Common_EnterRequest>(this);
#endif return g2Common_EnterRequest;
} }
[ProtoIgnore]
public G2Common_EnterResponse ResponseType { get; set; } public void Return()
public uint OpCode() { return InnerOpcode.G2Common_EnterRequest; } {
[ProtoMember(1)] if (!AutoReturn)
public long AccountId { get; set; } {
[ProtoMember(2)] SetIsPool(true);
public long GateRouteId { get; set; } AutoReturn = true;
[ProtoMember(3)] }
public int RouteType { get; set; } else if (!IsPool())
} {
[ProtoContract] return;
public partial class G2Common_EnterResponse : AMessage, IRouteResponse }
{ Dispose();
public static G2Common_EnterResponse Create(Scene scene) }
{
return scene.MessagePoolComponent.Rent<G2Common_EnterResponse>();
}
public override void Dispose()
{
ErrorCode = default;
UnitRouteId = default;
RouteType = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Common_EnterResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; }
[ProtoMember(1)]
public long UnitRouteId { get; set; }
[ProtoMember(2)]
public int RouteType { get; set; }
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class G2Common_ExitRequest : AMessage, IRouteRequest
{
public static G2Common_ExitRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Common_ExitRequest>();
}
public override void Dispose()
{
AccountId = default;
GateRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Common_ExitRequest>(this);
#endif
}
[ProtoIgnore]
public Common2G_ExitResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Common_ExitRequest; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
}
[ProtoContract]
public partial class Common2G_ExitResponse : AMessage, IRouteResponse
{
public static Common2G_ExitResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Common2G_ExitResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Common2G_ExitResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Common2G_ExitResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 获取玩家基础信息
/// </summary>
[ProtoContract]
public partial class S2G_GetPlayerBasicInfoRequest : AMessage, IRouteRequest
{
public static S2G_GetPlayerBasicInfoRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2G_GetPlayerBasicInfoRequest>();
}
public override void Dispose()
{
IdList.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2G_GetPlayerBasicInfoRequest>(this);
#endif
}
[ProtoIgnore]
public G2S_GetPlayerBasicInfoResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.S2G_GetPlayerBasicInfoRequest; }
[ProtoMember(1)]
public List<long> IdList = new List<long>();
}
/// <summary>
/// 获取玩家基础信息响应
/// </summary>
[ProtoContract]
public partial class G2S_GetPlayerBasicInfoResponse : AMessage, IRouteResponse
{
public static G2S_GetPlayerBasicInfoResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2S_GetPlayerBasicInfoResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoleList.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2S_GetPlayerBasicInfoResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.G2S_GetPlayerBasicInfoResponse; }
[ProtoMember(1)]
public List<RoleSimpleInfo> RoleList = new List<RoleSimpleInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class S2G_ChatMessage : AMessage, IRouteMessage
{
public static S2G_ChatMessage Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2G_ChatMessage>();
}
public override void Dispose()
{
Message = default;
IdList.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2G_ChatMessage>(this);
#endif
}
public uint OpCode() { return InnerOpcode.S2G_ChatMessage; }
[ProtoMember(1)]
public ChatMessageInfo Message { get; set; }
[ProtoMember(2)]
public List<long> IdList = new List<long>();
}
/// <summary>
/// 创建聊天频道
/// </summary>
[ProtoContract]
public partial class Club2Chat_CreateChannel : AMessage, IRouteMessage
{
public static Club2Chat_CreateChannel Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Club2Chat_CreateChannel>();
}
public override void Dispose()
{
ChannelId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Club2Chat_CreateChannel>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Club2Chat_CreateChannel; }
[ProtoMember(1)]
public long ChannelId { get; set; }
}
/// <summary>
/// 请求进入房间
/// </summary>
[ProtoContract]
public partial class G2Map_EnterMapRequest : AMessage, IRouteRequest
{
public static G2Map_EnterMapRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Map_EnterMapRequest>();
}
public override void Dispose()
{
RoomCode = default;
AccountId = default;
MapId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Map_EnterMapRequest>(this);
#endif
}
[ProtoIgnore]
public Map2G_EnterMapResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Map_EnterMapRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public long AccountId { get; set; }
[ProtoMember(3)]
public int MapId { get; set; }
}
/// <summary>
/// 请求进入房间响应
/// </summary>
[ProtoContract]
public partial class Map2G_EnterMapResponse : AMessage, IRouteResponse
{
public static Map2G_EnterMapResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2G_EnterMapResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
MapId = default;
Units.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2G_EnterMapResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Map2G_EnterMapResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public int MapId { get; set; }
[ProtoMember(3)]
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
[ProtoMember(4)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求离开房间
/// </summary>
[ProtoContract]
public partial class G2Map_ExitRoomRequest : AMessage, IRouteRequest
{
public static G2Map_ExitRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Map_ExitRoomRequest>();
}
public override void Dispose()
{
RoomCode = default;
AccountId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Map_ExitRoomRequest>(this);
#endif
}
[ProtoIgnore]
public Map2G_ExiRoomResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Map_ExitRoomRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public long AccountId { get; set; }
}
/// <summary>
/// 请求离开房间响应
/// </summary>
[ProtoContract]
public partial class Map2G_ExiRoomResponse : AMessage, IRouteResponse
{
public static Map2G_ExiRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2G_ExiRoomResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2G_ExiRoomResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Map2G_ExiRoomResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
}
public void Dispose()
{
if (!IsPool()) return;
AccountId = default;
GateRouteId = default;
RouteType = default;
MessageObjectPool<G2Common_EnterRequest>.Return(this);
}
public uint OpCode() { return InnerOpcode.G2Common_EnterRequest; }
[ProtoIgnore]
public G2Common_EnterResponse ResponseType { get; set; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
[ProtoMember(3)]
public int RouteType { get; set; }
}
[Serializable]
[ProtoContract]
public partial class G2Common_EnterResponse : AMessage, IAddressResponse
{
public static G2Common_EnterResponse Create(bool autoReturn = true)
{
var g2Common_EnterResponse = MessageObjectPool<G2Common_EnterResponse>.Rent();
g2Common_EnterResponse.AutoReturn = autoReturn;
if (!autoReturn)
{
g2Common_EnterResponse.SetIsPool(false);
}
return g2Common_EnterResponse;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ErrorCode = 0;
UnitRouteId = default;
RouteType = default;
MessageObjectPool<G2Common_EnterResponse>.Return(this);
}
public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
[ProtoMember(2)]
public long UnitRouteId { get; set; }
[ProtoMember(3)]
public int RouteType { get; set; }
}
[Serializable]
[ProtoContract]
public partial class G2Common_ExitRequest : AMessage, IAddressRequest
{
public static G2Common_ExitRequest Create(bool autoReturn = true)
{
var g2Common_ExitRequest = MessageObjectPool<G2Common_ExitRequest>.Rent();
g2Common_ExitRequest.AutoReturn = autoReturn;
if (!autoReturn)
{
g2Common_ExitRequest.SetIsPool(false);
}
return g2Common_ExitRequest;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
AccountId = default;
GateRouteId = default;
MessageObjectPool<G2Common_ExitRequest>.Return(this);
}
public uint OpCode() { return InnerOpcode.G2Common_ExitRequest; }
[ProtoIgnore]
public Common2G_ExitResponse ResponseType { get; set; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
}
[Serializable]
[ProtoContract]
public partial class Common2G_ExitResponse : AMessage, IAddressResponse
{
public static Common2G_ExitResponse Create(bool autoReturn = true)
{
var common2G_ExitResponse = MessageObjectPool<Common2G_ExitResponse>.Rent();
common2G_ExitResponse.AutoReturn = autoReturn;
if (!autoReturn)
{
common2G_ExitResponse.SetIsPool(false);
}
return common2G_ExitResponse;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ErrorCode = 0;
MessageObjectPool<Common2G_ExitResponse>.Return(this);
}
public uint OpCode() { return InnerOpcode.Common2G_ExitResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 获取玩家基础信息
/// </summary>
[Serializable]
[ProtoContract]
public partial class S2G_GetPlayerBasicInfoRequest : AMessage, IAddressRequest
{
public static S2G_GetPlayerBasicInfoRequest Create(bool autoReturn = true)
{
var s2G_GetPlayerBasicInfoRequest = MessageObjectPool<S2G_GetPlayerBasicInfoRequest>.Rent();
s2G_GetPlayerBasicInfoRequest.AutoReturn = autoReturn;
if (!autoReturn)
{
s2G_GetPlayerBasicInfoRequest.SetIsPool(false);
}
return s2G_GetPlayerBasicInfoRequest;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
IdList.Clear();
MessageObjectPool<S2G_GetPlayerBasicInfoRequest>.Return(this);
}
public uint OpCode() { return InnerOpcode.S2G_GetPlayerBasicInfoRequest; }
[ProtoIgnore]
public G2S_GetPlayerBasicInfoResponse ResponseType { get; set; }
[ProtoMember(1)]
public List<long> IdList { get; set; } = new List<long>();
}
/// <summary>
/// 获取玩家基础信息响应
/// </summary>
[Serializable]
[ProtoContract]
public partial class G2S_GetPlayerBasicInfoResponse : AMessage, IAddressResponse
{
public static G2S_GetPlayerBasicInfoResponse Create(bool autoReturn = true)
{
var g2S_GetPlayerBasicInfoResponse = MessageObjectPool<G2S_GetPlayerBasicInfoResponse>.Rent();
g2S_GetPlayerBasicInfoResponse.AutoReturn = autoReturn;
if (!autoReturn)
{
g2S_GetPlayerBasicInfoResponse.SetIsPool(false);
}
return g2S_GetPlayerBasicInfoResponse;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ErrorCode = 0;
RoleList.Clear();
MessageObjectPool<G2S_GetPlayerBasicInfoResponse>.Return(this);
}
public uint OpCode() { return InnerOpcode.G2S_GetPlayerBasicInfoResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
[ProtoMember(2)]
public List<RoleSimpleInfo> RoleList { get; set; } = new List<RoleSimpleInfo>();
}
[Serializable]
[ProtoContract]
public partial class S2G_ChatMessage : AMessage, IAddressMessage
{
public static S2G_ChatMessage Create(bool autoReturn = true)
{
var s2G_ChatMessage = MessageObjectPool<S2G_ChatMessage>.Rent();
s2G_ChatMessage.AutoReturn = autoReturn;
if (!autoReturn)
{
s2G_ChatMessage.SetIsPool(false);
}
return s2G_ChatMessage;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
Message = default;
IdList.Clear();
MessageObjectPool<S2G_ChatMessage>.Return(this);
}
public uint OpCode() { return InnerOpcode.S2G_ChatMessage; }
[ProtoMember(1)]
public ChatMessageInfo Message { get; set; }
[ProtoMember(2)]
public List<long> IdList { get; set; } = new List<long>();
}
/// <summary>
/// 创建聊天频道
/// </summary>
[Serializable]
[ProtoContract]
public partial class Club2Chat_CreateChannel : AMessage, IAddressMessage
{
public static Club2Chat_CreateChannel Create(bool autoReturn = true)
{
var club2Chat_CreateChannel = MessageObjectPool<Club2Chat_CreateChannel>.Rent();
club2Chat_CreateChannel.AutoReturn = autoReturn;
if (!autoReturn)
{
club2Chat_CreateChannel.SetIsPool(false);
}
return club2Chat_CreateChannel;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ChannelId = default;
MessageObjectPool<Club2Chat_CreateChannel>.Return(this);
}
public uint OpCode() { return InnerOpcode.Club2Chat_CreateChannel; }
[ProtoMember(1)]
public long ChannelId { get; set; }
}
/// <summary>
/// 请求进入房间
/// </summary>
[Serializable]
[ProtoContract]
public partial class G2Map_EnterMapRequest : AMessage, IAddressRequest
{
public static G2Map_EnterMapRequest Create(bool autoReturn = true)
{
var g2Map_EnterMapRequest = MessageObjectPool<G2Map_EnterMapRequest>.Rent();
g2Map_EnterMapRequest.AutoReturn = autoReturn;
if (!autoReturn)
{
g2Map_EnterMapRequest.SetIsPool(false);
}
return g2Map_EnterMapRequest;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
RoomCode = default;
AccountId = default;
MapId = default;
MessageObjectPool<G2Map_EnterMapRequest>.Return(this);
}
public uint OpCode() { return InnerOpcode.G2Map_EnterMapRequest; }
[ProtoIgnore]
public Map2G_EnterMapResponse ResponseType { get; set; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public long AccountId { get; set; }
[ProtoMember(3)]
public int MapId { get; set; }
}
/// <summary>
/// 请求进入房间响应
/// </summary>
[Serializable]
[ProtoContract]
public partial class Map2G_EnterMapResponse : AMessage, IAddressResponse
{
public static Map2G_EnterMapResponse Create(bool autoReturn = true)
{
var map2G_EnterMapResponse = MessageObjectPool<Map2G_EnterMapResponse>.Rent();
map2G_EnterMapResponse.AutoReturn = autoReturn;
if (!autoReturn)
{
map2G_EnterMapResponse.SetIsPool(false);
}
return map2G_EnterMapResponse;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ErrorCode = 0;
RoomCode = default;
MapId = default;
Units.Clear();
MessageObjectPool<Map2G_EnterMapResponse>.Return(this);
}
public uint OpCode() { return InnerOpcode.Map2G_EnterMapResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
[ProtoMember(2)]
public string RoomCode { get; set; }
[ProtoMember(3)]
public int MapId { get; set; }
[ProtoMember(4)]
public List<MapUnitInfo> Units { get; set; } = new List<MapUnitInfo>();
}
/// <summary>
/// 请求离开房间
/// </summary>
[Serializable]
[ProtoContract]
public partial class G2Map_ExitRoomRequest : AMessage, IAddressRequest
{
public static G2Map_ExitRoomRequest Create(bool autoReturn = true)
{
var g2Map_ExitRoomRequest = MessageObjectPool<G2Map_ExitRoomRequest>.Rent();
g2Map_ExitRoomRequest.AutoReturn = autoReturn;
if (!autoReturn)
{
g2Map_ExitRoomRequest.SetIsPool(false);
}
return g2Map_ExitRoomRequest;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
RoomCode = default;
AccountId = default;
MessageObjectPool<G2Map_ExitRoomRequest>.Return(this);
}
public uint OpCode() { return InnerOpcode.G2Map_ExitRoomRequest; }
[ProtoIgnore]
public Map2G_ExiRoomResponse ResponseType { get; set; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public long AccountId { get; set; }
}
/// <summary>
/// 请求离开房间响应
/// </summary>
[Serializable]
[ProtoContract]
public partial class Map2G_ExiRoomResponse : AMessage, IAddressResponse
{
public static Map2G_ExiRoomResponse Create(bool autoReturn = true)
{
var map2G_ExiRoomResponse = MessageObjectPool<Map2G_ExiRoomResponse>.Rent();
map2G_ExiRoomResponse.AutoReturn = autoReturn;
if (!autoReturn)
{
map2G_ExiRoomResponse.SetIsPool(false);
}
return map2G_ExiRoomResponse;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ErrorCode = 0;
MessageObjectPool<Map2G_ExiRoomResponse>.Return(this);
}
public uint OpCode() { return InnerOpcode.Map2G_ExiRoomResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
}

View File

@@ -1,18 +1,22 @@
// ReSharper disable InconsistentNaming
namespace Fantasy namespace Fantasy
{ {
public static partial class InnerOpcode /// <summary>
{ /// 本代码有编辑器生成,请不要再这里进行编辑。
public const uint G2Common_EnterRequest = 1073751825; /// </summary>
public const uint G2Common_EnterResponse = 1207969553; public static partial class InnerOpcode
public const uint G2Common_ExitRequest = 1073751826; {
public const uint Common2G_ExitResponse = 1207969554; public const uint G2Common_EnterRequest = 1073751825;
public const uint S2G_GetPlayerBasicInfoRequest = 1073751827; public const uint G2Common_EnterResponse = 1207969553;
public const uint G2S_GetPlayerBasicInfoResponse = 1207969555; public const uint G2Common_ExitRequest = 1073751826;
public const uint S2G_ChatMessage = 939534097; public const uint Common2G_ExitResponse = 1207969554;
public const uint Club2Chat_CreateChannel = 939534098; public const uint S2G_GetPlayerBasicInfoRequest = 1073751827;
public const uint G2Map_EnterMapRequest = 1073751828; public const uint G2S_GetPlayerBasicInfoResponse = 1207969555;
public const uint Map2G_EnterMapResponse = 1207969556; public const uint S2G_ChatMessage = 939534097;
public const uint G2Map_ExitRoomRequest = 1073751829; public const uint Club2Chat_CreateChannel = 939534098;
public const uint Map2G_ExiRoomResponse = 1207969557; public const uint G2Map_EnterMapRequest = 1073751828;
} public const uint Map2G_EnterMapResponse = 1207969556;
} public const uint G2Map_ExitRoomRequest = 1073751829;
public const uint Map2G_ExiRoomResponse = 1207969557;
}
}

View File

@@ -1,203 +0,0 @@
using ProtoBuf;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
/// <summary>
/// 请求创建房间
/// </summary>
[ProtoContract]
public partial class C2Map_CreateRoomRequest : AMessage, ICustomRouteRequest
{
public static C2Map_CreateRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_CreateRoomRequest>();
}
public override void Dispose()
{
MapId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_CreateRoomRequest>(this);
#endif
}
[ProtoIgnore]
public Map2C_CreateRoomResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int MapId { get; set; }
}
/// <summary>
/// 请求创建房间成功
/// </summary>
[ProtoContract]
public partial class Map2C_CreateRoomResponse : AMessage, ICustomRouteResponse
{
public static Map2C_CreateRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_CreateRoomResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
Units.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_CreateRoomResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求网关离开房间(离开房间,但是不离开地图)
/// </summary>
[ProtoContract]
public partial class C2G_ExitRoomRequest : AMessage, IRequest
{
public static C2G_ExitRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2G_ExitRoomRequest>();
}
public override void Dispose()
{
RoomCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2G_ExitRoomRequest>(this);
#endif
}
[ProtoIgnore]
public G2C_ExitRoomResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2G_ExitRoomRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
}
/// <summary>
/// 请求网关进入离开响应
/// </summary>
[ProtoContract]
public partial class G2C_ExitRoomResponse : AMessage, IResponse
{
public static G2C_ExitRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2C_ExitRoomResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2C_ExitRoomResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_ExitRoomResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求网关进入地图
/// </summary>
[ProtoContract]
public partial class C2G_EnterMapRequest : AMessage, IRequest
{
public static C2G_EnterMapRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2G_EnterMapRequest>();
}
public override void Dispose()
{
RoomCode = default;
MapId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2G_EnterMapRequest>(this);
#endif
}
[ProtoIgnore]
public G2C_EnterMapResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2G_EnterMapRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public int MapId { get; set; }
}
/// <summary>
/// 请求网关进入房间响应
/// </summary>
[ProtoContract]
public partial class G2C_EnterMapResponse : AMessage, IResponse
{
public static G2C_EnterMapResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2C_EnterMapResponse>();
}
public override void Dispose()
{
ErrorCode = default;
MapId = default;
RoomCode = default;
Units.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2C_EnterMapResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_EnterMapResponse; }
[ProtoMember(1)]
public int MapId { get; set; }
[ProtoMember(2)]
public string RoomCode { get; set; }
[ProtoMember(3)]
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
[ProtoMember(4)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 通知客户端切换地图
/// </summary>
[ProtoContract]
public partial class Map2C_ChangeMap : AMessage, ICustomRouteMessage
{
public static Map2C_ChangeMap Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_ChangeMap>();
}
public override void Dispose()
{
MapId = default;
Node = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_ChangeMap>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_ChangeMap; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int MapId { get; set; }
[ProtoMember(2)]
public int Node { get; set; }
}
}

View File

@@ -1,184 +0,0 @@
using ProtoBuf;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
[ProtoContract]
public partial class Vector3Info : AMessage
{
public static Vector3Info Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Vector3Info>();
}
public override void Dispose()
{
x = default;
y = default;
z = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Vector3Info>(this);
#endif
}
[ProtoMember(1)]
public float x { get; set; }
[ProtoMember(2)]
public float y { get; set; }
[ProtoMember(3)]
public float z { get; set; }
}
[ProtoContract]
public partial class Vector2Info : AMessage
{
public static Vector2Info Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Vector2Info>();
}
public override void Dispose()
{
x = default;
y = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Vector2Info>(this);
#endif
}
[ProtoMember(1)]
public float x { get; set; }
[ProtoMember(2)]
public float y { get; set; }
}
[ProtoContract]
public partial class QuaternionInfo : AMessage
{
public static QuaternionInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<QuaternionInfo>();
}
public override void Dispose()
{
x = default;
y = default;
z = default;
w = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<QuaternionInfo>(this);
#endif
}
[ProtoMember(1)]
public float x { get; set; }
[ProtoMember(2)]
public float y { get; set; }
[ProtoMember(3)]
public float z { get; set; }
[ProtoMember(4)]
public float w { get; set; }
}
/// <summary>
/// 玩家当前使用钓组信息
/// </summary>
[ProtoContract]
public partial class GearInfo : AMessage
{
public static GearInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<GearInfo>();
}
public override void Dispose()
{
Item = default;
Binds.Clear();
Position = default;
Rotation = default;
Propertys.Clear();
InUse = default;
InHand = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<GearInfo>(this);
#endif
}
[ProtoMember(1)]
public ItemInfo Item { get; set; }
[ProtoMember(2)]
public List<ItemInfo> Binds = new List<ItemInfo>();
[ProtoMember(3)]
public Vector3Info Position { get; set; }
[ProtoMember(4)]
public Vector3Info Rotation { get; set; }
[ProtoMember(5)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
[ProtoMember(6)]
public bool InUse { get; set; }
[ProtoMember(7)]
public bool InHand { get; set; }
}
[ProtoContract]
public partial class UnitStateInfo : AMessage
{
public static UnitStateInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
}
public override void Dispose()
{
State = default;
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
#endif
}
[ProtoMember(1)]
public int State { get; set; }
[ProtoMember(2)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
[ProtoContract]
public partial class MapUnitInfo : AMessage
{
public static MapUnitInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
}
public override void Dispose()
{
Id = default;
RoleInfo = default;
Position = default;
Rotation = default;
State = default;
Gears.Clear();
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public RoleSimpleInfo RoleInfo { get; set; }
[ProtoMember(3)]
public Vector3Info Position { get; set; }
[ProtoMember(4)]
public Vector3Info Rotation { get; set; }
[ProtoMember(5)]
public UnitStateInfo State { get; set; }
[ProtoMember(6)]
public List<GearInfo> Gears = new List<GearInfo>();
[ProtoMember(7)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,85 +1,89 @@
// ReSharper disable InconsistentNaming
namespace Fantasy namespace Fantasy
{ {
public static partial class OuterOpcode /// <summary>
{ /// 本代码有编辑器生成,请不要再这里进行编辑。
public const uint C2Game_GetItemsRequest = 2281711377; /// </summary>
public const uint Game2C_GetItemsResponse = 2415929105; public static partial class OuterOpcode
public const uint C2Game_UseItemRequest = 2281711378; {
public const uint Game2C_UseItemResponse = 2415929106; public const uint C2Game_GetItemsRequest = 2281711377;
public const uint Game2C_ItemChange = 2147493649; public const uint Game2C_GetItemsResponse = 2415929105;
public const uint C2Game_RigChangeRequest = 2281711379; public const uint C2Game_UseItemRequest = 2281711378;
public const uint Game2C_RigChangeResponse = 2415929107; public const uint Game2C_UseItemResponse = 2415929106;
public const uint C2Game_SetSlotRequest = 2281711380; public const uint Game2C_ItemChange = 2147493649;
public const uint Game2C_SetSlotResponse = 2415929108; public const uint C2Game_RigChangeRequest = 2281711379;
public const uint C2Game_GetFishsRequest = 2281711381; public const uint Game2C_RigChangeResponse = 2415929107;
public const uint Game2C_GetFishsResponse = 2415929109; public const uint C2Game_SetSlotRequest = 2281711380;
public const uint Game2C_FishChange = 2147493650; public const uint Game2C_SetSlotResponse = 2415929108;
public const uint C2Game_SellFishRequest = 2281711382; public const uint C2Game_GetFishsRequest = 2281711381;
public const uint Game2C_SellFishResponse = 2415929110; public const uint Game2C_GetFishsResponse = 2415929109;
public const uint C2Game_GetShopItemsRequest = 2281711383; public const uint Game2C_FishChange = 2147493650;
public const uint Game2C_GetShopItemsResponse = 2415929111; public const uint C2Game_SellFishRequest = 2281711382;
public const uint C2Game_BuyRequest = 2281711384; public const uint Game2C_SellFishResponse = 2415929110;
public const uint Game2C_BuyResponse = 2415929112; public const uint C2Game_GetShopItemsRequest = 2281711383;
public const uint Game2C_RewardNotify = 2147493651; public const uint Game2C_GetShopItemsResponse = 2415929111;
public const uint C2Game_GMRequest = 2281711385; public const uint C2Game_BuyRequest = 2281711384;
public const uint Game2C_GMResponse = 2415929113; public const uint Game2C_BuyResponse = 2415929112;
public const uint C2Map_CreateRoomRequest = 2281711386; public const uint Game2C_RewardNotify = 2147493651;
public const uint Map2C_CreateRoomResponse = 2415929114; public const uint C2Game_GMRequest = 2281711385;
public const uint C2G_ExitRoomRequest = 268445457; public const uint Game2C_GMResponse = 2415929113;
public const uint G2C_ExitRoomResponse = 402663185; public const uint C2Map_CreateRoomRequest = 2281711386;
public const uint C2G_EnterMapRequest = 268445458; public const uint Map2C_CreateRoomResponse = 2415929114;
public const uint G2C_EnterMapResponse = 402663186; public const uint C2G_ExitRoomRequest = 268445457;
public const uint Map2C_ChangeMap = 2147493652; public const uint G2C_ExitRoomResponse = 402663185;
public const uint C2A_LoginRequest = 268445459; public const uint C2G_EnterMapRequest = 268445458;
public const uint A2C_LoginResponse = 402663187; public const uint G2C_EnterMapResponse = 402663186;
public const uint C2G_LoginRequest = 268445460; public const uint Map2C_ChangeMap = 2147493652;
public const uint G2C_LoginResponse = 402663188; public const uint C2A_LoginRequest = 268445459;
public const uint G2C_RepeatLogin = 134227729; public const uint A2C_LoginResponse = 402663187;
public const uint C2Game_GetRoleInfoRequest = 2281711387; public const uint C2G_LoginRequest = 268445460;
public const uint Game2C_GetRoleInfoResponse = 2415929115; public const uint G2C_LoginResponse = 402663188;
public const uint Map2C_RoleEnterRoomNotify = 2147493653; public const uint G2C_RepeatLogin = 134227729;
public const uint Map2C_RoleExitRoomNotify = 2147493654; public const uint C2Game_GetRoleInfoRequest = 2281711387;
public const uint C2Map_TakeItemRequest = 2281711388; public const uint Game2C_GetRoleInfoResponse = 2415929115;
public const uint Map2C_TakeItemResponse = 2415929116; public const uint Map2C_RoleEnterRoomNotify = 2147493653;
public const uint C2Map_RolePropertyChange = 2147493655; public const uint Map2C_RoleExitRoomNotify = 2147493654;
public const uint Map2C_RoleStateNotify = 2147493656; public const uint C2Map_TakeItemRequest = 2281711388;
public const uint Map2C_RoleGearChangeNotify = 2147493657; public const uint Map2C_TakeItemResponse = 2415929116;
public const uint Map2C_RolePropertyChangeNotify = 2147493658; public const uint C2Map_RolePropertyChange = 2147493655;
public const uint C2Map_Move = 2147493659; public const uint Map2C_RoleStateNotify = 2147493656;
public const uint C2Map_Look = 2147493660; public const uint Map2C_RoleGearChangeNotify = 2147493657;
public const uint Map2C_MoveNotify = 2147493661; public const uint Map2C_RolePropertyChangeNotify = 2147493658;
public const uint Map2C_LookeNotify = 2147493662; public const uint C2Map_Move = 2147493659;
public const uint C2S_GetConversationsRequest = 2281711389; public const uint C2Map_Look = 2147493660;
public const uint S2C_GetConversationsResponse = 2415929117; public const uint Map2C_MoveNotify = 2147493661;
public const uint C2S_SendMailRequest = 2281711390; public const uint Map2C_LookeNotify = 2147493662;
public const uint S2C_SendMailResponse = 2415929118; public const uint C2S_GetConversationsRequest = 2281711389;
public const uint C2S_DeleteMailRequest = 2281711391; public const uint S2C_GetConversationsResponse = 2415929117;
public const uint S2C_DeleteMailResponse = 2415929119; public const uint C2S_SendMailRequest = 2281711390;
public const uint S2C_HaveMail = 2147493663; public const uint S2C_SendMailResponse = 2415929118;
public const uint S2C_MailState = 2147493664; public const uint C2S_DeleteMailRequest = 2281711391;
public const uint C2S_CreateChannelRequest = 2281711392; public const uint S2C_DeleteMailResponse = 2415929119;
public const uint S2C_CreateChannelResponse = 2415929120; public const uint S2C_HaveMail = 2147493663;
public const uint C2S_JoinChannelRequest = 2281711393; public const uint S2C_MailState = 2147493664;
public const uint S2C_JoinChannelResponse = 2415929121; public const uint C2S_CreateChannelRequest = 2281711392;
public const uint C2S_SendMessageRequest = 2281711394; public const uint S2C_CreateChannelResponse = 2415929120;
public const uint S2C_SendMessageResponse = 2415929122; public const uint C2S_JoinChannelRequest = 2281711393;
public const uint S2C_Message = 2147493665; public const uint S2C_JoinChannelResponse = 2415929121;
public const uint C2S_CreateClubRequest = 2281711395; public const uint C2S_SendMessageRequest = 2281711394;
public const uint S2C_CreateClubResponse = 2415929123; public const uint S2C_SendMessageResponse = 2415929122;
public const uint C2S_GetClubInfoRequest = 2281711396; public const uint S2C_Message = 2147493665;
public const uint S2C_GetClubInfoResponse = 2415929124; public const uint C2S_CreateClubRequest = 2281711395;
public const uint C2S_GetMemberListRequest = 2281711397; public const uint S2C_CreateClubResponse = 2415929123;
public const uint S2C_GetMemberListResponse = 2415929125; public const uint C2S_GetClubInfoRequest = 2281711396;
public const uint C2S_GetClubListRequest = 2281711398; public const uint S2C_GetClubInfoResponse = 2415929124;
public const uint S2C_GetClubListResponse = 2415929126; public const uint C2S_GetMemberListRequest = 2281711397;
public const uint C2S_JoinClubRequest = 2281711399; public const uint S2C_GetMemberListResponse = 2415929125;
public const uint S2C_JoinClubResponse = 2415929127; public const uint C2S_GetClubListRequest = 2281711398;
public const uint C2S_LeaveClubRequest = 2281711400; public const uint S2C_GetClubListResponse = 2415929126;
public const uint S2C_LeaveClubResponse = 2415929128; public const uint C2S_JoinClubRequest = 2281711399;
public const uint C2S_DissolveClubRequest = 2281711401; public const uint S2C_JoinClubResponse = 2415929127;
public const uint S2C_DissolveClubResponse = 2415929129; public const uint C2S_LeaveClubRequest = 2281711400;
public const uint C2S_DisposeJoinRequest = 2281711402; public const uint S2C_LeaveClubResponse = 2415929128;
public const uint S2C_DisposeJoinResponse = 2415929130; public const uint C2S_DissolveClubRequest = 2281711401;
public const uint S2C_ClubChange = 2147493666; public const uint S2C_DissolveClubResponse = 2415929129;
} public const uint C2S_DisposeJoinRequest = 2281711402;
} public const uint S2C_DisposeJoinResponse = 2415929130;
public const uint S2C_ClubChange = 2147493666;
}
}

View File

@@ -1,18 +1,22 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Fantasy namespace Fantasy
{ {
// Roaming协议定义(需要定义10000以上、因为10000以内的框架预留) /// <summary>
public static class RoamingType /// 本代码有编辑器生成,请不要再这里进行编辑。
{ /// Roaming协议定义(需要定义10000以上、因为10000以内的框架预留)
public const int MapRoamingType = 10001; /// </summary>
public const int ChatRoamingType = 10002; public static partial class RoamingType
public static IEnumerable<int> RoamingTypes {
{ public const int MapRoamingType = 10001; // Map
get public const int ChatRoamingType = 10002; // Chat
{
yield return 10001; public static IEnumerable<int> RoamingTypes
yield return 10002; {
} get
} {
} yield return MapRoamingType;
} yield return ChatRoamingType;
}
}
}
}

View File

@@ -1,346 +0,0 @@
using ProtoBuf;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
/// <summary>
/// 用户进入地图
/// </summary>
[ProtoContract]
public partial class Map2C_RoleEnterRoomNotify : AMessage, ICustomRouteMessage
{
public static Map2C_RoleEnterRoomNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleEnterRoomNotify>();
}
public override void Dispose()
{
Info = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleEnterRoomNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleEnterRoomNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public MapUnitInfo Info { get; set; }
}
/// <summary>
/// 用户离开地图
/// </summary>
[ProtoContract]
public partial class Map2C_RoleExitRoomNotify : AMessage, ICustomRouteMessage
{
public static Map2C_RoleExitRoomNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleExitRoomNotify>();
}
public override void Dispose()
{
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleExitRoomNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleExitRoomNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long Id { get; set; }
}
/// <summary>
/// 请求拿起物品
/// </summary>
[ProtoContract]
public partial class C2Map_TakeItemRequest : AMessage, ICustomRouteRequest
{
public static C2Map_TakeItemRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_TakeItemRequest>();
}
public override void Dispose()
{
Id = default;
Task = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_TakeItemRequest>(this);
#endif
}
[ProtoIgnore]
public Map2C_TakeItemResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Map_TakeItemRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int Id { get; set; }
[ProtoMember(2)]
public bool Task { get; set; }
}
/// <summary>
/// 请求拿起物品响应
/// </summary>
[ProtoContract]
public partial class Map2C_TakeItemResponse : AMessage, ICustomRouteResponse
{
public static Map2C_TakeItemResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_TakeItemResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Id = default;
Task = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_TakeItemResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_TakeItemResponse; }
[ProtoMember(1)]
public int Id { get; set; }
[ProtoMember(2)]
public bool Task { get; set; }
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class C2Map_RolePropertyChange : AMessage, ICustomRouteMessage
{
public static C2Map_RolePropertyChange Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_RolePropertyChange>();
}
public override void Dispose()
{
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_RolePropertyChange>(this);
#endif
}
public uint OpCode() { return OuterOpcode.C2Map_RolePropertyChange; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
/// <summary>
/// 玩家状态变化同步
/// </summary>
[ProtoContract]
public partial class Map2C_RoleStateNotify : AMessage, ICustomRouteMessage
{
public static Map2C_RoleStateNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleStateNotify>();
}
public override void Dispose()
{
Id = default;
State = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleStateNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleStateNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public UnitStateInfo State { get; set; }
}
/// <summary>
/// 玩家钓组变化
/// </summary>
[ProtoContract]
public partial class Map2C_RoleGearChangeNotify : AMessage, ICustomRouteMessage
{
public static Map2C_RoleGearChangeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleGearChangeNotify>();
}
public override void Dispose()
{
Id = default;
Gears.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleGearChangeNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleGearChangeNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public List<GearInfo> Gears = new List<GearInfo>();
}
[ProtoContract]
public partial class Map2C_RolePropertyChangeNotify : AMessage, ICustomRouteMessage
{
public static Map2C_RolePropertyChangeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RolePropertyChangeNotify>();
}
public override void Dispose()
{
Id = default;
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RolePropertyChangeNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RolePropertyChangeNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
[ProtoContract]
public partial class C2Map_Move : AMessage, ICustomRouteMessage
{
public static C2Map_Move Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_Move>();
}
public override void Dispose()
{
Position = default;
Rotation = default;
Direction = default;
IsStop = default;
IsRun = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_Move>(this);
#endif
}
public uint OpCode() { return OuterOpcode.C2Map_Move; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public Vector3Info Position { get; set; }
[ProtoMember(2)]
public Vector3Info Rotation { get; set; }
[ProtoMember(3)]
public Vector3Info Direction { get; set; }
[ProtoMember(4)]
public bool IsStop { get; set; }
[ProtoMember(5)]
public bool IsRun { get; set; }
[ProtoMember(6)]
public long Timestamp { get; set; }
}
[ProtoContract]
public partial class C2Map_Look : AMessage, ICustomRouteMessage
{
public static C2Map_Look Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_Look>();
}
public override void Dispose()
{
Rotation = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_Look>(this);
#endif
}
public uint OpCode() { return OuterOpcode.C2Map_Look; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public Vector3Info Rotation { get; set; }
[ProtoMember(2)]
public long Timestamp { get; set; }
}
/// <summary>
/// 玩家移动推送
/// </summary>
[ProtoContract]
public partial class Map2C_MoveNotify : AMessage, ICustomRouteMessage
{
public static Map2C_MoveNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_MoveNotify>();
}
public override void Dispose()
{
Id = default;
Position = default;
Rotation = default;
Direction = default;
IsStop = default;
IsRun = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_MoveNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_MoveNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public Vector3Info Position { get; set; }
[ProtoMember(3)]
public Vector3Info Rotation { get; set; }
[ProtoMember(4)]
public Vector3Info Direction { get; set; }
[ProtoMember(5)]
public bool IsStop { get; set; }
[ProtoMember(6)]
public bool IsRun { get; set; }
[ProtoMember(7)]
public long Timestamp { get; set; }
}
/// <summary>
/// 玩家旋转推送
/// </summary>
[ProtoContract]
public partial class Map2C_LookeNotify : AMessage, ICustomRouteMessage
{
public static Map2C_LookeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_LookeNotify>();
}
public override void Dispose()
{
Id = default;
Rotation = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_LookeNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_LookeNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public Vector3Info Rotation { get; set; }
[ProtoMember(3)]
public long Timestamp { get; set; }
}
}

View File

@@ -1,10 +1,24 @@
using System.Collections.Generic;
namespace Fantasy namespace Fantasy
{ {
// Route协议定义(需要定义1000以上、因为1000以内的框架预留) /// <summary>
public static class RouteType /// 本代码有编辑器生成,请不要再这里进行编辑。
{ /// Route协议定义(需要定义1000以上、因为1000以内的框架预留)
public const int GateRoute = 1001; // Gate /// </summary>
public const int SocialRoute = 1002; // Social public static partial class RouteType
public const int GameRoute = 1003; // Game {
} public const int GateRoute = 1001; // Gate
} public const int SocialRoute = 1002; // Social
public const int GameRoute = 1003; // Game
public static IEnumerable<int> RoamingTypes
{
get
{
yield return GateRoute;
yield return SocialRoute;
yield return GameRoute;
}
}
}
}

View File

@@ -1,957 +0,0 @@
using ProtoBuf;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
/// <summary>
/// /////////// ******** 私聊/邮件 *******/////////////
/// </summary>
/// <summary>
/// 会话信息
/// </summary>
[ProtoContract]
public partial class ConversationInfo : AMessage
{
public static ConversationInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ConversationInfo>();
}
public override void Dispose()
{
RoleInfo = default;
List.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ConversationInfo>(this);
#endif
}
[ProtoMember(1)]
public RoleSimpleInfo RoleInfo { get; set; }
[ProtoMember(2)]
public List<MailInfo> List = new List<MailInfo>();
}
[ProtoContract]
public partial class MailInfo : AMessage
{
public static MailInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<MailInfo>();
}
public override void Dispose()
{
Id = default;
Sender = default;
Content = default;
CreateTime = default;
MailType = default;
MailState = default;
Items.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<MailInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public long Sender { get; set; }
[ProtoMember(3)]
public string Content { get; set; }
[ProtoMember(4)]
public long CreateTime { get; set; }
[ProtoMember(5)]
public int MailType { get; set; }
[ProtoMember(6)]
public int MailState { get; set; }
[ProtoMember(7)]
public List<AwardInfo> Items = new List<AwardInfo>();
}
/// <summary>
/// 请求会话列表
/// </summary>
[ProtoContract]
public partial class C2S_GetConversationsRequest : AMessage, ICustomRouteRequest
{
public static C2S_GetConversationsRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_GetConversationsRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_GetConversationsRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_GetConversationsResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_GetConversationsRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
}
/// <summary>
/// 请求会话列表响应
/// </summary>
[ProtoContract]
public partial class S2C_GetConversationsResponse : AMessage, ICustomRouteResponse
{
public static S2C_GetConversationsResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_GetConversationsResponse>();
}
public override void Dispose()
{
ErrorCode = default;
List.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_GetConversationsResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_GetConversationsResponse; }
[ProtoMember(1)]
public List<ConversationInfo> List = new List<ConversationInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 发送邮件消息
/// </summary>
[ProtoContract]
public partial class C2S_SendMailRequest : AMessage, ICustomRouteRequest
{
public static C2S_SendMailRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_SendMailRequest>();
}
public override void Dispose()
{
Target = default;
Content = default;
Items.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_SendMailRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_SendMailResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_SendMailRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long Target { get; set; }
[ProtoMember(2)]
public string Content { get; set; }
[ProtoMember(3)]
public List<AwardInfo> Items = new List<AwardInfo>();
}
/// <summary>
/// 发送邮件消息响应
/// </summary>
[ProtoContract]
public partial class S2C_SendMailResponse : AMessage, ICustomRouteResponse
{
public static S2C_SendMailResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_SendMailResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_SendMailResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_SendMailResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 发送删除会话消息
/// </summary>
[ProtoContract]
public partial class C2S_DeleteMailRequest : AMessage, ICustomRouteRequest
{
public static C2S_DeleteMailRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_DeleteMailRequest>();
}
public override void Dispose()
{
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_DeleteMailRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_DeleteMailResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_DeleteMailRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long Id { get; set; }
}
/// <summary>
/// 发送删除会话消息响应
/// </summary>
[ProtoContract]
public partial class S2C_DeleteMailResponse : AMessage, ICustomRouteResponse
{
public static S2C_DeleteMailResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_DeleteMailResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_DeleteMailResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_DeleteMailResponse; }
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 新邮件推送
/// </summary>
[ProtoContract]
public partial class S2C_HaveMail : AMessage, ICustomRouteMessage
{
public static S2C_HaveMail Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_HaveMail>();
}
public override void Dispose()
{
Mail = default;
Key = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_HaveMail>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_HaveMail; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public MailInfo Mail { get; set; }
[ProtoMember(2)]
public string Key { get; set; }
}
[ProtoContract]
public partial class S2C_MailState : AMessage, ICustomRouteMessage
{
public static S2C_MailState Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_MailState>();
}
public override void Dispose()
{
MailState = default;
MailId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_MailState>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_MailState; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public int MailState { get; set; }
[ProtoMember(2)]
public long MailId { get; set; }
}
/// <summary>
/// /////////// ******** 频道聊天 *******/////////////
/// </summary>
[ProtoContract]
public partial class ChatUserInfo : AMessage
{
public static ChatUserInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ChatUserInfo>();
}
public override void Dispose()
{
Id = default;
Name = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ChatUserInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public long Name { get; set; }
}
[ProtoContract]
public partial class ChatMessageInfo : AMessage
{
public static ChatMessageInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ChatMessageInfo>();
}
public override void Dispose()
{
Type = default;
Source = default;
Trigger = default;
Content = default;
SendTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ChatMessageInfo>(this);
#endif
}
[ProtoMember(1)]
public int Type { get; set; }
[ProtoMember(2)]
public long Source { get; set; }
[ProtoMember(3)]
public ChatUserInfo Trigger { get; set; }
[ProtoMember(4)]
public string Content { get; set; }
[ProtoMember(5)]
public long SendTime { get; set; }
}
/// <summary>
/// 创建频道
/// </summary>
[ProtoContract]
public partial class C2S_CreateChannelRequest : AMessage, ICustomRouteRequest
{
public static C2S_CreateChannelRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_CreateChannelRequest>();
}
public override void Dispose()
{
Name = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_CreateChannelRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_CreateChannelResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_CreateChannelRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public string Name { get; set; }
}
/// <summary>
/// 创建频道响应
/// </summary>
[ProtoContract]
public partial class S2C_CreateChannelResponse : AMessage, ICustomRouteResponse
{
public static S2C_CreateChannelResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_CreateChannelResponse>();
}
public override void Dispose()
{
ErrorCode = default;
ChannelId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_CreateChannelResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_CreateChannelResponse; }
[ProtoMember(1)]
public long ChannelId { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求进入频道
/// </summary>
[ProtoContract]
public partial class C2S_JoinChannelRequest : AMessage, ICustomRouteRequest
{
public static C2S_JoinChannelRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_JoinChannelRequest>();
}
public override void Dispose()
{
Target = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_JoinChannelRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_JoinChannelResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_JoinChannelRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long Target { get; set; }
}
/// <summary>
/// 进入频道响应
/// </summary>
[ProtoContract]
public partial class S2C_JoinChannelResponse : AMessage, ICustomRouteResponse
{
public static S2C_JoinChannelResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_JoinChannelResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_JoinChannelResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_JoinChannelResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 发送消息
/// </summary>
[ProtoContract]
public partial class C2S_SendMessageRequest : AMessage, ICustomRouteRequest
{
public static C2S_SendMessageRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_SendMessageRequest>();
}
public override void Dispose()
{
Message = default;
Target = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_SendMessageRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_SendMessageResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_SendMessageRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public string Message { get; set; }
[ProtoMember(2)]
public long Target { get; set; }
}
/// <summary>
/// 发送消息响应
/// </summary>
[ProtoContract]
public partial class S2C_SendMessageResponse : AMessage, ICustomRouteResponse
{
public static S2C_SendMessageResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_SendMessageResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_SendMessageResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_SendMessageResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 推送消息
/// </summary>
[ProtoContract]
public partial class S2C_Message : AMessage, ICustomRouteMessage
{
public static S2C_Message Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_Message>();
}
public override void Dispose()
{
Msg = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_Message>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_Message; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public ChatMessageInfo Msg { get; set; }
}
/// <summary>
/// /////////// ******** 工会 *******/////////////
/// </summary>
[ProtoContract]
public partial class ClubInfo : AMessage
{
public static ClubInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ClubInfo>();
}
public override void Dispose()
{
Id = default;
Name = default;
CreateTime = default;
OwnerId = default;
MemberCount = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ClubInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public string Name { get; set; }
[ProtoMember(3)]
public long CreateTime { get; set; }
[ProtoMember(4)]
public long OwnerId { get; set; }
[ProtoMember(5)]
public int MemberCount { get; set; }
}
/// <summary>
/// 请求创建工会
/// </summary>
[ProtoContract]
public partial class C2S_CreateClubRequest : AMessage, ICustomRouteRequest
{
public static C2S_CreateClubRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_CreateClubRequest>();
}
public override void Dispose()
{
Name = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_CreateClubRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_CreateClubResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_CreateClubRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public string Name { get; set; }
}
/// <summary>
/// 创建工会响应
/// </summary>
[ProtoContract]
public partial class S2C_CreateClubResponse : AMessage, ICustomRouteResponse
{
public static S2C_CreateClubResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_CreateClubResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Club = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_CreateClubResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_CreateClubResponse; }
[ProtoMember(1)]
public ClubInfo Club { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求工会信息
/// </summary>
[ProtoContract]
public partial class C2S_GetClubInfoRequest : AMessage, ICustomRouteRequest
{
public static C2S_GetClubInfoRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_GetClubInfoRequest>();
}
public override void Dispose()
{
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_GetClubInfoRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_GetClubInfoResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_GetClubInfoRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long ClubId { get; set; }
}
/// <summary>
/// 响应工会信息
/// </summary>
[ProtoContract]
public partial class S2C_GetClubInfoResponse : AMessage, ICustomRouteResponse
{
public static S2C_GetClubInfoResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_GetClubInfoResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Name = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_GetClubInfoResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_GetClubInfoResponse; }
[ProtoMember(1)]
public string Name { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求工会成员列表
/// </summary>
[ProtoContract]
public partial class C2S_GetMemberListRequest : AMessage, ICustomRouteRequest
{
public static C2S_GetMemberListRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_GetMemberListRequest>();
}
public override void Dispose()
{
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_GetMemberListRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_GetMemberListResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_GetMemberListRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long ClubId { get; set; }
}
/// <summary>
/// 响应工会成员列表
/// </summary>
[ProtoContract]
public partial class S2C_GetMemberListResponse : AMessage, ICustomRouteResponse
{
public static S2C_GetMemberListResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_GetMemberListResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Members.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_GetMemberListResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_GetMemberListResponse; }
[ProtoMember(1)]
public List<RoleSimpleInfo> Members = new List<RoleSimpleInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 获取工会列表请求
/// </summary>
[ProtoContract]
public partial class C2S_GetClubListRequest : AMessage, ICustomRouteRequest
{
public static C2S_GetClubListRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_GetClubListRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_GetClubListRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_GetClubListResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_GetClubListRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
}
/// <summary>
/// 获取工会列表响应
/// </summary>
[ProtoContract]
public partial class S2C_GetClubListResponse : AMessage, ICustomRouteResponse
{
public static S2C_GetClubListResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_GetClubListResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Clubs.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_GetClubListResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_GetClubListResponse; }
[ProtoMember(1)]
public List<ClubInfo> Clubs = new List<ClubInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求加入工会
/// </summary>
[ProtoContract]
public partial class C2S_JoinClubRequest : AMessage, ICustomRouteRequest
{
public static C2S_JoinClubRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_JoinClubRequest>();
}
public override void Dispose()
{
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_JoinClubRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_JoinClubResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_JoinClubRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long ClubId { get; set; }
}
/// <summary>
/// 响应加入工会
/// </summary>
[ProtoContract]
public partial class S2C_JoinClubResponse : AMessage, ICustomRouteResponse
{
public static S2C_JoinClubResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_JoinClubResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Club = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_JoinClubResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_JoinClubResponse; }
[ProtoMember(1)]
public ClubInfo Club { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求退出工会
/// </summary>
[ProtoContract]
public partial class C2S_LeaveClubRequest : AMessage, ICustomRouteRequest
{
public static C2S_LeaveClubRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_LeaveClubRequest>();
}
public override void Dispose()
{
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_LeaveClubRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_LeaveClubResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_LeaveClubRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long ClubId { get; set; }
}
/// <summary>
/// 响应退出工会
/// </summary>
[ProtoContract]
public partial class S2C_LeaveClubResponse : AMessage, ICustomRouteResponse
{
public static S2C_LeaveClubResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_LeaveClubResponse>();
}
public override void Dispose()
{
ErrorCode = default;
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_LeaveClubResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_LeaveClubResponse; }
[ProtoMember(1)]
public long ClubId { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求解散工会
/// </summary>
[ProtoContract]
public partial class C2S_DissolveClubRequest : AMessage, ICustomRouteRequest
{
public static C2S_DissolveClubRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_DissolveClubRequest>();
}
public override void Dispose()
{
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_DissolveClubRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_DissolveClubResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_DissolveClubRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long ClubId { get; set; }
}
/// <summary>
/// 响应解散工会
/// </summary>
[ProtoContract]
public partial class S2C_DissolveClubResponse : AMessage, ICustomRouteResponse
{
public static S2C_DissolveClubResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_DissolveClubResponse>();
}
public override void Dispose()
{
ErrorCode = default;
ClubId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_DissolveClubResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_DissolveClubResponse; }
[ProtoMember(1)]
public long ClubId { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求操作申请
/// </summary>
[ProtoContract]
public partial class C2S_DisposeJoinRequest : AMessage, ICustomRouteRequest
{
public static C2S_DisposeJoinRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2S_DisposeJoinRequest>();
}
public override void Dispose()
{
ClubId = default;
ApplicantId = default;
Agree = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2S_DisposeJoinRequest>(this);
#endif
}
[ProtoIgnore]
public S2C_DisposeJoinResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2S_DisposeJoinRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public long ClubId { get; set; }
[ProtoMember(2)]
public long ApplicantId { get; set; }
[ProtoMember(3)]
public int Agree { get; set; }
}
/// <summary>
/// 响应操作申请
/// </summary>
[ProtoContract]
public partial class S2C_DisposeJoinResponse : AMessage, ICustomRouteResponse
{
public static S2C_DisposeJoinResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_DisposeJoinResponse>();
}
public override void Dispose()
{
ErrorCode = default;
ClubId = default;
ApplicantId = default;
Agree = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_DisposeJoinResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_DisposeJoinResponse; }
[ProtoMember(1)]
public long ClubId { get; set; }
[ProtoMember(2)]
public long ApplicantId { get; set; }
[ProtoMember(3)]
public int Agree { get; set; }
[ProtoMember(4)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 推送消息
/// </summary>
[ProtoContract]
public partial class S2C_ClubChange : AMessage, ICustomRouteMessage
{
public static S2C_ClubChange Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2C_ClubChange>();
}
public override void Dispose()
{
Club = default;
ChangeType = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2C_ClubChange>(this);
#endif
}
public uint OpCode() { return OuterOpcode.S2C_ClubChange; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public ClubInfo Club { get; set; }
[ProtoMember(2)]
public int ChangeType { get; set; }
}
}

View File

@@ -1,3 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace NBF.ConfigTable; namespace NBF.ConfigTable;
public interface IConfigContext public interface IConfigContext

View File

@@ -1,3 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection; using System.Reflection;
using Fantasy; using Fantasy;
using Fantasy.Helper; using Fantasy.Helper;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
namespace NB.Chat; namespace NB.Chat;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Chat; namespace NB.Chat;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Club; namespace NB.Club;

View File

@@ -1,4 +1,5 @@
using Fantasy.DataStructure.Collection; using System.Collections.Generic;
using Fantasy.DataStructure.Collection;
using Fantasy.Entitas; using Fantasy.Entitas;
using Fantasy.Helper; using Fantasy.Helper;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Chat; namespace NB.Chat;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
using NB.Game; using NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Chat; namespace NB.Chat;

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using System.Collections.Generic;
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
namespace NB.Chat; namespace NB.Chat;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.DataStructure.Collection; using Fantasy.DataStructure.Collection;
using Fantasy.Entitas; using Fantasy.Entitas;

View File

@@ -1,3 +1,4 @@
using System;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network; using Fantasy.Network;
@@ -21,7 +22,7 @@ public class C2A_LoginRequestHandler : MessageRPC<C2A_LoginRequest, A2C_LoginRes
session.SetTimeout(3000); session.SetTimeout(3000);
var scene = session.Scene; var scene = session.Scene;
Log.Info($"登录服场景 {scene.Id} {scene.RouteId} {scene.SceneConfigId}"); Log.Info($"登录服场景 {scene.Id} {scene.RuntimeId} {scene.SceneConfigId}");
var result = await AuthenticationHelper.Login(scene, request.Username, request.Password); var result = await AuthenticationHelper.Login(scene, request.Username, request.Password);
if (result.ErrorCode != ErrorCode.Successful && result.AccountId == -1) if (result.ErrorCode != ErrorCode.Successful && result.AccountId == -1)

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas; using Fantasy.Entitas;

View File

@@ -1,3 +1,4 @@
using System;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Security.Cryptography; using System.Security.Cryptography;
using Fantasy; using Fantasy;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
using NB.Chat; using NB.Chat;
@@ -6,7 +7,7 @@ using NB.Game;
namespace NB.Common; namespace NB.Common;
public class G2Common_EnterRequestHandler : RouteRPC<Scene, G2Common_EnterRequest, G2Common_EnterResponse> public class G2Common_EnterRequestHandler : AddressRPC<Scene, G2Common_EnterRequest, G2Common_EnterResponse>
{ {
protected override async FTask Run(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response, protected override async FTask Run(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response,
Action reply) Action reply)

View File

@@ -1,4 +1,5 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
using NB.Chat; using NB.Chat;
@@ -6,7 +7,7 @@ using NB.Game;
namespace NB.Common; namespace NB.Common;
public class G2Common_ExitRequestHandler : RouteRPC<Scene, G2Common_ExitRequest, Common2G_ExitResponse> public class G2Common_ExitRequestHandler : AddressRPC<Scene, G2Common_ExitRequest, Common2G_ExitResponse>
{ {
protected override async FTask Run(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response, protected override async FTask Run(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response,
Action reply) Action reply)

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Linq;
using Fantasy;
using Fantasy.Platform.Net; using Fantasy.Platform.Net;
namespace NB.Common; namespace NB.Common;

View File

@@ -1,4 +1,5 @@
using NB.Authentication; using System;
using NB.Authentication;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas; using Fantasy.Entitas;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;
using Fantasy.Helper; using Fantasy.Helper;

View File

@@ -1,11 +1,12 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class public class
S2G_GetPlayerBasicInfoRequestHandler : RouteRPC<Scene, S2G_GetPlayerBasicInfoRequest, S2G_GetPlayerBasicInfoRequestHandler : AddressRPC<Scene, S2G_GetPlayerBasicInfoRequest,
G2S_GetPlayerBasicInfoResponse> G2S_GetPlayerBasicInfoResponse>
{ {
protected override async FTask Run(Scene scene, S2G_GetPlayerBasicInfoRequest request, protected override async FTask Run(Scene scene, S2G_GetPlayerBasicInfoRequest request,

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using NB.Common; using NB.Common;
@@ -15,9 +16,9 @@ public static class CacheHandler
public static async FTask<List<RoleSimpleInfo>> GetPlayerBasicCacheInfos(Scene scene, List<long> id) public static async FTask<List<RoleSimpleInfo>> GetPlayerBasicCacheInfos(Scene scene, List<long> id)
{ {
var gameSceneConfig = SceneConfigHelper.GetConfig(SceneType.Game); var gameSceneConfig = SceneConfigHelper.GetConfig(SceneType.Game);
var gameRouteId = gameSceneConfig.RouteId; var gameRouteId = gameSceneConfig.Address;
//连接到游戏中心服 //连接到游戏中心服
var gameResponse = (G2S_GetPlayerBasicInfoResponse)await scene.NetworkMessagingComponent.CallInnerRoute( var gameResponse = (G2S_GetPlayerBasicInfoResponse)await scene.NetworkMessagingComponent.Call(
gameRouteId, new S2G_GetPlayerBasicInfoRequest() gameRouteId, new S2G_GetPlayerBasicInfoRequest()
{ {
IdList = id IdList = id

View File

@@ -1,4 +1,5 @@
using System.Diagnostics; using System.Collections.Generic;
using System.Diagnostics;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;

View File

@@ -1,10 +1,11 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Game_GetItemsRequestHandler : RouteRPC<Player, C2Game_GetItemsRequest, Game2C_GetItemsResponse> public class C2Game_GetItemsRequestHandler : AddressRPC<Player, C2Game_GetItemsRequest, Game2C_GetItemsResponse>
{ {
protected override async FTask Run(Player entity, C2Game_GetItemsRequest request, Game2C_GetItemsResponse response, protected override async FTask Run(Player entity, C2Game_GetItemsRequest request, Game2C_GetItemsResponse response,
Action reply) Action reply)

View File

@@ -1,11 +1,12 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas; using Fantasy.Entitas;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Game_GetRoleInfoRequestHandler : RouteRPC<Player, C2Game_GetRoleInfoRequest, Game2C_GetRoleInfoResponse> public class C2Game_GetRoleInfoRequestHandler : AddressRPC<Player, C2Game_GetRoleInfoRequest, Game2C_GetRoleInfoResponse>
{ {
protected override async FTask Run(Player entity, C2Game_GetRoleInfoRequest request, protected override async FTask Run(Player entity, C2Game_GetRoleInfoRequest request,
Game2C_GetRoleInfoResponse response, Action reply) Game2C_GetRoleInfoResponse response, Action reply)

View File

@@ -1,10 +1,13 @@
using Fantasy; using System;
using System.Collections.Generic;
using System.Linq;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Game_RigChangeRequestHandler : RouteRPC<Player, C2Game_RigChangeRequest, Game2C_RigChangeResponse> public class C2Game_RigChangeRequestHandler : AddressRPC<Player, C2Game_RigChangeRequest, Game2C_RigChangeResponse>
{ {
protected override async FTask Run(Player entity, C2Game_RigChangeRequest request, protected override async FTask Run(Player entity, C2Game_RigChangeRequest request,
Game2C_RigChangeResponse response, Action reply) Game2C_RigChangeResponse response, Action reply)

View File

@@ -1,10 +1,11 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Game_SetSlotRequestHandler : RouteRPC<Player, C2Game_SetSlotRequest, Game2C_SetSlotResponse> public class C2Game_SetSlotRequestHandler : AddressRPC<Player, C2Game_SetSlotRequest, Game2C_SetSlotResponse>
{ {
protected override async FTask Run(Player entity, C2Game_SetSlotRequest request, Game2C_SetSlotResponse response, protected override async FTask Run(Player entity, C2Game_SetSlotRequest request, Game2C_SetSlotResponse response,
Action reply) Action reply)

View File

@@ -1,10 +1,11 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Game_UseItemRequestHandler : RouteRPC<Player, C2Game_UseItemRequest, Game2C_UseItemResponse> public class C2Game_UseItemRequestHandler : AddressRPC<Player, C2Game_UseItemRequest, Game2C_UseItemResponse>
{ {
protected override async FTask Run(Player entity, C2Game_UseItemRequest request, Game2C_UseItemResponse response, protected override async FTask Run(Player entity, C2Game_UseItemRequest request, Game2C_UseItemResponse response,
Action reply) Action reply)

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;

View File

@@ -1,11 +1,12 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas; using Fantasy.Entitas;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Map_CreateRoomRequestHandler : RouteRPC<Player, C2Map_CreateRoomRequest, Map2C_CreateRoomResponse> public class C2Map_CreateRoomRequestHandler : AddressRPC<Player, C2Map_CreateRoomRequest, Map2C_CreateRoomResponse>
{ {
protected override async FTask Run(Player entity, C2Map_CreateRoomRequest request, protected override async FTask Run(Player entity, C2Map_CreateRoomRequest request,
Map2C_CreateRoomResponse response, Map2C_CreateRoomResponse response,

View File

@@ -4,7 +4,7 @@ using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Map_LookHandler : Route<Player, C2Map_Look> public class C2Map_LookHandler : Address<Player, C2Map_Look>
{ {
protected override async FTask Run(Player entity, C2Map_Look message) protected override async FTask Run(Player entity, C2Map_Look message)
{ {
@@ -37,7 +37,7 @@ public class C2Map_LookHandler : Route<Player, C2Map_Look>
foreach (var (_, unit) in room.Units) foreach (var (_, unit) in room.Units)
{ {
// if (unit.Id == entity.Id) continue; // if (unit.Id == entity.Id) continue;
entity.Scene.NetworkMessagingComponent.SendInnerRoute(unit.SessionRunTimeId, notifyMessage); entity.Scene.NetworkMessagingComponent.Send(unit.SessionRunTimeId, notifyMessage);
} }
await FTask.CompletedTask; await FTask.CompletedTask;

View File

@@ -5,7 +5,7 @@ using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Map_MoveHandler : Route<Player, C2Map_Move> public class C2Map_MoveHandler : Address<Player, C2Map_Move>
{ {
protected override async FTask Run(Player entity, C2Map_Move message) protected override async FTask Run(Player entity, C2Map_Move message)
{ {
@@ -45,7 +45,7 @@ public class C2Map_MoveHandler : Route<Player, C2Map_Move>
foreach (var (_, unit) in room.Units) foreach (var (_, unit) in room.Units)
{ {
// if (unit.Id == entity.Id) continue; // if (unit.Id == entity.Id) continue;
entity.Scene.NetworkMessagingComponent.SendInnerRoute(unit.SessionRunTimeId, notifyMessage); entity.Scene.NetworkMessagingComponent.Send(unit.SessionRunTimeId, notifyMessage);
} }

View File

@@ -4,7 +4,7 @@ using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Map_RolePropertyChangeHandler : Route<Player, C2Map_RolePropertyChange> public class C2Map_RolePropertyChangeHandler : Address<Player, C2Map_RolePropertyChange>
{ {
protected override async FTask Run(Player entity, C2Map_RolePropertyChange message) protected override async FTask Run(Player entity, C2Map_RolePropertyChange message)
{ {
@@ -33,7 +33,7 @@ public class C2Map_RolePropertyChangeHandler : Route<Player, C2Map_RolePropertyC
foreach (var (_, unit) in room.Units) foreach (var (_, unit) in room.Units)
{ {
if (unit.Id == entity.Id) continue; if (unit.Id == entity.Id) continue;
entity.Scene.NetworkMessagingComponent.SendInnerRoute(unit.SessionRunTimeId, notifyMessage); entity.Scene.NetworkMessagingComponent.Send(unit.SessionRunTimeId, notifyMessage);
} }
await FTask.CompletedTask; await FTask.CompletedTask;

View File

@@ -1,10 +1,11 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game; namespace NB.Game;
public class C2Map_TakeItemRequestHandler : RouteRPC<Player, C2Map_TakeItemRequest, Map2C_TakeItemResponse> public class C2Map_TakeItemRequestHandler : AddressRPC<Player, C2Map_TakeItemRequest, Map2C_TakeItemResponse>
{ {
protected override async FTask Run(Player entity, C2Map_TakeItemRequest request, Map2C_TakeItemResponse response, protected override async FTask Run(Player entity, C2Map_TakeItemRequest request, Map2C_TakeItemResponse response,
Action reply) Action reply)
@@ -53,7 +54,7 @@ public class C2Map_TakeItemRequestHandler : RouteRPC<Player, C2Map_TakeItemReque
foreach (var (_, unit) in room.Units) foreach (var (_, unit) in room.Units)
{ {
// if (unit.Id == entity.Id) continue; // if (unit.Id == entity.Id) continue;
entity.Scene.NetworkMessagingComponent.SendInnerRoute(unit.SessionRunTimeId, notifyMessage); entity.Scene.NetworkMessagingComponent.Send(unit.SessionRunTimeId, notifyMessage);
} }
} }
} }

View File

@@ -1,4 +1,5 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
using NB.Game; using NB.Game;
@@ -8,7 +9,7 @@ namespace NB.Game.Inner;
/// <summary> /// <summary>
/// 请求进入地图 /// 请求进入地图
/// </summary> /// </summary>
public class G2Map_EnterMapRequestHandler : RouteRPC<Scene, G2Map_EnterMapRequest, Map2G_EnterMapResponse> public class G2Map_EnterMapRequestHandler : AddressRPC<Scene, G2Map_EnterMapRequest, Map2G_EnterMapResponse>
{ {
protected override async FTask Run(Scene entity, G2Map_EnterMapRequest request, Map2G_EnterMapResponse response, protected override async FTask Run(Scene entity, G2Map_EnterMapRequest request, Map2G_EnterMapResponse response,
Action reply) Action reply)

View File

@@ -1,10 +1,11 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
namespace NB.Game.Inner; namespace NB.Game.Inner;
public class G2Map_ExitRoomRequestHandler : RouteRPC<Scene, G2Map_ExitRoomRequest, Map2G_ExiRoomResponse> public class G2Map_ExitRoomRequestHandler : AddressRPC<Scene, G2Map_ExitRoomRequest, Map2G_ExiRoomResponse>
{ {
protected override async FTask Run(Scene entity, G2Map_ExitRoomRequest request, Map2G_ExiRoomResponse response, protected override async FTask Run(Scene entity, G2Map_ExitRoomRequest request, Map2G_ExiRoomResponse response,
Action reply) Action reply)

View File

@@ -1,4 +1,5 @@
using System.Text; using System;
using System.Text;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Fantasy.Entitas; using Fantasy.Entitas;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
namespace NB.Game; namespace NB.Game;

View File

@@ -1,4 +1,6 @@
using Fantasy; using System;
using System.Collections.Generic;
using Fantasy;
using Fantasy.Entitas; using Fantasy.Entitas;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;

View File

@@ -1,3 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas; using Fantasy.Entitas;

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
@@ -69,8 +70,8 @@ public static class PlayerSystem
var ret = new MapUnitInfo() var ret = new MapUnitInfo()
{ {
Id = self.Id, Id = self.Id,
Position = Vector3Info.Create(self.Scene), Position = Vector3Info.Create(),
Rotation = Vector3Info.Create(self.Scene), Rotation = Vector3Info.Create(),
}; };
var mapUnit = self.GetComponent<MapUnitComponent>(); var mapUnit = self.GetComponent<MapUnitComponent>();

View File

@@ -133,7 +133,7 @@ public static class PlayerHelper
var info = new RoleInfo(); var info = new RoleInfo();
info.BaseInfo = GetRoleBaseInfo(self); info.BaseInfo = GetRoleBaseInfo(self);
// info.Items = self.ItemContainer.GetItemInfos(); // info.Items = self.ItemContainer.GetItemInfos();
info.RoleId = self.RouteId; info.RoleId = self.Address;
return info; return info;
} }

View File

@@ -1,3 +1,4 @@
using System;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;

View File

@@ -7,7 +7,7 @@ using Fantasy.PacketParser;
namespace NB.Gate; namespace NB.Gate;
public class S2G_ChatMessageHandler : Route<Scene, S2G_ChatMessage> public class S2G_ChatMessageHandler : Address<Scene, S2G_ChatMessage>
{ {
protected override async FTask Run(Scene scene, S2G_ChatMessage message) protected override async FTask Run(Scene scene, S2G_ChatMessage message)
{ {

View File

@@ -1,4 +1,6 @@
using Fantasy; using System;
using System.Linq;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network; using Fantasy.Network;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
@@ -68,7 +70,7 @@ public class C2G_EnterMapRequestHandler : MessageRPC<C2G_EnterMapRequest, G2C_En
//先判断是否需要更换地图服务器 //先判断是否需要更换地图服务器
var oldServerRouteId = gateUnit.GetAddress(sceneConfig.SceneType); var oldServerRouteId = gateUnit.GetAddress(sceneConfig.SceneType);
if (oldServerRouteId != sceneConfig.RouteId) if (oldServerRouteId != sceneConfig.Address)
{ {
//先退出旧的服务 //先退出旧的服务
var ret = await gateUnit.Offline(session.RuntimeId, RouteType.GameRoute); var ret = await gateUnit.Offline(session.RuntimeId, RouteType.GameRoute);
@@ -88,8 +90,8 @@ public class C2G_EnterMapRequestHandler : MessageRPC<C2G_EnterMapRequest, G2C_En
} }
//执行进入房间操作 //执行进入房间操作
var roomResponse = (Map2G_EnterMapResponse)await session.Scene.NetworkMessagingComponent.CallInnerRoute( var roomResponse = (Map2G_EnterMapResponse)await session.Scene.NetworkMessagingComponent.Call(
sceneConfig.RouteId, new G2Map_EnterMapRequest() sceneConfig.Address, new G2Map_EnterMapRequest()
{ {
AccountId = gateUnit.Id, AccountId = gateUnit.Id,
RoomCode = request.RoomCode, RoomCode = request.RoomCode,

View File

@@ -1,3 +1,4 @@
using System;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network; using Fantasy.Network;
@@ -62,8 +63,8 @@ public class C2G_ExitRoomRequestHandler : MessageRPC<C2G_ExitRoomRequest, G2C_Ex
} }
//执行退出房间操作 //执行退出房间操作
var roomResponse = (Map2G_ExiRoomResponse)await session.Scene.NetworkMessagingComponent.CallInnerRoute( var roomResponse = (Map2G_ExiRoomResponse)await session.Scene.NetworkMessagingComponent.Call(
sceneConfig.RouteId, new G2Map_ExitRoomRequest() sceneConfig.Address, new G2Map_ExitRoomRequest()
{ {
AccountId = gateUnit.Id, AccountId = gateUnit.Id,
RoomCode = request.RoomCode, RoomCode = request.RoomCode,

View File

@@ -1,3 +1,4 @@
using System;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network; using Fantasy.Network;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas; using Fantasy.Entitas;
using Fantasy.Network; using Fantasy.Network;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System.Collections.Generic;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;
using Fantasy.Network; using Fantasy.Network;
@@ -72,9 +73,9 @@ public static class GateUnitSystem
sceneConfig = SceneConfigHelper.GetConfigByRouteType(routeType); sceneConfig = SceneConfigHelper.GetConfigByRouteType(routeType);
} }
var gameRouteId = sceneConfig.RouteId; var gameRouteId = sceneConfig.Address;
var gameResponse = (G2Common_EnterResponse)await self.Scene.NetworkMessagingComponent.CallInnerRoute( var gameResponse = (G2Common_EnterResponse)await self.Scene.NetworkMessagingComponent.Call(
gameRouteId, new G2Common_EnterRequest() gameRouteId, new G2Common_EnterRequest()
{ {
AccountId = self.AccountID, AccountId = self.AccountID,
@@ -115,11 +116,11 @@ public static class GateUnitSystem
public static async FTask<uint> Offline(this GateUnit self, long sessionId, int routeType) public static async FTask<uint> Offline(this GateUnit self, long sessionId, int routeType)
{ {
var sceneConfig = SceneConfigHelper.GetConfigByRouteType(routeType); var sceneConfig = SceneConfigHelper.GetConfigByRouteType(routeType);
var sceneRouteId = sceneConfig.RouteId; var sceneRouteId = sceneConfig.Address;
if (sceneRouteId < 1) return ErrorCode.Successful; if (sceneRouteId < 1) return ErrorCode.Successful;
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
{ {
var gameResponse = (Common2G_ExitResponse)await self.Scene.NetworkMessagingComponent.CallInnerRoute( var gameResponse = (Common2G_ExitResponse)await self.Scene.NetworkMessagingComponent.Call(
sceneRouteId, new G2Common_ExitRequest() sceneRouteId, new G2Common_ExitRequest()
{ {
AccountId = self.AccountID, AccountId = self.AccountID,

View File

@@ -1,3 +1,4 @@
using System;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Security.Cryptography; using System.Security.Cryptography;
using Fantasy.Entitas.Interface; using Fantasy.Entitas.Interface;

View File

@@ -1,3 +1,4 @@
using System;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using Fantasy; using Fantasy;

View File

@@ -1,4 +1,5 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
@@ -8,7 +9,7 @@ namespace NB.Chat;
/// 请求创建频道 /// 请求创建频道
/// </summary> /// </summary>
public class public class
C2S_CreateChannelRequestHandler : RouteRPC<SocialUnit, C2S_CreateChannelRequest, S2C_CreateChannelResponse> C2S_CreateChannelRequestHandler : AddressRPC<SocialUnit, C2S_CreateChannelRequest, S2C_CreateChannelResponse>
{ {
protected override async FTask Run(SocialUnit entity, C2S_CreateChannelRequest request, protected override async FTask Run(SocialUnit entity, C2S_CreateChannelRequest request,
S2C_CreateChannelResponse response, Action reply) S2C_CreateChannelResponse response, Action reply)

View File

@@ -5,7 +5,7 @@
// namespace NB.Chat; // namespace NB.Chat;
// //
// public class // public class
// C2S_GetOfflineMessageRequestHandler : RouteRPC<SocialUnit, C2S_GetOfflineMessageRequest, // C2S_GetOfflineMessageRequestHandler : AddressRPC<SocialUnit, C2S_GetOfflineMessageRequest,
// S2C_GetOfflineMessageResponse> // S2C_GetOfflineMessageResponse>
// { // {
// protected override async FTask Run(SocialUnit entity, C2S_GetOfflineMessageRequest request, // protected override async FTask Run(SocialUnit entity, C2S_GetOfflineMessageRequest request,

View File

@@ -1,4 +1,5 @@
using Fantasy; using System;
using Fantasy;
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
@@ -8,7 +9,7 @@ namespace NB.Chat;
/// 请求进入频道 /// 请求进入频道
/// </summary> /// </summary>
public class public class
C2S_JoinChannelRequestHandler : RouteRPC<SocialUnit, C2S_JoinChannelRequest, S2C_JoinChannelResponse> C2S_JoinChannelRequestHandler : AddressRPC<SocialUnit, C2S_JoinChannelRequest, S2C_JoinChannelResponse>
{ {
protected override async FTask Run(SocialUnit entity, C2S_JoinChannelRequest request, protected override async FTask Run(SocialUnit entity, C2S_JoinChannelRequest request,
S2C_JoinChannelResponse response, Action reply) S2C_JoinChannelResponse response, Action reply)

View File

@@ -1,4 +1,5 @@
using System.Diagnostics; using System;
using System.Diagnostics;
using System.Text; using System.Text;
using Fantasy; using Fantasy;
using Fantasy.Async; using Fantasy.Async;
@@ -9,7 +10,7 @@ using NB.Game;
namespace NB.Chat; namespace NB.Chat;
public sealed class public sealed class
C2S_SendMessageRequestHandler : RouteRPC<SocialUnit, C2S_SendMessageRequest, S2C_SendMessageResponse> C2S_SendMessageRequestHandler : AddressRPC<SocialUnit, C2S_SendMessageRequest, S2C_SendMessageResponse>
{ {
protected override async FTask Run(SocialUnit socialUnit, C2S_SendMessageRequest request, protected override async FTask Run(SocialUnit socialUnit, C2S_SendMessageRequest request,
S2C_SendMessageResponse response, Action reply) S2C_SendMessageResponse response, Action reply)

Some files were not shown because too many files have changed in this diff Show More