1
This commit is contained in:
parent
4ffcfd47fa
commit
103c232fed
@ -251,7 +251,18 @@ void CondAddBuff::ProcLimitTimeKillTarget()
|
||||
kDieEvent,
|
||||
[this, context, target_uniid] (const a8::Args& args)
|
||||
{
|
||||
|
||||
if (owner->dead) {
|
||||
return;
|
||||
}
|
||||
auto itr = context->watch_targets.find(target_uniid);
|
||||
if (itr != context->watch_targets.end()) {
|
||||
Entity* e = owner->room->GetEntityByUniId(target_uniid);
|
||||
if (e && e->IsCreature(owner->room)) {
|
||||
Creature* c = (Creature*)e;
|
||||
c->GetTrigger()->RemoveEventHandler(std::get<1>(itr->second));
|
||||
}
|
||||
context->watch_targets.erase(itr);
|
||||
}
|
||||
});
|
||||
context->watch_targets[target->GetUniId()] = std::make_tuple(timer_wp, handler);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user