战斗血量bug

back_recharge
mashiyu 2019-03-27 15:47:27 +08:00
parent d6cd2edb89
commit 5b5bf07eec
4 changed files with 6 additions and 4 deletions

View File

@ -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()

View File

@ -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

View File

@ -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();

View File

@ -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<LuaValue> effectList = getEffect(sSkillLogicVo);
int size = effectList.size();