| | |
| | | import DataRecordPack
|
| | | import IpyGameDataPY
|
| | | import ItemControler
|
| | | import CrossRealmPlayer
|
| | | import ShareDefine
|
| | | import ChConfig
|
| | | import FBLogic
|
| | | import PlayerVip
|
| | |
|
| | | import operator
|
| | | import json
|
| | |
| | | randAwardList = GameWorld.GetResultByRandomList(actionRandAwardList)
|
| | | if randAwardList:
|
| | | for itemID, itemCnt, isBind in randAwardList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind,
|
| | | [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere], True)
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere])
|
| | |
|
| | |
|
| | | # 同步伤害列表
|
| | |
| | | ## 过天
|
| | | def OnDay(curPlayer):
|
| | | #清空当天摸boss次数
|
| | | setCrossDict = {}
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WorldBoss_HurtCnt, 0)
|
| | | killBossCntLimitDict = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 2, {})
|
| | | for index,limitCnt in killBossCntLimitDict.items():
|
| | | for index, limitCnt in killBossCntLimitDict.items():
|
| | |
|
| | | killCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCnt%index, 0)
|
| | | #hasBuyKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%index, 0)
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntItemAddCnt % index, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCnt % index, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntBuyCnt % index, 0)
|
| | | if index == ShareDefine.Def_Boss_Func_Dogz:
|
| | | setCrossDict.update({ChConfig.Def_PDict_Boss_KillCntItemAddCnt % index:0,
|
| | | ChConfig.Def_PDict_Boss_KillCnt % index:0,
|
| | | ChConfig.Def_PDict_Boss_KillCntBuyCnt % index:0,
|
| | | })
|
| | |
|
| | | NotifyAttackBossCnt(curPlayer)
|
| | | CrossRealmPlayer.SetCrossPlayerNomalDict(curPlayer, setCrossDict)
|
| | | return
|
| | |
|
| | | ## 登录处理
|
| | |
| | | if limitIndex !=-1 and index != limitIndex:
|
| | | continue
|
| | | killCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCnt % index, 0)
|
| | | #hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt % index, 0)
|
| | | hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt % index, 0)
|
| | | itemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntItemAddCnt % index, 0)
|
| | | infoPack = ChPyNetSendPack.tagMCBossCntInfo()
|
| | | infoPack.BossType = index
|
| | | infoPack.KillCnt = killCnt
|
| | | infoPack.ItemAddCnt = itemAddCnt
|
| | | infoPack.BuyCnt = hasBuyCnt
|
| | | packdata.KillCntInfoList.append(infoPack)
|
| | |
|
| | | packdata.Cnt = len(packdata.KillCntInfoList)
|
| | | NetPackCommon.SendFakePack(curPlayer, packdata)
|
| | | return
|
| | |
|
| | |
|
| | | # BOSS剩余可击杀次数
|
| | | def GetCanKillBossCnt(curPlayer, bossFuncIndex):
|
| | | #获取BOSS剩余可击杀数量与最大数量
|
| | | hasKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCnt%bossFuncIndex, 0)
|
| | | itemAddKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntItemAddCnt%bossFuncIndex, 0)
|
| | | hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%bossFuncIndex, 0)
|
| | | killLimitPrivilege = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 4, {}).get(bossFuncIndex, 0)
|
| | | if killLimitPrivilege:
|
| | | limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, killLimitPrivilege)
|
| | | else:
|
| | | limitCnt = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 2, {}).get(bossFuncIndex, 0)
|
| | | return max(0, limitCnt + itemAddKillCnt + hasBuyCnt - hasKillCnt), limitCnt
|
| | |
|
| | |
|