1
This commit is contained in:
parent
0fef2ada52
commit
19aa9c64db
@ -452,7 +452,7 @@ int Creature::TryAddBuffAndSetTime(Creature* caster,
|
||||
a8::XTimerWp Creature::TryDelayAddBuff(Creature* caster,
|
||||
int buff_id,
|
||||
int time,
|
||||
DelayAddBuffHandle* handle,
|
||||
std::shared_ptr<DelayAddBuffHandle> handle,
|
||||
std::shared_ptr<a8::Args> init_args,
|
||||
std::shared_ptr<std::vector<float>> buff_vars)
|
||||
{
|
||||
@ -475,7 +475,6 @@ a8::XTimerWp Creature::TryDelayAddBuff(Creature* caster,
|
||||
}
|
||||
} else if (a8::TIMER_DELETE_EVENT == event) {
|
||||
if (handle) {
|
||||
delete handle;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -181,7 +181,7 @@ class Creature : public MoveableEntity
|
||||
Creature* caster,
|
||||
int buff_id,
|
||||
int time,
|
||||
DelayAddBuffHandle* handle = nullptr,
|
||||
std::shared_ptr<DelayAddBuffHandle> handle = nullptr,
|
||||
std::shared_ptr<a8::Args> init_args = nullptr,
|
||||
std::shared_ptr<std::vector<float>> buff_vars = nullptr
|
||||
);
|
||||
|
@ -352,7 +352,7 @@ static void ProcMissile(Creature* c,
|
||||
} _T;
|
||||
auto context = std::make_shared<_T>();
|
||||
|
||||
DelayAddBuffHandle* handle = new DelayAddBuffHandle;
|
||||
auto handle = std::make_shared<DelayAddBuffHandle>();
|
||||
handle->pre_add_cb =
|
||||
[fly_distance, context] (Creature* c)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user