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