| | |
| | | value2:hmNum 时分场次编号
|
| | | value3:playerID 购买的玩家ID
|
| | | value4:factionID 所选择的阵营ID
|
| | | value5:serverOnly 是否仅本服玩家可加入,0-否,1-是
|
| | |
|
| | | StrValue3:[callPlayerID,...] 召集来的玩家ID,包含自己
|
| | | '''
|
| | |
| | | self.zoneID = 0
|
| | | self.playerID = 0
|
| | | self.factionID = 0
|
| | | self.serverOnly = 0
|
| | | self.callPlayerIDList = []
|
| | |
|
| | | # 子服用,跨服服务器同步数据时负值; 不存库,玩家属性缓存信息,本服玩家取自己服务器最新缓存
|
| | |
| | | "RealmLV":cacheDict["RealmLV"], "FightPower":cacheDict["FightPower"]}
|
| | |
|
| | | return {"buyTime":self.buyTime, "hmNum":self.hmNum, "zoneID":self.zoneID, "playerID":self.playerID, "factionID":self.factionID,
|
| | | "callPlayerIDList":self.callPlayerIDList, "callPlayerDict":self.callPlayerDict}
|
| | | "serverOnly":self.serverOnly, "callPlayerIDList":self.callPlayerIDList, "callPlayerDict":self.callPlayerDict}
|
| | |
|
| | | def SetAttr(self, attrDict):
|
| | | for k, v in attrDict.items():
|
| | |
| | | hmNum = recData.GetValue2()
|
| | | playerID = recData.GetValue3()
|
| | | factionID = recData.GetValue4()
|
| | | serverOnly = recData.GetValue5()
|
| | |
|
| | | strValue3 = recData.GetStrValue3()
|
| | |
|
| | |
| | | buyRec.hmNum = hmNum
|
| | | buyRec.playerID = playerID
|
| | | buyRec.factionID = factionID
|
| | | buyRec.serverOnly = serverOnly
|
| | | buyRec.callPlayerIDList = eval(strValue3) if strValue3 else []
|
| | |
|
| | | buyPlayerInfo = GetBuyPlayerInfo(zoneID, hmNum)
|
| | |
| | | recData.SetValue2(buyRec.hmNum)
|
| | | recData.SetValue3(buyRec.playerID)
|
| | | recData.SetValue4(buyRec.factionID)
|
| | | recData.SetValue5(buyRec.serverOnly)
|
| | |
|
| | | recData.SetStrValue3(str(buyRec.callPlayerIDList).replace(" ", ""))
|
| | |
|
| | |
| | | playerID = billboardData.ID
|
| | | cmpValue = billboardData.CmpValue
|
| | | rank = i + 1
|
| | | awardItemList = GameWorld.GetOrderValueByDict(awardDict, rank, False, [])
|
| | | awardItemList = []
|
| | | rankAwardItemList = GameWorld.GetOrderValueByDict(awardDict, rank, False, [])
|
| | | if rankAwardItemList:
|
| | | awardItemList.extend(rankAwardItemList)
|
| | | paramList = [rank]
|
| | | if billboardType == ShareDefine.Def_CBT_BattlefieldWJoin and enterWeekMoneyItemID:
|
| | | moneyBaseCount, multiValue = GameWorld.GetOrderValueByDict(enterWeekMoneyMultiIntDict, rank, False, [0, 0]) # 奖励货币倍值
|
| | | #基础保底值(不同名次可能不一样) + 名次倍率*次数
|
| | | awardMoneyCount = int(moneyBaseCount + multiValue * cmpValue)
|
| | | awardItemList.append([enterWeekMoneyItemID, awardMoneyCount, 0])
|
| | | GameWorld.Log(" billboardType=%s,rank=%s,playerID=%s,cmpValue=%s,awardItemList=%s" |
| | | % (billboardType, rank, playerID, cmpValue, awardItemList))
|
| | | if awardItemList:
|
| | | PlayerCompensation.SendMailByKey(mailKey, [playerID], awardItemList, paramList, crossMail=True)
|
| | |
|
| | |
| | | openHour = msgData["openHour"]
|
| | | openMinute = msgData["openMinute"]
|
| | | faction = msgData["faction"]
|
| | | serverOnly = msgData.get("serverOnly", 0)
|
| | |
|
| | | hmNum = GetHMNum(openHour, openMinute)
|
| | |
|
| | |
| | | buyRec.playerID = playerID
|
| | | buyRec.factionID = faction
|
| | | buyRec.callPlayerIDList = [playerID]
|
| | | buyRec.serverOnly = serverOnly
|
| | | buyPlayerInfo[playerID] = buyRec
|
| | |
|
| | | GameWorld.DebugLog("玩家购买开启召集场次! zoneID=%s,openHour=%s,openMinute=%s" % (zoneID, openHour, openMinute), playerID)
|
| | | GameWorld.DebugLog("玩家购买开启召集场次! zoneID=%s,openHour=%s,openMinute=%s,faction=%s,serverOnly=%s" |
| | | % (zoneID, openHour, openMinute, faction, serverOnly), playerID)
|
| | |
|
| | | # 上榜
|
| | | billboardCallCountLimit = IpyGameDataPY.GetFuncCfg("CrossBattlefieldBillboard", 1) # 周召集榜上榜至少次数
|
| | |
| | |
|
| | | serverGroupIDList = zoneIpyData.GetServerGroupIDList()
|
| | | msgData.update({"opType":"CallKick"})
|
| | | Send_CrossServerMsg_BattlefieldBuy(zoneID, serverGroupIDList, msgData)
|
| | | return
|
| | |
|
| | | def ClientServerMsg_BattlefieldCallChange(serverGroupID, msgData):
|
| | | |
| | | openHour = msgData["openHour"]
|
| | | openMinute = msgData["openMinute"]
|
| | | serverOnly = msgData["serverOnly"]
|
| | | playerID = msgData["playerID"]
|
| | | |
| | | zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
|
| | | if not zoneIpyData:
|
| | | return
|
| | | zoneID = zoneIpyData.GetZoneID()
|
| | | |
| | | hmNum = GetHMNum(openHour, openMinute)
|
| | | buyPlayerInfo = GetBuyPlayerInfo(zoneID, hmNum)
|
| | | if playerID not in buyPlayerInfo:
|
| | | GameWorld.ErrLog("跨服战场不存在该玩家的召集队伍! hmNum=%s,playerID=%s" % (hmNum, playerID), playerID)
|
| | | return
|
| | | buyRec = buyPlayerInfo[playerID]
|
| | | buyRec.serverOnly = 1 if serverOnly else 0
|
| | | |
| | | GameWorld.DebugLog("玩家召集队伍修改! zoneID=%s,openHour=%s,openMinute=%s,serverOnly=%s" |
| | | % (zoneID, openHour, openMinute, serverOnly), playerID)
|
| | | |
| | | #SyncMapServerCrossBattlefieldBuyInfo()
|
| | | |
| | | serverGroupIDList = zoneIpyData.GetServerGroupIDList()
|
| | | msgData.update({"opType":"CallChange"})
|
| | | Send_CrossServerMsg_BattlefieldBuy(zoneID, serverGroupIDList, msgData)
|
| | | return
|
| | |
|
| | |
| | | elif opType == "CallKick":
|
| | | pass
|
| | |
|
| | | elif opType == "CallChange":
|
| | | pass
|
| | | |
| | | return
|
| | |
|
| | | def SyncCrossBattlefieldBuyInfo(curPlayer, zoneID, hmNum=None):
|
| | |
| | | buyPlayerPack = ChPyNetSendPack.tagGCCrossBattlefieldBuyPlayer()
|
| | | buyPlayerPack.BuyPlayerID = buyPlayerID
|
| | | buyPlayerPack.Faction = buyRec.factionID
|
| | | buyPlayerPack.ServerOnly = buyRec.serverOnly
|
| | | buyPlayerPack.FactionPlayerList = []
|
| | |
|
| | | for callPlayerID in buyRec.callPlayerIDList:
|
| | |
| | | GameWorld.DebugLog("召集人数已满! hmNum=%s,buyPlayerID=%s,callPlayerIDList=%s" % (hmNum, buyPlayerID, buyRec.callPlayerIDList), playerID)
|
| | | return
|
| | |
|
| | | if buyRec.serverOnly and not PlayerControl.GetDBPlayerAccIDByID(buyPlayerID):
|
| | | PlayerControl.NotifyCode(curPlayer, "CrossBattlefieldCallServerOnly")
|
| | | #GameWorld.DebugLog("非本服玩家,无法加入其购买的召集队伍! hmNum=%s,buyPlayerID=%s,serverOnly=%s" % (hmNum, buyPlayerID, buyRec.serverOnly), playerID)
|
| | | return
|
| | | |
| | | # 请求查询跨服服务器
|
| | | dataMsg = {"openHour":openHour, "openMinute":openMinute, "buyPlayerID":buyPlayerID, "tagPlayerID":tagPlayerID, "playerID":playerID}
|
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_BattlefieldCallJoin, dataMsg)
|
| | |
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_BattlefieldCallKick, dataMsg)
|
| | | return
|
| | |
|
| | | #// C0 09 跨服战场召集场次修改 #tagCGCrossBattlefieldCallChange
|
| | | #
|
| | | #struct tagCGCrossBattlefieldCallChange
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE Hour; //战场开启时
|
| | | # BYTE Minute; //战场开启分
|
| | | # BYTE ServerOnly; //是否仅本服玩家可加入,0-否,1-是
|
| | | #};
|
| | | def OnCrossBattlefieldCallChange(index, clientData, tick):
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | |
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | openHour = clientData.Hour
|
| | | openMinute = clientData.Minute
|
| | | serverOnly = clientData.ServerOnly
|
| | | |
| | | # 请求查询跨服服务器
|
| | | dataMsg = {"openHour":openHour, "openMinute":openMinute, "serverOnly":serverOnly, "playerID":playerID}
|
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_BattlefieldCallChange, dataMsg)
|
| | | return
|