From 2930bdc1878ec66d0db331aad05d70562baa351d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 20 二月 2024 10:28:07 +0800
Subject: [PATCH] 10133 【后端】境界修改
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
index 40d60ea..43abd50 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossChampionship.py
@@ -758,11 +758,22 @@
return
+def DoChampionshipOpen(curPlayer):
+ NotifyPlayerChampionshipInfo(curPlayer, GameWorld.GetGameWorld().GetTick())
+ return
+
def OnPlayerLogin(curPlayer, tick):
if GameWorld.IsCrossServer():
return
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
+ return
+
+ NotifyPlayerChampionshipInfo(curPlayer, tick)
+ return
+
+def NotifyPlayerChampionshipInfo(curPlayer, tick):
playerID = curPlayer.GetPlayerID()
champMgr = GetChampionshipMgr()
pkZoneIDList = champMgr.GetChampPKZoneIDList()
@@ -2379,7 +2390,21 @@
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:
@@ -2619,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:
@@ -2637,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
@@ -2839,11 +2874,13 @@
def Sync_ChampionshipPKZoneGroupInfo(zoneID, groupMarkDict=None, curPlayer=None):
## 同步排位分区分组信息
# @param groupMarkDict: {groupMark:[battleNum, ...], ...}
-
+
champMgr = GetChampionshipMgr()
if curPlayer:
playerZoneID = champMgr.GetPlayerPKZoneID(curPlayer.GetPlayerID())
if playerZoneID != zoneID:
+ return
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
return
pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID)
@@ -2918,6 +2955,8 @@
playerZoneID = champMgr.GetPlayerPKZoneID(curPlayer.GetPlayerID())
if playerZoneID != zoneID:
continue
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
+ continue
NetPackCommon.SendFakePack(curPlayer, clientPack)
return
@@ -2930,6 +2969,8 @@
champMgr = GetChampionshipMgr()
playerZoneID = champMgr.GetPlayerPKZoneID(playerID)
if not playerZoneID:
+ return
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
return
pkZoneMgr = champMgr.GetChampPKZoneMgr(playerZoneID)
@@ -2976,6 +3017,8 @@
playerZoneID = champMgr.GetPlayerPKZoneID(curPlayer.GetPlayerID())
if playerZoneID != zoneID:
return
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
+ return
pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID)
if not pkZoneMgr:
@@ -3019,6 +3062,8 @@
playerZoneID = champMgr.GetPlayerPKZoneID(curPlayer.GetPlayerID())
if playerZoneID != zoneID:
continue
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
+ continue
NetPackCommon.SendFakePack(curPlayer, clientPack)
return
@@ -3030,6 +3075,8 @@
if curPlayer:
playerZoneID = champMgr.GetPlayerOfficialZoneID(curPlayer.GetPlayerID())
if playerZoneID != zoneID:
+ return
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
return
clientPack = ChPyNetSendPack.tagGCChampionshipOfficialInfo()
@@ -3090,6 +3137,8 @@
playerZoneID = champMgr.GetPlayerOfficialZoneID(curPlayer.GetPlayerID())
if playerZoneID != zoneID:
continue
+ if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Championship):
+ continue
NetPackCommon.SendFakePack(curPlayer, clientPack)
return
--
Gitblit v1.8.0