8440 【道具】VIP15直升卡(同步主干;支持领取默认直接使用);
| | |
| | | Def_Effect_TouchMission = 252 #触发任务
|
| | | Def_Effect_HorsePetSkinExp = 253 #骑宠觉醒值
|
| | | Def_Effect_ItemGiveTreasureScore = 254 #使用道具给予寻宝积分
|
| | | Def_Effect_VIPLVCard = 256 #VIP等级直升卡 直接升到VIPx级,只加经验,享受VIP特权 效果值A: vip等级 效果值B: 领取是否默认直接使用
|
| | | #----以下未使用或代码依然存在的---
|
| | | Def_Effect_ItemGiveGongXun = 1920 #使用道具给予功勋
|
| | | Def_Effect_ItemGiveRuneJH = 1925 #使用道具给予符印精华
|
| | |
| | | ChConfig.Def_Effect_CleanGuilt:"Item_CleanGuilt", # 洗红名
|
| | | ChConfig.Def_Effect_PrizeCoin:"Item_PrizeCoin", # 奖励充值点券
|
| | | ChConfig.Def_Effect_AddVIPExp:"Item_AddVIPExp", # 增加VIP经验
|
| | | ChConfig.Def_Effect_VIPLVCard:"Item_VIPLVCard", # VIP等级直升卡
|
| | | ChConfig.Def_Effect_ResetBossKillCnt:"Item_ResetBossKillCnt", # 重置boss击杀疲劳
|
| | | ChConfig.Def_Effect_AddFBCnt:"Item_AddFBCnt", # 增加副本可进入次数
|
| | | ChConfig.Def_Effect_AddKillBossCnt:"Item_AddKillBossCnt", # 增加BOSS可击杀次数
|
| | |
| | | import IpyGameDataPY
|
| | | import DataRecordPack
|
| | | import EventShell
|
| | | import PlayerVip
|
| | | import ChEquip
|
| | |
|
| | | import math
|
| | |
| | | PlayerMagicWeapon.DoActiveMW(curPlayer, tagItem.GetEffectByIndex(0).GetEffectValue(0))
|
| | | tagItem.Clear()
|
| | | return True
|
| | | itemEff = tagItem.GetEffectByIndex(0)
|
| | | #直升VIP
|
| | | if itemEff.GetEffectID() == ChConfig.Def_Effect_VIPLVCard:
|
| | | isAutoUse = itemEff.GetEffectValue(1)
|
| | | if isAutoUse:
|
| | | tagVIPLV = itemEff.GetEffectValue(0)
|
| | | isOK, _ = PlayerVip.UpgradeVIPLV(curPlayer, tagVIPLV)
|
| | | if isOK:
|
| | | #GameWorld.DebugLog("直升VIP默认使用")
|
| | | tagItem.Clear()
|
| | | return True
|
| | | |
| | | if itemID in ChConfig.Def_TransformItemIDList:
|
| | | # 直接转化为对应货币的物品仅在放入背包时直接转化,否则还是以真实物品的形式存在,但堆叠上限需要做特殊处理
|
| | | if packIndex == IPY_GameWorld.rptItem:
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package UseItem.Item_VIPLVCard
|
| | | #
|
| | | # @todo:VIP等级直升卡
|
| | | # @author hxp
|
| | | # @date 2020-9-3
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: VIP等级直升卡 直接升到VIPx级,只加经验,享受VIP特权
|
| | | #
|
| | | # 效果值A: vip等级 |
| | | # 效果值B: 领取是否默认直接使用
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2020-09-03 18:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import PlayerVip
|
| | | import ItemCommon
|
| | | import ChConfig
|
| | |
|
| | | def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):
|
| | | ##批量使用物品
|
| | | curEff = curRoleItem.GetEffectByIndex(0)
|
| | | tagVIPLV = curEff.GetEffectValue(0)
|
| | | befVIPLV = curPlayer.GetVIPLv()
|
| | | befVIPExp = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_VipExp)
|
| | | |
| | | isOK, addExp = PlayerVip.UpgradeVIPLV(curPlayer, tagVIPLV)
|
| | | if not isOK:
|
| | | return
|
| | | |
| | | succCnt = 1 # 默认值使用1个
|
| | | aftVIPLV = curPlayer.GetVIPLv()
|
| | | aftVIPExp = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_VipExp)
|
| | | saveDataDict = {"BeforeVIPLV":befVIPLV, "BeforeVIPExp":befVIPExp, "AfterVIPLV":aftVIPLV, "AfterVIPExp":aftVIPExp, "AddVIPExp":addExp}
|
| | | ItemCommon.DelItem(curPlayer, curRoleItem, succCnt, True, ChConfig.ItemDel_AddVIPExp, saveDataDict, True)
|
| | | return True, succCnt
|
| | | |
| | | |
| | |
|
| | |
| | | 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)
|