10191 【越南】【主干】【港台】新增多种培养材料副本(增加VIP购买次数特权ID自定义配置支持)
| | |
| | |
|
| | | ## 根据特权ID 和 VIP等级获得特权值
|
| | | def GetPrivilegeValue(vipLV, privilegeID):
|
| | | if privilegeID not in ChConfig.VIPPrivilegeList:
|
| | | #if privilegeID not in ChConfig.VIPPrivilegeList:
|
| | | # return 0
|
| | | if not privilegeID:
|
| | | return 0
|
| | | vipMsg = IpyGameDataPY.GetIpyGameData('VipPrivilege', privilegeID)
|
| | | if not vipMsg:
|
| | |
| | | costGold = eval(costGold)
|
| | | costMoneyTypeInfo = IpyGameDataPY.GetFuncEvalCfg('BuyFBCntCost', 2, {})
|
| | | costType = costMoneyTypeInfo.get(str(mapID), ShareDefine.TYPE_Price_Gold_Paper_Money)
|
| | | if costGold <= 0:
|
| | | GameWorld.DebugLog("没有配置购买副本次数消耗货币数! mapID=%s,costType=%s,costGold=%s" % (mapID, costType, costGold))
|
| | | return
|
| | | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, costType, costGold)
|
| | | #GameWorld.Log('costMoneyList=%s,costGold=%s'%(costMoneyList,costGold))
|
| | | if not costMoneyList:
|
| | |
| | | #tequanID 特权ID
|
| | | #playerVipLv 玩家VIP等级,获得对应vip等级的特权值,-1时获得玩家VIP等级对应的特权值
|
| | | def GetPrivilegeValue(curPlayer, privilegeID, playerVipLv=-1, isCheckTime=True):
|
| | | if privilegeID not in ChConfig.VIPPrivilegeList:
|
| | | #if privilegeID not in ChConfig.VIPPrivilegeList:
|
| | | # return 0
|
| | | if not privilegeID:
|
| | | return 0
|
| | | isExperience = False
|
| | | if playerVipLv != -1:
|