| | |
| | | playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
|
| | | worshipType = GameWorld.ToIntDef(gmCmdDict.get('worshipType', ''), 0)
|
| | | worshipValue = GameWorld.ToIntDef(gmCmdDict.get('worshipValue', ''), 0)
|
| | | zoneID = GameWorld.ToIntDef(gmCmdDict.get('zoneID', ''), 0)
|
| | | days = GameWorld.ToIntDef(gmCmdDict.get('days', ''), 0)
|
| | | try:
|
| | | serverIDList = eval(gmCmdDict.get('serverIDList', '[]'))
|
| | | except:
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
|
| | | return
|
| | |
|
| | | opType = gmCmdDict.get('opType', '')
|
| | |
|
| | |
| | | AccID = cacheDict.get("AccID", "")
|
| | |
|
| | | if opType == "add":
|
| | | if not GameWorship.AddWorshipPlayer(tagPlayerID, worshipType, worshipValue, days, zoneID):
|
| | | if not GameWorship.AddWorshipPlayer(worshipType, worshipValue, tagPlayerID, serverIDList, days=days):
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Unknow, "add error.")
|
| | | return
|
| | |
|
| | |
| | | recDict = playerRecMgr.GetPlayerRecDataDict(ShareDefine.Def_PlayerRecType_WorshipPlayer)
|
| | | for recDataList in recDict.values():
|
| | | for recData in recDataList:
|
| | | playerInfo = GameWorship.GetModelShowInfo(recData)
|
| | | playerInfo = recData.GetUserDataByKey(ChConfig.Def_RecDataKey_PlayerInfo, {})
|
| | | worshipList.append({"PlayerID":recData.GetPlayerID(),
|
| | | "AddTime":GameWorld.ChangeTimeNumToStr(recData.GetTime()),
|
| | | "WorshipType":GameWorship.GetWorshipType(recData),
|
| | | "WorshipValue":GameWorship.GetWorshipValue(recData),
|
| | | "Days":GameWorship.GetWorshipDays(recData),
|
| | | "ZoneID":GameWorship.GetWorshipZoneID(recData),
|
| | | "ServerIDList":str(recData.GetUserDataByKey(ChConfig.Def_RecDataKey_ServerIDList)),
|
| | | "AccID":playerInfo.get("AccID", ""),
|
| | | "Name":playerInfo.get("Name", ""),
|
| | | })
|