Esempio n. 1
0
 public override void Validate(BasePacket packet)
 {
     ValidationInfo info;
     _info.TryGetValue(packet.SessionToken, out info);
     if (info == null)
     {
         BaseResponse.Throw(packet.ToString(), ECGeneral.SessionError);
         return;
     }
     info.AssertAction(packet);
 }
Esempio n. 2
0
 private void AssertDistance(BasePacket packet, double dist)
 {
     double ms = DateTime.Now.Subtract(_lastMoveTime).TotalMilliseconds;
     if (ms/_lastPlayerSpeed/dist < DIST_DIFF_THRESH)
     {
         BaseResponse.Throw(packet.ToString(), ECGeneral.ActionIsImposible);
     }
 }