1
This commit is contained in:
commit
ae1ab3b1ee
@ -257,14 +257,16 @@ void CondAddBuff::ProcLimitTimeKillTarget()
|
|||||||
time_limit * SERVER_FRAME_RATE,
|
time_limit * SERVER_FRAME_RATE,
|
||||||
[this, context, target_uniid] (int event, const a8::Args* args)
|
[this, context, target_uniid] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
auto itr = context->watch_targets.find(target_uniid);
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
if (itr != context->watch_targets.end()) {
|
auto itr = context->watch_targets.find(target_uniid);
|
||||||
Entity* e = owner->room->GetEntityByUniId(target_uniid);
|
if (itr != context->watch_targets.end()) {
|
||||||
if (e && e->IsCreature(owner->room)) {
|
Entity* e = owner->room->GetEntityByUniId(target_uniid);
|
||||||
Creature* c = (Creature*)e;
|
if (e && e->IsCreature(owner->room)) {
|
||||||
c->GetTrigger()->RemoveEventHandler(std::get<1>(itr->second));
|
Creature* c = (Creature*)e;
|
||||||
|
c->GetTrigger()->RemoveEventHandler(std::get<1>(itr->second));
|
||||||
|
}
|
||||||
|
context->watch_targets.erase(itr);
|
||||||
}
|
}
|
||||||
context->watch_targets.erase(itr);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher);
|
&xtimer_attacher);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user