From 665ab496dbb975f0088c00fbd70ffa0bbef7ddaf Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 27 九月 2022 17:21:06 +0800
Subject: [PATCH] 9701 【后端】【越南】【BT7】【主干】跨服竞技64位排位赛(增加可取消仙官申请)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py                    |   14 ++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossChampionship.py |    4 +++-
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
index 40d60ea..d105313 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
@@ -2379,8 +2379,22 @@
     playerID = msgData["playerID"]
     mainOfficialID = msgData["mainOfficialID"]
     officialID = msgData["officialID"]
+    cancel = msgData["cancel"]
     PropData = msgData["PropData"]
     
+    if cancel:
+        champMgr = GetChampionshipMgr()
+        offZoneMgr = champMgr.GetChampOfficialZoneMgr(zoneID)
+        officialObj = offZoneMgr.GetOfficialObj(officialID)
+        if not officialObj:
+            return
+        if playerID not in officialObj.applyPlayerInfo:
+            GameWorld.ErrLog("不在仙官申请列表里! zoneID=%s,mainOfficialID=%s,officialID=%s" % (zoneID, mainOfficialID, officialID), playerID)
+            return
+        officialObj.applyPlayerInfo.pop(playerID, None)
+        Send_CrossServerMsg_ChampionshipOfficial(zoneID, [officialID])
+        return
+    
     mainIpyData = IpyGameDataPY.GetIpyGameData("ChampionshipOfficial", mainOfficialID)
     if not mainIpyData:
         return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossChampionship.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossChampionship.py
index 162dbf3..0a075ac 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossChampionship.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossChampionship.py
@@ -47,6 +47,7 @@
 #    BYTE        ZoneID;        //仙官数据分区ID
 #    WORD        MainOfficialID;    //界主官职ID
 #    WORD        OfficialID;    //申请官职ID
+#    BYTE        Cancel;        //是否取消申请,默认0-申请;1-取消申请
 #};
 def OnChampionshipOfficialApply(index, clientData, tick):
     if GameWorld.IsCrossServer():
@@ -58,6 +59,7 @@
     zoneID = clientData.ZoneID
     mainOfficialID = clientData.MainOfficialID
     officialID = clientData.OfficialID
+    cancel = clientData.Cancel
     
     realmLV = curPlayer.GetOfficialRank()
     needRealmLV = IpyGameDataPY.GetFuncCfg("CrossChamOfficial", 3)
@@ -66,7 +68,7 @@
         return
     
     # 发送跨服服务器
-    dataMsg = {"zoneID":zoneID, "mainOfficialID":mainOfficialID, "officialID":officialID,
+    dataMsg = {"zoneID":zoneID, "mainOfficialID":mainOfficialID, "officialID":officialID, "cancel":cancel,
                "playerID":playerID, "PropData":CrossRealmPlayer.GetPlayerCrossPropDataShort(curPlayer)}
     GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_ChampionshipOfficialApply, dataMsg)
     return

--
Gitblit v1.8.0