#!/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
|