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);
|
float new_health = std::max(0.0f, GetHP() - dec_hp);
|
||||||
AdjustDecHp(old_health, new_health);
|
AdjustDecHp(old_health, new_health);
|
||||||
SetHP(std::max(0.0f, new_health));
|
SetHP(std::max(0.0f, new_health));
|
||||||
if (GetHP() - old_health > 0.001f) {
|
if (old_health - GetHP() > 0.001f) {
|
||||||
stats.damage_amount_in += GetHP() - old_health;
|
stats.damage_amount_in += old_health - GetHP();
|
||||||
|
GetTrigger()->ReceiveDmg();
|
||||||
}
|
}
|
||||||
if (GetHP() <= 0.0001f && !dead) {
|
if (GetHP() <= 0.0001f && !dead) {
|
||||||
if (downed) {
|
if (downed) {
|
||||||
|
@ -177,6 +177,11 @@ void Trigger::HpChg()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Trigger::ReceiveDmg()
|
||||||
|
{
|
||||||
|
TriggeCondBuffAll(kCondBuffReceiveDmg);
|
||||||
|
}
|
||||||
|
|
||||||
void Trigger::Die()
|
void Trigger::Die()
|
||||||
{
|
{
|
||||||
TriggeCondBuffAll(kCondBuffDid);
|
TriggeCondBuffAll(kCondBuffDid);
|
||||||
|
@ -23,6 +23,7 @@ public:
|
|||||||
void UseItemAction(int slot_id);
|
void UseItemAction(int slot_id);
|
||||||
void UseSkill(Skill* skill);
|
void UseSkill(Skill* skill);
|
||||||
void HpChg();
|
void HpChg();
|
||||||
|
void ReceiveDmg();
|
||||||
void Die();
|
void Die();
|
||||||
void ActiveBuff(MetaData::Buff* buff_meta);
|
void ActiveBuff(MetaData::Buff* buff_meta);
|
||||||
void DeactiveBuff(MetaData::Buff* buff_meta);
|
void DeactiveBuff(MetaData::Buff* buff_meta);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user