1
This commit is contained in:
parent
a5d5be071e
commit
cce7549812
@ -865,8 +865,9 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string& killer_name, i
|
||||
float new_health = std::max(0.0f, GetHP() - dec_hp);
|
||||
AdjustDecHp(old_health, new_health);
|
||||
SetHP(std::max(0.0f, new_health));
|
||||
if (GetHP() - old_health > 0.001f) {
|
||||
stats.damage_amount_in += GetHP() - old_health;
|
||||
if (old_health - GetHP() > 0.001f) {
|
||||
stats.damage_amount_in += old_health - GetHP();
|
||||
GetTrigger()->ReceiveDmg();
|
||||
}
|
||||
if (GetHP() <= 0.0001f && !dead) {
|
||||
if (downed) {
|
||||
|
@ -177,6 +177,11 @@ void Trigger::HpChg()
|
||||
});
|
||||
}
|
||||
|
||||
void Trigger::ReceiveDmg()
|
||||
{
|
||||
TriggeCondBuffAll(kCondBuffReceiveDmg);
|
||||
}
|
||||
|
||||
void Trigger::Die()
|
||||
{
|
||||
TriggeCondBuffAll(kCondBuffDid);
|
||||
@ -221,7 +226,7 @@ void Trigger::TriggeCondBuffAll(int cond)
|
||||
[this, cond] (Buff* buff, bool& stop)
|
||||
{
|
||||
AddBuffs(cond, buff->meta->param4_int_list);
|
||||
});
|
||||
});
|
||||
owner_->context_pos = old_context_pos;
|
||||
owner_->context_ability = old_context_ability;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
void UseItemAction(int slot_id);
|
||||
void UseSkill(Skill* skill);
|
||||
void HpChg();
|
||||
void ReceiveDmg();
|
||||
void Die();
|
||||
void ActiveBuff(MetaData::Buff* buff_meta);
|
||||
void DeactiveBuff(MetaData::Buff* buff_meta);
|
||||
|
Loading…
x
Reference in New Issue
Block a user