hxp
2018-11-21 d77abb724151826fbfcb23f6e1bc5d232f155535
4926 【后端】【1.2】【1.3】BOSS归属特殊规则
7个文件已修改
36 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_NormalNPC.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_186.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -58,6 +58,7 @@
import NetPackCommon
import FamilyRobBoss
import FBCommon
import ChNPC
import datetime
import math
@@ -2457,7 +2458,7 @@
# @param curObjDetel 对象实例
# @return 返回值无意义
# @remarks 理对象死亡逻辑
def DoLogic_ObjDead(curObjDetel):
def DoLogic_ObjDead(atkObj, curObjDetel, curSkill, tick):
    if GameObj.GetHP(curObjDetel) > 0:
        return
    
@@ -2468,6 +2469,10 @@
        return
    
    #---NPC处理---
    if not ChNPC.OnCheckCanDie(atkObj, curObjDetel, curSkill, tick):
        GameObj.SetHP(curObjDetel, 1)
        return
    npcControl = NPCCommon.NPCControl(curObjDetel)
    npcControl.SetKilled()
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Pet_Attack_NormalNPC.py
@@ -110,6 +110,10 @@
        #执行击杀NPC逻辑
        curPlayer = PetControl.GetPetOwner(curPet)  # 宠物主人
        
        if not ChNPC.OnCheckCanDie(curPlayer, curTagNPC, skill, tick):
            GameObj.SetHP(curTagNPC, 1)
            return
        if curPlayer != None:
            FBLogic.DoFB_Player_KillNPC(curPlayer, curTagNPC, tick)
            NPCCommon.OnPlayerAttackNPCDie(curTagNPC, curPlayer, skill)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/Player_Attack_NormalNPC.py
@@ -110,6 +110,9 @@
        return
    
    if GameObj.GetHP(curTagNormalNPC) <= 0:
        if not ChNPC.OnCheckCanDie(curPlayer, curTagNormalNPC, skill, tick):
            GameObj.SetHP(curTagNormalNPC, 1)
            return
        #执行击杀NPC逻辑
        FBLogic.DoFB_Player_KillNPC(curPlayer , curTagNormalNPC , tick)
        NPCCommon.OnPlayerAttackNPCDie(curTagNormalNPC, curPlayer, skill)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/SummonNPC_Attack_NormalNPC.py
@@ -143,6 +143,10 @@
    #玩家击杀NPC副本触发器
    curPlayer = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, curSummonNPC)
    
    if not ChNPC.OnCheckCanDie(curPlayer, curTagNPC, skill, tick):
        GameObj.SetHP(curTagNPC, 1)
        return
    #2011-05-12 chenxuewei 有没主人都只要通知一次即可,避免重复通知
    if curPlayer != None:
        FBLogic.DoFB_Player_KillNPC(curPlayer, curTagNPC, tick)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py
@@ -134,7 +134,13 @@
    callFunc(atkObj, curNPC, skill, tick)
    
    PlayerActivity.OnAttackNPCActivity(atkObj, curNPC)
def OnCheckCanDie(atkObj, curNPC, skill, tick):
    callFunc = GameWorld.GetExecFunc(NPCAI, "AIType_%d.%s"%(curNPC.GetAIType(), "OnCheckCanDie"))
    if callFunc == None:
        return True
    return callFunc(atkObj, curNPC, skill, tick)
#---------------------------------------------------------------------
## 初始化NPC 
#  @param tick 当前时间
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_186.py
@@ -381,6 +381,14 @@
        PlayerState.SetBossStateTick(atkObj, tick)
    return
def OnCheckCanDie(atkObj, curNPC, skill, tick):
    ## 检查NPC是否可死亡
    tagObj = __RefreshDropOwner(curNPC, tick, 0)
    if not atkObj or not tagObj:
        GameWorld.ErrLog("Boss当前状态下不可以死亡!npcID=%s" % curNPC.GetNPCID())
        return False
    return True
## NPC被玩家杀死
def OnAttackDieByPlayer(curNPC, curPlayer, skill):
    tick = GameWorld.GetGameWorld().GetTick()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1252,7 +1252,7 @@
    
    #无法找到Buff拥有者
    if not buffOwner:
        AttackCommon.DoLogic_ObjDead(curObj)
        AttackCommon.DoLogic_ObjDead(None, curObj, curSkill, tick)
        return
        
    #NPC需要手动添加伤血和仇恨, 因为无调用DoAttack