8813 【主干】【后端】七日巡礼:任务调整(任务隔天可触发;增加事件传功、升星、强化);
| | |
| | | Def_WPAct_Pray, #祈愿 27
|
| | | Def_WPAct_FamilyBoss, #仙盟Boss 28
|
| | | Def_WPAct_FairyDomain, #缥缈仙域 29
|
| | | ) = range(1, 29+1)
|
| | | Def_WPAct_Plus, #强化 30
|
| | | Def_WPAct_Star, #升星 31
|
| | | Def_WPAct_FamilyChuanGong, #传功 32
|
| | | ) = range(1, 32+1)
|
| | |
|
| | | #登录奖励活动定义
|
| | | LoginAwardActIDList = (
|
| | |
| | | import EventShell
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import PlayerWeekParty
|
| | | #-------------------------------------------------------------------------------------------
|
| | |
|
| | | #===============================================================================
|
| | |
| | | ChEquip.NotifyEquipPartPlusLV(curPlayer, packType, index)
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_EquipPlus)
|
| | | PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipPlus, 1)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Plus, 1)
|
| | | return
|
| | |
|
| | | def __EquipMayaPlusChange(curPlayer, packType, curEquip, index, updPlusLV):
|
| | |
| | | import IPY_GameWorld
|
| | | import DataRecordPack
|
| | | import PlayerAuctionHouse
|
| | | import PlayerWeekParty
|
| | | import IpyGameDataPY
|
| | | import PlayerSuccess
|
| | | import GameWorld
|
| | |
| | | msgParamList = [curPlayer.GetPlayerName(), itemID, userData, guid, updPartStar]
|
| | | PlayerControl.WorldNotify(0, "StarLevelUp", msgParamList)
|
| | |
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Star, 1)
|
| | | return
|
| | |
|
| | | def __CheckCostInfo(curPlayer, classLV, equipPlace, curPartStar, costEquipIndexList, costEquipIDList, itemPack, isAutoBuy):
|
| | |
| | | import Item_AddLV
|
| | | import PlayerTalk
|
| | | import PlayerActivity
|
| | | import PlayerWeekParty
|
| | |
|
| | | #---战盟副本---
|
| | | FBPlayerDict_TagPlayerID = 'XMYH_TagPlayerID%s' # 邀请传功目标玩家ID
|
| | |
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartySitState, 1)
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyChuanGong)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_FamilyChuanGong, 1)
|
| | | DoFBHelp(curPlayer, 0)
|
| | |
|
| | | #帮助传功奖励
|
| | |
| | | dayIndex = actWeekPartyInfo.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | if dayIndex >= len(templateIDList):
|
| | | return
|
| | | |
| | | dayTidList = templateIDList[dayIndex]
|
| | | findTidList = []
|
| | | for tid in dayTidList:
|
| | | if tid / 100 == actionID:
|
| | | findTidList.append(tid)
|
| | | if not findTidList:
|
| | | return
|
| | | for findTid in findTidList:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
|
| | | if not ipyData:
|
| | | if actionID in [ChConfig.Def_WPAct_Login]:
|
| | | addDayIndexList = [dayIndex]
|
| | | else:
|
| | | addDayIndexList = range(dayIndex + 1)
|
| | | for dayIndex in addDayIndexList:
|
| | | dayTidList = templateIDList[dayIndex]
|
| | | findTidList = []
|
| | | for tid in dayTidList:
|
| | | if tid / 100 == actionID:
|
| | | findTidList.append(tid)
|
| | | if not findTidList:
|
| | | continue
|
| | | totalTimes = ipyData.GetTotalTimes()
|
| | | curTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), 0, ChConfig.Def_PDictType_WeekParty)
|
| | | if isAdd:
|
| | | curAddCnt = addCnt if totalTimes == 0 else min(totalTimes - curTimes, addCnt)
|
| | | if curAddCnt <= 0:
|
| | | for findTid in findTidList:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
|
| | | if not ipyData:
|
| | | continue
|
| | | updTimes = curTimes + curAddCnt
|
| | | else:
|
| | | if not isCompatible and addCnt != totalTimes:
|
| | | totalTimes = ipyData.GetTotalTimes()
|
| | | curTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), 0, ChConfig.Def_PDictType_WeekParty)
|
| | | if isAdd:
|
| | | curAddCnt = addCnt if totalTimes == 0 else min(totalTimes - curTimes, addCnt)
|
| | | if curAddCnt <= 0:
|
| | | continue
|
| | | updTimes = curTimes + curAddCnt
|
| | | else:
|
| | | if not isCompatible and addCnt != totalTimes:
|
| | | continue
|
| | | updTimes = min(addCnt, totalTimes)
|
| | | realAddCnt = updTimes - curTimes
|
| | | if realAddCnt <= 0:
|
| | | continue
|
| | | updTimes = min(addCnt, totalTimes)
|
| | | realAddCnt = updTimes - curTimes
|
| | | if realAddCnt <= 0:
|
| | | continue
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), updTimes, ChConfig.Def_PDictType_WeekParty)
|
| | | #加积分
|
| | | singleTimes = ipyData.GetSingleTimes()
|
| | | addPoint = (curTimes % singleTimes + realAddCnt) / singleTimes * ipyData.GetPoint()
|
| | | curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyPoint % dayIndex, 0, ChConfig.Def_PDictType_WeekParty)
|
| | | updPoint = curPoint + addPoint
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_WeekParty)
|
| | | GameWorld.DebugLog(' 增加周狂欢相关活动完成次数 dayIndex=%s, findTid=%s, realAddCnt=%s,addPoint=%s' % (dayIndex, findTid, realAddCnt, addPoint))
|
| | | if isSync:
|
| | | SyncWeekPartyPlayerInfo(curPlayer, dayIndex, findTid)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), updTimes, ChConfig.Def_PDictType_WeekParty)
|
| | | #加积分
|
| | | singleTimes = ipyData.GetSingleTimes()
|
| | | addPoint = (curTimes % singleTimes + realAddCnt) / singleTimes * ipyData.GetPoint()
|
| | | curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyPoint % dayIndex, 0, ChConfig.Def_PDictType_WeekParty)
|
| | | updPoint = curPoint + addPoint
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_WeekParty)
|
| | | GameWorld.DebugLog(' 增加周狂欢相关活动完成次数 dayIndex=%s, findTid=%s, curTimes=%s, updTimes=%s, realAddCnt=%s,addPoint=%s' % (dayIndex, findTid, curTimes, updTimes, realAddCnt, addPoint))
|
| | | if isSync:
|
| | | SyncWeekPartyPlayerInfo(curPlayer, dayIndex, findTid)
|
| | | return True
|
| | |
|
| | | def CheckWeekPartyActionCnt(curPlayer, isSync):
|