#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package GM.Commands.SetGuideState  
 | 
#  
 | 
# @todo:ÉèÖÃÐÂÊÖÒýµ¼×´Ì¬  
 | 
# @author hxp  
 | 
# @date 2018-04-30  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ÉèÖÃÐÂÊÖÒýµ¼×´Ì¬  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#"""Version = 2018-04-30 18:00"""  
 | 
#-------------------------------------------------------------------------------  
 | 
  
 | 
import GameWorld  
 | 
import ChConfig  
 | 
import ChPlayer  
 | 
  
 | 
#-------------------------------------------------------------------------------  
 | 
#Â߼ʵÏÖ  
 | 
## GMÃüÁîÖ´ÐÐÈë¿Ú  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param msgList ²ÎÊýÁбí [npcID]  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷  
 | 
def OnExec(curPlayer, msgList):  
 | 
    if not msgList or len(msgList) != 2:  
 | 
        GameWorld.DebugAnswer(curPlayer, "SetGuideState index isOK")  
 | 
        return  
 | 
      
 | 
    index, state = msgList  
 | 
    if index < 200:  
 | 
        GameWorld.DebugAnswer(curPlayer, "²»ÖªµÀ¸ÃÒýµ¼Ë÷ÒýÉèÖÃ!index=%s" % index)  
 | 
        return  
 | 
      
 | 
    GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GuideState, index, state)  
 | 
    GameWorld.DebugAnswer(curPlayer, "ÉèÖÃÒýµ¼×´Ì¬:index( %s ) = %s" % (index, state))  
 | 
    ChPlayer.SyncGuideState(curPlayer)  
 | 
    return  
 | 
  
 |