| | |
| | | # 活动中同步活动信息
|
| | | SyncWeekPartyInfo(curPlayer)
|
| | | if actCostRebateInfo.get(ShareDefine.ActKey_State):
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1, False, False, False)
|
| | | SyncWeekPartyPlayerInfo(curPlayer)
|
| | | return
|
| | |
|
| | |
| | | playerID = curPlayer.GetPlayerID()
|
| | |
|
| | | actWeekPartyInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WeekParty, {})
|
| | | #WeekPartyID = actWeekPartyInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
|
| | | actID = actWeekPartyInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | cfgID = actWeekPartyInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | passlv = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
|
| | | if state:
|
| | | #每天都要触发
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Tower, passlv, False, True, False)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1, False, False)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, Operate_EquipStone.GetTotalStoneLV(curPlayer), False, True, False)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GodWeapon, PlayerGodWeapon.GetGodWeaponTotalLV(curPlayer), False, True, False)
|
| | | SyncWeekPartyPlayerInfo(curPlayer)
|
| | | playerWeekPartyID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyID, 0, ChConfig.Def_PDictType_WeekParty) # 玩家身上的活动ID
|
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyActID, 0, ChConfig.Def_PDictType_WeekParty) # 玩家身上的活动ID
|
| | | playerWeekPartyID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyID, 0, ChConfig.Def_PDictType_WeekParty) # 玩家身上的活动配置ID
|
| | | playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyWorldLV, 0, ChConfig.Def_PDictType_WeekParty) # 玩家身上的活动世界等级
|
| | | # 活动ID 相同的话不处理
|
| | | if cfgID == playerWeekPartyID:
|
| | | #GameWorld.DebugLog("周狂欢活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | if actID == playerActID:
|
| | | GameWorld.DebugLog("周狂欢活动ID不变,不处理!playerActID=%s" % playerActID, curPlayer.GetPlayerID())
|
| | | if state:
|
| | | CheckWeekPartyActionCnt(curPlayer, True)
|
| | | return
|
| | | CheckWeekPartyActionCnt(curPlayer)
|
| | | # 未领取的奖励邮件发放
|
| | | if playerWeekPartyID:
|
| | | __SendWeekPartyMail(curPlayer, playerWeekPartyID)
|
| | | |
| | | if not cfgID:
|
| | | GameWorld.DebugLog(' 周狂欢活动重置!')
|
| | | curPlayer.ClearNomalDict(ChConfig.Def_PDictType_WeekParty)
|
| | | |
| | | GameWorld.DebugLog("周狂欢变更! state=%s,cfgID=%s,playerWeekPartyID=%s" % (state, cfgID, playerWeekPartyID), playerID)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyID, cfgID, ChConfig.Def_PDictType_WeekParty)
|
| | | __SendWeekPartyMail(curPlayer, playerWeekPartyID, playerWorldLV)
|
| | |
|
| | | SyncWeekPartyInfo(curPlayer)
|
| | | GameWorld.DebugLog('周狂欢活动重置!')
|
| | | curPlayer.ClearNomalDict(ChConfig.Def_PDictType_WeekParty)
|
| | | |
| | | worldLV = actWeekPartyInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | GameWorld.DebugLog("周狂欢变更! state=%s,actID=%s,cfgID=%s,playerWeekPartyID=%s,worldLV=%s" % (state, actID, cfgID, playerWeekPartyID, worldLV), playerID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyActID, actID, ChConfig.Def_PDictType_WeekParty)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyID, cfgID, ChConfig.Def_PDictType_WeekParty)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyWorldLV, worldLV, ChConfig.Def_PDictType_WeekParty)
|
| | | if state:
|
| | | CheckWeekPartyActionCnt(curPlayer, False)
|
| | | SyncWeekPartyInfo(curPlayer)
|
| | | SyncWeekPartyPlayerInfo(curPlayer)
|
| | | |
| | | return True
|
| | |
|
| | |
|
| | | def __SendWeekPartyMail(curPlayer, cfgID):
|
| | | def __SendWeekPartyMail(curPlayer, cfgID, playerWorldLV):
|
| | | # 未领取的奖励邮件发放
|
| | | actBossIpyData = IpyGameDataPY.GetIpyGameData("ActWeekParty", cfgID)
|
| | | if not actBossIpyData:
|
| | |
| | | canGotCnt = (curTimes - gotTimes) / singleTimes
|
| | | if not canGotCnt:
|
| | | continue
|
| | | itemDict = __GetAwardItem(curPlayer, ipyData, canGotCnt)
|
| | | itemDict = __GetAwardItem(curPlayer, ipyData, playerWorldLV, canGotCnt)
|
| | | GameWorld.AddDictValue(totalItemDict, itemDict)
|
| | | #积分奖励
|
| | | for day, awardDict in actBossIpyData.GetPointAward().items():
|
| | | pointAwardInfo = __GetPointAwardInfo(actBossIpyData.GetPointAward(), playerWorldLV)
|
| | | for day, awardDict in pointAwardInfo.items():
|
| | | pointList = awardDict.keys()
|
| | | pointList.sort()
|
| | | for i, point in enumerate(pointList):
|
| | |
| | | PlayerControl.SendMailByKey('SecondWeekReward', [curPlayer.GetID()], totalItemList)
|
| | | return
|
| | |
|
| | | def __GetPointAwardInfo(cfgPointAwardInfo, worldLV):
|
| | | return GameWorld.GetDictValueByRangeKey(cfgPointAwardInfo, worldLV, {})
|
| | |
|
| | | def AddWeekPartyActionCnt(curPlayer, actionID, addCnt=1, isAdd=True, isCompatible=False, isSync=True):
|
| | | '''增加周狂欢相关活动完成次数'''
|
| | |
| | | state = actWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
|
| | | cfgID = actWeekPartyInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | |
|
| | | if not state or not cfgID:
|
| | | if not cfgID:
|
| | | return
|
| | | if not state:
|
| | | return
|
| | | |
| | | actBossIpyData = IpyGameDataPY.GetIpyGameData("ActWeekParty", cfgID)
|
| | | if not actBossIpyData:
|
| | | return
|
| | |
| | | dayIndex = actWeekPartyInfo.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | if dayIndex >= len(templateIDList):
|
| | | return
|
| | | if actionID in ChConfig.AheadFinishWPActList:
|
| | | isFind = False
|
| | | for day, dayTidList in enumerate(templateIDList[dayIndex:]):
|
| | | findTid = 0
|
| | | for tid in dayTidList:
|
| | | if tid / 100 == actionID:
|
| | | findTid = tid
|
| | | break
|
| | | if not findTid:
|
| | | continue
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
|
| | | if not ipyData:
|
| | | continue
|
| | | totalTimes = ipyData.GetTotalTimes()
|
| | | if addCnt != totalTimes:
|
| | | continue
|
| | | dayIndex = day + dayIndex
|
| | | isFind = True
|
| | | break
|
| | | if not isFind:
|
| | | return
|
| | |
|
| | | dayTidList = templateIDList[dayIndex]
|
| | | findTid = 0
|
| | | findTidList = []
|
| | | for tid in dayTidList:
|
| | | if tid / 100 == actionID:
|
| | | findTid = tid
|
| | | break
|
| | | if not findTid:
|
| | | findTidList.append(tid)
|
| | | if not findTidList:
|
| | | return
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
|
| | | if not ipyData:
|
| | | return
|
| | | totalTimes = ipyData.GetTotalTimes()
|
| | | curTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyCurTimes % (dayIndex, findTid), 0, ChConfig.Def_PDictType_WeekParty)
|
| | | if isAdd:
|
| | | addCnt = addCnt if totalTimes == 0 else min(totalTimes - curTimes, addCnt)
|
| | | if addCnt <= 0:
|
| | | return
|
| | | updTimes = curTimes + addCnt
|
| | | else:
|
| | | if not isCompatible and addCnt != totalTimes:
|
| | | return
|
| | | updTimes = min(addCnt, totalTimes)
|
| | | realAddCnt = updTimes - curTimes
|
| | | if realAddCnt <= 0:
|
| | | return
|
| | | 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)
|
| | | for findTid in findTidList:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', findTid)
|
| | | if not ipyData:
|
| | | 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:
|
| | | continue
|
| | | updTimes = curTimes + curAddCnt
|
| | | else:
|
| | | if not isCompatible and addCnt != totalTimes:
|
| | | 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)
|
| | | return True
|
| | |
|
| | |
|
| | | def CheckWeekPartyActionCnt(curPlayer):
|
| | | def CheckWeekPartyActionCnt(curPlayer, isSync):
|
| | | ## 同步活动状态时需要触发的
|
| | | |
| | | # 灵宠激活
|
| | | petDataPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptPet)
|
| | | for petDataIndex in range(petDataPack.GetCount()):
|
| | | petItem = petDataPack.GetAt(petDataIndex)
|
| | | if petItem.IsEmpty():
|
| | | continue
|
| | | petNPCID = petItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Pet, petNPCID, False, isSync=isSync)
|
| | | |
| | | # 出战神兽
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for actionType in ChConfig.AheadFinishWPActList:
|
| | | if actionType == ChConfig.Def_WPAct_Horse:
|
| | | for i in xrange(ipyDataMgr.GetHorseCount()):
|
| | | ipyData = ipyDataMgr.GetHorseByIndex(i)
|
| | | index = ipyData.GetHorseID()
|
| | | lv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Horser_LV % index, 0, ChConfig.Def_PDictType_Horse)
|
| | | if lv:
|
| | | AddWeekPartyActionCnt(curPlayer, actionType, index, False)
|
| | | elif actionType == ChConfig.Def_WPAct_Pet:
|
| | | petDataPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptPet)
|
| | | for petDataIndex in range(petDataPack.GetCount()):
|
| | | petItem = petDataPack.GetAt(petDataIndex)
|
| | | if petItem.IsEmpty():
|
| | | continue
|
| | | petNPCID = petItem.GetUserAttr(ShareDefine.Def_IudetPet_NPCID)
|
| | | AddWeekPartyActionCnt(curPlayer, actionType, petNPCID, False)
|
| | | elif actionType == ChConfig.Def_WPAct_Dogz:
|
| | | for i in xrange(ipyDataMgr.GetDogzCount()):
|
| | | ipyData = ipyDataMgr.GetDogzByIndex(i)
|
| | | if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_DogzFightState, i):
|
| | | AddWeekPartyActionCnt(curPlayer, actionType, ipyData.GetDogzID(), False)
|
| | | elif actionType == ChConfig.Def_WPAct_Rune:
|
| | | runeHoleCnt = IpyGameDataPY.GetFuncCfg("RuneUnlock", 4)
|
| | | for holeNum in xrange(1, runeHoleCnt + 1):
|
| | | runeData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % holeNum, 0)
|
| | | if not runeData:
|
| | | continue
|
| | | runeItemID = ItemControler.GetRuneItemID(runeData)
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(runeItemID)
|
| | | if not itemData:
|
| | | continue
|
| | | itemColor = itemData.GetItemColor()
|
| | | AddWeekPartyActionCnt(curPlayer, actionType, itemColor, False)
|
| | | for i in xrange(ipyDataMgr.GetDogzCount()):
|
| | | ipyData = ipyDataMgr.GetDogzByIndex(i)
|
| | | if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_DogzFightState, i):
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Dogz, ipyData.GetDogzID(), False, isSync=isSync)
|
| | | |
| | | # 穿戴某品质符印
|
| | | runeHoleCnt = IpyGameDataPY.GetFuncCfg("RuneUnlock", 4)
|
| | | for holeNum in xrange(1, runeHoleCnt + 1):
|
| | | runeData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % holeNum, 0)
|
| | | if not runeData:
|
| | | continue
|
| | | runeItemID = ItemControler.GetRuneItemID(runeData)
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(runeItemID)
|
| | | if not itemData:
|
| | | continue
|
| | | itemColor = itemData.GetItemColor()
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Rune, itemColor, False, isSync=isSync)
|
| | | |
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1, False, False, isSync)
|
| | | passlv = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Tower, passlv, False, True, isSync)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, Operate_EquipStone.GetTotalStoneLV(curPlayer), False, True, isSync)
|
| | | AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GodWeapon, PlayerGodWeapon.GetGodWeaponTotalLV(curPlayer), False, True, isSync)
|
| | | return
|
| | |
|
| | | def GetWeekPartyActionAward(curPlayer, day, templateID):
|
| | | '''领取周狂欢活动奖励'''
|
| | | templateID = GameWorld.ToIntDef(templateID, 0)
|
| | | actWeekPartyInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WeekParty, {})
|
| | | state = actWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
|
| | | cfgID = actWeekPartyInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | if not state or not cfgID:
|
| | | return
|
| | | actBossIpyData = IpyGameDataPY.GetIpyGameData("ActWeekParty", cfgID)
|
| | | if not actBossIpyData:
|
| | | return
|
| | | templateIDList = actBossIpyData.GetTemplateID()
|
| | | if not templateIDList:
|
| | | return
|
| | | if day >= len(templateIDList):
|
| | | return
|
| | | dayTempIDList = templateIDList[day]
|
| | | if templateID not in dayTempIDList:
|
| | | return
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('WeekParty', templateID)
|
| | | if not ipyData:
|
| | | return
|
| | |
| | | return
|
| | |
|
| | | #给奖励
|
| | | awardDict = __GetAwardItem(curPlayer, ipyData)
|
| | | awardDict = __GetAwardItem(curPlayer, ipyData, actWeekPartyInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | # 检查背包
|
| | | needSpace = len(awardDict)
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
|
| | |
| | | #GameWorld.Log(' actionID=%s,curTimes=%s,gotTimes=%s,singleTimes=%s,newGotTimes=%s'%(actionID, curTimes, gotTimes,singleTimes, newGotTimes))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyGotTimes % (day, templateID), newGotTimes, ChConfig.Def_PDictType_WeekParty)
|
| | | for itemID, itemCnt in awardDict.items():
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 1, [IPY_GameWorld.rptItem])
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
|
| | | SyncWeekPartyPlayerInfo(curPlayer, day, templateID)
|
| | | return
|
| | |
|
| | |
| | | curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyPoint % day, 0, ChConfig.Def_PDictType_WeekParty)
|
| | | if curPoint < getPoint:
|
| | | return
|
| | | pointAwardDict = actBossIpyData.GetPointAward().get(day, {})
|
| | | pointAwardInfo = __GetPointAwardInfo(actBossIpyData.GetPointAward(), actWeekPartyInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | pointAwardDict = pointAwardInfo.get(day, {})
|
| | | pointList = pointAwardDict.keys()
|
| | | pointList.sort()
|
| | | if getPoint not in pointList:
|
| | |
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyAwardRecord % day, awardRecord | pow(2, getIndex), ChConfig.Def_PDictType_WeekParty)
|
| | | for itemID, itemCnt, isBind in itemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
|
| | | SyncWeekPartyPlayerInfo(curPlayer, day)
|
| | | DataRecordPack.DR_WeekPartyPoint(curPlayer, day, getPoint)
|
| | | return
|
| | |
|
| | |
|
| | | def __GetAwardItem(curPlayer, ipyData, times=1):
|
| | | def __GetAwardItem(curPlayer, ipyData, worldLV, times=1):
|
| | | awardDict = {}
|
| | | for itemID, itemCnt, isbind in ipyData.GetReward():
|
| | | awardItemList = __GetAwardItemListByJob(curPlayer, ipyData.GetReward(), worldLV)
|
| | | for itemID, itemCnt, isbind in awardItemList:
|
| | | if not itemID or not itemCnt:
|
| | | continue
|
| | | awardDict[itemID] = awardDict.get(itemID, 0) + itemCnt * times
|
| | |
|
| | | return awardDict
|
| | |
|
| | | def __GetAwardItemListByJob(curPlayer, rewardItemInfo, worldLV):
|
| | | ## 根据职业获取对应奖励
|
| | | if not rewardItemInfo:
|
| | | return []
|
| | | if isinstance(rewardItemInfo, dict):
|
| | | keyList = rewardItemInfo.keys()
|
| | | # 配世界等级范围的
|
| | | if isinstance(keyList[0], tuple) and len(keyList[0]) == 2:
|
| | | return __GetAwardItemListByJob(curPlayer, GameWorld.GetDictValueByRangeKey(rewardItemInfo, worldLV), worldLV)
|
| | | return rewardItemInfo.get(curPlayer.GetJob(), [])
|
| | | return rewardItemInfo
|
| | |
|
| | | def SyncWeekPartyPlayerInfo(curPlayer, day=-1, templateID=-1):
|
| | | def SyncWeekPartyPlayerInfo(curPlayer, day= -1, templateID= -1):
|
| | | #通知当前次数、已领次数
|
| | | actWeekPartyInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WeekParty, {})
|
| | | state = actWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
|
| | |
| | | templateIDList = actBossIpyData.GetTemplateID()
|
| | | if not templateIDList:
|
| | | return
|
| | | pointAwardDict = actBossIpyData.GetPointAward()
|
| | | worldLV = actWeekPartyInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | pointAwardDict = __GetPointAwardInfo(actBossIpyData.GetPointAward(), worldLV)
|
| | | openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | actInfo = ChPyNetSendPack.tagMCWeekPartyInfo()
|
| | | actInfo.Clear()
|
| | |
| | | tInfo.SingleTimes = ipyData.GetSingleTimes()
|
| | | tInfo.Point = ipyData.GetPoint()
|
| | | tInfo.ItemInfo = []
|
| | | for itemID, itemCnt, isBind in ipyData.GetReward():
|
| | | awardItemList = __GetAwardItemListByJob(curPlayer, ipyData.GetReward(), worldLV)
|
| | | for itemID, itemCnt, isBind in awardItemList:
|
| | | awardItem = ChPyNetSendPack.tagMCWeekPartyItem()
|
| | | awardItem.ItemID = itemID
|
| | | awardItem.ItemCnt = itemCnt
|