| | |
| | | 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):
|
| | |
| | | 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)
|