hxp
2025-06-12 edc3910a9d090e5df4deb2dbc37709a740375938
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
45
46
47
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.MakeItemB
#
# @todo:ÖÆÔì°ó¶¨²»°ó¶¨ÎïÆ·
# @author hxp
# @date 2018-04-04
# @version 1.0
#
# ÏêϸÃèÊö: ÖÆÔì°ó¶¨²»°ó¶¨ÎïÆ·
#
#-------------------------------------------------------------------------------
#"""Version = 2018-04-04 12:00"""
#-------------------------------------------------------------------------------
 
import IPY_GameWorld
import ItemControler
import GameWorld
import ChConfig
 
 
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param msgList ²ÎÊýÁбí [ ÎïÆ·ID, ÊýÁ¿]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, msgList):
    
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "MakeItemB id ²»°ó¸öÊý °ó¶¨¸öÊý")
        return
    
    itemID = msgList[0]
    unBindCount = msgList[1] if len(msgList) > 1 else 1
    bindCount = msgList[2] if len(msgList) > 2 else 0
    
    if unBindCount > 0:
        ItemControler.GivePlayerItem(curPlayer, itemID, unBindCount, 0, [IPY_GameWorld.rptItem], 
                                     event=[ChConfig.ItemGive_GMMake, False, {"CMD":"MakeItemB"}])
    if bindCount:
        ItemControler.GivePlayerItem(curPlayer, itemID, bindCount, 0, [IPY_GameWorld.rptItem], 
                                     event=[ChConfig.ItemGive_GMMake, False, {"CMD":"MakeItemB"}])
 
    return