From 3bc2e9aae7e595d5be896a9db4c909b76fa6f5be Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期五, 11 七月 2025 14:16:29 +0800 Subject: [PATCH] 0312 物品叠加数量支持配置DWORD --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py | 76 +------------------------------------ 1 files changed, 3 insertions(+), 73 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py index dbaf5d3..cbb2482 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py @@ -35,13 +35,9 @@ import ChConfig import NPCCommon import NPCCustomRefresh -import GameLogInfo import time import math -import ReadChConfig import PlayerActivity -import SkillCommon -import BuffSkill import GameObj import SkillShell import FBLogic @@ -345,20 +341,6 @@ for curNPC in gameBoss_List: ProcessNPCAI(curNPC, tick) - - #---骠车AI--- - gameTruck_List = [] - for index in range(gameNPC.GetTruckCount()): - curNPC = gameNPC.GetTruckAt(index) - #镖车不可能死亡的 - if not curNPC.IsAlive(): - GameWorld.Log('###镖车死亡 , %s'%(curNPC.GetName())) - continue - - gameTruck_List.append(curNPC) - - for curNPC in gameTruck_List: - ProcessNPCAI(curNPC, tick) # 宠物AI ProcessPetAI(gameWorld, gameNPC, tick) @@ -430,6 +412,9 @@ # if tick - curNPC.GetAttackTick() < ChConfig.TYPE_NPC_Tick_ProcessAI: # #攻击间隔没有到, 返回 # return + if curNPC.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightPosInfo): + #GameWorld.DebugLog("回合制NPC不处理AI!", curNPC.GetID()) + return npcID = curNPC.GetNPCID() endTick = GameWorld.GetGameFB().GetGameFBDictByKey(ChConfig.Def_FBDict_NPCShowEndTick % npcID) if endTick: @@ -472,61 +457,6 @@ # GameWorld.Log('功能或AI不存在: %s'%curNPC.GetAIType()) return - -#=============================================================================== -# def OnUndeathBossHurt(curNPC, hurtHP): -# npcID = curNPC.GetNPCID() -# UndeathBossDict = ReadChConfig.GetEvalChConfig("UndeathBoss") -# if npcID not in UndeathBossDict: -# return False -# unitLostHP = UndeathBossDict[npcID] # 叠加一层buff所需掉血量 -# -# curLayerLostHP = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_Undeath_LayerLostHP) -# updLostHP = curLayerLostHP + hurtHP -# addLayer = updLostHP / unitLostHP # 增加buff层数, 攻击高的可能一次性加多层 -# #GameWorld.DebugLog("不死boss掉血: curLayerLostHP=%s,hurtHP=%s,updLostHP=%s,unitLostHP=%s,addLayer=%s" -# # % (curLayerLostHP, hurtHP, updLostHP, unitLostHP, addLayer), npcID) -# if addLayer > 0: -# curBuffLayer = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_Undeath_BuffLayer) -# updBuffLyaer = curBuffLayer + addLayer -# curNPC.SetDict(ChConfig.Def_NPC_Dict_Undeath_BuffLayer, updBuffLyaer) -# updLostHP = updLostHP % unitLostHP # 更新层累加后剩余的伤害值 -# #GameWorld.DebugLog(" 增加NPC字典buff层: curBuffLayer=%s,updBuffLyaer=%s,updLostHP=%s" -# # % (curBuffLayer, updBuffLyaer, updLostHP), npcID) -# __UpdBossLayerBuff(curNPC, updBuffLyaer) -# -# curNPC.SetDict(ChConfig.Def_NPC_Dict_Undeath_LayerLostHP, updLostHP) -# return True -# -# def __UpdBossLayerBuff(curNPC, updBuffLyaer): -# ''' 更新boss层buff层级 ''' -# buffType = IPY_GameWorld.bfBuff -# buffTuple = SkillCommon.GetBuffManagerByBuffType(curNPC, buffType) -# if buffTuple == (): -# return -# -# tick = GameWorld.GetGameWorld().GetTick() -# buffState = buffTuple[0] -# for i in range(0,buffState.GetBuffCount()): -# curBuff = buffState.GetBuff(i) -# curSkill = curBuff.GetSkill() -# skillID = curSkill.GetSkillID() -# if not skillID: -# continue -# -# for j in range(0, curSkill.GetEffectCount()): -# curEffect = curSkill.GetEffect(j) -# effectID = curEffect.GetEffectID() -# # 层级buff效果 -# if effectID in ChConfig.Def_BuffLayerEffectList: -# BuffSkill.AddBuffNoRefreshState(curNPC, buffType, curSkill, tick, updBuffLyaer, curNPC) -# #GameWorld.DebugLog(" 更新层级buff效果层数: isOK=%s,skillID=%s,effID=%s,updBuffLyaer=%s" -# # % (isOK, skillID, effectID, updBuffLyaer), curNPC.GetNPCID()) -# break -# -# NPCCommon.NPCControl(curNPC).RefreshNPCAttrState() -# return -#=============================================================================== def OnUndeathBossAttacked(curNPC): npcID = curNPC.GetNPCID() -- Gitblit v1.8.0