From fc7847f19424c902c7e6fdac1d024b5039b3d725 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期四, 14 二月 2019 15:16:49 +0800 Subject: [PATCH] 5315 【后端】【1.6】登录奖励活动 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyTreasure.py | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyTreasure.py index 30c9f4f..db152ca 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyTreasure.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLuckyTreasure.py @@ -79,6 +79,8 @@ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LuckyTreasureFree, 0) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LuckyTreasurePoint, 0) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LuckyTreasureCnt, 0) + SyncLuckyTreasureInfo(curPlayer) SyncLuckyTreasureResultInfo(curPlayer) @@ -153,13 +155,19 @@ greatItem = randomRateList[-1][1] curLuckyPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LuckyTreasurePoint) + curLuckyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LuckyTreasureCnt) + maxLuckyPoint = actIpyData.GetLuckyPoint() singlePoint = IpyGameDataPY.GetFuncCfg('LuckyAppraisal', 2) if curLuckyPoint + singlePoint >= maxLuckyPoint: giveItem = greatItem newLuckyPoint = 0 else: - randomResultList = GameWorld.GetResultByRandomListEx(randomRateList, 1, []) + if curLuckyCnt < IpyGameDataPY.GetFuncCfg('LuckyAppraisal', 3): + #前X次鉴宝不能出大奖 + randomResultList = GameWorld.GetResultByRandomListEx(randomRateList[:-1], 1, []) + else: + randomResultList = GameWorld.GetResultByRandomListEx(randomRateList, 1, []) if len(randomResultList) != 1: GameWorld.DebugLog(' 开始幸运鉴宝 随机库结果 获取错误 !') return @@ -179,6 +187,7 @@ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LuckyTreasureFree, 1) #更新幸运值 PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LuckyTreasurePoint, newLuckyPoint) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LuckyTreasureCnt, curLuckyCnt + 1) for itemID, itemCount, isBind in [giveItem]: ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem], event=[ChConfig.ItemGive_LuckyTreasure, False, {"isFree":not hasFree}]) -- Gitblit v1.8.0