1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/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):
    GameWorld.DebugAnswer(curPlayer, "ClearInvest Í¶×ÊÀàÐÍ(²»Ð´ÔòÈ«²¿ÖØÖÃ)")
    investTypeList = [msgList[0]] if msgList else ChConfig.GoldInvestTypeList
    for itype in investTypeList:
        valueKey = ChConfig.Def_PDict_GoldInvest_Time % itype
        PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
        
        valueKey = ChConfig.Def_PDict_GoldInvest_Gold % itype
        PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
        
        valueKey = ChConfig.Def_PDict_GoldInvest_AwardData % itype
        PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
        for i in range(1, 32):
            valueKey = ChConfig.Def_PDict_GoldInvest_GotRewardValue % (itype, i)
            PlayerControl.NomalDictSetProperty(curPlayer, valueKey, 0, ChConfig.Def_PDictType_GoldInvest)
    
        PlayerGoldInvest.Sync_GoldInvestInfo(curPlayer, itype, isForce=True)
        
    return