From c12d5449fea4d565592bda07cbac539f370d7d46 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 23 十月 2020 17:12:15 +0800 Subject: [PATCH] 8440 【道具】VIP15直升卡(同步主干;支持领取默认直接使用); --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py index 89e8191..6444c8a 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py @@ -251,6 +251,20 @@ newStrTick = tickList[0] + ' ' + '00:00:00' return GameWorld.ChangeTimeStrToNum(newStrTick) +## 直升VIP等级 +def UpgradeVIPLV(curPlayer, tagVIPLV): + befVIPLV = curPlayer.GetVIPLv() + if befVIPLV >= tagVIPLV: + GameWorld.DebugLog("已经达到该VIP等级!不需要处理") + return True, 0 + vipExpDict = GetVIPLvUpExp() + if tagVIPLV not in vipExpDict: + GameWorld.ErrLog("没有该VIP等级,无法直升! tagVIPLV=", tagVIPLV); + return False, 0 + tagVIPExp = vipExpDict[tagVIPLV] + vipExp = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_VipExp) + addExp = tagVIPExp - vipExp + return AddVIPExp(curPlayer, addExp), addExp #VIP经验增加入口 def AddVIPExp(curPlayer, exp): @@ -270,7 +284,7 @@ OnChangeVIPLv(curPlayer, vipLV) ##当VIP等级变更,触发的方法写在这里 PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_VIPLV, 1, [vipLV]) vipLV += 1 - GameWorld.DebugLog("VIP等级--%s,经验--%s" % (curPlayer.GetVIPLv(), vipExp)) + GameWorld.DebugLog("VIP等级--%s,addExp--%s,经验--%s" % (curPlayer.GetVIPLv(), exp, vipExp)) Sycn_VIPMsg(curPlayer) if not preVIPLV: Sycn_VIPTime(curPlayer) -- Gitblit v1.8.0