From bd30335b5a3ef468352f3b30a9ea68684df515f9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 06 六月 2024 11:17:55 +0800
Subject: [PATCH] 10130 【后端】福地争夺资源功能(优化启动加载福地物品数据逻辑;修复坐标转小数点问题;)
---
Tool/Robot/Robot/RobotBase.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Tool/Robot/Robot/RobotBase.py b/Tool/Robot/Robot/RobotBase.py
index ea48ff3..75cb885 100644
--- a/Tool/Robot/Robot/RobotBase.py
+++ b/Tool/Robot/Robot/RobotBase.py
@@ -235,7 +235,7 @@
port = GetConfig().GetServerPort()
logging.debug( "Connect to %s:%d", ip, port )
self.__peer = self.__mgr.CreatePeer()
- logging.debug( "create __peer:0x%08X", self.GetPeerValue() )
+ logging.info( "create %s __peer:0x%08X", self.__params[1], self.GetPeerValue() )
#注册回调
logging.debug( "register callback function for 0x%08X" % self.GetPeerValue() )
@@ -367,6 +367,8 @@
self.allsend += sendPack.GetLength()
logging.debug( "%s send %d bytes data. recvAll:%d sendAll:%d ALL:%d" % \
( str(self), sendPack.GetLength(), self.allrecv, self.allsend, self.allrecv+self.allsend ) )
+ if not self.__peer:
+ return
self.__mgr.SendData( self.__peer, sendPack.GetBuffer(), sendPack.GetLength() )
--
Gitblit v1.8.0