| #!/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  |