This commit is contained in:
aozhiwei 2024-09-11 16:49:41 +08:00
parent d8447a90c5
commit aa353e9318

View File

@ -1170,6 +1170,13 @@ void Creature::Initialize()
if (IsHuman()) {
a8::XTimerWp nature_recover_hp_timer;
auto battling_state = std::make_shared<bool>(true);
GetTrigger()->AddListener
(
kBattleStartEvent,
[battling_state] (const a8::Args& args)
{
*battling_state = true;
});
nature_recover_hp_idle_timer = room->xtimer.SetIntervalWpEx
(
SERVER_FRAME_RATE * mt::Param::s().nature_recover_hp_idletime,