礼物重复过滤条件调整

This commit is contained in:
Muihd
2024-08-17 13:36:41 +08:00
parent eac828e8a3
commit 34743528d7
+2 -9
View File
@@ -347,17 +347,11 @@ namespace BarrageGrab
ogift.Name = findForData.name;
}
//Combo 为1时,表示为可连击礼物
//if (msg.Gift.Combo) //一堆礼物Combo 和实际可连击情况不匹配,例如亲吻,闪耀星辰 Combo =false,实际上是可连击的,抖音那帮程序员怕是看女主播冲昏头了
if (true)
{
//判断礼物重复
if (msg.repeatEnd == 1)
if (msg.repeatEnd == 1 && giftCountCache.ContainsKey(key))
{
//清除缓存中的key
if (msg.groupId > 0 && giftCountCache.ContainsKey(key))
if (msg.groupId > 0 )
{
Tuple<int, DateTime> _;
giftCountCache.TryRemove(key, out _);
@@ -388,7 +382,6 @@ namespace BarrageGrab
}
//比上次小,则说明先后顺序出了问题,直接丢掉,应为比它大的消息已经处理过了
if (backward) return;
}
var count = currCount - lastCount;