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