| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package UseItem.Item_PrizeCoin  | 
| #  | 
| # @todo:½±Àø³äÖµµãȯ  | 
| # @author hxp  | 
| # @date 2018-03-08  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ½±Àø³äÖµµãȯ  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2018-03-08 22:00"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import PlayerCoin  | 
| import ItemCommon  | 
| import ChConfig  | 
|   | 
| def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):  | 
|     ##ÅúÁ¿Ê¹ÓÃÎïÆ·  | 
|     curEff = curRoleItem.GetEffectByIndex(0)  | 
|     useCoin = curEff.GetEffectValue(0) * useCnt  | 
|     prizeCoin = curEff.GetEffectValue(1) * useCnt  | 
|     isAddBourseMoney = True # Ä¬ÈÏÔö¼Ó  | 
|     if not useCoin and not prizeCoin:  | 
|         return  | 
|       | 
|     itemID = curRoleItem.GetItemTypeID()  | 
|     saveDataDict = {"UseCoin":useCoin, "PrizeCoin":prizeCoin}  | 
|     ItemCommon.DelItem(curPlayer, curRoleItem, useCnt, True, ChConfig.ItemDel_PrizeCoin, saveDataDict, isForceDR=True)  | 
|       | 
|     orderRMB = useCoin + prizeCoin  | 
|     addDataDict = {"UseCount":useCnt, ChConfig.Def_Give_Reason_SonKey:itemID}  | 
|     PlayerCoin.PlayerItemCTG(curPlayer, orderRMB, ChConfig.Def_GiveMoney_UseItem, isAddBourseMoney, addDataDict)  | 
|     return True, useCnt  | 
|   |