| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package GM.Commands.ClearFreeGoods  | 
| #  | 
| # @todo:ÖØÖü«Æ·°×Äà  | 
| # @author xdh  | 
| # @date 2018-07-11  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ÖØÖü«Æ·°×Äà  | 
| #  | 
| #---------------------------------------------------------------------  | 
| """Version = 2018-07-11 11:30"""  | 
|   | 
| import PlayerControl  | 
| import time  | 
| import ChConfig  | 
| import GameWorld  | 
| import IpyGameDataPY  | 
| import PlayerFreeGoods  | 
| #---------------------------------------------------------------------  | 
| #Â߼ʵÏÖ  | 
| ## GMÃüÁîÖ´ÐÐÈë¿Ú  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param list ²ÎÊýÁбí [npcID]  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(curPlayer, list):  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FreeGoodsOpenTime, int(time.time()))  | 
|     for i in xrange(IpyGameDataPY.IPY_Data().GetFreeGoodsCount()):  | 
|         ipyData = IpyGameDataPY.IPY_Data().GetFreeGoodsByIndex(i)  | 
|         goodsID = ipyData.GetID()  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FreeGoodsBuyState % goodsID, 0)  | 
|       | 
|     GameWorld.DebugAnswer(curPlayer, "ÖØÖü«Æ·°×Äóɹ¦£¡")  | 
|     PlayerFreeGoods.Sync_FreeGoodsInfo(curPlayer)  | 
|     return  | 
|   |