hxp
7 天以前 388823edfe6308cba6f76ca6dc4f20022c5cb2be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/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