过滤 repetend = 1的礼物信息

This commit is contained in:
小白猿
2023-04-09 13:08:17 +08:00
parent ab950101cf
commit deda545676
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ namespace BarrageGrab.Proxy
if (e.HttpClient.ConnectRequest?.TunnelType == TunnelType.Websocket) if (e.HttpClient.ConnectRequest?.TunnelType == TunnelType.Websocket)
{ {
e.DataReceived += WebSocket_DataReceived; e.DataReceived += WebSocket_DataReceived;
} }
} }
private async Task ExplicitEndPoint_BeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e) private async Task ExplicitEndPoint_BeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
+7 -1
View File
@@ -127,7 +127,13 @@ namespace BarrageGrab
private void Grab_OnGiftMessage(object sender, ProtoEntity.GiftMessage e) private void Grab_OnGiftMessage(object sender, ProtoEntity.GiftMessage e)
{ {
if (!CheckRoomId(e.Common.roomId)) return; if (!CheckRoomId(e.Common.roomId)) return;
//判断礼物重复
if (e.repeatEnd == 1)
{
return;
}
var enty = new GiftMsg() var enty = new GiftMsg()
{ {
MsgId = e.Common.msgId, MsgId = e.Common.msgId,