| | |
| | | killBossCntLimitDict = IpyGameDataPY.GetFuncCfg('KillBossCntLimit', 1)
|
| | | limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, npcID)
|
| | | if limitIndex != None:
|
| | | totalKey = ChConfig.Def_PDict_Boss_KillCntTotal % limitIndex
|
| | | totalCnt = min(curPlayer.NomalDictGetProperty(totalKey, 0) + 1, ChConfig.Def_UpperLimit_DWord)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, totalKey, totalCnt)
|
| | | #今日杀怪次数+1
|
| | | key = ChConfig.Def_PDict_Boss_KillCnt % limitIndex
|
| | | newCnt = curPlayer.NomalDictGetProperty(key, 0) + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, key, newCnt)
|
| | | BossHurtMng.NotifyAttackBossCnt(curPlayer, limitIndex)
|
| | | GameWorld.DebugLog("今日杀怪次数 playerID=%s, newCnt=%s" % (curPlayer.GetPlayerID(), newCnt))
|
| | | GameWorld.DebugLog("更新击杀Boss次数: index=%s, todayCnt=%s, totalCnt=%s" % (limitIndex, newCnt, totalCnt), curPlayer.GetPlayerID())
|
| | |
|
| | | dataDict = {"objID":npcID, "bossID":npcID, "touchCnt":newCnt,
|
| | | dataDict = {"objID":npcID, "bossID":npcID, "touchCnt":newCnt, "totalCnt":totalCnt,
|
| | | "AccID":curPlayer.GetAccID(), "PlayerID":curPlayer.GetPlayerID()}
|
| | | DataRecordPack.SendEventPack("AddKillBossCnt", dataDict, curPlayer)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillBoss, 1, [limitIndex])
|