| | |
| | | import CrossRealmPlayer
|
| | | import PlayerBillboard
|
| | | import ChPyNetSendPack
|
| | | import PlayerZhanling
|
| | | import NetPackCommon
|
| | | import GameWorld
|
| | | import ChConfig
|
| | |
| | |
|
| | | GameWorld.DebugLog("古宝养成重置! actNum=%s,actID=%s,playerActID=%s,state=%s,cfgID=%s"
|
| | | % (actNum, actID, playerActID, state, cfgID), playerID)
|
| | | score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
|
| | | PlayerZhanling.ResetZhanling(curPlayer, PlayerZhanling.ZhanlingType_GubaoTrain, score)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoID % actNum, actID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoScore % actNum, 0)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActGubaoScore % actNum, updScore)
|
| | | GameWorld.DebugLog("古宝活动增加积分: actNum=%s,addScore=%s,updScore=%s" % (actNum, addScore, updScore))
|
| | | Sync_GubaoPlayerInfo(curPlayer, actNum)
|
| | | PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_GubaoTrainScore, addScore, "ActGubaoTrain")
|
| | | PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_GubaoScore, updScore, autoSort=True)
|
| | | SendToGameServer_Gubao(curPlayer, "AddGubaoScore", [addScore, updScore, isRelationCrossAct])
|
| | | return updScore
|
| | |
| | | GameWorld.Log("古宝养成发送GameServer: %s, %s" % (msgType, dataMsg), playerID)
|
| | | return
|
| | |
|
| | | def GetActGubaoTrainScore(curPlayer):
|
| | | ## 获取活动中养成积分
|
| | | actScore = 0
|
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_Gubao, {}).values():
|
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
|
| | | if not actInfo.get(ShareDefine.ActKey_State):
|
| | | continue
|
| | | score = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActGubaoScore % actNum)
|
| | | actScore = max(score, actScore)
|
| | | return actScore
|
| | |
|
| | | def Sync_GubaoActionInfo(curPlayer, actNum):
|
| | | ## 通知活动信息
|
| | |
|