| | |
| | | #};
|
| | | ## 购买BOSS可击杀次数
|
| | | def OnBuyKillBossCnt(index, clientData, tick):
|
| | | # curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | # killBossMark = clientData.KillBossMark
|
| | | # killBossCntLimitDict = ReadChConfig.GetEvalChConfig("KillBossCntLimit")
|
| | | # curBossLimitInfo = []
|
| | | # for limitInfo in killBossCntLimitDict.values():
|
| | | # if killBossMark == limitInfo[0]:
|
| | | # curBossLimitInfo = limitInfo
|
| | | # break
|
| | | # if not curBossLimitInfo:
|
| | | # return
|
| | | # |
| | | # killBossMark, limitCnt, canBuyCnt, buyCost, sysMark1, sysMark2= curBossLimitInfo
|
| | | # hasKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCnt%killBossMark, 0)
|
| | | # hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, 0)
|
| | | # playerID = curPlayer.GetPlayerID()
|
| | | # if hasBuyCnt >= canBuyCnt:
|
| | | # GameWorld.Log('购买BOSS可击杀次数, 已达到今日最大可购买次数,hasBuyCnt=%s, canBuyCnt=%s'%(hasBuyCnt, canBuyCnt), playerID)
|
| | | # return
|
| | | # costGold = eval(buyCost)
|
| | | # infoDict = {"index":index, ChConfig.Def_Cost_Reason_SonKey:index}
|
| | | # isOK = PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGold, |
| | | # ChConfig.Def_Cost_BuyKillBossCnt, infoDict)
|
| | | # |
| | | # if not isOK:
|
| | | # return
|
| | | # # 增加购买次数
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, hasBuyCnt + 1)
|
| | | # BossHurtMng.NotifyAttackBossCnt(curPlayer)
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | killBossMark = clientData.KillBossMark
|
| | | buyTimesVIPPriID = IpyGameDataPY.GetFuncEvalCfg("KillBossCntLimit1", 1, {}).get(killBossMark)
|
| | | if not buyTimesVIPPriID:
|
| | | return
|
| | | canBuyCnt = PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID)
|
| | | hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, 0)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | if hasBuyCnt >= canBuyCnt:
|
| | | GameWorld.DebugLog('购买BOSS可击杀次数, 已达到今日最大可购买次数,hasBuyCnt=%s, canBuyCnt=%s'%(hasBuyCnt, canBuyCnt), playerID)
|
| | | return
|
| | | canKillCnt, dayTimesLimit = BossHurtMng.GetCanKillBossCnt(curPlayer, killBossMark)
|
| | | if canKillCnt >= dayTimesLimit:
|
| | | GameWorld.DebugLog('购买BOSS可击杀次数, 剩余次数已满!,canKillCnt=%s'%(canKillCnt), playerID)
|
| | | return
|
| | | |
| | | costGold = IpyGameDataPY.GetFuncEvalCfg("KillBossCntLimit1", 2, {}).get(killBossMark)
|
| | | if not costGold:
|
| | | return
|
| | | |
| | | infoDict = {"index":killBossMark, ChConfig.Def_Cost_Reason_SonKey:killBossMark}
|
| | | isOK = PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGold, |
| | | ChConfig.Def_Cost_BuyKillBossCnt, infoDict)
|
| | | |
| | | if not isOK:
|
| | | return
|
| | | # 增加购买次数
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, hasBuyCnt + 1)
|
| | | BossHurtMng.NotifyAttackBossCnt(curPlayer, killBossMark)
|
| | | return
|
| | |
|
| | | #// A2 23 NPC秀结束 #tagCMNPCShowEnd
|