From ae3a9cc0f0e995114bf7e29455cb4d1d3778779d Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 29 四月 2021 10:57:15 +0800 Subject: [PATCH] 5040 【BT2】【主干】无附件、无截止时间的邮件默认过期时间改为1天(onday删除无奖励的通知类模板邮件,不包含后台发送的通知类邮件) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py index 4b31887..008819d 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py @@ -1189,11 +1189,25 @@ # @return None def ClearUpPersonalCompensation(): #校验过期补偿 + tempSign = "<MailTemplate>" + tempSignEnd = "</MailTemplate>" curTime = datetime.datetime.today() needClearGUIDList = [] allCnt = GameWorld.GetCompensationMgr().GetAllPersonalCompensationCount() for i in xrange(allCnt): curMail = GameWorld.GetCompensationMgr().AtAllPersonalCompensation(i) + + 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 + # 超过接收邮件30天则完全删除此邮件 limitTime = datetime.datetime.strptime(curMail.CreateTime, ChConfig.TYPE_Time_Format) + datetime.timedelta(days = 30) if limitTime < curTime: -- Gitblit v1.8.0