修改对战房间指令无反应的问题

This commit is contained in:
lishuo committed 2024-05-10 16:32:10 +08:00
1 parent b84409a5fd
commit 6e6d3b2050
2 files changed
+8 -13

No files matched your search

+3 -3
View File
@@ -289,7 +289,7 @@ namespace OnlineUserPool.ViewModels
int total = 0;
var G = $"{total}l[{gameRoom},detail{{{ss}}}]";
var temp = string.Join("|", list.Select(m => m.ToString(2))) + "|";
var strV21 = $"*l{{{ temp }}};g{{{ G}}};#";
var strV21 = $"l{{{ temp }}};g{{{ G}}};";
var ddd = new NetworkData(strV21);
var needList = Clients.Where(c => c.RoomId == gameRoom.RoomId).ToList();
@@ -316,7 +316,7 @@ namespace OnlineUserPool.ViewModels
foreach (var item in needlist)
{
var G = GameRoomMessageHandler(item);
var strV21 = $"*l{{{ temp }}};g{{{G}}};#";
var strV21 = $"l{{{ temp }}};g{{{G}}};";
var ddd = new NetworkData(strV21);
bool isZip = item.Encoding == "gzip";
item.Service.Send(ddd.GetBytes(isZip), ddd.GetBytes(isZip).Length, item.IPEndPoint);
@@ -369,7 +369,7 @@ namespace OnlineUserPool.ViewModels
roomInfo += $"[{r.ToString()},detail{{{ss}}}]";
}
var strV21 = $"*l{{{ temp }}};g{{{roomInfo}}};#";
var strV21 = $"l{{{ temp }}};g{{{roomInfo}}};";
var ddd = new NetworkData(strV21);
bool isZip = needSend.Encoding == "gzip";
needSend.Service.Send(ddd.GetBytes(isZip), ddd.GetBytes(isZip).Length, needSend.IPEndPoint);