From 31779da0ff5baba545b421e791a3a22a5b4fdf73 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 29 三月 2019 19:56:23 +0800
Subject: [PATCH] 2666 【1.4】boss攻击间隔配置3000毫秒。实际间隔为4s左右
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index 5278138..e52e73f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -77,7 +77,7 @@
curItemData.ItemID = curItemDict['ItemID']
curItemData.Count = curItemDict['Count']
#curItemData.IsBind = curItemDict.get('IsBind',0)
- curItemData.IsBind = 1 if not curItemDict.get('IsAuctionItem',0) else 0
+ curItemData.IsBind = curItemDict.get('IsAuctionItem',0)
curItemData.UserData = curItemDict.get('UserData', '')
return curItemData
@@ -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