From a1ea5474ffd2b081668f9a0cef8d069aa78db85d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 12 十二月 2025 20:53:42 +0800
Subject: [PATCH] 389 流向记录(战斗服务器不记录流向)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
index 6f75602..41cbd50 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
@@ -50,6 +50,7 @@
     
     def acquire(self, obj_class, *args, **kwargs):
         """获取对象并记录其所属池"""
+        return obj_class(*args, **kwargs) # 关闭对象池
         if obj_class not in self._pools:
             # 如果池不存在,自动创建大小为0的无限制池
             self.create_pool(obj_class, 0)
@@ -78,6 +79,7 @@
     
     def release(self, obj):
         """释放对象并递归释放其嵌套对象池对象"""
+        return # 释放对象效率有点低,暂时关闭对象池,后续优化
         obj_id = id(obj)
         
         # 检查是否正在递归释放中
@@ -330,9 +332,10 @@
         PyGameData.g_objPoolMgr = poolMgr
     return poolMgr
 
-def OnMinute():
+def OnMinute(curTime):
     """每分钟执行,输出对象池状态"""
-    GetPoolMgr().pool_status()
+    #if curTime.minute == 5: # 每小时的5分输出一次
+    #    GetPoolMgr().pool_status()
     return
 
 ## 使用示例

--
Gitblit v1.8.0