From 2a41f04515a5cc91e285cf00e9330dc035e26765 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 16 四月 2019 16:09:14 +0800 Subject: [PATCH] 3287 【2.0】娲皇遗迹S通关异常自动退出副本 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py index 7095fc6..eaa23fa 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AICommon.py @@ -333,18 +333,21 @@ useSkill = changeSkill #GameWorld.DebugLog("----随机技能 %s"%useSkill.GetSkillID()) - if PetControl.IsPet(curNPC): - petOwner = PetControl.GetPetOwner(curNPC) - - if petOwner == None: - GameWorld.ErrLog("宠物(%s)找不到主人"%curNPC.GetRolePet().PetID) - return False - - #血量条件判定 - effect = SkillCommon.GetSkillEffectByEffectID(useSkill, ChConfig.Def_Skill_Effect_HPPerLimit) - if effect: - if GameObj.GetHP(petOwner)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(petOwner) >= effect.GetEffectValue(0): - return False + #=========================================================================== + # 改成被动触发 + # if PetControl.IsPet(curNPC): + # petOwner = PetControl.GetPetOwner(curNPC) + # + # if petOwner == None: + # GameWorld.ErrLog("宠物(%s)找不到主人"%curNPC.GetRolePet().PetID) + # return False + # + # #血量条件判定 + # effect = SkillCommon.GetSkillEffectByEffectID(useSkill, ChConfig.Def_Skill_Effect_HPPerLimit) + # if effect: + # if GameObj.GetHP(petOwner)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(petOwner) >= effect.GetEffectValue(0): + # return False + #=========================================================================== skillTag = SkillShell.GetSkillAffectTag(useSkill) skillAim = SkillShell.GetSkillFireAim(useSkill) @@ -480,12 +483,13 @@ if SkillShell.GetSkillFireAim(useSkill) == ChConfig.Def_UseSkillAim_Obj: # 主目标对象判定, 不能释放则不进入队列 curSkillUseTag = SkillShell.GetSkillAffectTag(useSkill) - hurtTypeList = ChConfig.Def_Dict_UseSkillTag_ObjType.get(curSkillUseTag) - if not hurtTypeList: - continue - - if tagObjType not in hurtTypeList: - continue + if curSkillUseTag != ChConfig.Def_UseSkillTag_AppointNPC: + hurtTypeList = ChConfig.Def_Dict_UseSkillTag_ObjType.get(curSkillUseTag) + if not hurtTypeList: + continue + + if tagObjType not in hurtTypeList: + continue if triggerDict != {}: if not CheckSkillTrigger(curNPC, triggerDict, index, tick): -- Gitblit v1.8.0