xdh
2018-08-18 536f78666b3288424ab6adaded137f2bdd044b0d
add:GM命令 SetMWSoul 魂ID 状态(1激活,0未激活)
1个文件已添加
45 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMWSoul.py 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMWSoul.py
New file
@@ -0,0 +1,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