10263 【英文】【BT】【GM】后端支持NPC仿真实玩家战斗和快速战斗(镜像AI单次攻击触发被动死循环防范,暂时限制单次攻击累计触发50次不再触发并发送后台邮件警告;)
3个文件已修改
20 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -42,6 +42,7 @@
import PassiveBuffEffMng
import PlayerGeTui
import IpyGameDataPY
import PyGameData
#---------------------------------------------------------------------
g_skillHurtList = IPY_GameWorld.IPY_HurtList()
@@ -1973,7 +1974,20 @@
    #PlayerControl.DoPlayerStand(curPlayer)
    #激活玩家
    PlayerControl.SetIsNeedProcess(curPlayer, True)
    #镜像单次攻击统计,查单次攻击无限触发被动死循环临时代码
    if PyGameData.g_singleAtkRecordList != None and (attacker and attacker.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)) \
        and (curPlayer and curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID)):
        atkID = attacker.GetID()
        defID = curPlayer.GetID()
        skillID = curSkill.GetSkillID() if curSkill else 0
        PyGameData.g_singleAtkRecordList.append([atkID, defID, skillID])
        #GameWorld.DebugLog("PyGameData.g_singleAtkRecordList: %s, %s" % (len(PyGameData.g_singleAtkRecordList), PyGameData.g_singleAtkRecordList))
        if len(PyGameData.g_singleAtkRecordList) >= 50:
            GameWorld.SendGameError("MirrorAIAtkDepthError", str(PyGameData.g_singleAtkRecordList))
            PyGameData.g_singleAtkRecordList = None
            return
    # 暂且只有玩家被攻击触发
    if not curSkill or curSkill.GetSkillType() in ChConfig.Def_CanAttackSkill_List:
        # 优先触发,如无敌可以抵挡后续的被动伤害技能
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
@@ -721,6 +721,7 @@
        #GameWorld.DebugLog("攻击间隔: %s < %s" % (tick - curPlayer.GetPlayerAttackTick(), curPlayer.GetAtkInterval()), playerID)
        return
    
    PyGameData.g_singleAtkRecordList = []
    autoUseSkillList = battle.GetPlayerAutoUseSkillList(curPlayer)
    #GameWorld.DebugLog("镜像AI攻击: autoUseSkillList=%s" % (autoUseSkillList), playerID)
    
@@ -745,6 +746,7 @@
            if isOK:
                break
            
    PyGameData.g_singleAtkRecordList = None
    if isOK:
        # 每次处理仅执行一次成功行为
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
@@ -132,3 +132,5 @@
g_familyZhenfaInfo = {} # 仙盟阵法信息{familyID:{zhenfaType:{k:v, }, ...}, ...}
g_singleAtkRecordList = None # 单次攻击记录