From d57c815c413ca0e40a67054e634291377ebb6381 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 29 九月 2022 18:41:56 +0800
Subject: [PATCH] 9701 【后端】【越南】【BT7】【主干】跨服竞技64位排位赛(玩家挑战仙官成功后同步移除该玩家其他的仙官申请; 登录同步排位相关封包时机调整到登录成功后)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py |   12 +++++++++++-
 ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py                  |    4 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
index a0ffab3..43abd50 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
@@ -2644,6 +2644,7 @@
         GameWorld.Log("挑战目标仙官玩家ID结果! zoneID=%s,mainOfficialID=%s,officialID=%s,fightPower=%s,tagFightPower=%s,tagPlayerID=%s,Ret=%s" 
                       % (zoneID, mainOfficialID, officialID, fightPower, tagFightPower, tagPlayerID, Ret), playerID)
         
+    syncOfficialIDList = [officialID]
     playerName = PropData.get("Name", str(playerID))
     # 暂时只记录挑战胜利的
     if Ret == 1:
@@ -2662,13 +2663,22 @@
         officialObj.ResetPlayer()
         officialObj.playerID = playerID
         
+        # 移除该玩家的其他仙官申请
+        for offID in offZoneMgr.officialInfo.keys():
+            offObj = offZoneMgr.GetOfficialObj(offID)
+            if not offObj:
+                continue
+            if playerID in offObj.applyPlayerInfo:
+                offObj.applyPlayerInfo.pop(playerID)
+                syncOfficialIDList.append(offID)
+                
         # 邮件通知对方,官职被挑战了
         if offPlayerID:
             PlayerCompensation.SendMailByKey("CrossChampionshipOfficialBeChallenge", [offPlayerID], [], [playerName, officialID], crossMail=True)
             
     exData = {"exDataType":"OfficialChallenge", "playerID":playerID, "tagPlayerName":officialObj.playerName,
               "mainOfficialID":mainOfficialID, "officialID":officialID, "Ret":Ret}
-    Send_CrossServerMsg_ChampionshipOfficial(zoneID, [officialID], exData=exData)
+    Send_CrossServerMsg_ChampionshipOfficial(zoneID, syncOfficialIDList, exData=exData)
     return
 
 #// C0 23 跨服排位仙官挑战记录查询 #tagCGChampionshipOfficialChallengeQuery
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index 691de98..35495d5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -193,8 +193,6 @@
         GameWorldArena.OnPlayerLogin(curPlayer)
         #跨服PK
         CrossRealmPK.OnPlayerLogin(curPlayer)
-        #跨服排位
-        CrossChampionship.OnPlayerLogin(curPlayer, tick)
         #幸运云购
         CrossLuckyCloudBuy.OnPlayerLogin(curPlayer)
         #诛仙BOSS
@@ -234,6 +232,8 @@
         PlayerLove.OnPlayerLogin(curPlayer)
         #跨服战场
         CrossBattlefield.OnPlayerLogin(curPlayer)
+        #跨服排位
+        CrossChampionship.OnPlayerLogin(curPlayer, tick)
         
     if isMixServerFirstLogin:
         PlayerCharm.OnMixServerFirstLogin(curPlayer)

--
Gitblit v1.8.0