From 0957c665f046bee67819b7f4e223dd19baad9da4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 28 十一月 2025 18:16:28 +0800
Subject: [PATCH] 16 卡牌服务端(数据备档、入库时间调整;每日3点6分入库,每30分钟备档;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
index 420847f..0b32d31 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
@@ -1062,6 +1062,20 @@
         __doHeroBookAct(curPlayer, heroID)
     return
 
+def GetHeroBookActCnt(curPlayer):
+    ## 获取武将图鉴已激活数量
+    bookCnt = 0
+    ipyDataMgr = IpyGameDataPY.IPY_Data()
+    for index in range(ipyDataMgr.GetHeroCount()):
+        ipyData = ipyDataMgr.GetHeroByIndex(index)
+        heroID = ipyData.GetHeroID()
+        if not ipyData.GetPlayerCanUse():
+            continue
+        if not GetHeroBookInitState(curPlayer, heroID):
+            continue
+        bookCnt += 1
+    return bookCnt
+
 def __doHeroBookAct(curPlayer, heroID):
     ## 图鉴激活
     playerID = curPlayer.GetPlayerID()
@@ -1090,6 +1104,8 @@
     Sync_HeroInfo(curPlayer, [heroID])
     
     RefreshLordAttr(curPlayer)
+    
+    PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_HeroBook)
     return
 
 def __doHeroBookStarLVUP(curPlayer, heroID):

--
Gitblit v1.8.0