| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package Item_AddKillBossCnt  | 
| # @todo: Ôö¼ÓBOSS¿É»÷ɱ´ÎÊý  | 
| #  | 
| # @author: xdh  | 
| # @date 2017-07-10  | 
| # @version 1.0  | 
| #  | 
| #------------------------------------------------------------------------------   | 
| """Version = 2017-07-10 19:50"""  | 
| #------------------------------------------------------------------------------   | 
| #µ¼Èë  | 
| import ItemCommon  | 
| import PlayerControl  | 
| import ChConfig  | 
| import BossHurtMng  | 
| #------------------------------------------------------------------------------   | 
|   | 
| #------------------------------------------------------------------------------   | 
| ##ʹÓÃÎïÆ·,´¥·¢ÎïÆ·¸½¼ÓЧ¹û Ôö¼ÓBOSS¿É»÷ɱ´ÎÊý  | 
| # @param curPlayer Íæ¼ÒʵÀý  | 
| # @param curRoleItem ÎïÆ·ÊµÀý  | 
| # @param tick Ê±¼ä´Á  | 
| # @return ÊÇ·ñʹÓÃÎïÆ·³É¹¦  | 
| # @remarks Ê¹ÓÃÎïÆ·,´¥·¢ÎïÆ·¸½¼ÓЧ¹û  | 
| def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):  | 
|     itemTypeID = curRoleItem.GetItemTypeID()  | 
|     useItemEff = curRoleItem.GetEffectByIndex(0)  | 
|     bossTypeIndex = useItemEff.GetEffectValue(0)  | 
|     addCnt = useItemEff.GetEffectValue(1) * useCnt  | 
|     if addCnt <= 0:  | 
|         return  | 
|     itemAddKillCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntItemAddCnt % bossTypeIndex, 0)  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Boss_KillCntItemAddCnt % bossTypeIndex, itemAddKillCnt + addCnt)  | 
|     BossHurtMng.NotifyAttackBossCnt(curPlayer, bossTypeIndex)  | 
|     #¿Û³ýÎïÆ·  | 
|     saveDataDict = {"bossTypeIndex":bossTypeIndex, 'addCnt':addCnt}  | 
|     ItemCommon.DelItem(curPlayer, curRoleItem, useCnt, True, ChConfig.ItemDel_AddKillBossCnt, saveDataDict)  | 
|     PlayerControl.NotifyCode(curPlayer, 'WorldBossCountItem', [itemTypeID, bossTypeIndex, addCnt])  | 
|     return True  |