xdh
2018-08-18 536f78666b3288424ab6adaded137f2bdd044b0d
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
#!/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
 
#Âß¼­ÊµÏÖ
## 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)
        
    PlayerMagicWeapon.CalcMagicWeaponSoulAttr(curPlayer)
    PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
    
    #֪ͨ
    PlayerMagicWeapon.Sycn_MWPrivilegeData(curPlayer, soulID)
    return