From bd9dce2d66b5086712596b8dac6d9116be65bafd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 11 十二月 2025 16:53:47 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(去除常规功能封包对象池使用;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
index 0120ebe..90ef549 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
@@ -28,7 +28,6 @@
import PyGameData
import GameWorld
import ChConfig
-import ObjPool
import random
# 记录攻击类型
@@ -403,8 +402,7 @@
def __SyncMatchList(curPlayer, matchIDList, viewCacheDict={}):
## 同步匹配列表
- objPool = ObjPool.GetPoolMgr()
- clientPack = objPool.acquire(ChPyNetSendPack.tagSCArenaMatchList)
+ clientPack = ChPyNetSendPack.tagSCArenaMatchList()
clientPack.MatchList = []
for matchID in matchIDList:
if matchID in viewCacheDict:
@@ -413,7 +411,7 @@
viewCache = PlayerViewCache.FindBattleViewCache(matchID)
if not viewCache:
continue
- matchInfo = objPool.acquire(ChPyNetSendPack.tagSCArenaMatchInfo)
+ matchInfo = ChPyNetSendPack.tagSCArenaMatchInfo()
matchInfo.PlayerID = matchID
if viewCache:
matchInfo.PlayerName = viewCache.GetPlayerName()
@@ -432,7 +430,7 @@
return
def Sync_ArenaInfo(curPlayer):
- clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCArenaPlayerInfo)
+ clientPack = ChPyNetSendPack.tagSCArenaPlayerInfo()
clientPack.Score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaScore)
clientPack.WinCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaWinCnt)
NetPackCommon.SendFakePack(curPlayer, clientPack)
--
Gitblit v1.8.0