#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GM.Commands.SetAlchemyCount # # @todo:ÉèÖÃÁ¶µ¤´ÎÊý # @author hxp # @date 2018-03-19 # @version 1.0 # # ÏêϸÃèÊö: ÉèÖÃÁ¶µ¤´ÎÊý # #------------------------------------------------------------------------------- #"""Version = 2018-03-19 19:30""" #------------------------------------------------------------------------------- import GameWorld import PlayerControl import IpyGameDataPY import ChConfig ## Âß¼­ÊµÏÖ # @param curPlayer # @param cmdList ²ÎÊýÁбí # @return None def OnExec(curPlayer, cmdList): if not cmdList: #GameWorld.DebugAnswer(curPlayer, "SetAlchemyCount Á¶µ¤±àºÅ ´ÎÊý ÊÇ·ñÌØÊâÁ¶µ¤") GameWorld.DebugAnswer(curPlayer, "SetAlchemyCount ËùÓÐÁ¶µ¤´ÎÊý") return SpecialAlchemyDictComm = IpyGameDataPY.GetFuncEvalCfg("SpecialAlchemy", 1) SpecialAlchemyDictSpec = IpyGameDataPY.GetFuncEvalCfg("SpecialAlchemy", 2) alchemyCount = cmdList[0] for alchemyID in SpecialAlchemyDictComm.keys(): PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyCount % alchemyID, alchemyCount) GameWorld.DebugAnswer(curPlayer, "ÉèÖÃÆÕͨÁ¶µ¤´ÎÊý,ID=%s,´ÎÊý=%s" % (alchemyID, alchemyCount)) for specID in SpecialAlchemyDictSpec.keys(): PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyCountSpec % specID, alchemyCount) GameWorld.DebugAnswer(curPlayer, "ÉèÖÃÌØÊâÁ¶µ¤´ÎÊý,ID=%s,´ÎÊý=%s" % (specID, alchemyCount)) if alchemyCount == 0: outPutCountLimitDict = IpyGameDataPY.GetFuncEvalCfg("SpecialAlchemy", 3) for itemID in outPutCountLimitDict.keys(): PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyOutputCount % itemID, 0) GameWorld.DebugAnswer(curPlayer, "ÖØÖÃÌØÊâÎïÆ·²ú³ö´ÎÊý: %s" % str(outPutCountLimitDict.keys())) return