This commit is contained in:
aozhiwei 2023-07-06 12:05:11 +08:00
parent 0c5624ab84
commit ee1ba0f16f

View File

@ -731,6 +731,19 @@ void CallFuncBuff::SummonHeroSpecPoint()
vars
);
}
if (meta->_int_buff_param8) {
owner->GetTrigger()->AddListener
(
kDieEvent,
[hero_ptr = hero->GetWeakPtrRef(), hero_id] (const a8::Args& args) mutable
{
if (hero_ptr.Get() && hero_ptr.Get()->AsHero()->master.Get()) {
if (!hero_ptr.Get()->room->IsGameOver()) {
hero_ptr.Get()->AsHero()->master.Get()->RemoveSurplusHero(hero_id, 0);
}
}
});
}
}
}
}
@ -772,6 +785,19 @@ void CallFuncBuff::SummonHeroSpecDistance()
vars
);
}
if (meta->_int_buff_param8) {
owner->GetTrigger()->AddListener
(
kDieEvent,
[hero_ptr = hero->GetWeakPtrRef(), hero_id] (const a8::Args& args) mutable
{
if (hero_ptr.Get() && hero_ptr.Get()->AsHero()->master.Get()) {
if (!hero_ptr.Get()->room->IsGameOver()) {
hero_ptr.Get()->AsHero()->master.Get()->RemoveSurplusHero(hero_id, 0);
}
}
});
}
}
}
}