/* 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(); long now = AccountServerUtils.GetApp().Time.GetTime(); //客户端发给服务器 if (pingReq.ServerTime == 0) { pingReq.ServerTime = now; PlayerPacketSender.SendToPlayer(playerSession, packet); return 0; } long thisPing = now - pingReq.ServerTime; return 0; } } }