| | |
| | | import IPY_GameWorld
|
| | | import PlayerControl
|
| | | import ItemControler
|
| | | import PlayerFamilyRedPacket
|
| | | import IpyGameDataPY
|
| | | import PyGameData
|
| | | import EventReport
|
| | |
|
| | | import datetime
|
| | | import time
|
| | | import math
|
| | | import PlayerFeastRedPacket
|
| | | import DataRecordPack
|
| | |
|
| | |
|
| | |
| | | def UptateSuccessProgress(curPlayer, successType, newCnt, condition=[]):
|
| | | if successType not in ShareDefine.SuccessTypeList:
|
| | | return
|
| | | if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | if not PlayerFeastRedPacket.GetFeastRedPacketState():
|
| | | return
|
| | | #if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | # if not PlayerFeastRedPacket.GetFeastRedPacketState():
|
| | | # return
|
| | | succInfoList = GetSuccDataMng().GetSuccDataByType(successType)
|
| | | if not succInfoList:
|
| | | GameWorld.DebugLog(" 找不到成就数据successType=%s" % successType)
|
| | |
| | | succID = succDataObj.succID
|
| | | cond = succDataObj.condition
|
| | |
|
| | | if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | todayFeastSuccIDList = PlayerFeastRedPacket.GetTodayFeastSuccIDList()
|
| | | if not todayFeastSuccIDList or succID not in todayFeastSuccIDList:
|
| | | #GameWorld.DebugLog(" 非今日节日红包成就,不增加进度! succID=%s,todayFeastSuccIDList=%s" % (succID, todayFeastSuccIDList))
|
| | | return
|
| | | #if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | # todayFeastSuccIDList = PlayerFeastRedPacket.GetTodayFeastSuccIDList()
|
| | | # if not todayFeastSuccIDList or succID not in todayFeastSuccIDList:
|
| | | # #GameWorld.DebugLog(" 非今日节日红包成就,不增加进度! succID=%s,todayFeastSuccIDList=%s" % (succID, todayFeastSuccIDList))
|
| | | # return
|
| | | isUnDownCheck = successType in ShareDefine.UnDownCheckSuccessTypeList
|
| | | isContain = successType in ShareDefine.ContainSuccessTypeList
|
| | | # 已完成的不再检查
|
| | |
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | |
|
| | | if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | if not PlayerFeastRedPacket.GetFeastRedPacketState():
|
| | | #GameWorld.DebugLog("非节日红包活动时间,不增加成就!successType=%s" % successType)
|
| | | return
|
| | | #if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | # if not PlayerFeastRedPacket.GetFeastRedPacketState():
|
| | | # #GameWorld.DebugLog("非节日红包活动时间,不增加成就!successType=%s" % successType)
|
| | | # return
|
| | |
|
| | | playerID = curPlayer.GetID()
|
| | | if delayCalc and successType not in ShareDefine.NeedResetSuccessTypeList:
|
| | |
| | | if succData.attrDict:
|
| | | RefreshSuccessAttr(curPlayer)
|
| | | #发红包
|
| | | if succData.redPacketID:
|
| | | PlayerFamilyRedPacket.CreatRedPacketByID(curPlayer, succData.redPacketID, PlayerFamilyRedPacket.State_NoGot, succID)
|
| | | #if succData.redPacketID:
|
| | | # PlayerFamilyRedPacket.CreatRedPacketByID(curPlayer, succData.redPacketID, PlayerFamilyRedPacket.State_NoGot, succID)
|
| | | GameWorld.DebugLog(" OK! awardItemDict=%s moneyDict=%s" % (itemDict, succData.moneyDict))
|
| | | ItemControler.NotifyGiveAwardInfo(curPlayer, giveItemList, "SuccessAward", exp=succData.exp, moneyInfo=succData.moneyDict)
|
| | | return itemDict
|