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
48
49
#!/usr/bin/python
# -*- coding: GBK -*-
 
##@package SetItemBind
# ÉèÖÃÎïÆ·°ó¶¨
#
# @author Mark
# @date 2010-4-23
# @version 1.3
#
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
# @change: "2010-05-12 18:30" zhengyang Ìí¼Ó×¢ÊÍ
# @change: "2012-01-16 17:30" chengaobao ½«ÎïÆ·È¥³ý°ó¶¨
# @change: "2012-01-21 12:30" chengaobao ½«ÉèÖð󶨵Ľӿڷâ×°ÖÁItemControlerÖÐ
# Ä£¿éÏêϸ˵Ã÷
#---------------------------------------------------------------------
"""Version = 2012-01-21 12:30"""
#---------------------------------------------------------------------
#½Å±¾ËµÃ÷
#---------------------------------------------------------------------
#µ¼Èë
import IPY_GameWorld
import ItemControler
#---------------------------------------------------------------------
#È«¾Ö±äÁ¿
#---------------------------------------------------------------------
 
#---------------------------------------------------------------------
#Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param playerList ²ÎÊýÁбí [index,1True]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer,playerList):
    if len(playerList) != 2:
        return
    
    curItem = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem).GetAt(int(playerList[0]))
    if not curItem or curItem.IsEmpty():
        return
    
    if playerList[1] == 1:
        ItemControler.SetItemIsBind(curItem, True)
    else:
        ItemControler.SetItemIsBind(curItem, False)
    
    return