| | |
| | | import Operate_EquipStone
|
| | | import Operate_EquipWash
|
| | | import Operate_EquipSuitCompose
|
| | | import PlayerFeastRedPacket
|
| | | import PlayerDogz
|
| | | import QuestCommon
|
| | | import DataRecordPack
|
| | |
| | | Sync_SuccessInfo(curPlayer, resetList, True)
|
| | | return
|
| | |
|
| | | def DoResetSuccessIDList(curPlayer, resetSuccIDList):
|
| | | ## 重置成就相关数据
|
| | | if not resetSuccIDList:
|
| | | return
|
| | | resetList = []
|
| | | for succID in resetSuccIDList:
|
| | | succData = GetSuccDataMng().GetSuccessData(succID)
|
| | | if not succData:
|
| | | continue
|
| | | succType = succData.succType
|
| | | condition = succData.condition
|
| | | if not GetSuccFinishValue(curPlayer, succType, condition):
|
| | | continue
|
| | | SetSuccFinishValue(curPlayer, succType, condition, 0)
|
| | | SetSuccFinish(curPlayer, succID, False)
|
| | | SetSuccHasGot(curPlayer, succID, False)
|
| | | resetList.append(succID)
|
| | | GameWorld.DebugLog(" 重置成就类型: succType=%s,succID=%s" % (succType, succID))
|
| | | if resetList:
|
| | | Sync_SuccTypeIndexAwardRecord(curPlayer, resetList, True)
|
| | | Sync_SuccessInfo(curPlayer, resetList, True)
|
| | | return
|
| | |
|
| | | ## 成就OnDay
|
| | | # @param curPlayer
|
| | | # @return
|
| | |
| | | def UptateSuccessProgress(curPlayer, successType, newCnt, condition=[]):
|
| | | if successType not in ShareDefine.SuccessTypeList:
|
| | | return
|
| | | if successType in ShareDefine.FeastRedPackSuccessTypeList:
|
| | | if not PlayerFeastRedPacket.GetFeastRedPacketState():
|
| | | return
|
| | | succInfoList = GetSuccDataMng().GetSuccDataByType(successType)
|
| | | if not succInfoList:
|
| | | return
|
| | |
| | | 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
|
| | | isUnDownCheck = successType in ShareDefine.UnDownCheckSuccessTypeList
|
| | | isContain = successType in ShareDefine.ContainSuccessTypeList
|
| | | # 已完成的不再检查
|
| | |
| | | def DoAddSuccessProgress(curPlayer, successType, addCnt, condition=[], delayCalc=True):
|
| | | #GameWorld.DebugLog("DoAddSuccessProgress type=%s,addCnt=%s,condition=%s"
|
| | | # % (successType, addCnt, condition), curPlayer.GetPlayerID())
|
| | |
|
| | | if GameWorld.IsCrossServer():
|
| | | 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 playerID not in PyGameData.g_delaySuccessDict:
|