This commit is contained in:
aozhiwei 2023-04-20 18:20:42 +08:00
parent a45a9ac286
commit 73c16e922e

View File

@ -193,16 +193,19 @@ void Guide::ProcKillEnemy()
[this, hero_id, hero_meta, pos, context, i ] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
context->heros[i] =
owner_->room->CreateHero
Hero* hero = owner_->room->CreateHero
(
nullptr,
hero_meta,
pos,
pos,
666
)->GetUniId()
;
);
if (!hero) {
abort();
}
hero->SetHP(0.1f);
context->heros[i] = hero->GetUniId();
}
},
&owner_->xtimer_attacher);
@ -269,16 +272,19 @@ void Guide::ProcUseSkillAndKillEnemy()
[this, hero_id, hero_meta, pos, context, i ] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
context->heros[i] =
owner_->room->CreateHero
Hero* hero = owner_->room->CreateHero
(
nullptr,
hero_meta,
pos,
pos,
666
)->GetUniId()
;
);
if (!hero) {
abort();
}
hero->SetHP(0.1f);
context->heros[i] = hero->GetUniId();
}
},
&owner_->xtimer_attacher);