From f8cbb085900ff5959d302879b8073e5cf79aa322 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 27 十二月 2018 22:28:49 +0800 Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(修复无法领奖bug) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_105.py | 52 ++++++++++++++++++++++++++++------------------------ 1 files changed, 28 insertions(+), 24 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_105.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_105.py index bd19c28..25acd59 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_105.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_105.py @@ -36,11 +36,13 @@ # @return None # @remarks 执行AI def ProcessAI(rolePet, tick): - ## 执行频率, 根据人数降低--------------------------- - if tick - rolePet.GetDictByKey(Def_LastAI1ProTick) < 1500: - return - rolePet.SetDict(Def_LastAI1ProTick, tick) - #------------------------------------------------------- + #=========================================================================== + # ## 执行频率, 根据人数降低--------------------------- + # if tick - rolePet.GetDictByKey(Def_LastAI1ProTick) < 3000: + # return + # rolePet.SetDict(Def_LastAI1ProTick, tick) + # #------------------------------------------------------- + #=========================================================================== curPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, rolePet) @@ -58,24 +60,26 @@ posX, posY = petControl.GetMoveNearPos(curPlayer.GetPosX(), curPlayer.GetPosY(), 1) rolePet.ResetPos(posX, posY) - skillManager = rolePet.GetSkillManager() - for index in range(0, skillManager.GetSkillCount()): - useSkill = skillManager.GetSkillByIndex(index) - #已经到尾部了 - if not useSkill or useSkill.GetSkillTypeID() == 0: - break - - if SkillCommon.isPassiveSkill(useSkill): - #GameWorld.Log('被动技能不释放不释放 = %s'%(useSkill.GetSkillName())) - continue - - effect = SkillCommon.GetSkillEffectByEffectID(useSkill, ChConfig.Def_Skill_Effect_HPPerLimit) - if not effect: - continue - - if GameObj.GetHP(curPlayer)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(curPlayer) >= effect.GetEffectValue(0): - continue - - AICommon.DoNPCUseSkill(rolePet, curPlayer, useSkill, 0, tick) + #=========================================================================== + # skillManager = rolePet.GetSkillManager() + # for index in range(0, skillManager.GetSkillCount()): + # useSkill = skillManager.GetSkillByIndex(index) + # #已经到尾部了 + # if not useSkill or useSkill.GetSkillTypeID() == 0: + # break + # + # if SkillCommon.isPassiveSkill(useSkill): + # #GameWorld.Log('被动技能不释放不释放 = %s'%(useSkill.GetSkillName())) + # continue + # + # effect = SkillCommon.GetSkillEffectByEffectID(useSkill, ChConfig.Def_Skill_Effect_HPPerLimit) + # if not effect: + # continue + # + # if GameObj.GetHP(curPlayer)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(curPlayer) >= effect.GetEffectValue(0): + # continue + # + # AICommon.DoNPCUseSkill(rolePet, curPlayer, useSkill, 0, tick) + #=========================================================================== return -- Gitblit v1.8.0