From 49687fb87f3ca5fb311cf0caef1185825dfa3ed0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 11 十二月 2025 14:12:46 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(优化战斗效率;司马懿所有技能;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
index 1b1b21b..b410500 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)
# 检查是否正在递归释放中
--
Gitblit v1.8.0