| | |
| | | import ChItem
|
| | | import IpyGameDataPY
|
| | | import PlayerRune
|
| | | import PlayerSuccess
|
| | | import GameFuncComm
|
| | | import PlayerFairyCeremony
|
| | | import PyGameData
|
| | |
|
| | |
| | | if onEventType == ShareDefine.Def_OnEventType:
|
| | | UpdataSuperGiftTime(curPlayer, True)
|
| | | SyncSuperGiftInfo(curPlayer)
|
| | | OSSaleOpenMail(curPlayer)
|
| | | refreshType = [3]
|
| | | elif onEventType == ShareDefine.Def_OnEventTypeEx:
|
| | | refreshType = [4]
|
| | |
| | | # 默认不限制
|
| | | return False
|
| | |
|
| | | def OSSaleOpenMail(curPlayer):
|
| | | #开服特惠开启邮件
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_OSSail):
|
| | | return
|
| | | openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)+1
|
| | | if openServerDay not in IpyGameDataPY.GetFuncEvalCfg('OSSaleOpenMail'):
|
| | | return
|
| | | addItemList = IpyGameDataPY.GetFuncEvalCfg('OSSaleOpenMail', 2)
|
| | | PlayerControl.SendMailByKey('SellMail1', [curPlayer.GetID()], addItemList)
|
| | | return
|
| | |
|
| | | #超值礼包购买时间
|
| | | def UpdataSuperGiftTime(curPlayer, isOnday=False):
|
| | |
| | | return
|
| | | giftID, day = superGiftTimeList[giftIndex-1]
|
| | | openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)+1
|
| | | remainDay = max(0, day - openServerDay+startDay)-1
|
| | |
|
| | | packData = ChPyNetSendPack.tagMCSuperGiftInfo()
|
| | | packData.GiftID = giftID
|
| | | packData.RemainDay = max(0, day - openServerDay+startDay)
|
| | | packData.EndtDate = str(GameWorld.GetDatetimeByDiffDays(remainDay))[:10]
|
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | | def CheckSuperGiftBuy(curPlayer, giftID):
|