You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
867 B
42 lines
867 B
/*
|
|
Sog 游戏基础库
|
|
2016 by zouwei
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
using Sog;
|
|
using ProtoCSStruct;
|
|
|
|
namespace Account
|
|
{
|
|
// 系统消息: ping chat sysnotice
|
|
public static class SysHandler
|
|
{
|
|
|
|
public static int ProcessPing(PlayerSession playerSession, StructPacket packet)
|
|
{
|
|
ref CSPing pingReq = ref packet.GetMessage<CSPing>();
|
|
|
|
long now = AccountServerUtils.GetApp().Time.GetTime();
|
|
|
|
//客户端发给服务器
|
|
if (pingReq.ServerTime == 0)
|
|
{
|
|
pingReq.ServerTime = now;
|
|
PlayerPacketSender.SendToPlayer<CSPing>(playerSession, packet);
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
long thisPing = now - pingReq.ServerTime;
|
|
|
|
return 0;
|
|
}
|
|
|
|
}
|
|
}
|
|
|