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