hch
2019-05-09 0eadbbeaefe189774a3bbbb3f3a2cb138f8895d1
860312 增加GM命令PrintSkill      带个参数增加输出被动信息
1个文件已添加
104 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py
New file
@@ -0,0 +1,104 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
##@package
#
# @todo: 输出玩家技能
#
# @author: Alee
# @date 2019-5-9 下午02:54:09
# @version 1.0
#
# @note:
#
#---------------------------------------------------------------------
import GameWorld
import ChConfig
import PassiveBuffEffMng
import PlayerPet
## GM命令执行入口
#  @param curPlayer 当前玩家
#  @param list 参数列表 [npcID]
#  @return None
#  @remarks 函数详细说明.
def OnExec(curPlayer, cmdList):
    GameWorld.DebugAnswer(curPlayer, "----开始打印玩家技能, 带参数1输出被动技能")
    skillDict = {}
    skillManager = curPlayer.GetSkillManager()
    for i in range(0 , skillManager.GetSkillCount()):
        curSkill = skillManager.GetSkillByIndex(i)
        if not curSkill:
            continue
        funcType = curSkill.GetFuncType()
        if funcType not in skillDict:
            skillDict[funcType] = [curSkill.GetSkillID()]
        else:
            skillDict[funcType].append(curSkill.GetSkillID())
    showDict = {
                1 : "人族法宝",
                2 : "魔族法宝",
                3 : "法宝专精",
                4 : "天赋",
                5 : "坐骑技能",
                6 : "神兵技能",
                7 : "人族法宝",
                8 : "普攻",
                9 : "无",
                10 : "通用翻滚",
                11 : "NPC境界",
                12 : "神兽技能",
                13 : "诛仙技能",
                }
    for funcType, skillList in skillDict.items():
        GameWorld.DebugAnswer(curPlayer, "%s : %s"%(showDict[funcType], skillList))
    if not cmdList:
        return
    passiveEff = PassiveBuffEffMng.GetPassiveEffManager().GetPassiveEff(curPlayer )
    if not passiveEff:
        return
    GameWorld.DebugAnswer(curPlayer, "---------输出被动效果")
    GameWorld.DebugAnswer(curPlayer, "被动效果 :%s"%passiveEff.AffectSkillDict)
    GameWorld.DebugAnswer(curPlayer, "选中的被动技能效果 :%s"%passiveEff.AffectPassiveSkillSetDict)
    GameWorld.DebugAnswer(curPlayer, "被动BUFF效果 :%s"%passiveEff.AffectBuffDict)
    GameWorld.DebugAnswer(curPlayer, "神兽被动效果 :%s"%passiveEff.AffectDogzSkillDict)
    fightPet = curPlayer.GetPetMgr().GetFightPet()
    if fightPet:
        GameWorld.DebugAnswer(curPlayer, "出战宠物技能%s-%s"%PlayerPet.GetPetLearnSkill(curPlayer))
        passiveEff = PassiveBuffEffMng.GetPassiveEffManager().GetPassiveEff(fightPet )
        if not passiveEff:
            return
        GameWorld.DebugAnswer(curPlayer, "宠物被动效果 :%s"%passiveEff.AffectSkillDict)
        GameWorld.DebugAnswer(curPlayer, "宠物被动BUFF效果 :%s"%passiveEff.AffectBuffDict)
#===============================================================================
# (Def_SkillFuncType_Common, #0为通用技能
# Def_SkillFuncType_FbSkill, #1为法宝功能获得的主动技能
# Def_SkillFuncType_FbPassiveSkill, #2为法宝功能获得的被动技能
# Def_SkillFuncType_FbSPSkill, #3为法宝功能获得的SP技能
# Def_SkillFuncType_GiftSkill, #4为天赋技能
# Def_SkillFuncType_HorseSkill, #5为坐骑技能
# Def_SkillFuncType_PetSkill, #6为宠物技能
# Def_SkillFuncType_GWSkill,  #7为神兵技能
# Def_SkillFuncType_NormalAttack,  #8为普攻
# Def_SkillFuncType_SP15,  #9为SP15级 服务端未用到
# Def_SkillFuncType_SkillRoll,  #10为翻滚    服务端未用到
# Def_SkillFuncType_RealmSuppress,  #11为境界压制 目前是NPC在用
# Def_SkillFuncType_Dogz,     #12 神兽技能
# Def_SkillFuncType_ZhuXian,     #13 诛仙技能
#===============================================================================