10223 10238 10241 【越南】【砍树】【主干】【港台】仙匣秘境、骑宠养成、古宝养成增加可配置是否关联跨服活动;
| | |
| | | WORD LVLimit; //限制等级
|
| | | WORD ActShopType; //开放商店类型,为0时不开放
|
| | | WORD PersonalTemplateID; //个人排行模板编号
|
| | | BYTE IsRelationCrossAct; //是否关联跨服活动
|
| | | };
|
| | |
|
| | | //骑宠养成榜单模版表
|
| | |
| | | char JoinEndTime; //参与结束时间点
|
| | | WORD LVLimit; //限制等级
|
| | | WORD PersonalTemplateID; //个人排行模板编号
|
| | | BYTE IsRelationCrossAct; //是否关联跨服活动
|
| | | };
|
| | |
|
| | | //古宝养成榜单模版表
|
| | |
| | | WORD PersonalTemplateID; //个人排行模板编号
|
| | | WORD LotteryAddScore; //每次抽奖加积分
|
| | | WORD LayerAddScore; //每次跨层加积分
|
| | | BYTE IsRelationCrossAct; //是否关联跨服活动
|
| | | };
|
| | |
|
| | | //仙匣秘境榜单模版表
|
| | |
| | | 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): |
| | |
| | | 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): |
| | |
| | | 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): |
| | |
| | | ("WORD", "LVLimit", 0),
|
| | | ("WORD", "ActShopType", 0),
|
| | | ("WORD", "PersonalTemplateID", 0),
|
| | | ("BYTE", "IsRelationCrossAct", 0),
|
| | | ),
|
| | |
|
| | | "ActHorsePetTrainBillTemp":(
|
| | |
| | | ("char", "JoinEndTime", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("WORD", "PersonalTemplateID", 0),
|
| | | ("BYTE", "IsRelationCrossAct", 0),
|
| | | ),
|
| | |
|
| | | "ActGubaoBillTemp":(
|
| | |
| | | ("WORD", "PersonalTemplateID", 0),
|
| | | ("WORD", "LotteryAddScore", 0),
|
| | | ("WORD", "LayerAddScore", 0),
|
| | | ("BYTE", "IsRelationCrossAct", 0),
|
| | | ),
|
| | |
|
| | | "ActXianXiaMJBillTemp":(
|
| | |
| | | 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(): |
| | |
| | | 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(): |
| | |
| | | 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(): |
| | |
| | | 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)
|
| | |
| | | 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
|
| | |
| | | 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)
|
| | |
| | | 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=""):
|
| | |
| | | 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)
|
| | |
| | | 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)
|
| | |
| | | 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=""):
|
| | |
| | | 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):
|
| | |
| | | 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
|
| | |
| | | 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
|
| | |
| | | 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()
|