From 7060867c004c3312f409a320623b40b42186f9af Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 20 十月 2025 09:29:43 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(A922同步等级信息)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py    |    7 +++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py |    9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index c4a4a30..09cf941 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -16647,6 +16647,7 @@
 class  tagSCArenaMatchInfo(Structure):
     PlayerID = 0    #(DWORD PlayerID)//目标玩家ID
     PlayerName = ""    #(char PlayerName[33])
+    LV = 0    #(WORD LV)// 玩家等级
     RealmLV = 0    #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
     FightPower = 0    #(DWORD FightPower)//战力求余亿部分
     FightPowerEx = 0    #(DWORD FightPowerEx)//战力整除亿部分
@@ -16663,6 +16664,7 @@
         self.Clear()
         self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+        self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
@@ -16674,6 +16676,7 @@
     def Clear(self):
         self.PlayerID = 0
         self.PlayerName = ""
+        self.LV = 0
         self.RealmLV = 0
         self.FightPower = 0
         self.FightPowerEx = 0
@@ -16687,6 +16690,7 @@
         length += 4
         length += 33
         length += 2
+        length += 2
         length += 4
         length += 4
         length += 4
@@ -16699,6 +16703,7 @@
         data = ''
         data = CommFunc.WriteDWORD(data, self.PlayerID)
         data = CommFunc.WriteString(data, 33, self.PlayerName)
+        data = CommFunc.WriteWORD(data, self.LV)
         data = CommFunc.WriteWORD(data, self.RealmLV)
         data = CommFunc.WriteDWORD(data, self.FightPower)
         data = CommFunc.WriteDWORD(data, self.FightPowerEx)
@@ -16711,6 +16716,7 @@
         DumpString = '''
                                 PlayerID:%d,
                                 PlayerName:%s,
+                                LV:%d,
                                 RealmLV:%d,
                                 FightPower:%d,
                                 FightPowerEx:%d,
@@ -16721,6 +16727,7 @@
                                 %(
                                 self.PlayerID,
                                 self.PlayerName,
+                                self.LV,
                                 self.RealmLV,
                                 self.FightPower,
                                 self.FightPowerEx,
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 8ac66e3..4584fca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerArena.py
@@ -27,6 +27,7 @@
 import PyGameData
 import GameWorld
 import ChConfig
+import ObjPool
 import random
 
 # 记录攻击类型
@@ -323,15 +324,17 @@
 
 def __SyncMatchList(curPlayer, matchIDList):
     ## 同步匹配列表
-    clientPack = ChPyNetSendPack.tagSCArenaMatchList()
+    objPool = ObjPool.GetPoolMgr()
+    clientPack = objPool.acquire(ChPyNetSendPack.tagSCArenaMatchList)
     clientPack.MatchList = []
     for matchID in matchIDList:
         viewCache = PlayerViewCache.FindViewCache(matchID)
-        matchInfo = ChPyNetSendPack.tagSCArenaMatchInfo()
+        matchInfo = objPool.acquire(ChPyNetSendPack.tagSCArenaMatchInfo)
         matchInfo.PlayerID = matchID
         if viewCache:
             matchInfo.PlayerName = viewCache.GetPlayerName()
             matchInfo.RealmLV = viewCache.GetRealmLV()
+            matchInfo.LV = viewCache.GetLV()
             matchInfo.Face = viewCache.GetFace()
             matchInfo.FacePic = viewCache.GetFacePic()
             matchInfo.FightPower = viewCache.GetFightPower()
@@ -345,7 +348,7 @@
     return
 
 def Sync_ArenaInfo(curPlayer):
-    clientPack = ChPyNetSendPack.tagSCArenaPlayerInfo()
+    clientPack = ObjPool.GetPoolMgr().acquire(ChPyNetSendPack.tagSCArenaPlayerInfo)
     clientPack.Score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ArenaScore)
     NetPackCommon.SendFakePack(curPlayer, clientPack)
     return

--
Gitblit v1.8.0