From a49287c1591671d95952114f04db742c1507de13 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 20 八月 2024 15:01:53 +0800 Subject: [PATCH] 10223 10238 10241 【越南】【砍树】【主干】【港台】仙匣秘境、骑宠养成、古宝养成增加可配置是否关联跨服活动; --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py | 13 ++- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py | 13 ++- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 12 +++- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py | 28 +++++--- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py | 22 ++++-- PySysDB/PySysDBPY.h | 3 + ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py | 13 ++- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py | 31 +++++----- 8 files changed, 83 insertions(+), 52 deletions(-) diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h index c4c43c6..8267ff7 100644 --- a/PySysDB/PySysDBPY.h +++ b/PySysDB/PySysDBPY.h @@ -1914,6 +1914,7 @@ WORD LVLimit; //限制等级 WORD ActShopType; //开放商店类型,为0时不开放 WORD PersonalTemplateID; //个人排行模板编号 + BYTE IsRelationCrossAct; //是否关联跨服活动 }; //骑宠养成榜单模版表 @@ -1936,6 +1937,7 @@ char JoinEndTime; //参与结束时间点 WORD LVLimit; //限制等级 WORD PersonalTemplateID; //个人排行模板编号 + BYTE IsRelationCrossAct; //是否关联跨服活动 }; //古宝养成榜单模版表 @@ -1964,6 +1966,7 @@ WORD PersonalTemplateID; //个人排行模板编号 WORD LotteryAddScore; //每次抽奖加积分 WORD LayerAddScore; //每次跨层加积分 + BYTE IsRelationCrossAct; //是否关联跨服活动 }; //仙匣秘境榜单模版表 diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py index 2e1255d..1e8006c 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActGubao.py @@ -132,12 +132,15 @@ playerName = curPlayer.GetName() job = curPlayer.GetJob() realmLV = curPlayer.GetOfficialRank() - _, updScore = dataMsg + _, updScore, isRelationCrossAct = dataMsg - #同步跨服 - playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, - "playerScore":updScore} - SyncGubaoToCrossServer(curPlayer, playerInfo) + # 仙盟榜... + + if isRelationCrossAct: + #同步跨服 + playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, + "playerScore":updScore} + SyncGubaoToCrossServer(curPlayer, playerInfo) return def SyncGubaoToCrossServer(curPlayer, playerInfo): diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py index b9f65a6..c05f09a 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActHorsePetTrain.py @@ -131,12 +131,15 @@ playerName = curPlayer.GetName() job = curPlayer.GetJob() realmLV = curPlayer.GetOfficialRank() - _, updScore = dataMsg + _, updScore, isRelationCrossAct = dataMsg - #同步跨服 - playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, - "playerScore":updScore} - SyncHorsePetTrainToCrossServer(curPlayer, playerInfo) + # 仙盟榜... + + if isRelationCrossAct: + #同步跨服 + playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, + "playerScore":updScore} + SyncHorsePetTrainToCrossServer(curPlayer, playerInfo) return def SyncHorsePetTrainToCrossServer(curPlayer, playerInfo): diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py index ef75024..5667123 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerActXianXiaMJ.py @@ -131,12 +131,15 @@ playerName = curPlayer.GetName() job = curPlayer.GetJob() realmLV = curPlayer.GetOfficialRank() - _, updLotteryScore = dataMsg + _, updLotteryScore, isRelationCrossAct = dataMsg - #同步跨服 - playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, - "playerLotteryScore":updLotteryScore} - SyncXianXiaMJToCrossServer(curPlayer, playerInfo) + # 仙盟榜... + + if isRelationCrossAct: + #同步跨服 + playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, + "playerLotteryScore":updLotteryScore} + SyncXianXiaMJToCrossServer(curPlayer, playerInfo) return def SyncXianXiaMJToCrossServer(curPlayer, playerInfo): diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py index 72eab92..8f7114e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py @@ -1516,6 +1516,7 @@ ("WORD", "LVLimit", 0), ("WORD", "ActShopType", 0), ("WORD", "PersonalTemplateID", 0), + ("BYTE", "IsRelationCrossAct", 0), ), "ActHorsePetTrainBillTemp":( @@ -1532,6 +1533,7 @@ ("char", "JoinEndTime", 0), ("WORD", "LVLimit", 0), ("WORD", "PersonalTemplateID", 0), + ("BYTE", "IsRelationCrossAct", 0), ), "ActGubaoBillTemp":( @@ -1554,6 +1556,7 @@ ("WORD", "PersonalTemplateID", 0), ("WORD", "LotteryAddScore", 0), ("WORD", "LayerAddScore", 0), + ("BYTE", "IsRelationCrossAct", 0), ), "ActXianXiaMJBillTemp":( @@ -4610,7 +4613,8 @@ def GetJoinEndTime(self): return self.attrTuple[4] # 参与结束时间点 char def GetLVLimit(self): return self.attrTuple[5] # 限制等级 WORD def GetActShopType(self): return self.attrTuple[6] # 开放商店类型,为0时不开放 WORD - def GetPersonalTemplateID(self): return self.attrTuple[7] # 个人排行模板编号 WORD + def GetPersonalTemplateID(self): return self.attrTuple[7] # 个人排行模板编号 WORD + def GetIsRelationCrossAct(self): return self.attrTuple[8] # 是否关联跨服活动 BYTE # 骑宠养成榜单模版表 class IPY_ActHorsePetTrainBillTemp(): @@ -4636,7 +4640,8 @@ def GetJoinStartTime(self): return self.attrTuple[3] # 参与开始时间点 char def GetJoinEndTime(self): return self.attrTuple[4] # 参与结束时间点 char def GetLVLimit(self): return self.attrTuple[5] # 限制等级 WORD - def GetPersonalTemplateID(self): return self.attrTuple[6] # 个人排行模板编号 WORD + def GetPersonalTemplateID(self): return self.attrTuple[6] # 个人排行模板编号 WORD + def GetIsRelationCrossAct(self): return self.attrTuple[7] # 是否关联跨服活动 BYTE # 古宝养成榜单模版表 class IPY_ActGubaoBillTemp(): @@ -4668,7 +4673,8 @@ def GetTemplateID(self): return self.attrTuple[9] # 模板ID BYTE def GetPersonalTemplateID(self): return self.attrTuple[10] # 个人排行模板编号 WORD def GetLotteryAddScore(self): return self.attrTuple[11] # 每次抽奖加积分 WORD - def GetLayerAddScore(self): return self.attrTuple[12] # 每次跨层加积分 WORD + def GetLayerAddScore(self): return self.attrTuple[12] # 每次跨层加积分 WORD + def GetIsRelationCrossAct(self): return self.attrTuple[13] # 是否关联跨服活动 BYTE # 仙匣秘境榜单模版表 class IPY_ActXianXiaMJBillTemp(): diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py index 1628339..a7c3c5e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActGubao.py @@ -138,11 +138,17 @@ if not actInfo.get(ShareDefine.ActKey_State): continue - crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_Gubao) - if crossActInfo.get(ShareDefine.ActKey_State, 0): - if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: - GameWorld.Log("跨服古宝养成非参与活动中: actNum=%s" % actNum, playerID) - continue + cfgID = actInfo.get(ShareDefine.ActKey_CfgID) + ipyData = IpyGameDataPY.GetIpyGameData("ActGubao", cfgID) + if not ipyData: + continue + + if ipyData.GetIsRelationCrossAct(): + crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_Gubao) + if crossActInfo.get(ShareDefine.ActKey_State, 0): + if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: + GameWorld.Log("跨服古宝养成非参与活动中: actNum=%s" % actNum, playerID) + continue else: if actInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: GameWorld.Log("古宝养成非参与活动中: actNum=%s" % actNum, playerID) @@ -151,10 +157,10 @@ addGubaoScore = 0 pieceQualityScoreDict = IpyGameDataPY.GetFuncEvalCfg("GubaoAct", 1, {}) for pieceID, pieceCount in costPieceInfo.items(): - ipyData = IpyGameDataPY.GetIpyGameData("Gubao", pieceID) - if not ipyData: + gbIpyData = IpyGameDataPY.GetIpyGameData("Gubao", pieceID) + if not gbIpyData: continue - quality = ipyData.GetGubaoQuality() + quality = gbIpyData.GetGubaoQuality() if str(quality) not in pieceQualityScoreDict: continue qualityScore = pieceQualityScoreDict[str(quality)] * pieceCount @@ -172,11 +178,11 @@ if addGubaoScore <= 0: continue - AddPlayerScore(curPlayer, actNum, addGubaoScore) + AddPlayerScore(curPlayer, actNum, addGubaoScore, ipyData.GetIsRelationCrossAct()) return -def AddPlayerScore(curPlayer, actNum, addScore): +def AddPlayerScore(curPlayer, actNum, addScore, isRelationCrossAct): if addScore <= 0: return 0 score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum) @@ -185,7 +191,7 @@ GameWorld.DebugLog("古宝活动增加积分: actNum=%s,addScore=%s,updScore=%s" % (actNum, addScore, updScore)) Sync_GubaoPlayerInfo(curPlayer, actNum) PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_GubaoScore, updScore, autoSort=True) - SendToGameServer_Gubao(curPlayer, "AddGubaoScore", [addScore, updScore]) + SendToGameServer_Gubao(curPlayer, "AddGubaoScore", [addScore, updScore, isRelationCrossAct]) return updScore def SendToGameServer_Gubao(curPlayer, msgType, dataMsg=""): diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py index 4e4fe4e..181c6ea 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActHorsePetTrain.py @@ -144,11 +144,17 @@ if not actInfo.get(ShareDefine.ActKey_State): continue - crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_HorsePetTrain) - if crossActInfo.get(ShareDefine.ActKey_State, 0): - if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: - GameWorld.Log("跨服骑宠养成非参与活动中: actNum=%s" % actNum, playerID) - continue + cfgID = actInfo.get(ShareDefine.ActKey_CfgID) + ipyData = IpyGameDataPY.GetIpyGameData("ActHorsePetTrain", cfgID) + if not ipyData: + continue + + if ipyData.GetIsRelationCrossAct(): + crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_HorsePetTrain) + if crossActInfo.get(ShareDefine.ActKey_State, 0): + if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: + GameWorld.Log("跨服骑宠养成非参与活动中: actNum=%s" % actNum, playerID) + continue else: if actInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: GameWorld.Log("骑宠养成非参与活动中: actNum=%s" % actNum, playerID) @@ -167,11 +173,11 @@ if addActScore <= 0: continue - AddPlayerScore(curPlayer, actNum, addActScore) + AddPlayerScore(curPlayer, actNum, addActScore, ipyData.GetIsRelationCrossAct()) return -def AddPlayerScore(curPlayer, actNum, addScore): +def AddPlayerScore(curPlayer, actNum, addScore, isRelationCrossAct): if addScore <= 0: return 0 score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActHorsePetTrainScore % actNum) @@ -182,7 +188,7 @@ PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_HorsePetTrainScore, addScore, "ActHorsePetTrain") PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_HorsePetActScore, addScore) PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_HorsePetTrainScore, updScore, autoSort=True) - SendToGameServer_HorsePetTrain(curPlayer, "AddHorsePetTrainScore", [addScore, updScore]) + SendToGameServer_HorsePetTrain(curPlayer, "AddHorsePetTrainScore", [addScore, updScore, isRelationCrossAct]) return updScore def SendToGameServer_HorsePetTrain(curPlayer, msgType, dataMsg=""): diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py index bae2dc6..c9af2b4 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActXianXiaMJ.py @@ -181,14 +181,14 @@ GameWorld.Log("仙匣秘境发送GameServer: %s, %s" % (msgType, dataMsg), playerID) return -def AddPlayerLotteryScore(curPlayer, actNum, addScore): +def AddPlayerLotteryScore(curPlayer, actNum, addScore, isRelationCrossAct): if addScore <= 0: return 0 lotteryScore = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_XianXiaMJScore % actNum) updLotteryScore = lotteryScore + addScore PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_XianXiaMJScore % actNum, updLotteryScore) PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_XianXiaMJScore, updLotteryScore, autoSort=True) - SendToGameServer_XianXiaMJ(curPlayer, "AddLotteryScore", [addScore, updLotteryScore]) + SendToGameServer_XianXiaMJ(curPlayer, "AddLotteryScore", [addScore, updLotteryScore, isRelationCrossAct]) return updLotteryScore def GetLayerSetByList(layerNum, setList): @@ -457,7 +457,7 @@ GameWorld.DebugLog(" 刷新完成! layerNum=%s,playCount=%s" % (layerNum, playCount)) PlayerActTask.UpdActTaskValue(curPlayer, ChConfig.ActTaskType_XianXiaMJLayer, layerNum) if layerNum > 1: - AddPlayerLotteryScore(curPlayer, actNum, ipyData.GetLayerAddScore()) + AddPlayerLotteryScore(curPlayer, actNum, ipyData.GetLayerAddScore(), ipyData.GetIsRelationCrossAct()) return True #// AA 17 仙匣秘境活动抽奖 #tagCMActXianXiaMJLottery @@ -482,23 +482,24 @@ if not actInfo.get(ShareDefine.ActKey_State): GameWorld.DebugLog(" 非活动中!") return - - playerID = curPlayer.GetPlayerID() - crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_XianXiaMJ) - if crossActInfo.get(ShareDefine.ActKey_State, 0): - if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: - GameWorld.Log("跨服仙匣秘境非参与活动中: actNum=%s" % actNum, playerID) - return - else: - if actInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: - GameWorld.Log("仙匣秘境非参与活动中: actNum=%s" % actNum, playerID) - return + playerID = curPlayer.GetPlayerID() cfgID = actInfo.get(ShareDefine.ActKey_CfgID) ipyData = IpyGameDataPY.GetIpyGameData("ActXianXiaMJ", cfgID) if not ipyData: return + if ipyData.GetIsRelationCrossAct(): + crossActInfo = CrossRealmPlayer.GetPlayerCrossActInfo(curPlayer, ShareDefine.CrossActName_XianXiaMJ) + if crossActInfo.get(ShareDefine.ActKey_State, 0): + if crossActInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: + GameWorld.Log("跨服仙匣秘境非参与活动中: actNum=%s" % actNum, playerID) + return + else: + if actInfo.get(ShareDefine.ActKey_StateJoin) != ShareDefine.ActStateJoin_Start: + GameWorld.Log("仙匣秘境非参与活动中: actNum=%s" % actNum, playerID) + return + templateID = ipyData.GetTemplateID() if not templateID: return @@ -635,7 +636,7 @@ PlayerControl.WorldNotify(0, "XianXiaMJ%s" % actNum, [curPlayer.GetPlayerName(), itemID, itemCount]) # 积分 - lotteryScore = AddPlayerLotteryScore(curPlayer, actNum, ipyData.GetLotteryAddScore()) + lotteryScore = AddPlayerLotteryScore(curPlayer, actNum, ipyData.GetLotteryAddScore(), ipyData.GetIsRelationCrossAct()) # 通知抽奖结果 clientPack = ChPyNetSendPack.tagMCActXianXiaMJAwardItemResult() -- Gitblit v1.8.0