From fd3137f3c58f6fb5f53c0bfc38c55c74e7709f72 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 04 八月 2025 15:07:05 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(阵容通知B124)

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
index 2a29643..e51d59f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
@@ -62,7 +62,7 @@
         self.fightPower = 0 # 阵容总战力
         return
     
-    def UpdLineup(self, heroItemDict, shapeType=0, refreshForce=False):
+    def UpdLineup(self, heroItemDict, shapeType=0, refreshForce=False, syncLineup=True):
         '''变更阵容时更新
         @param heroItemDict: 武将背包索引信息  {itemIndex:posNum, ...}
         @param shapeType: 阵型
@@ -72,6 +72,8 @@
         self.heroItemDict = heroItemDict
         GameWorld.DebugLog("更新阵容: lineupID=%s,%s" % (self.lineupID, heroItemDict), self.playerID)
         self.RefreshLineupAttr(refreshForce)
+        if syncLineup and self.olPlayer.curPlayer:
+            PlayerHero.Sync_Lineup(self.olPlayer.curPlayer, self.lineupID)
         return
     
     def FreeLineupHero(self):
@@ -384,8 +386,9 @@
         # 获取其他绑定该阵容的功能,如红颜、灵兽等
         
         shapeType = lineShapeTypeDict.get(lineupID, 0)
-        lineup.UpdLineup(heroItemDict, shapeType)
+        lineup.UpdLineup(heroItemDict, shapeType, syncLineup=False)
         
+    PlayerHero.Sync_Lineup(curPlayer)
     return
 
 def doCalcAllAttr(curPlayer):

--
Gitblit v1.8.0