From d6cd2edb89c0b4610834ce18da768cff0af8016c Mon Sep 17 00:00:00 2001 From: jiahuiwen <1024696487@qq.com> Date: Wed, 27 Mar 2019 11:36:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ljsd/jieling/handler/map/MapLogic.java | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java index b9805b6c9..0f390923e 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java @@ -582,13 +582,31 @@ public class MapLogic { // 3 角色属性 case 3:{ int[][] values = sOptionAddConditions.getValues(); + int teamId = user.getMapManager().getTeamId(); + List teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId); // 1: 全队 0: 最高 if (values[0][0] == 1) { - - } else { - + for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) { + Hero hero = user.getHeroManager().getHero(teamPosHeroInfo.getHeroId()); + Map map = HeroLogic.getInstance().calHeroAllAttribute(hero); + Integer integer = map.get(values[0][1]); + if (integer == null || integer < values[0][2]) { + return jumpTypeValues[0][1]; + } + } + return jumpTypeValues[0][0]; + } else if (values[0][0] == 0){ + for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) { + Hero hero = user.getHeroManager().getHero(teamPosHeroInfo.getHeroId()); + Map map = HeroLogic.getInstance().calHeroAllAttribute(hero); + Integer integer = map.get(values[0][1]); + if (integer != null && integer >= values[0][2]) { + return jumpTypeValues[0][0]; + } + } + return jumpTypeValues[0][1]; } - break; + return jumpTypeValues[0][1]; } // 完成某个任务的第几步 case 4:{ From 5b5bf07eec18feba5cfdf621af58328f374d3a04 Mon Sep 17 00:00:00 2001 From: mashiyu Date: Wed, 27 Mar 2019 15:47:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=88=98=E6=96=97=E8=A1=80=E9=87=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luafight/Modules/Battle/Logic/BattleLogic.lua | 4 +++- luafight/Modules/Battle/Logic/RoleLogic.lua | 2 +- .../com/ljsd/jieling/handler/map/behavior/BehaviorUtil.java | 2 +- .../src/main/java/com/ljsd/jieling/util/FightDataUtil.java | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/luafight/Modules/Battle/Logic/BattleLogic.lua b/luafight/Modules/Battle/Logic/BattleLogic.lua index 74e7b78ee..e7a6ca993 100644 --- a/luafight/Modules/Battle/Logic/BattleLogic.lua +++ b/luafight/Modules/Battle/Logic/BattleLogic.lua @@ -160,7 +160,9 @@ function BattleLogic.AddRole(roleData) local data = rolePool:Get() data:Init(curUid, roleData) objList:Add(curUid, data) - BattleLogic.Event:DispatchEvent(BattleEventName.AddRole, data) + if not data.isDead then + BattleLogic.Event:DispatchEvent(BattleEventName.AddRole, data) + end end function BattleLogic.InitAggro() diff --git a/luafight/Modules/Battle/Logic/RoleLogic.lua b/luafight/Modules/Battle/Logic/RoleLogic.lua index 448e97992..0f51fec0b 100644 --- a/luafight/Modules/Battle/Logic/RoleLogic.lua +++ b/luafight/Modules/Battle/Logic/RoleLogic.lua @@ -60,7 +60,7 @@ function RoleLogic:Init(uid, data) Passivity[id](self, args) end - self.isDead = false + self.isDead = self:GetRoleData(RoleDataName.Hp) == 0 self.Auto = true self.IsDebug = false self.enable = true diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/BehaviorUtil.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/BehaviorUtil.java index 6febf68aa..411bdab27 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/BehaviorUtil.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/behavior/BehaviorUtil.java @@ -90,7 +90,7 @@ public class BehaviorUtil { CommonProto.FightData.Builder fightData = CommonProto.FightData.newBuilder(); for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) { Hero hero = user.getHeroManager().getHero(teamPosHeroInfo.getHeroId()); - if (hero == null || hero.getCurHp() == 0) { + if (hero == null) { continue; } StringBuilder skillSb = new StringBuilder(); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/util/FightDataUtil.java b/serverlogic/src/main/java/com/ljsd/jieling/util/FightDataUtil.java index 53b34c61e..44234f837 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/util/FightDataUtil.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/util/FightDataUtil.java @@ -190,7 +190,7 @@ public class FightDataUtil { return skill; } SSkillLogicVo sSkillLogicVo = SSkillLogicConfig.getsSkillLogicVo(Integer.valueOf(skillId)); - if (sSkillLogicVo != null) { + if (sSkillLogicVo != null && sSkillLogicVo.getSkillTargetVoList().size()>0) { skill.rawset(1, LuaValue.valueOf(sSkillLogicVo.getCd())); List effectList = getEffect(sSkillLogicVo); int size = effectList.size();