| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package GM.Commands.ClearFirstGold  | 
| #  | 
| # @todo:ÖØÖÃÊ×³ä  | 
| # @author hxp  | 
| # @date 2018-05-07  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ÖØÖÃÊ×³ä  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2018-05-07 21:00"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import ChConfig  | 
| import PlayerGoldGift  | 
| import PlayerControl  | 
| import IpyGameDataPY  | 
| import PlayerCoin  | 
|   | 
|   | 
| #Â߼ʵÏÖ  | 
| ## GMÃüÁîÖ´ÐÐÈë¿Ú  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param msgList ²ÎÊýÁбí [npcID]  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(curPlayer, msgList):  | 
|     curPlayer.SetChangeCoinPointTotal(0, 0)  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GoldGiftFirstRecord, 0)  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldServerDay, 0)  | 
|     PlayerGoldGift.Sync_FirstGoldInfo(curPlayer)  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 0)  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftStartTime, 0)  | 
|     # ÖØÖóäÖµ´ÎÊýÐÅÏ¢  | 
|     syncRecordIDList = []  | 
|     ipyDataMgr = IpyGameDataPY.IPY_Data()  | 
|     for i in xrange(ipyDataMgr.GetCTGCount()):  | 
|         ipyData = ipyDataMgr.GetCTGByIndex(i)  | 
|         recordID = ipyData.GetRecordID()  | 
|         totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)  | 
|         todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % recordID)  | 
|         if not totalBuyCount and not todayBuyCount:  | 
|             continue  | 
|         syncRecordIDList.append(recordID)  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, 0)  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, 0)  | 
|     if syncRecordIDList:  | 
|         PlayerCoin.Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)  | 
|     return  | 
|   |