From e5d9e13d80e43fb89e00cc9e0ffafcb25e36e435 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 27 三月 2019 16:55:12 +0800 Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(页游领地争夺战) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py index bdde78b..854897d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py @@ -220,7 +220,7 @@ def PlayerLoginMergeServerSkillLogic(curPlayer, tick): playerID = curPlayer.GetPlayerID() - if not GameWorld.IsMergeServer(): + if not GameWorld.IsCrossServer(): GameWorld.DebugLog("非跨服服务器上线不清除buff...", playerID) return @@ -482,6 +482,8 @@ return int(value) + + ## 玩家召唤NPC(当前玩家,召唤技能,召唤兽ID,召唤兽属性列表, 召唤兽离自己的距离, 当前时间) # @param curPlayer 当前玩家 # @param curSkill 召唤技能 @@ -524,6 +526,8 @@ summonPos = GameMap.GetEmptyPlaceInArea(curPlayer.GetPosX(), curPlayer.GetPosY(), summonDist) summonNPC.Reborn(summonPos.GetPosX(), summonPos.GetPosY()) summonNPC.SetBornTime(tick) + # 继承技能等级 + SetSummonNPCSkillLV(summonNPC, curSkill) if curSkill: summonNPC.SetLastTime(curSkill.GetLastTime()) #----设置为无敌,在AI中解除无敌 @@ -531,6 +535,38 @@ summonNPC.SetCanAttack(False) return + +# 召唤兽技能继承,玩家释放技能的等级 +def SetSummonNPCSkillLV(summonNPC, curSkill): + if curSkill.GetEffect(0).GetEffectValue(1) == 0: + return + skillLV = curSkill.GetSkillLV() - 1 + if skillLV == 0: + return + + skillManager = summonNPC.GetSkillManager() + learnSkillIDList =[] + for index in range(0, skillManager.GetSkillCount()): + useSkill = skillManager.GetSkillByIndex(index) + #已经到尾部了 + if not useSkill or useSkill.GetSkillTypeID() == 0: + break + + useSkillTypeID = useSkill.GetSkillTypeID() + # 找到可学习的技能 + learnSkillID = useSkillTypeID + skillLV + findSkill = GameWorld.GetGameData().GetSkillBySkillID(learnSkillID) + if not findSkill: + continue + if findSkill.GetSkillTypeID() != useSkillTypeID: + # 不是同一个技能 + continue + learnSkillIDList.append(learnSkillID) + + for skillID in learnSkillIDList: + skillManager.LearnSkillByID(skillID, False) + return + ## 设置召唤兽属性 # @param curPlayer 当前玩家 @@ -1232,6 +1268,9 @@ notifyLostValue = lostValue curObjHP_BeforeAttack = GameObj.GetHP(curObj) + if curObjHP_BeforeAttack == 0: + # 没有血量不能再触发 + return if reduceHP : lostValue = AttackCommon.CalcAtkProDef(buffOwner, curObj, lostValue, curSkill, tick) @@ -1256,6 +1295,8 @@ # 已广播的不重复 GameObj.SetHP(curObj, remainHP, not view) + AttackCommon.WriteHurtLog(buffOwner, curObj, curSkill, lostValue, hurtType, "持续掉血") + if view: #广播伤血类型 AttackCommon.ChangeHPView(curObj, buffOwner, skillTypeID, notifyLostValue, hurtType) @@ -1270,6 +1311,7 @@ AttackCommon.DoLogic_ObjDead(None, curObj, curSkill, tick) return + #NPC需要手动添加伤血和仇恨, 因为无调用DoAttack if curObjType == IPY_GameWorld.gotNPC: -- Gitblit v1.8.0