#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package GM.Commands.SetMWSoul  
 | 
#  
 | 
# @todo:ÉèÖ÷¨±¦Ö®»ê¼¤»î״̬  
 | 
# @author xdh  
 | 
# @date 2018-08-18  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ÉèÖ÷¨±¦Ö®»ê¼¤»î״̬  
 | 
#  
 | 
#---------------------------------------------------------------------  
 | 
"""Version = 2018-08-18 16:30"""  
 | 
#---------------------------------------------------------------------  
 | 
import PlayerMagicWeapon  
 | 
import PlayerControl  
 | 
import ChConfig  
 | 
import GameWorld  
 | 
import EventShell  
 | 
  
 | 
#Â߼ʵÏÖ  
 | 
## GMÃüÁîÖ´ÐÐÈë¿Ú  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param list ²ÎÊýÁбí [npcID]  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def OnExec(curPlayer, paramList):  
 | 
    if len(paramList) != 2:  
 | 
        GameWorld.DebugAnswer(curPlayer, "SetMWSoul »êID ×´Ì¬(1¼¤»î£¬0δ¼¤»î)")  
 | 
        return  
 | 
    soulID = paramList[0]  
 | 
    state = paramList[1]  
 | 
      
 | 
    GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_MWSoulActiveState, soulID, state, True)  
 | 
    if state:  
 | 
        EventShell.EventRespons_MWSoulActive(curPlayer, soulID)  
 | 
    PlayerMagicWeapon.CalcMagicWeaponSoulAttr(curPlayer)  
 | 
    PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()  
 | 
      
 | 
    #֪ͨ  
 | 
    PlayerMagicWeapon.Sycn_MWPrivilegeData(curPlayer, soulID)  
 | 
    return  
 | 
  
 |