From e10fe7a58e2eeb0075e184b82a9e34608c8483ae Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 28 十一月 2025 18:00:44 +0800
Subject: [PATCH] 16 卡牌服务端(对象池状态输出改为每小时一次;增加命令Pool输出对象池状态;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py                       |    5 +++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Pool.py              |   24 ++++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py |    2 +-
 3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Pool.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Pool.py
new file mode 100644
index 0000000..09089ae
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Pool.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package GM.Commands.Pool
+#
+# @todo:对象池
+# @author hxp
+# @date 2025-11-28
+# @version 1.0
+#
+# 详细描述: 对象池
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2025-11-28 18:00"""
+#-------------------------------------------------------------------------------
+
+import GameWorld
+import ObjPool
+
+def OnExec(curPlayer, msgList):
+    GameWorld.DebugAnswer(curPlayer, "对象池状态输出地图日志")
+    ObjPool.GetPoolMgr().pool_status()
+    return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py
index 78b2a7c..5f661d2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/GameWorldEvent.py
@@ -299,7 +299,7 @@
     PlayerFamily.OnMinute()
     PlayerOnline.OnMinute()
     BattleObj.OnMinute()
-    ObjPool.OnMinute()
+    ObjPool.OnMinute(curTime)
     
     __CheckIpyDataRecycle(curTime)
     return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
index 6f75602..1b1b21b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ObjPool.py
@@ -330,9 +330,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