| | |
| | |
|
| | | def SendMailByKey(mailTypeKey, playerID, itemList, paramList=[], limitDays=7):
|
| | | ## 发送个人邮件魔板
|
| | | # @param itemList: 元素支持字典{itemID:itemCount, ...} 或列表 [itemID, itemCount, 可选是否拍品, 物品UserData]
|
| | | if not mailTypeKey:
|
| | | mailTypeKey = ShareDefine.DefaultLackSpaceMailType
|
| | | title = "<T>%s</T>" % mailTypeKey
|
| | |
| | |
|
| | | def SendMail(playerID, title, text, itemList=None, limitDays=7, mailType=0):
|
| | | ## 发送个人邮件
|
| | | # @param itemList: 元素支持字典{itemID:itemCount, ...} 或列表 [itemID, itemCount, 可选是否拍品, 物品UserData]
|
| | | if itemList == None:
|
| | | itemList = []
|
| | | |
| | | if isinstance(itemList, dict):
|
| | | itemList = [[itemID, itemCount] for itemID, itemCount in itemList.items()]
|
| | | mailMgr = DBDataMgr.GetMailMgr()
|
| | | mailMax = IpyGameDataPY.GetFuncCfg("PersonalMail", 1)
|
| | | mailCnt = mailMgr.GetPersonalMailCount(playerID)
|
| | |
| | | def SendSeverMail(guid, title, text, itemList=None, limitDays=7, mailType=0, limitLV=0, limitLVType=0, checkState=0):
|
| | | '''发送全服邮件
|
| | | @param guid: 可传入空,则系统自动生成guid
|
| | | @param itemList: 元素支持字典{itemID:itemCount, ...} 或列表 [itemID, itemCount, 可选是否拍品, 物品UserData]
|
| | | @param limitLV: 限制可领的最低等级
|
| | | @param limitLVType: 等级达到后是否可领,默认不可
|
| | | @param checkState: 是否需要审核,默认不需要
|
| | | @return: None - 发送失败; mailObj - 成功发送的邮件实例
|
| | | '''
|
| | | if itemList == None:
|
| | | itemList = []
|
| | | if isinstance(itemList, dict):
|
| | | itemList = [[itemID, itemCount] for itemID, itemCount in itemList.items()]
|
| | | mailMgr = DBDataMgr.GetMailMgr()
|
| | | mailObj = mailMgr.AddServerMail(guid, title, text, itemList, limitDays, mailType)
|
| | | if not mailObj:
|