| | |
| | | GameWorld.DebugLog("增加协助感谢: itemID=%s,mapID=%s,lineID=%s,npcID=%s,exData=%s" % (itemID, mapID, lineID, npcID, exData), playerID)
|
| | | return
|
| | |
|
| | | def AddNewAssistThanksEx(curPlayer, itemID, assistPlayerDict, mapID=0, lineID=0, npcID=0, exData=""):
|
| | | ## 添加协助感谢数据,自动更新 TodayGiftCount 及 玩家信息
|
| | | DailyDateStr = GameWorld.GetDailyDateStr()
|
| | | assistThanksMgr = PyDataManager.GetPlayerAssistThanksPyManager()
|
| | | for assistPlayerID, assistPlayerInfoDict in assistPlayerDict.items():
|
| | | |
| | | # 查找今日该感谢物品已接受感谢次数
|
| | | TodayGiftCount = 0
|
| | | assistPlayerThanksList = assistThanksMgr.assistPlayerThanksDict.get(assistPlayerID, [])
|
| | | for thanks in assistPlayerThanksList:
|
| | | if DailyDateStr != thanks.DailyDateStr or itemID != thanks.ItemID:
|
| | | continue
|
| | | if assistPlayerID not in thanks.AssistPlayerDict:
|
| | | continue
|
| | | infoDict = thanks.AssistPlayerDict[assistPlayerID]
|
| | | TodayGiftCount = infoDict.get("TodayGiftCount", 0)
|
| | | break
|
| | | |
| | | assistPlayerInfoDict["TodayGiftCount"] = TodayGiftCount
|
| | | |
| | | # 更新玩家信息,之后有需要再扩展,可以从玩家缓存或直接取在线玩家实例赋值 name job 等信息
|
| | | |
| | | GameWorld.DebugLog("获取今日接受感谢次数: itemID=%s,TodayGiftCount=%s" % (itemID, TodayGiftCount), assistPlayerID)
|
| | | GameWorld.DebugLog("AddNewAssistThanksEx itemID=%s,assistPlayerDict=%s" % (itemID, assistPlayerDict), curPlayer.GetPlayerID())
|
| | | AddNewAssistThanks(curPlayer, itemID, mapID, lineID, assistPlayerDict, npcID, exData)
|
| | | return
|
| | |
|
| | | |
| | | #// B0 14 使用协助感谢礼盒 #tagCGUseAssistThanksGift
|
| | | #
|
| | | #struct tagCGUseAssistThanksGift
|