6603 【后端】【2.0】增加新版的sp和被动技能 - 优化对当前释放技能的逻辑判断
2个文件已修改
18 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4100.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4100.py
@@ -20,6 +20,8 @@
def CheckCanHappen(attacker, defender, effect, curSkill):
    if not defender:
        return False
    buff = SkillCommon.FindBuffByOwner(defender, effect.GetEffectValue(0), attacker.GetID(), attacker.GetGameObjType())
    if not buff:
        return False
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -55,6 +55,7 @@
# 记录客户端伤害 {(objID, objType):[HurtHP, AttackType]}
g_ClientHurtDict = collections.OrderedDict()
g_UseSkillPlayerID = 0  # 全服攻击为单线程 记录的是当前使用技能的玩家 用于判断g_ClientHurtDict的归属
#---------------------------------------------------------------------
##C++调用函数, 重新读取所有技能
@@ -92,6 +93,10 @@
def GetSkillFireAim(curSkill):
    return curSkill.GetTag()%10
# 当前释放主动技能的玩家
def GetUseSkillPlayerID():
    global g_UseSkillPlayerID
    return g_UseSkillPlayerID
# 客户端伤血列表,修改了遍历对象和计算血量
def GetClientHurtDict():
@@ -100,7 +105,9 @@
def ClearClientHurtDict(curPlayer):
    global g_ClientHurtDict
    global g_UseSkillPlayerID
    g_ClientHurtDict = collections.OrderedDict()
    g_UseSkillPlayerID = 0
    
    
def GetClientHurtByObj(objID, objType):
@@ -122,6 +129,7 @@
# 技能开始初始化客户端伤血列表
def InitClientHurtDict(curPlayer, curSkill, hurtList):
    global g_ClientHurtDict
    global g_UseSkillPlayerID
    ClearClientHurtDict(curPlayer)
    
    #技能攻击最大数量
@@ -157,7 +165,8 @@
            return False
        
        g_ClientHurtDict[(hurobj.ObjID, hurobj.ObjType)] = [hurobj.HurtHP, hurobj.AttackType]
    g_UseSkillPlayerID = curPlayer.GetID()
    return True
#---------------------------------------------------------------------    
# 非客户端玩家释放的技能
@@ -169,12 +178,17 @@
        # 玩家普通也是技能,正常是不会走到这边
        return False
    
    if GetUseSkillPlayerID() != attacker.GetID():
        # 非释放者
        return False
    useSkillData = attacker.GetUseSkill()
    if useSkillData and curSkill.GetSkillTypeID() != useSkillData.GetSkillTypeID():
        # 默认群攻附加触发buff的对象与攻击对象一致
        if not SkillCommon.IsBuff(curSkill):
            return False
    
    if not GetClientHurtDict():
        return False