| | |
| | | # 今日已膜拜记录 {tagPlayerID:[[膜拜类型, 膜拜值], ...], ...}
|
| | | # 今日是否已膜拜过该玩家某个膜拜
|
| | | def HasWorshipRecordToday(recData, tagPlayerID, worshipType, worshipValue):
|
| | | if not recData:
|
| | | return False
|
| | | worshipRecordList = recData.GetUserDataByKey(tagPlayerID, [])
|
| | | if not worshipRecordList:
|
| | | return False
|
| | |
| | | GameWorld.DebugLog("膜拜: tagPlayerID=%s,worshipType=%s,worshipValue=%s,moneyType=%s,moneyValue=%s"
|
| | | % (tagPlayerID, worshipType, worshipValue, moneyType, moneyValue), playerID)
|
| | | playerRecMgr = PyDataManager.GetDBPlayerRecDataManager()
|
| | | worshipRecData = playerRecMgr.GetPlayerRecDataFirst(ShareDefine.Def_PlayerRecType_WorshipDaily, playerID)
|
| | | worshipRecData = playerRecMgr.GetPlayerRecDataFirst(ShareDefine.Def_PlayerRecType_WorshipDaily, playerID, True)
|
| | | SetWorshipRecordToday(worshipRecData, tagPlayerID, worshipType, worshipValue)
|
| | |
|
| | | __SyncWorshipResult(curPlayer, tagPlayerID, worshipType, worshipValue, 0, moneyType, moneyValue)
|
| | |
| | | return
|
| | |
|
| | | playerRecMgr = PyDataManager.GetDBPlayerRecDataManager()
|
| | | worshipRecData = playerRecMgr.GetPlayerRecDataFirst(ShareDefine.Def_PlayerRecType_WorshipDaily, playerID)
|
| | | worshipRecData = playerRecMgr.GetPlayerRecDataFirst(ShareDefine.Def_PlayerRecType_WorshipDaily, playerID, False)
|
| | | if HasWorshipRecordToday(worshipRecData, recPlayerID, worshipType, worshipValue):
|
| | | GameWorld.DebugLog("今日已膜拜过! recPlayerID=%s,worshipType=%s, worshipValue=%s" % (recPlayerID, worshipType, worshipValue), playerID)
|
| | | return
|