| 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
 | | #!/usr/bin/python  |  | # -*- coding: GBK -*-  |  | #  |  | # @todo: Ôö¼ÓÍÑ»ú¹Òʱ¼ä  |  | #  |  | # @author: Alee  |  | # @date 2018-1-3 ÏÂÎç09:58:45  |  | # @version 1.0  |  | #  |  | # @note:   |  | #  |  | #---------------------------------------------------------------------  |  | import PlayerControl  |  | import ItemCommon  |  | import PlayerTJG  |  |   |  | def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):  |  |     addTime = curRoleItem.GetEffectByIndex(0).GetEffectValue(0)*useCnt  |  |     PlayerTJG.AddTJGTime(curPlayer, addTime)  |  |     PlayerControl.NotifyCode(curPlayer, 'UseItem2', [curRoleItem.GetItemTypeID(), addTime/3600])  |  |     ItemCommon.DelItem(curPlayer, curRoleItem, useCnt, True, "TJGAddTime")  |  |     return True, useCnt  |  |   |  |   |  | def UseItem(curPlayer, curRoleItem, tick):  |  |     BatchUseItem(curPlayer, curRoleItem, tick, 1, 0)  |  |     return True | 
 |