From d9611fb2b7b4616e5d40746ecda265dfa1d9a0b9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 13 十二月 2021 16:00:24 +0800
Subject: [PATCH] 8901 【BT2】【后端】全服红包(报错防范)

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index 97cba28..464f830 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -1234,13 +1234,15 @@
         mailText = curMail.Text
         # 通知类模板邮件,过天可直接删除
         if tempSign in mailText and tempSignEnd in mailText and CheckCanDelCompensation(curMail, curMail.GUID):
-            #tempKey = mailText[mailText.index(tempSign) + len(tempSign):mailText.index(tempSignEnd)]
-            #GameWorld.DebugLog("过天删除无附件通知类邮件模板! tempKey=%s %s, %s" % (tempKey, curMail.PlayerID, curMail.GUID))
-            needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
-            player = GameWorld.GetPlayerManager().FindPlayerByID(curMail.PlayerID)
-            if player and player.GetInitOK():
-                NotifyCompensationResult(player, curMail.GUID, 1)
-            continue
+            tempKey = mailText[mailText.index(tempSign) + len(tempSign):mailText.index(tempSignEnd)]
+            notClearMailKeyList = IpyGameDataPY.GetFuncEvalCfg("MailSet", 1)
+            if tempKey not in notClearMailKeyList:
+                #GameWorld.DebugLog("过天删除无附件通知类邮件模板! tempKey=%s %s, %s" % (tempKey, curMail.PlayerID, curMail.GUID))
+                needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
+                player = GameWorld.GetPlayerManager().FindPlayerByID(curMail.PlayerID)
+                if player and player.GetInitOK():
+                    NotifyCompensationResult(player, curMail.GUID, 1)
+                continue
         
         # 超过接收邮件30天则完全删除此邮件
         limitTime = datetime.datetime.strptime(curMail.CreateTime, ChConfig.TYPE_Time_Format) + datetime.timedelta(days = 30)

--
Gitblit v1.8.0