1
This commit is contained in:
parent
dd487b86d8
commit
122a4274c5
@ -76,14 +76,35 @@ void Buff::InternalTimerAddBuff(Creature* caster)
|
|||||||
a8::XParams param;
|
a8::XParams param;
|
||||||
param.SetSender(this);
|
param.SetSender(this);
|
||||||
param.SetParam1(caster_state);
|
param.SetParam1(caster_state);
|
||||||
param.SetParam2(meta);
|
param.SetParam2(meta->i->buff_param2());
|
||||||
param.SetParam3(caster->CurrentSkill() ? caster->CurrentSkill()->meta : nullptr);
|
param.SetParam3(caster->CurrentSkill() ? caster->CurrentSkill()->meta : nullptr);
|
||||||
|
|
||||||
owner->room->xtimer.AddRepeatTimerAndAttach
|
switch (meta->i->buff_effect() ) {
|
||||||
(
|
case kBET_DelayAddBuff:
|
||||||
meta->param1 / FRAME_RATE_MS,
|
{
|
||||||
param,
|
owner->room->xtimer.AddDeadLineTimerAndAttach
|
||||||
timer_func,
|
(
|
||||||
&xtimer_attacher.timer_list_,
|
meta->param1 * SERVER_FRAME_RATE,
|
||||||
timer_after_func);
|
param,
|
||||||
|
timer_func,
|
||||||
|
&xtimer_attacher.timer_list_,
|
||||||
|
timer_after_func);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case kBET_IntervalAddBuff:
|
||||||
|
{
|
||||||
|
owner->room->xtimer.AddRepeatTimerAndAttach
|
||||||
|
(
|
||||||
|
meta->param1 / FRAME_RATE_MS,
|
||||||
|
param,
|
||||||
|
timer_func,
|
||||||
|
&xtimer_attacher.timer_list_,
|
||||||
|
timer_after_func);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user