From 8998ec5daea710f0465f56740aafbd0c2f0d2ee7 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 24 二月 2025 11:51:53 +0800
Subject: [PATCH] 10337 【越南】【英语】【BT】【GM】【砍树】爬塔通关类的支持一键过关(战力不足时提示TaskFeedback4)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py
index b40c2c6..0cff408 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerAssist.py
@@ -1214,6 +1214,34 @@
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
--
Gitblit v1.8.0