#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package GM.Commands.ClearInvest  
 | 
#  
 | 
# @todo:ÖØÖÃͶ×ÊÀí²Æ  
 | 
# @author xdh  
 | 
# @date 2014-08-19  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ÖØÖÃͶ×ÊÀí²Æ  
 | 
#  
 | 
#---------------------------------------------------------------------  
 | 
#"""Version = 2015-04-13 11:10"""  
 | 
import ChConfig  
 | 
import PlayerGoldInvest  
 | 
import PlayerControl  
 | 
import GameWorld  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
#Â߼ʵÏÖ  
 | 
## GMÃüÁîÖ´ÐÐÈë¿Ú  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param list ²ÎÊýÁбí [npcID]  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def OnExec(curPlayer, msgList):  
 | 
      
 | 
    if not msgList:  
 | 
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃËùÓÐͶ×Ê: ClearInvest 0")  
 | 
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃÖ¸¶¨Í¶×Ê: ClearInvest ÀàÐÍ")  
 | 
        GameWorld.DebugAnswer(curPlayer, "ÀàÐÍ:7-ÓÀ¾Ã¿¨;8-ÖÜ¿¨;9-µÇ¼¿¨;10-µÈ¼¶¿¨;11-boss¿¨;")  
 | 
        return  
 | 
      
 | 
    investType = msgList[0]  
 | 
    if not investType:  
 | 
        investTypeList = ChConfig.InvestTypeList  
 | 
    elif investType not in ChConfig.InvestTypeList:  
 | 
        GameWorld.DebugAnswer(curPlayer, "²»´æÔÚ¸ÃͶ×ÊÀàÐÍ!")  
 | 
        return  
 | 
    else:  
 | 
        investTypeList = [investType]  
 | 
          
 | 
    for itype in investTypeList:  
 | 
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestTime % itype, 0)  
 | 
        for keyNum in range(ChConfig.Def_PDict_InvestKeyCount):  
 | 
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestReward % (itype, keyNum), 0)  
 | 
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestProgress % (itype, keyNum), 0)  
 | 
        PlayerGoldInvest.Sync_InvestInfo(curPlayer, itype)  
 | 
          
 | 
    return  
 | 
  
 |