10263 【英文】【BT】【GM】后端支持NPC仿真实玩家战斗和快速战斗(优化释放被动UsePassive计数,防止可能引起的死循环;)
4个文件已修改
16 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
@@ -514,6 +514,7 @@
    '''
    
    playerID = 0
    curTime = int(time.time())
    if curPlayer:
        if GameWorld.IsCrossServer():
            GameWorld.DebugLog("跨服服务器中不允许玩家镜像战斗请求!", playerID)
@@ -525,7 +526,6 @@
        if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID):
            GameWorld.DebugLog("镜像战斗场景中,无法请求!", playerID)
            return
        curTime = int(time.time())
        # 请求cd验证
        requestTime = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleTime)
        if requestTime and (curTime - requestTime) <= 20: # 20秒内不重复请求
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
@@ -296,6 +296,7 @@
def __DoClientUseSkillEx(curPlayer, skillData, tick):
    #使用技能结果
    useSkillResult = False
    SkillCommon.ClearUsingPassiveSkill(curPlayer)
    
    #---无目标类技能---
    aimType = SkillShell.GetSkillFireAim(skillData)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -2006,7 +2006,15 @@
    return attacker.GetDictByKey("UsePassive")
def SetUsingPassiveSkill(attacker, value):
    return attacker.SetDict("UsePassive", value)
    if value > 0:
        attacker.SetDict("UsePassive", attacker.GetDictByKey("UsePassive") + 1)
    else:
        attacker.SetDict("UsePassive", max(0, attacker.GetDictByKey("UsePassive") - 1))
    return
def ClearUsingPassiveSkill(attacker):
    attacker.SetDict("UsePassive", 0)
    return
def CheckPlayerAtkInterval(curPlayer, skillTypeID, tick):
    ''' 验证是否基本攻击间隔 '''
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -3807,7 +3807,8 @@
        skillID = curSkill.GetSkillID()
        PyGameData.g_singleAtkRecordList.append([atkID, tagID, skillID])
        #GameWorld.DebugLog("PyGameData.g_singleAtkRecordList: %s, %s" % (len(PyGameData.g_singleAtkRecordList), PyGameData.g_singleAtkRecordList))
        if len(PyGameData.g_singleAtkRecordList) >= 50:
        #已修复SetUsingPassiveSkill计数问题,这个记录还是先保留,观察一段时间后没问题可去除
        if len(PyGameData.g_singleAtkRecordList) >= 100:
            mapID = GameWorld.GetMap().GetMapID()
            GameWorld.SendGameError("MirrorAIAtkDepthError", "mapID=%s, %s" % (mapID, PyGameData.g_singleAtkRecordList))
            PyGameData.g_singleAtkRecordList = None