#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package GM.Commands.ClearCollectNPCCnt  
 | 
#  
 | 
# @todo:ÖØÖòɼ¯NPC´ÎÊýÏà¹Ø  
 | 
# @author hxp  
 | 
# @date 2017-05-03  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ÖØÖòɼ¯NPC´ÎÊýÏà¹Ø  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#"""Version = 2017-05-03 11:00"""  
 | 
#-------------------------------------------------------------------------------  
 | 
  
 | 
import ChConfig  
 | 
import PlayerControl  
 | 
import IpyGameDataPY  
 | 
import NPCCommon  
 | 
import GameWorld  
 | 
#---------------------------------------------------------------------  
 | 
#È«¾Ö±äÁ¿  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
#Â߼ʵÏÖ  
 | 
## GMÃüÁîÖ´ÐÐÈë¿Ú  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param list ²ÎÊýÁбí [npcID]  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def OnExec(curPlayer, paramList):  
 | 
      
 | 
    resetNPCIDList = []  
 | 
    ipyDataMgr = IpyGameDataPY.IPY_Data()  
 | 
    for index in xrange(ipyDataMgr.GetCollectNPCCount()):  
 | 
        ipyData = ipyDataMgr.GetCollectNPCByIndex(index)  
 | 
        npcID = ipyData.GetNPCID()  
 | 
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CollNpcIDCollTimeTotal % npcID, 0)  
 | 
        if not ipyData.GetMaxCollectCount():  
 | 
            continue  
 | 
        if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CollNpcIDCollTime % npcID):  
 | 
            continue  
 | 
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CollNpcIDCollTime % npcID, 0)  
 | 
        resetNPCIDList.append(npcID)  
 | 
          
 | 
    if resetNPCIDList:  
 | 
        NPCCommon.SyncCollNPCTime(curPlayer, resetNPCIDList)  
 | 
          
 | 
    GameWorld.DebugAnswer(curPlayer, "ÖØÖòɼ¯NPC³É¹¦")  
 | 
      
 | 
    npcID = IpyGameDataPY.GetFuncCfg("CrossGrasslandCfg", 1)  
 | 
    NPCCommon.UpdateNPCAttackCount(curPlayer, npcID, 0)  
 | 
    return  
 | 
  
 |