| | |
| | | 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
|
| | |
|
| | |
| | | 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])
|
| | | |
| | | #删除过期补偿信息, 没有主动通知在线玩家
|
| | | for playerID, GUID in needClearGUIDList:
|
| | | ClearPersonalCompensation(playerID, GUID)
|
| | | return
|
| | |
|
| | | ## 清理超时补偿, 个人邮件在超过上限后才会自动删除
|
| | | # @param None
|
| | | # @return None
|
| | | def ClearUpTimeOutCompensation():
|
| | |
|
| | | ClearUpPersonalCompensation()
|
| | | ClearUpEntireCompensation()
|
| | | return
|
| | |
|