示例#1
0
 public override bool TakeAction()
 {
     if (!PVPLogic.StopSingleMatch(m_UserId))
     {
         ErrorCode = (int)ErrorType.CannotStopMatching;
         ErrorInfo = "You have already matched";
         return(false);
     }
     return(true);
 }
示例#2
0
 protected override void OnDisconnected(GameSession session)
 {
     if (session.UserId != 0)
     {
         PlayerLogic p = new PlayerLogic();
         p.SetUser(session.UserId);
         p.OffLine();
         PVPLogic.StopSingleMatch(session.UserId);
         PlayerArenaLogic pa = new PlayerArenaLogic();
         pa.SetUser(session.UserId);
         if (pa.MyArena.EnemyId > 0)
         {
             int token;
             pa.EndBattle(pa.MyArena.EnemyId, false, false, out token);
         }
     }
     base.OnDisconnected(session);
     TraceLog.ReleaseWrite("Client '{0}' disconnect OK.", session.RemoteAddress);
 }