缓存模块

This commit is contained in:
bob
2025-08-15 18:12:04 +08:00
parent d5689258fc
commit 34b25273a7
19 changed files with 275 additions and 79 deletions

View File

@@ -34,6 +34,8 @@ namespace Fantasy
Country = default;
Level = default;
Exp = default;
Vip = default;
VipInfo = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
#endif
@@ -48,6 +50,10 @@ namespace Fantasy
public int Level { get; set; }
[ProtoMember(5)]
public int Exp { get; set; }
[ProtoMember(6)]
public bool Vip { get; set; }
[ProtoMember(7)]
public VipInfo VipInfo { get; set; }
}
[ProtoContract]
public partial class KeyValueStringInt64 : AMessage, IProto
@@ -167,6 +173,7 @@ namespace Fantasy
Head = default;
Country = default;
Level = default;
Vip = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleSimpleInfo>(this);
#endif
@@ -181,6 +188,8 @@ namespace Fantasy
public string Country { get; set; }
[ProtoMember(5)]
public int Level { get; set; }
[ProtoMember(6)]
public bool Vip { get; set; }
}
/// <summary>
/// VIP信息

View File

@@ -109,6 +109,53 @@ namespace Fantasy
public uint ErrorCode { get; set; }
}
/// <summary>
/// 获取玩家基础信息
/// </summary>
[ProtoContract]
public partial class S2G_GetPlayerBasicInfoRequest : AMessage, IRouteRequest, IProto
{
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, IProto
{
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; }
}
/// <summary>
/// 通知游戏服角色进入该聊天服
/// </summary>
[ProtoContract]

View File

@@ -6,10 +6,12 @@ namespace Fantasy
public const uint Game2G_EnterResponse = 1207969553;
public const uint G2Game_ExitRequest = 1073751826;
public const uint Game2G_ExitResponse = 1207969554;
public const uint G2S_EnterRequest = 1073751827;
public const uint S2G_EnterResponse = 1207969555;
public const uint G2S_ExitRequest = 1073751828;
public const uint S2G_ExitResponse = 1207969556;
public const uint S2G_GetPlayerBasicInfoRequest = 1073751827;
public const uint G2S_GetPlayerBasicInfoResponse = 1207969555;
public const uint G2S_EnterRequest = 1073751828;
public const uint S2G_EnterResponse = 1207969556;
public const uint G2S_ExitRequest = 1073751829;
public const uint S2G_ExitResponse = 1207969557;
public const uint S2G_ChatMessage = 939534097;
public const uint Club2Chat_CreateChannel = 939534098;
}

View File

@@ -441,6 +441,9 @@ namespace Fantasy
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// /////////// ******** 工会 *******/////////////
/// </summary>
[ProtoContract]
public partial class ClubInfo : AMessage, IProto
{