| | |
| | | import ItemControler
|
| | | import ChPyNetSendPack
|
| | | import Operate_EquipStone
|
| | | import PlayerFeastWeekParty
|
| | | import DataRecordPack
|
| | | import PlayerGodWeapon
|
| | | import NetPackCommon
|
| | | import ShareDefine
|
| | |
| | | itemList = awardDict[point]
|
| | | for itemID, itemCnt, isBind in itemList:
|
| | | totalItemDict[itemID] = totalItemDict.get(itemID, 0) + itemCnt
|
| | | DataRecordPack.DR_WeekPartyPoint(curPlayer, day, point)
|
| | | if not totalItemDict:
|
| | | return
|
| | | totalItemList = [[itemID, itemCnt, 1] for itemID, itemCnt in totalItemDict.items()]
|
| | |
| | |
|
| | | def AddWeekPartyActionCnt(curPlayer, actionID, addCnt=1, isAdd=True, isCompatible=False, isSync=True):
|
| | | '''增加周狂欢相关活动完成次数'''
|
| | | PlayerFeastWeekParty.AddFeastWeekPartyActionCnt(curPlayer, actionID, addCnt, isAdd, isCompatible, isSync)
|
| | | #判断活动是否开启
|
| | | if not addCnt:
|
| | | return
|
| | |
| | | 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 and actionID not in ChConfig.AheadFinishWPActList:
|
| | | return
|
| | | |
| | | actBossIpyData = IpyGameDataPY.GetIpyGameData("ActWeekParty", cfgID)
|
| | | if not actBossIpyData:
|
| | | return
|
| | |
| | | #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
|
| | |
|
| | |
| | | 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
|
| | |
|
| | |
|