860312 增加锁定模式 - 只对选中目标造成伤害,适用于部分BOSS争夺副本
5个文件已修改
47 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -2576,6 +2576,7 @@
        1    全体模式    IPY_GameWorld.amAll              对所有玩家都是敌对,家族区域同盟玩家除外  
        2    防卫模式    IPY_GameWorld.amCountry          本服玩家友好,他服玩家都是敌对
        5    强制模式    IPY_GameWorld.amFamily           队友、仙盟成员、同阵营友好,其他玩家敌对
        7    锁定单一目标模式 IPY_GameWorld.amContest       只对选中目标有伤害, 目前只用于部分BOSS争夺地图
        
    场景区域
        普通区域    IPY_GameWorld.gatNormal    可根据不同PK模式PK,击杀玩家有惩罚
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -914,12 +914,19 @@
    if attacker.GetGameObjType() != IPY_GameWorld.gotPlayer:
        return None
    
    useSkillTagID = attacker.GetUseSkillTagID()
    useSkillTagType = attacker.GetUseSkillTagType()
    curTag = GameWorld.GetObj(useSkillTagID, useSkillTagType)
    curTag = None
    if attacker.GetAttackMode() == IPY_GameWorld.amContest:
        # 单一目标锁定模式
        curTag = GameWorld.GetObj(attacker.SetDict(ChConfig.Def_PlayerKey_SelectObjID),
                                  attacker.SetDict(ChConfig.Def_PlayerKey_SelectObjType))
    if not curTag:
        return None
        useSkillTagID = attacker.GetUseSkillTagID()
        useSkillTagType = attacker.GetUseSkillTagType()
        curTag = GameWorld.GetObj(useSkillTagID, useSkillTagType)
        if not curTag:
            return None
    
    if SkillShell.GetSkillAffectTag(curSkill) == ChConfig.Def_UseSkillTag_CanAttackNPC:
        if NPCCommon.GetNpcObjOwnerIsPlayer(curTag):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3005,6 +3005,8 @@
#---SetDict 玩家字典KEY,不存于数据库---
# key的长度不能超过29个字节
Def_PlayerKey_SelectObjID = "selectID"   # 锁定模式选中,不用SetActionObj
Def_PlayerKey_SelectObjType = "selectType"   # 锁定模式选中
Def_PlayerKey_LuckyHitPer = "LuckyHitPer"   # 会心一击伤害万分率
Def_PlayerKey_SuperHitPer = "SuperHitPer" # 暴击伤害万分率
Def_PlayerKey_NormalHurt = "NormalHurt"   # 属性普通攻击增伤:普通攻击附加的固定值伤害
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBattle.py
@@ -298,37 +298,28 @@
    PlayerControl.ExitPlayerConfronting(curPlayer)
    return
##没有了对峙,需要设置选中
# 目标死亡和消失时发包取消对象,人物死亡取消选中
##增加锁定模式amContest,锁定情况下只能攻击目标
# @param None
# @return None
def SelectObj(index, clientData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    if curPlayer.GetPlayerAction() == IPY_GameWorld.paEvent:
    if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
        return
    
    if clientData.isSelect == 0:
        curPlayer.SetActionObj(None)
        if curPlayer.GetPlayerAction() == IPY_GameWorld.paPreparing:
            PlayerControl.ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
        curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjID, 0)
        curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjType, 0)
        return
    
    curTag = GameWorld.GetObj(clientData.ID, clientData.Type)
    if curTag == None or curTag.IsEmpty():
        return
    
    if curPlayer.GetPlayerAction() not in ChConfig.Def_PlayerCanEnterConfronting:
        #GameWorld.Log("状态不对%s"%curPlayer.GetPlayerAction())
        return
    tagObj = curPlayer.GetActionObj()
    if tagObj:
        if curPlayer.GetPlayerAction() == IPY_GameWorld.paPreparing:
            if tagObj.GetGameObjType() != clientData.Type or tagObj.GetID() != clientData.ID:
                PlayerControl.ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
            
    #这里不验证是否死亡
    curPlayer.SetActionObj(curTag)
    curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjID, clientData.ID)
    curPlayer.SetDict(ChConfig.Def_PlayerKey_SelectObjType, clientData.Type)
    
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1975,6 +1975,10 @@
# @return 返回值, 伤害数量
# @remarks 获得区域技能伤害对象数量
def GetSkillArea_Atk_Count(attacker, curSkill):
    if attacker.GetGameObjType() ==  IPY_GameWorld.gotPlayer and attacker.GetAttackMode() == IPY_GameWorld.amContest:
        # 单一目标锁定模式
        return 1
    #默认攻击最大数
    hurtCount = 50