| | |
| | | return true; |
| | | } |
| | | |
| | | public virtual void Hurt(List<long> damageValues, long _totalDamage, |
| | | HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig, int hitIndex, |
| | | BattleDrops battleDrops, HB422_tagMCTurnFightObjDead deadPack, |
| | | long fromHp, long toHp) |
| | | public virtual void Hurt(BattleHurtParam battleHurtParam) |
| | | { |
| | | bool isLastHit = hitIndex >= skillConfig.DamageDivide.Length - 1; |
| | | bool firstHit = hitIndex == 0; |
| | | BattleDmgInfo dmgInfo = PopDamage(damageValues, _totalDamage, hurt, skillConfig, isLastHit, fromHp, toHp); |
| | | bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1; |
| | | bool firstHit = battleHurtParam.hitIndex == 0; |
| | | BattleDmgInfo dmgInfo = PopDamage(battleHurtParam); |
| | | |
| | | |
| | | // 这里 |
| | |
| | | |
| | | |
| | | |
| | | bool isFatalAttack = (null != deadPack) && isLastHit; |
| | | bool isFatalAttack = (null != battleHurtParam.deadPack) && isLastHit; |
| | | |
| | | if (isFatalAttack) |
| | | { |
| | |
| | | { |
| | | PushDropItems(battleDrops); |
| | | } |
| | | battleField.OnObjsDead(new List<HB422_tagMCTurnFightObjDead>() { deadPack }); |
| | | battleField.OnObjsDead(new List<HB422_tagMCTurnFightObjDead>() { battleHurtParam.deadPack }); |
| | | |
| | | } |
| | | else |
| | |
| | | } |
| | | |
| | | // 伤害还要看 是否闪避 暴击 and so on 需要有一个DamageType 服务器应该会给 |
| | | protected virtual BattleDmgInfo PopDamage(List<long> damageValues, long _totalDamage, |
| | | HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig, bool isLastHit, |
| | | long fromHp, long toHp) |
| | | protected virtual BattleDmgInfo PopDamage(BattleHurtParam battleHurtParam) |
| | | { |
| | | BattleDmgInfo battleDmgInfo = new BattleDmgInfo(battleField.guid, damageValues, this, hurt, skillConfig, isLastHit); |
| | | BattleDmgInfo battleDmgInfo = new BattleDmgInfo(battleField.guid, battleHurtParam); |
| | | |
| | | // 使用传入的 fromHp 和 toHp 更新血条显示 |
| | | heroInfoBar.UpdateHP(fromHp, toHp, teamHero.maxHp); |
| | | heroInfoBar.UpdateHP(battleHurtParam.fromHp, battleHurtParam.toHp, teamHero.maxHp); |
| | | |
| | | // YYL TODO 是否需要挂在在自身的follow点上 |
| | | EventBroadcast.Instance.Broadcast(EventName.BATTLE_DAMAGE_TAKEN, battleDmgInfo); |