From 027cedb2cfd1d72e469f29b3689a0232c12e104b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 02 三月 2026 14:38:02 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(开通永久卡重置武将招募幸运值)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py   |   23 +++++++++++++++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py |    4 ++++
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
index 734a00a..23f5274 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -175,6 +175,10 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestEndTime % investType, updEndTime)
     GameWorld.DebugLog("投资理财成功: investType=%s" % (investType))
     Sync_InvestInfo(curPlayer, investType)
+    
+    if investType == ChConfig.InvestType_Life:
+        import PlayerTreasure
+        PlayerTreasure.ResetLifeCardLucky(curPlayer)
     return
 
 def GetAddFBCnt(curPlayer, mapID):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index c530ab9..a8324eb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -59,11 +59,11 @@
 TreasureType_Gubao, # 古宝寻宝 5
 ) = range(1, 1 + 5)
 
-TreasureType_HeroComm = 11 # 英雄招募 - 普通
+#TreasureType_HeroComm = 11 # 英雄招募 - 普通
 TreasureType_HeroHigh = 12 # 英雄招募 - 高级
 TreasureType_HeroScore = 13 # 英雄招募 - 积分
 #武将招募的所有类型
-TreasureType_HeroCallList = [TreasureType_HeroComm, TreasureType_HeroHigh, TreasureType_HeroScore]
+TreasureType_HeroCallList = [TreasureType_HeroHigh, TreasureType_HeroScore]
 
 #活动寻宝类型
 ActType_HeroAppear = 1 # 武将登场
@@ -140,6 +140,25 @@
     Sync_TreasureInfo(curPlayer, treasureTypeList)
     return
 
+def ResetLifeCardLucky(curPlayer):
+    treasureTypeList = []
+    for treasureType in TreasureType_HeroCallList:
+        if treasureType in treasureTypeList:
+            continue
+        houseList = IpyGameDataPY.GetIpyGameDataList("TreasureHouse", treasureType)
+        if not houseList:
+            continue
+        for hourseIpyData in houseList:
+            if hourseIpyData.GetLuckyItemRateInfoEx():
+                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureLuck % (treasureType), 0)
+                treasureTypeList.append(treasureType)
+                GameWorld.DebugLog("开通永久卡重置武将招募永久卡幸运值! treasureType=%s" % treasureType)
+                break
+    if not treasureTypeList:
+        return
+    Sync_TreasureInfo(curPlayer, treasureTypeList)
+    return
+
 def IsActTreasureType(curPlayer, treasureType, actType):
     ## 是否活动中的寻宝类型
     if actType == ActType_HeroAppear:

--
Gitblit v1.8.0