| | |
| | | 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=""):
|