From d50410deaed69bc1a07dcb02b0816f9321a34a69 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 19 四月 2019 17:39:36 +0800
Subject: [PATCH] 6457 【后端】【2.0】缥缈仙域开发单(宝藏流程调整)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index 75bf6eb..e52e73f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -853,11 +853,35 @@
return
+##清理超时30天的个人邮件, 否则流失玩家在不断合服情况下数据会累积
+# 个人邮件暂无过期时间设定,只有30天清理逻辑,以创建时间为准
+# @param None
+# @return None
+def ClearUpPersonalCompensation():
+ #校验过期补偿
+ curTime = datetime.datetime.today()
+ needClearGUIDList = []
+ allCnt = GameWorld.GetCompensationMgr().GetAllPersonalCompensationCount()
+ for i in xrange(allCnt):
+ curMail = GameWorld.GetCompensationMgr().AtAllPersonalCompensation(i)
+ # 超过接收邮件30天则完全删除此邮件
+ limitTime = datetime.datetime.strptime(curMail.CreateTime, ChConfig.TYPE_Time_Format) + datetime.timedelta(days = 30)
+ if limitTime < curTime:
+ needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
+
+ GameWorld.Log("ClearUpPersonalCompensation count=%s"%len(needClearGUIDList))
+
+ #删除过期补偿信息, 没有主动通知在线玩家
+ for playerID, GUID in needClearGUIDList:
+ ClearPersonalCompensation(playerID, GUID)
+ return
+
## 清理超时补偿, 个人邮件在超过上限后才会自动删除
# @param None
# @return None
def ClearUpTimeOutCompensation():
+ ClearUpPersonalCompensation()
ClearUpEntireCompensation()
return
--
Gitblit v1.8.0