hxp
5 小时以前 e1fb8828f3e3ade575522e1717322a27e0521daf
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
49
50
51
52
53
54
55
56
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.GoldInvest
#
# @todo:Ͷ×Ê
# @author hxp
# @date 2025-11-10
# @version 1.0
#
# ÏêϸÃèÊö: Í¶×Ê
#
#-------------------------------------------------------------------------------
#"""Version = 2025-11-10 20:30"""
#-------------------------------------------------------------------------------
 
import ChConfig
import PlayerGoldInvest
import PlayerControl
import GameWorld
 
def OnExec(curPlayer, msgList):
    
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃËùÓÐͶ×Ê: GoldInvest 0")
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃÖ¸¶¨Í¶×Ê: GoldInvest ÀàÐÍ")
        GameWorld.DebugAnswer(curPlayer, "¼¤»îÖ¸¶¨Í¶×Ê: GoldInvest a ÀàÐÍ")
        GameWorld.DebugAnswer(curPlayer, "ÀàÐÍ:1-Ô¿¨;2-ÖÕÉí¿¨;")
        return
    
    value = msgList[0]
    if value == "a":
        investType = msgList[1] if len(msgList) > 1 else 0
        if investType not in ChConfig.InvestTypeList:
            GameWorld.DebugAnswer(curPlayer, "²»´æÔÚ¸ÃͶ×ÊÀàÐÍ!")
            return
        PlayerGoldInvest.DoLogicInvest(curPlayer, investType)
        GameWorld.DebugAnswer(curPlayer, "¼¤»îͶ×Ê: %s" % investType)
        return
    
    if value == 0:
        investTypeList = ChConfig.InvestTypeList
    elif value in ChConfig.InvestTypeList:
        investTypeList = [value]
    else:
        GameWorld.DebugAnswer(curPlayer, "²»´æÔÚ¸ÃͶ×ÊÀàÐÍ!")
        return
    
    for itype in investTypeList:
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestTime % itype, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestEndTime % itype, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestRewardTime % itype, 0)
        PlayerGoldInvest.Sync_InvestInfo(curPlayer, itype)
    GameWorld.DebugAnswer(curPlayer, "ÖØÖÃͶ×ÊÀàÐÍ: %s" % investTypeList)
    return