1
This commit is contained in:
parent
2a89cc3d84
commit
ee70076369
@ -1150,7 +1150,7 @@ void Creature::Initialize()
|
|||||||
for (auto& node : cond_buffs_) {
|
for (auto& node : cond_buffs_) {
|
||||||
INIT_LIST_HEAD(&node);
|
INIT_LIST_HEAD(&node);
|
||||||
}
|
}
|
||||||
if (IsHuman() && mt::Param::s().nature_recover_hp_switch) {
|
if (IsHuman()) {
|
||||||
a8::XTimerWp nature_recover_hp_timer;
|
a8::XTimerWp nature_recover_hp_timer;
|
||||||
nature_recover_hp_idle_timer = room->xtimer.SetIntervalWpEx
|
nature_recover_hp_idle_timer = room->xtimer.SetIntervalWpEx
|
||||||
(
|
(
|
||||||
@ -1165,7 +1165,8 @@ void Creature::Initialize()
|
|||||||
[this] (int event, const a8::Args* args) mutable
|
[this] (int event, const a8::Args* args) mutable
|
||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
if (!dead && !poisoning && !downed && !HasBuffEffect(kBET_Dive)) {
|
if (!dead && !poisoning && !downed && !HasBuffEffect(kBET_Dive) &&
|
||||||
|
mt::Param::s().nature_recover_hp_switch) {
|
||||||
if (GetHP() + 1 < GetMaxHP()) {
|
if (GetHP() + 1 < GetMaxHP()) {
|
||||||
AddHp(GetMaxHP() * mt::Param::s().nature_recover_hp_rate);
|
AddHp(GetMaxHP() * mt::Param::s().nature_recover_hp_rate);
|
||||||
TryAddBuff(this, kRecoverHpEffectBuffId);
|
TryAddBuff(this, kRecoverHpEffectBuffId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user