39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using ServerCore; using ServerBase;
|
|
|
|
|
|
namespace ServerCommon
|
|
{
|
|
public static class MQHelper
|
|
{
|
|
//static long _SessionUpdateTick = 0;
|
|
//static int compareSessionCount = 0;
|
|
|
|
public static void SendSessionCount(RabbitMqConnector rabbit_mq, string instanceId, int sessionCount, int serverType, int worldId)
|
|
{
|
|
//DateTime newTime = DateTimeHelper.Current;
|
|
//if (newTime.Ticks < _SessionUpdateTick || compareSessionCount == sessionCount)
|
|
// return;
|
|
|
|
//_SessionUpdateTick = newTime.AddSeconds(Constant.UPDATE_SESSION_TIME).Ticks;
|
|
|
|
//ServerMessage notiMessage = new();
|
|
//notiMessage.SessionInfoNoti = new();
|
|
//notiMessage.SessionInfoNoti.InstanceId = instanceId;
|
|
//notiMessage.SessionInfoNoti.SessionCount = sessionCount;
|
|
//notiMessage.SessionInfoNoti.ServerType = serverType;
|
|
//notiMessage.SessionInfoNoti.WorldId = worldId;
|
|
|
|
//rabbit_mq.SendManagerServer(notiMessage);
|
|
|
|
//compareSessionCount = sessionCount;
|
|
}
|
|
}
|
|
}
|