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.SetVerFix
#
# @todo:ÉèÖð汾ÐÞ¸´×´Ì¬
# @author hxp
# @date 2018-11-10
# @version 1.0
#
# ÏêϸÃèÊö: ÉèÖð汾ÐÞ¸´×´Ì¬
#
#-------------------------------------------------------------------------------
#"""Version = 2018-11-10 15:00"""
#-------------------------------------------------------------------------------
 
import PlayerControl
import GameWorld
import ChConfig
 
 
## Âß¼­ÊµÏÖ
#  @param curPlayer
#  @param cmdList ²ÎÊýÁбí
#  @return None
def OnExec(curPlayer, cmdList):
    
    if not cmdList:        
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃËùÓа汾ÐÞ¸´×´Ì¬: SetVerFix 0")
        GameWorld.DebugAnswer(curPlayer, "ÉèÖÃij¸ö°æ±¾ÐÞ¸´×´Ì¬: SetVerFix ÐÞ¸´Ë÷Òý ×´Ì¬")
        return
    
    if len(cmdList) == 1 and cmdList[0] == 0:
        for i in xrange(5):
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_VersionFix % i, 0)
        GameWorld.DebugAnswer(curPlayer, "ÖØÖð汾ÐÞ¸´³É¹¦£¡")
        return
    
    if len(cmdList) == 2:
        fixIndex, value = cmdList
        state = 1 if value else 0
        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, fixIndex, state)
        GameWorld.DebugAnswer(curPlayer, "ÉèÖð汾ÐÞ¸´×´Ì¬: fixIndex=%s,state=%s" % (fixIndex, state))
        return
    
    return