From d7b7ed5eff26ceb650ccbe3482a31bed773a3c8d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 24 六月 2021 16:55:32 +0800
Subject: [PATCH] 8921 【主干】【BT2】【后端】H.活动-节日活动-垃圾分类(仙匣秘境限制最大层数99)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index 9ebe153..008819d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -395,6 +395,8 @@
perMailItemCnt = IpyGameDataPY.GetFuncCfg("MailMaxItemCnt")
mailCnt = max(1, int(math.ceil(len(addItemDictList)/float(perMailItemCnt)))) # 一封邮件最多5个物品
for i in xrange(mailCnt):
+ if i != 0:
+ gold, goldPaper, silver = 0, 0, 0 # 拆分后非第一封的邮件货币归零,防止重复给货币奖励
startIndex = i*perMailItemCnt
GUID = str(uuid.uuid1())
AddPersonalItem(GUID, addItemDictList[startIndex:startIndex + perMailItemCnt], playerIDList,
@@ -1187,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