|  |  |  | 
|---|
|  |  |  | if onEventType == ShareDefine.Def_OnEventTypeEx: | 
|---|
|  |  |  | # 重置完成次数 | 
|---|
|  |  |  | for i in xrange(ipyDataMgr.GetDailyQuestCount()): | 
|---|
|  |  |  | key = ChConfig.Def_PDict_Activity_FinishCnt % (i+1) | 
|---|
|  |  |  | ipyData = ipyDataMgr.GetDailyQuestByIndex(i) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | key = ChConfig.Def_PDict_Activity_FinishCnt % ipyData.GetID() | 
|---|
|  |  |  | curPBCnt = __GetPDictValue(curPlayer, key) #单次进度值 | 
|---|
|  |  |  | if curPBCnt: | 
|---|
|  |  |  | __SetPDictValue(curPlayer, key, 0) | 
|---|
|  |  |  | 
|---|
|  |  |  | actRealmPointInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RealmPoint, {})# 多倍修行点活动 | 
|---|
|  |  |  | if not actRealmPointInfo: | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | if actRealmPointInfo.get(ShareDefine.ActKey_State) \ | 
|---|
|  |  |  | and curPlayer.GetLV() >= actRealmPointInfo.get(ShareDefine.ActKey_LVLimit, 0): | 
|---|
|  |  |  | #从开始天的5点到结束天的5点 | 
|---|
|  |  |  | startData = GameWorld.GetDateTimeByStr(actRealmPointInfo[ShareDefine.ActKey_StartDate], ChConfig.TYPE_Time_Format_Day) | 
|---|
|  |  |  | endData = GameWorld.GetDateTimeByStr(actRealmPointInfo[ShareDefine.ActKey_EndDate], ChConfig.TYPE_Time_Format_Day) | 
|---|
|  |  |  | curTime = GameWorld.GetCurrentTime() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | curHour = GameWorld.GetCurrentTime().hour | 
|---|
|  |  |  | if curTime.year == startData.year and curTime.month == startData.month and curTime.day == startData.day: | 
|---|
|  |  |  | if 0<=curHour<5: | 
|---|
|  |  |  | #GameWorld.DebugLog('多倍修行点开始天的0-5点不生效') | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | if curTime.year == endData.year and curTime.month == endData.month and curTime.day == endData.day: | 
|---|
|  |  |  | if curHour >=5: | 
|---|
|  |  |  | #GameWorld.DebugLog('多倍修行点结束天的5点之后不生效') | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | multiple = actRealmPointInfo.get(ShareDefine.ActKey_RealmPointMulti, 1) | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | if not actRealmPointInfo.get(ShareDefine.ActKey_State): | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | actRealmPointIpyData = IpyGameDataPY.GetIpyGameData("ActRealmPoint", actRealmPointInfo.get(ShareDefine.ActKey_CfgID, 0)) | 
|---|
|  |  |  | if not actRealmPointIpyData: | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | if curPlayer.GetLV() < actRealmPointIpyData.GetLVLimit(): | 
|---|
|  |  |  | return multiple | 
|---|
|  |  |  | return actRealmPointIpyData.GetMultiple() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ## 同步活跃度信息 | 
|---|
|  |  |  | #  @param curPlayer | 
|---|
|  |  |  | 
|---|
|  |  |  | activityNum = GetActivityNum(RelatedType_1, dailyID) | 
|---|
|  |  |  | dailyQuestData = IpyGameDataPY.GetIpyGameDataNotLog('DailyQuest', activityNum) | 
|---|
|  |  |  | unLimitCnt = dailyQuestData and not dailyQuestData.GetTotalActiveValue() | 
|---|
|  |  |  | funcID = dailyQuestData.GetUnLockFuncID() if dailyQuestData else 0 | 
|---|
|  |  |  | if funcID and not GameFuncComm.GetFuncCanUse(curPlayer, funcID): | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | updDayTimes = 0 | 
|---|
|  |  |  | if dayTimesLimit: | 
|---|
|  |  |  | 
|---|
|  |  |  | if not unLimitCnt and curDayTimes >= dayTimesLimit: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | updDayTimes =  curDayTimes+addCnt if unLimitCnt else min(dayTimesLimit, curDayTimes+addCnt) | 
|---|
|  |  |  | addCnt = updDayTimes - curDayTimes | 
|---|
|  |  |  | PlayerControl.NomalDictSetProperty(curPlayer, key, updDayTimes) | 
|---|
|  |  |  | GameWorld.DebugLog('增加日常活动完成次数 dailyID=%s, curDayTimes=%s, updDayTimes=%s'%(dailyID, curDayTimes, updDayTimes)) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | updWeekTimes = 0 | 
|---|
|  |  |  | if weekTimesLimit: | 
|---|
|  |  |  | key = ChConfig.Def_PDict_DailyActionWeekTimes%dailyID | 
|---|
|  |  |  | curWeekTimes = curPlayer.NomalDictGetProperty(key) | 
|---|
|  |  |  | if not unLimitCnt and curWeekTimes >= weekTimesLimit: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | updWeekTimes =  curWeekTimes+addCnt if unLimitCnt else min(weekTimesLimit, curWeekTimes+addCnt) | 
|---|
|  |  |  | addCnt = updWeekTimes - curWeekTimes | 
|---|
|  |  |  | PlayerControl.NomalDictSetProperty(curPlayer, key, updWeekTimes) | 
|---|
|  |  |  | GameWorld.DebugLog('增加日常活动完成次数 dailyID=%s, curWeekTimes=%s, updWeekTimes=%s'%(dailyID, curWeekTimes, updWeekTimes)) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #对应的日常任务表ID | 
|---|
|  |  |  | updTimes = updDayTimes or updWeekTimes | 
|---|
|  |  |  | if updTimes and dailyQuestData: | 
|---|
|  |  |  | if addCnt and updTimes and dailyQuestData: | 
|---|
|  |  |  | AddActivityFinishCnt(curPlayer, activityNum, updTimes, addCnt) | 
|---|
|  |  |  | return True | 
|---|
|  |  |  |  | 
|---|