hch
2019-04-19 519a8605a41e9e4cb72da4d58f55a52c3b83263d
Tool/Robot/AI/AIFile/AILoginIn.py
@@ -73,21 +73,7 @@
    #  @remarks
    def _Process(self):
        return
        #self.IsKillSelf()
#===============================================================================
#        playerId = self.robot.GetPlayerInfo().GetPlayerID()
#        curPosX, curPosY = self.robot.GetPlayerInfo().GetPos()
#
#
#        curTime = self.GetTick()
#
#        if self.playerDieTime > 0 and curTime - self.playerDieTime > ReBornTime:
#            if self.robot.GetIsLoginOK():
#                #发包复活
#                self.PlayerReborn()
#
#            self.playerDieTime = 0
#===============================================================================
        
@@ -96,32 +82,10 @@
    #  @return None
    #  @remarks
    def ReConnect(self, curTime):
        if self.robot.IsConnected():
            curPosX, curPosY = self.robot.GetPlayerInfo().GetPos()
            if self.__IsCorrectPos(curPosX, curPosY):
                return
            self.SendGMRoleDead()
#            self.robot.DestroyRobot()
#            self.playerDisconnectTime = curTime
            logging.info('坐标错误,断开')
        else:
            if self.robot.GetIsLoginOK():
                self.robot.DestroyRobot()
            if  self.playerDisconnectTime == 0:
                self.playerDisconnectTime = curTime
            if self.playerDisconnectTime > 0 and curTime - self.playerDisconnectTime > ReConnectTime:
                self.robot.ReCreateRobot()
                if self.robot.IsConnected():
                    self.playerDisconnectTime = 0
                    logging.info('重新连接了')
        self.robot.SetIsLoginOK(False)
        self.robot.SetLastDisconnectReason(1)
        from Robot import RobotMgr
        RobotMgr.GetRobotMgr().DisconnectServer(self.robot)
                
        return