| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package UseItem.Item_TrainRealmLV  | 
| #  | 
| # @todo:¾³½çÅàÑø¿¨  | 
| # @author hxp  | 
| # @date 2024-08-14  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ¾³½çÅàÑø¿¨ ÖµA-¹¦ÄÜ£¨1-×øÆï£»2-Áé³è£»3-ÁéÆ÷£©£¬ ÖµB-¾³½ç  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2024-08-14 16:30"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import ItemCommon  | 
| import PlayerControl  | 
| import GameWorld  | 
| import ChConfig  | 
|   | 
| def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):  | 
|     ##ÅúÁ¿Ê¹ÓÃÎïÆ·  | 
|     curEff = curRoleItem.GetEffectByIndex(0)  | 
|     funcType = curEff.GetEffectValue(0)  | 
|     effTrainRealmLV = curEff.GetEffectValue(1)  | 
|       | 
|     trainRealmLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TrainRealmLV % funcType)  | 
|     if effTrainRealmLV > trainRealmLV:  | 
|         PlayerControl.SetTrainRealmLV(curPlayer, funcType, effTrainRealmLV)  | 
|           | 
|     GameWorld.DebugLog("¾³½çÅàÑø¿¨Ê¹ÓÃ: itemID=%s,funcType=%s,effTrainRealmLV=%s,trainRealmLV=%s"   | 
|                        % (curRoleItem.GetItemTypeID(), funcType, effTrainRealmLV, trainRealmLV))  | 
|     succCnt = useCnt  | 
|     saveDataDict = {}  | 
|     ItemCommon.DelItem(curPlayer, curRoleItem, succCnt, True, ChConfig.ItemDel_Unknown, saveDataDict, True)  | 
|     return True, succCnt  | 
|   | 
|   |