| | |
| | | import PlayerTongTianLing
|
| | | import PlayerGubao
|
| | | import PlayerTask
|
| | | import PlayerOnline
|
| | |
|
| | | #------------------------------------------------------------------------------
|
| | |
|
| | |
| | |
|
| | | addAttrIDList, addAttrValueList = realmIpyData.GetAddAttrType(), realmIpyData.GetAddAttrNum()
|
| | |
|
| | | allAttrList = [{} for i in range(4)]
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | attrDict = {}
|
| | | for i, attrID in enumerate(addAttrIDList):
|
| | | PlayerControl.CalcAttrDict_Type(attrID, addAttrValueList[i], allAttrList)
|
| | | attrDict[attrID] = attrDict.get(attrID, 0) + addAttrValueList[i]
|
| | |
|
| | | # 保存计算值
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Prestige, allAttrList)
|
| | | GameWorld.DebugLog("官职属性: %s" % attrDict, playerID)
|
| | | PlayerOnline.GetOnlinePlayer(curPlayer).SetCalcAttr(ChConfig.Def_CalcAttr_Realm, attrDict)
|
| | | return
|
| | |
|
| | | def RefreshOfficialAttr(curPlayer):
|
| | | CalcOfficialRankAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | PlayerOnline.GetOnlinePlayer(curPlayer).RefreshRoleAttr()
|
| | | return
|
| | |
|
| | | def AddRealmTaskValue(curPlayer, taskType, addValue):
|