-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: DarkRRb <177549718+DarkRRb@users.noreply.github.com>
- Loading branch information
1 parent
ddee04b
commit cdf493e
Showing
19 changed files
with
530 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace Lagrange.Core.Common.Entity; | ||
|
||
[Serializable] | ||
public class AiCharacter | ||
{ | ||
public string VoiceId { get; set; } | ||
|
||
public string CharacterName { get; set; } | ||
|
||
public string CharacterVoiceUrl { get; set; } | ||
|
||
public AiCharacter(string voiceId, string characterName, string characterVoiceUrl) | ||
{ | ||
VoiceId = voiceId; | ||
CharacterName = characterName; | ||
CharacterVoiceUrl = characterVoiceUrl; | ||
} | ||
} | ||
|
||
[Serializable] | ||
public class AiCharacterList | ||
{ | ||
public string Type { get; set; } | ||
|
||
public List<AiCharacter> Characters { get; set; } | ||
|
||
public AiCharacterList(string type, List<AiCharacter> characters) | ||
{ | ||
Type = type; | ||
Characters = characters; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Lagrange.Core/Internal/Event/Action/FetchAiCharacterListEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Lagrange.Core.Common.Entity; | ||
|
||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class FetchAiCharacterListEvent : ProtocolEvent | ||
{ | ||
public uint GroupUin { get; set; } | ||
|
||
public uint ChatType { get; set; } | ||
|
||
public List<AiCharacterList>? AiCharacters { get; set; } | ||
|
||
public string ErrorMessage { get; set; }=string.Empty; | ||
|
||
private FetchAiCharacterListEvent(uint chatType, uint groupUin = 42) : base(true) | ||
{ | ||
ChatType = chatType; | ||
GroupUin = groupUin; | ||
AiCharacters = new List<AiCharacterList>(); | ||
} | ||
|
||
private FetchAiCharacterListEvent(int resultCode, List<AiCharacterList>? aiCharacters,string errMsg) : base(resultCode) | ||
{ | ||
AiCharacters = aiCharacters; | ||
ErrorMessage = errMsg; | ||
} | ||
|
||
public static FetchAiCharacterListEvent Create(uint chatType, uint groupUin) => new(chatType, groupUin); | ||
|
||
public static FetchAiCharacterListEvent Result(int resultCode, List<AiCharacterList>? aiCharacters,string errMsg) => | ||
new(resultCode, aiCharacters, errMsg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Lagrange.Core.Internal.Packets.Service.Oidb.Common; | ||
using Lagrange.Core.Message.Entity; | ||
|
||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class GroupAiRecordEvent : ProtocolEvent | ||
{ | ||
public uint GroupUin { get; set; } | ||
public string Character { get; set; }= string.Empty; | ||
public string Text { get; set; }= string.Empty; | ||
|
||
public MsgInfo? RecordInfo { get; set; } | ||
public string ErrorMessage { get; set; }= string.Empty; | ||
|
||
private GroupAiRecordEvent(uint groupUin, string character, string text) : base(0) | ||
{ | ||
GroupUin = groupUin; | ||
Character = character; | ||
Text = text; | ||
} | ||
|
||
private GroupAiRecordEvent(int resultCode, MsgInfo? msgInfo) : base(resultCode) | ||
{ | ||
RecordInfo = msgInfo; | ||
} | ||
|
||
private GroupAiRecordEvent(int resultCode, string errMsg) : base(resultCode) | ||
{ | ||
ErrorMessage = errMsg; | ||
} | ||
|
||
public static GroupAiRecordEvent Create(uint groupUin, string character, string text) => | ||
new(groupUin, character, text); | ||
|
||
public static GroupAiRecordEvent Result(int resultCode, MsgInfo? msgInfo) => new(resultCode, msgInfo); | ||
|
||
public static GroupAiRecordEvent Result(int resultCode, string errMessage) => new(resultCode, errMessage); | ||
} |
25 changes: 25 additions & 0 deletions
25
Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x929B_0.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Request; | ||
|
||
#pragma warning disable CS8618 | ||
[ProtoContract] | ||
[OidbSvcTrpcTcp(0x929B, 0)] | ||
internal class OidbSvcTrpcTcp0x929B_0 | ||
{ | ||
[ProtoMember(1)] public uint GroupCode { get; set; } | ||
|
||
[ProtoMember(2)] public string VoiceId { get; set; } | ||
|
||
[ProtoMember(3)] public string Text { get; set; } | ||
|
||
[ProtoMember(4)] public uint ChatType { get; set; } = 1; //1 voice,2 song | ||
|
||
[ProtoMember(5)] private OidbSvcTrpcTcp0x929B_0ClientMsgInfo ClientMsgInfo { get; set; } | ||
} | ||
|
||
[ProtoContract] | ||
internal class OidbSvcTrpcTcp0x929B_0ClientMsgInfo | ||
{ | ||
[ProtoMember(1)] private uint MsgRandom { get; set; } = 233; | ||
} |
12 changes: 12 additions & 0 deletions
12
Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x929C_0.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Request; | ||
|
||
[ProtoContract] | ||
[OidbSvcTrpcTcp(0x929C, 0)] | ||
internal class OidbSvcTrpcTcp0x929C_0 | ||
{ | ||
[ProtoMember(1)] public uint Group { get; set; } | ||
|
||
[ProtoMember(2)] public uint ChatType { get; set; } = 1; //1 voice,2 song | ||
} |
12 changes: 12 additions & 0 deletions
12
Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x929D_0.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Request; | ||
|
||
[ProtoContract] | ||
[OidbSvcTrpcTcp(0x929D, 0)] | ||
internal class OidbSvcTrpcTcp0x929D_0 | ||
{ | ||
[ProtoMember(1)] public uint Group { get; set; } | ||
|
||
[ProtoMember(2)] public uint ChatType { get; set; } //1 voice,2 song | ||
} |
16 changes: 16 additions & 0 deletions
16
Lagrange.Core/Internal/Packets/Service/Oidb/Response/OidbSvcTrpcTcp0x929B_0Response.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Lagrange.Core.Internal.Packets.Service.Oidb.Common; | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Response; | ||
|
||
[ProtoContract] | ||
internal class OidbSvcTrpcTcp0x929B_0Response | ||
{ | ||
[ProtoMember(1)] uint Field1 { get; set; } //1 complete ,2 wait | ||
|
||
[ProtoMember(2)] uint? Field2 { get; set; } //319 | ||
|
||
[ProtoMember(3)] uint Field3 { get; set; } //20 | ||
|
||
[ProtoMember(4)] public MsgInfo? MsgInfo { get; set; } | ||
} |
19 changes: 19 additions & 0 deletions
19
Lagrange.Core/Internal/Packets/Service/Oidb/Response/OidbSvcTrpcTcp0x929C_0Response.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using ProtoBuf; | ||
|
||
namespace Lagrange.Core.Internal.Packets.Service.Oidb.Response; | ||
#pragma warning disable CS8618 | ||
[ProtoContract] | ||
internal class OidbSvcTrpcTcp0x929C_0Response | ||
{ | ||
[ProtoMember(1)] public List<OidbSvcTrpcTcp0x929C_0ResponseProperty> Property { get; set; } | ||
} | ||
|
||
[ProtoContract] | ||
internal class OidbSvcTrpcTcp0x929C_0ResponseProperty | ||
{ | ||
[ProtoMember(1)] public string CharacterId { get; set; } | ||
|
||
[ProtoMember(2)] public string CharacterName { get; set; } | ||
|
||
[ProtoMember(3)] public string CharacterVoiceUrl { get; set; } | ||
} |
Oops, something went wrong.