From 57d60ef7648868c76189d3a127dc3e5f0800f6f3 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期四, 27 六月 2019 14:27:31 +0800 Subject: [PATCH] 7589 【2.0.100】【后端】资源找回优化 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py index 102dde6c..28c88b7 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRecover.py @@ -394,8 +394,26 @@ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RecoverFBItemAddCnt % index, newItemAddCnt) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RecoverFBExtraCnt % index, newExtraCnt) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RecoverFBNoBuyCnt % index, newnoBuyCnt) - if max(newCommonCnt, newBuyCnt, newItemAddCnt, newExtraCnt, newnoBuyCnt) == 0 and index != Def_TJGRecoverID: - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HaveRecover % index, 1) + if index != Def_TJGRecoverID: + #1:找回了普通 2:找回了vip 3:2个都有找回 + recoverData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HaveRecover % index, 0) + updData = recoverData + if i < len(cntList) -1: + if recoverData == 2: + updData = 3 + elif recoverData == 0: + updData = 1 + else: + if max(curCommonCnt, curBuyCnt, curItemAddCnt, curExtraCnt) == 0: + if recoverData == 0: + updData = 2 + elif recoverData == 1: + updData = 3 + else: + updData = 3 + + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HaveRecover % index, updData) + return @@ -490,6 +508,7 @@ numInfoPack.Index = index numInfoPack.RecoverCnt = commonCnt numInfoPack.ExtraCnt = vipExtraCnt + numInfoPack.HaveRecover = haveRecover numInfoPack.ExtraData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverGainData % index, 0) numInfoPack.ExtraData2 = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RecoverGainDataEx % index, 0) sendPack.NumInfo.append(numInfoPack) -- Gitblit v1.8.0